@cluesmith/codev 2.0.0-rc.56 → 2.0.0-rc.57
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/dashboard/dist/assets/{index-xOaDIZ0l.js → index-bhDjF0Oa.js} +26 -27
- package/dashboard/dist/assets/index-bhDjF0Oa.js.map +1 -0
- package/dashboard/dist/index.html +1 -1
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +55 -17
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +202 -0
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/package.json +1 -1
- package/skeleton/protocols/bugfix/prompts/pr.md +2 -17
- package/skeleton/protocols/spider/prompts/plan.md +4 -68
- package/skeleton/protocols/spider/prompts/review.md +5 -23
- package/skeleton/protocols/spider/prompts/specify.md +4 -57
- package/dashboard/dist/assets/index-xOaDIZ0l.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){const V=document.createElement("link").relList;if(V&&V.supports&&V.supports("modulepreload"))return;for(const
|
|
1
|
+
(function(){const V=document.createElement("link").relList;if(V&&V.supports&&V.supports("modulepreload"))return;for(const ie of document.querySelectorAll('link[rel="modulepreload"]'))j(ie);new MutationObserver(ie=>{for(const ae of ie)if(ae.type==="childList")for(const q of ae.addedNodes)q.tagName==="LINK"&&q.rel==="modulepreload"&&j(q)}).observe(document,{childList:!0,subtree:!0});function Y(ie){const ae={};return ie.integrity&&(ae.integrity=ie.integrity),ie.referrerPolicy&&(ae.referrerPolicy=ie.referrerPolicy),ie.crossOrigin==="use-credentials"?ae.credentials="include":ie.crossOrigin==="anonymous"?ae.credentials="omit":ae.credentials="same-origin",ae}function j(ie){if(ie.ep)return;ie.ep=!0;const ae=Y(ie);fetch(ie.href,ae)}})();var Lo={exports:{}},$r={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Nf;function pv(){if(Nf)return $r;Nf=1;var U=Symbol.for("react.transitional.element"),V=Symbol.for("react.fragment");function Y(j,ie,ae){var q=null;if(ae!==void 0&&(q=""+ae),ie.key!==void 0&&(q=""+ie.key),"key"in ie){ae={};for(var n in ie)n!=="key"&&(ae[n]=ie[n])}else ae=ie;return ie=ae.ref,{$$typeof:U,type:j,key:q,ref:ie!==void 0?ie:null,props:ae}}return $r.Fragment=V,$r.jsx=Y,$r.jsxs=Y,$r}var Uf;function Sv(){return Uf||(Uf=1,Lo.exports=pv()),Lo.exports}var Z=Sv(),Ao={exports:{}},Ee={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var jf;function
|
|
17
|
+
*/var jf;function yv(){if(jf)return Ee;jf=1;var U=Symbol.for("react.transitional.element"),V=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),ae=Symbol.for("react.consumer"),q=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),l=Symbol.for("react.activity"),m=Symbol.iterator;function y(R){return R===null||typeof R!="object"?null:(R=m&&R[m]||R["@@iterator"],typeof R=="function"?R:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,r={};function h(R,O,$){this.props=R,this.context=O,this.refs=r,this.updater=$||b}h.prototype.isReactComponent={},h.prototype.setState=function(R,O){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,O,"setState")},h.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function o(){}o.prototype=h.prototype;function c(R,O,$){this.props=R,this.context=O,this.refs=r,this.updater=$||b}var g=c.prototype=new o;g.constructor=c,f(g,h.prototype),g.isPureReactComponent=!0;var C=Array.isArray;function S(){}var w={H:null,A:null,T:null,S:null},p=Object.prototype.hasOwnProperty;function E(R,O,$){var Q=$.ref;return{$$typeof:U,type:R,key:O,ref:Q!==void 0?Q:null,props:$}}function L(R,O){return E(R.type,O,R.props)}function T(R){return typeof R=="object"&&R!==null&&R.$$typeof===U}function A(R){var O={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function($){return O[$]})}var M=/\/+/g;function N(R,O){return typeof R=="object"&&R!==null&&R.key!=null?A(""+R.key):O.toString(36)}function X(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(S,S):(R.status="pending",R.then(function(O){R.status==="pending"&&(R.status="fulfilled",R.value=O)},function(O){R.status==="pending"&&(R.status="rejected",R.reason=O)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function z(R,O,$,Q,he){var ue=typeof R;(ue==="undefined"||ue==="boolean")&&(R=null);var F=!1;if(R===null)F=!0;else switch(ue){case"bigint":case"string":case"number":F=!0;break;case"object":switch(R.$$typeof){case U:case V:F=!0;break;case v:return F=R._init,z(F(R._payload),O,$,Q,he)}}if(F)return he=he(R),F=Q===""?"."+N(R,0):Q,C(he)?($="",F!=null&&($=F.replace(M,"$&/")+"/"),z(he,O,$,"",function(se){return se})):he!=null&&(T(he)&&(he=L(he,$+(he.key==null||R&&R.key===he.key?"":(""+he.key).replace(M,"$&/")+"/")+F)),O.push(he)),1;F=0;var k=Q===""?".":Q+":";if(C(R))for(var re=0;re<R.length;re++)Q=R[re],ue=k+N(Q,re),F+=z(Q,O,$,ue,he);else if(re=y(R),typeof re=="function")for(R=re.call(R),re=0;!(Q=R.next()).done;)Q=Q.value,ue=k+N(Q,re++),F+=z(Q,O,$,ue,he);else if(ue==="object"){if(typeof R.then=="function")return z(X(R),O,$,Q,he);throw O=String(R),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return F}function I(R,O,$){if(R==null)return R;var Q=[],he=0;return z(R,Q,"","",function(ue){return O.call($,ue,he++)}),Q}function G(R){if(R._status===-1){var O=R._result;O=O(),O.then(function($){(R._status===0||R._status===-1)&&(R._status=1,R._result=$)},function($){(R._status===0||R._status===-1)&&(R._status=2,R._result=$)}),R._status===-1&&(R._status=0,R._result=O)}if(R._status===1)return R._result.default;throw R._result}var D=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},H={map:I,forEach:function(R,O,$){I(R,function(){O.apply(this,arguments)},$)},count:function(R){var O=0;return I(R,function(){O++}),O},toArray:function(R){return I(R,function(O){return O})||[]},only:function(R){if(!T(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Ee.Activity=l,Ee.Children=H,Ee.Component=h,Ee.Fragment=Y,Ee.Profiler=ie,Ee.PureComponent=c,Ee.StrictMode=j,Ee.Suspense=d,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(R){return w.H.useMemoCache(R)}},Ee.cache=function(R){return function(){return R.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(R,O,$){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var Q=f({},R.props),he=R.key;if(O!=null)for(ue in O.key!==void 0&&(he=""+O.key),O)!p.call(O,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&O.ref===void 0||(Q[ue]=O[ue]);var ue=arguments.length-2;if(ue===1)Q.children=$;else if(1<ue){for(var F=Array(ue),k=0;k<ue;k++)F[k]=arguments[k+2];Q.children=F}return E(R.type,he,Q)},Ee.createContext=function(R){return R={$$typeof:q,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:ae,_context:R},R},Ee.createElement=function(R,O,$){var Q,he={},ue=null;if(O!=null)for(Q in O.key!==void 0&&(ue=""+O.key),O)p.call(O,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(he[Q]=O[Q]);var F=arguments.length-2;if(F===1)he.children=$;else if(1<F){for(var k=Array(F),re=0;re<F;re++)k[re]=arguments[re+2];he.children=k}if(R&&R.defaultProps)for(Q in F=R.defaultProps,F)he[Q]===void 0&&(he[Q]=F[Q]);return E(R,ue,he)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(R){return{$$typeof:n,render:R}},Ee.isValidElement=T,Ee.lazy=function(R){return{$$typeof:v,_payload:{_status:-1,_result:R},_init:G}},Ee.memo=function(R,O){return{$$typeof:_,type:R,compare:O===void 0?null:O}},Ee.startTransition=function(R){var O=w.T,$={};w.T=$;try{var Q=R(),he=w.S;he!==null&&he($,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(S,D)}catch(ue){D(ue)}finally{O!==null&&$.types!==null&&(O.types=$.types),w.T=O}},Ee.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},Ee.use=function(R){return w.H.use(R)},Ee.useActionState=function(R,O,$){return w.H.useActionState(R,O,$)},Ee.useCallback=function(R,O){return w.H.useCallback(R,O)},Ee.useContext=function(R){return w.H.useContext(R)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(R,O){return w.H.useDeferredValue(R,O)},Ee.useEffect=function(R,O){return w.H.useEffect(R,O)},Ee.useEffectEvent=function(R){return w.H.useEffectEvent(R)},Ee.useId=function(){return w.H.useId()},Ee.useImperativeHandle=function(R,O,$){return w.H.useImperativeHandle(R,O,$)},Ee.useInsertionEffect=function(R,O){return w.H.useInsertionEffect(R,O)},Ee.useLayoutEffect=function(R,O){return w.H.useLayoutEffect(R,O)},Ee.useMemo=function(R,O){return w.H.useMemo(R,O)},Ee.useOptimistic=function(R,O){return w.H.useOptimistic(R,O)},Ee.useReducer=function(R,O,$){return w.H.useReducer(R,O,$)},Ee.useRef=function(R){return w.H.useRef(R)},Ee.useState=function(R){return w.H.useState(R)},Ee.useSyncExternalStore=function(R,O,$){return w.H.useSyncExternalStore(R,O,$)},Ee.useTransition=function(){return w.H.useTransition()},Ee.version="19.2.4",Ee}var If;function jo(){return If||(If=1,Ao.exports=yv()),Ao.exports}var Ce=jo(),Ro={exports:{}},Xr={},Do={exports:{}},Mo={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Ff;function
|
|
25
|
+
*/var Ff;function bv(){return Ff||(Ff=1,(function(U){function V(z,I){var G=z.length;z.push(I);e:for(;0<G;){var D=G-1>>>1,H=z[D];if(0<ie(H,I))z[D]=I,z[G]=H,G=D;else break e}}function Y(z){return z.length===0?null:z[0]}function j(z){if(z.length===0)return null;var I=z[0],G=z.pop();if(G!==I){z[0]=G;e:for(var D=0,H=z.length,R=H>>>1;D<R;){var O=2*(D+1)-1,$=z[O],Q=O+1,he=z[Q];if(0>ie($,G))Q<H&&0>ie(he,$)?(z[D]=he,z[Q]=G,D=Q):(z[D]=$,z[O]=G,D=O);else if(Q<H&&0>ie(he,G))z[D]=he,z[Q]=G,D=Q;else break e}}return I}function ie(z,I){var G=z.sortIndex-I.sortIndex;return G!==0?G:z.id-I.id}if(U.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ae=performance;U.unstable_now=function(){return ae.now()}}else{var q=Date,n=q.now();U.unstable_now=function(){return q.now()-n}}var d=[],_=[],v=1,l=null,m=3,y=!1,b=!1,f=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;function g(z){for(var I=Y(_);I!==null;){if(I.callback===null)j(_);else if(I.startTime<=z)j(_),I.sortIndex=I.expirationTime,V(d,I);else break;I=Y(_)}}function C(z){if(f=!1,g(z),!b)if(Y(d)!==null)b=!0,S||(S=!0,A());else{var I=Y(_);I!==null&&X(C,I.startTime-z)}}var S=!1,w=-1,p=5,E=-1;function L(){return r?!0:!(U.unstable_now()-E<p)}function T(){if(r=!1,S){var z=U.unstable_now();E=z;var I=!0;try{e:{b=!1,f&&(f=!1,o(w),w=-1),y=!0;var G=m;try{t:{for(g(z),l=Y(d);l!==null&&!(l.expirationTime>z&&L());){var D=l.callback;if(typeof D=="function"){l.callback=null,m=l.priorityLevel;var H=D(l.expirationTime<=z);if(z=U.unstable_now(),typeof H=="function"){l.callback=H,g(z),I=!0;break t}l===Y(d)&&j(d),g(z)}else j(d);l=Y(d)}if(l!==null)I=!0;else{var R=Y(_);R!==null&&X(C,R.startTime-z),I=!1}}break e}finally{l=null,m=G,y=!1}I=void 0}}finally{I?A():S=!1}}}var A;if(typeof c=="function")A=function(){c(T)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,N=M.port2;M.port1.onmessage=T,A=function(){N.postMessage(null)}}else A=function(){h(T,0)};function X(z,I){w=h(function(){z(U.unstable_now())},I)}U.unstable_IdlePriority=5,U.unstable_ImmediatePriority=1,U.unstable_LowPriority=4,U.unstable_NormalPriority=3,U.unstable_Profiling=null,U.unstable_UserBlockingPriority=2,U.unstable_cancelCallback=function(z){z.callback=null},U.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):p=0<z?Math.floor(1e3/z):5},U.unstable_getCurrentPriorityLevel=function(){return m},U.unstable_next=function(z){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var G=m;m=I;try{return z()}finally{m=G}},U.unstable_requestPaint=function(){r=!0},U.unstable_runWithPriority=function(z,I){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var G=m;m=z;try{return I()}finally{m=G}},U.unstable_scheduleCallback=function(z,I,G){var D=U.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?D+G:D):G=D,z){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=G+H,z={id:v++,callback:I,priorityLevel:z,startTime:G,expirationTime:H,sortIndex:-1},G>D?(z.sortIndex=G,V(_,z),Y(d)===null&&z===Y(_)&&(f?(o(w),w=-1):f=!0,X(C,G-D))):(z.sortIndex=H,V(d,z),b||y||(b=!0,S||(S=!0,A()))),z},U.unstable_shouldYield=L,U.unstable_wrapCallback=function(z){var I=m;return function(){var G=m;m=I;try{return z.apply(this,arguments)}finally{m=G}}}})(Mo)),Mo}var Pf;function Cv(){return Pf||(Pf=1,Do.exports=bv()),Do.exports}var To={exports:{}},St={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var qf;function
|
|
33
|
+
*/var qf;function wv(){if(qf)return St;qf=1;var U=jo();function V(d){var _="https://react.dev/errors/"+d;if(1<arguments.length){_+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)_+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+d+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Y(){}var j={d:{f:Y,r:function(){throw Error(V(522))},D:Y,C:Y,L:Y,m:Y,X:Y,S:Y,M:Y},p:0,findDOMNode:null},ie=Symbol.for("react.portal");function ae(d,_,v){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ie,key:l==null?null:""+l,children:d,containerInfo:_,implementation:v}}var q=U.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function n(d,_){if(d==="font")return"";if(typeof _=="string")return _==="use-credentials"?_:""}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,St.createPortal=function(d,_){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_||_.nodeType!==1&&_.nodeType!==9&&_.nodeType!==11)throw Error(V(299));return ae(d,_,null,v)},St.flushSync=function(d){var _=q.T,v=j.p;try{if(q.T=null,j.p=2,d)return d()}finally{q.T=_,j.p=v,j.d.f()}},St.preconnect=function(d,_){typeof d=="string"&&(_?(_=_.crossOrigin,_=typeof _=="string"?_==="use-credentials"?_:"":void 0):_=null,j.d.C(d,_))},St.prefetchDNS=function(d){typeof d=="string"&&j.d.D(d)},St.preinit=function(d,_){if(typeof d=="string"&&_&&typeof _.as=="string"){var v=_.as,l=n(v,_.crossOrigin),m=typeof _.integrity=="string"?_.integrity:void 0,y=typeof _.fetchPriority=="string"?_.fetchPriority:void 0;v==="style"?j.d.S(d,typeof _.precedence=="string"?_.precedence:void 0,{crossOrigin:l,integrity:m,fetchPriority:y}):v==="script"&&j.d.X(d,{crossOrigin:l,integrity:m,fetchPriority:y,nonce:typeof _.nonce=="string"?_.nonce:void 0})}},St.preinitModule=function(d,_){if(typeof d=="string")if(typeof _=="object"&&_!==null){if(_.as==null||_.as==="script"){var v=n(_.as,_.crossOrigin);j.d.M(d,{crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0})}}else _==null&&j.d.M(d)},St.preload=function(d,_){if(typeof d=="string"&&typeof _=="object"&&_!==null&&typeof _.as=="string"){var v=_.as,l=n(v,_.crossOrigin);j.d.L(d,v,{crossOrigin:l,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0,type:typeof _.type=="string"?_.type:void 0,fetchPriority:typeof _.fetchPriority=="string"?_.fetchPriority:void 0,referrerPolicy:typeof _.referrerPolicy=="string"?_.referrerPolicy:void 0,imageSrcSet:typeof _.imageSrcSet=="string"?_.imageSrcSet:void 0,imageSizes:typeof _.imageSizes=="string"?_.imageSizes:void 0,media:typeof _.media=="string"?_.media:void 0})}},St.preloadModule=function(d,_){if(typeof d=="string")if(_){var v=n(_.as,_.crossOrigin);j.d.m(d,{as:typeof _.as=="string"&&_.as!=="script"?_.as:void 0,crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0})}else j.d.m(d)},St.requestFormReset=function(d){j.d.r(d)},St.unstable_batchedUpdates=function(d,_){return d(_)},St.useFormState=function(d,_,v){return q.H.useFormState(d,_,v)},St.useFormStatus=function(){return q.H.useHostTransitionStatus()},St.version="19.2.4",St}var Gf;function Ev(){if(Gf)return To.exports;Gf=1;function U(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(U)}catch(V){console.error(V)}}return U(),To.exports=wv(),To.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,23 +38,23 @@
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Wf;function
|
|
41
|
+
*/var Wf;function xv(){if(Wf)return Xr;Wf=1;var U=Cv(),V=jo(),Y=Ev();function j(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 ie(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ae(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 q(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 d(e){if(ae(e)!==e)throw Error(j(188))}function _(e){var t=e.alternate;if(!t){if(t=ae(e),t===null)throw Error(j(188));return t!==e?null:e}for(var i=e,s=t;;){var a=i.return;if(a===null)break;var u=a.alternate;if(u===null){if(s=a.return,s!==null){i=s;continue}break}if(a.child===u.child){for(u=a.child;u;){if(u===i)return d(a),e;if(u===s)return d(a),t;u=u.sibling}throw Error(j(188))}if(i.return!==s.return)i=a,s=u;else{for(var x=!1,B=a.child;B;){if(B===i){x=!0,i=a,s=u;break}if(B===s){x=!0,s=a,i=u;break}B=B.sibling}if(!x){for(B=u.child;B;){if(B===i){x=!0,i=u,s=a;break}if(B===s){x=!0,s=u,i=a;break}B=B.sibling}if(!x)throw Error(j(189))}}if(i.alternate!==s)throw Error(j(190))}if(i.tag!==3)throw Error(j(188));return i.stateNode.current===i?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var l=Object.assign,m=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),T=Symbol.iterator;function A(e){return e===null||typeof e!="object"?null:(e=T&&e[T]||e["@@iterator"],typeof e=="function"?e:null)}var M=Symbol.for("react.client.reference");function N(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case f:return"Fragment";case h:return"Profiler";case r:return"StrictMode";case C:return"Suspense";case S:return"SuspenseList";case E:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case c:return e.displayName||"Context";case o:return(e._context.displayName||"Context")+".Consumer";case g:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w:return t=e.displayName||null,t!==null?t:N(e.type)||"Memo";case p:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var X=Array.isArray,z=V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Y.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},D=[],H=-1;function R(e){return{current:e}}function O(e){0>H||(e.current=D[H],D[H]=null,H--)}function $(e,t){H++,D[H]=e.current,e.current=t}var Q=R(null),he=R(null),ue=R(null),F=R(null);function k(e,t){switch($(ue,t),$(he,e),$(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?af(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=af(t),e=lf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(Q),$(Q,e)}function re(){O(Q),O(he),O(ue)}function se(e){e.memoizedState!==null&&$(F,e);var t=Q.current,i=lf(t,e.type);t!==i&&($(he,e),$(Q,i))}function de(e){he.current===e&&(O(Q),O(he)),F.current===e&&(O(F),Pr._currentValue=G)}var fe,we;function me(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",we=-1<i.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+fe+e+we}var
|
|
43
|
+
`+fe+e+we}var ze=!1;function Ke(e,t){if(!e||ze)return"";ze=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ne){var te=ne}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(ne){te=ne}e.call(ce.prototype)}}else{try{throw Error()}catch(ne){te=ne}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ne){if(ne&&te&&typeof ne.stack=="string")return[ne.stack,te.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),x=u[0],B=u[1];if(x&&B){var P=x.split(`
|
|
44
44
|
`),ee=B.split(`
|
|
45
|
-
`);for(a=s=0;s<
|
|
46
|
-
`+
|
|
45
|
+
`);for(a=s=0;s<P.length&&!P[s].includes("DetermineComponentFrameRoot");)s++;for(;a<ee.length&&!ee[a].includes("DetermineComponentFrameRoot");)a++;if(s===P.length||a===ee.length)for(s=P.length-1,a=ee.length-1;1<=s&&0<=a&&P[s]!==ee[a];)a--;for(;1<=s&&0<=a;s--,a--)if(P[s]!==ee[a]){if(s!==1||a!==1)do if(s--,a--,0>a||P[s]!==ee[a]){var le=`
|
|
46
|
+
`+P[s].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=s&&0<=a);break}}}finally{ze=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?me(i):""}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me("Lazy");case 13:return e.child!==t&&t!==null?me("Suspense Fallback"):me("Suspense");case 19:return me("SuspenseList");case 0:case 15:return Ke(e.type,!1);case 11:return Ke(e.type.render,!1);case 1:return Ke(e.type,!0);case 31:return me("Activity");default:return""}}function Dt(e){try{var t="",i=null;do t+=Se(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
47
|
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var Jt=Object.prototype.hasOwnProperty,Be=U.unstable_scheduleCallback,Ae=U.unstable_cancelCallback,De=U.unstable_shouldYield,_e=U.unstable_requestPaint,Ce=U.unstable_now,Qe=U.unstable_getCurrentPriorityLevel,Pe=U.unstable_ImmediatePriority,Ut=U.unstable_UserBlockingPriority,ot=U.unstable_NormalPriority,bt=U.unstable_LowPriority,Je=U.unstable_IdlePriority,qe=U.log,Re=U.unstable_setDisableYieldValue,Vt=null,ht=null;function Mt(e){if(typeof qe=="function"&&Re(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Vt,e)}catch{}}var pt=Math.clz32?Math.clz32:fa,vs=Math.log,ua=Math.LN2;function fa(e){return e>>>=0,e===0?32:31-(vs(e)/ua|0)|0}var xi=256,Ki=262144,Qi=4194304;function ni(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 Yr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var a=0,u=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var B=s&134217727;return B!==0?(s=B&~u,s!==0?a=ni(s):(x&=B,x!==0?a=ni(x):i||(i=B&~e,i!==0&&(a=ni(i))))):(B=s&~u,B!==0?a=ni(B):x!==0?a=ni(x):i||(i=s&~e,i!==0&&(a=ni(i)))),a===0?0:t!==0&&t!==a&&(t&u)===0&&(u=a&-a,i=t&-t,u>=i||u===32&&(i&4194048)!==0)?t:a}function tr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ad(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 Io(){var e=Qi;return Qi<<=1,(Qi&62914560)===0&&(Qi=4194304),e}function da(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ir(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ld(e,t,i,s,a,u){var x=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 B=e.entanglements,q=e.expirationTimes,ee=e.hiddenUpdates;for(i=x&~i;0<i;){var le=31-pt(i),ce=1<<le;B[le]=0,q[le]=-1;var ie=ee[le];if(ie!==null)for(ee[le]=null,le=0;le<ie.length;le++){var ae=ie[le];ae!==null&&(ae.lane&=-536870913)}i&=~ce}s!==0&&Fo(e,s,0),u!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=u&~(x&~t))}function Fo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-pt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Po(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-pt(i),a=1<<s;a&t|e[s]&t&&(e[s]|=t),i&=~a}}function qo(e,t){var i=t&-t;return i=(i&42)!==0?1:_a(i),(i&(e.suspendedLanes|t))!==0?0:i}function _a(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 va(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Go(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Mf(e.type))}function Wo(e,t){var i=I.p;try{return I.p=e,t()}finally{I.p=i}}var Li=Math.random().toString(36).slice(2),dt="__reactFiber$"+Li,Ct="__reactProps$"+Li,gs="__reactContainer$"+Li,ga="__reactEvents$"+Li,od="__reactListeners$"+Li,cd="__reactHandles$"+Li,$o="__reactResources$"+Li,sr="__reactMarker$"+Li;function ma(e){delete e[dt],delete e[Ct],delete e[ga],delete e[od],delete e[cd]}function ms(e){var t=e[dt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[gs]||i[dt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=_f(e);e!==null;){if(i=e[dt])return i;e=_f(e)}return t}e=i,i=e.parentNode}return null}function ps(e){if(e=e[dt]||e[gs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(j(33))}function Ss(e){var t=e[$o];return t||(t=e[$o]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[sr]=!0}var Xo=new Set,Yo={};function Zi(e,t){ys(e,t),ys(e+"Capture",t)}function ys(e,t){for(Yo[e]=t,e=0;e<t.length;e++)Xo.add(t[e])}var hd=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]*$"),Vo={},Ko={};function ud(e){return Jt.call(Ko,e)?!0:Jt.call(Vo,e)?!1:hd.test(e)?Ko[e]=!0:(Vo[e]=!0,!1)}function Vr(e,t,i){if(ud(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 Kr(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 ai(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fd(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 a=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(x){i=""+x,u.call(this,x)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pa(e){if(!e._valueTracker){var t=Qo(e)?"checked":"value";e._valueTracker=fd(e,t,""+e[t])}}function Zo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Qo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Qr(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 dd=/[\n"\\]/g;function It(e){return e.replace(dd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Sa(e,t,i,s,a,u,x,B){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?ya(e,x,jt(t)):i!=null?ya(e,x,jt(i)):s!=null&&e.removeAttribute("value"),a==null&&u!=null&&(e.defaultChecked=!!u),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?e.name=""+jt(B):e.removeAttribute("name")}function Jo(e,t,i,s,a,u,x,B){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||i!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){pa(e);return}i=i!=null?""+jt(i):"",t=t!=null?""+jt(t):i,B||t===e.value||(e.value=t),e.defaultValue=t}s=s??a,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=B?e.checked:!!s,e.defaultChecked=!!s,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),pa(e)}function ya(e,t,i){t==="number"&&Qr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function bs(e,t,i,s){if(e=e.options,t){t={};for(var a=0;a<i.length;a++)t["$"+i[a]]=!0;for(i=0;i<e.length;i++)a=t.hasOwnProperty("$"+e[i].value),e[i].selected!==a&&(e[i].selected=a),a&&s&&(e[i].defaultSelected=!0)}else{for(i=""+jt(i),t=null,a=0;a<e.length;a++){if(e[a].value===i){e[a].selected=!0,s&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function ec(e,t,i){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+jt(i):""}function tc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(j(92));if(Y(s)){if(1<s.length)throw Error(j(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=jt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),pa(e)}function Cs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var _d=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 ic(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||_d.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function sc(e,t,i){if(t!=null&&typeof t!="object")throw Error(j(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 a in t)s=t[a],t.hasOwnProperty(a)&&i[a]!==s&&ic(e,a,s)}else for(var u in t)t.hasOwnProperty(u)&&ic(e,u,t[u])}function ba(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 vd=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"]]),gd=/^[\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 Zr(e){return gd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function li(){}var Ca=null;function wa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ws=null,Es=null;function rc(e){var t=ps(e);if(t&&(e=t.stateNode)){var i=e[Ct]||null;e:switch(e=t.stateNode,t.type){case"input":if(Sa(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="'+It(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var a=s[Ct]||null;if(!a)throw Error(j(90));Sa(s,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Zo(s)}break e;case"textarea":ec(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&bs(e,!!i.multiple,t,!1)}}}var Ea=!1;function nc(e,t,i){if(Ea)return e(t,i);Ea=!0;try{var s=e(t);return s}finally{if(Ea=!1,(ws!==null||Es!==null)&&(In(),ws&&(t=ws,e=Es,Es=ws=null,rc(t),e)))for(t=0;t<e.length;t++)rc(e[t])}}function nr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Ct]||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(j(231,t,typeof i));return i}var oi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xa=!1;if(oi)try{var ar={};Object.defineProperty(ar,"passive",{get:function(){xa=!0}}),window.addEventListener("test",ar,ar),window.removeEventListener("test",ar,ar)}catch{xa=!1}var Ai=null,La=null,Jr=null;function ac(){if(Jr)return Jr;var e,t=La,i=t.length,s,a="value"in Ai?Ai.value:Ai.textContent,u=a.length;for(e=0;e<i&&t[e]===a[e];e++);var x=i-e;for(s=1;s<=x&&t[i-s]===a[u-s];s++);return Jr=a.slice(e,1<s?1-s:void 0)}function en(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 tn(){return!0}function lc(){return!1}function wt(e){function t(i,s,a,u,x){this._reactName=i,this._targetInst=a,this.type=s,this.nativeEvent=u,this.target=x,this.currentTarget=null;for(var B in e)e.hasOwnProperty(B)&&(i=e[B],this[B]=i?i(u):u[B]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?tn:lc,this.isPropagationStopped=lc,this}return o(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=tn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=tn)},persist:function(){},isPersistent:tn}),t}var Ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sn=wt(Ji),lr=o({},Ji,{view:0,detail:0}),md=wt(lr),Aa,Ra,or,rn=o({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ma,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==or&&(or&&e.type==="mousemove"?(Aa=e.screenX-or.screenX,Ra=e.screenY-or.screenY):Ra=Aa=0,or=e),Aa)},movementY:function(e){return"movementY"in e?e.movementY:Ra}}),oc=wt(rn),pd=o({},rn,{dataTransfer:0}),Sd=wt(pd),yd=o({},lr,{relatedTarget:0}),Da=wt(yd),bd=o({},Ji,{animationName:0,elapsedTime:0,pseudoElement:0}),Cd=wt(bd),wd=o({},Ji,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ed=wt(wd),xd=o({},Ji,{data:0}),cc=wt(xd),Ld={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ad={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"},Rd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rd[e])?!!t[e]:!1}function Ma(){return Dd}var Md=o({},lr,{key:function(e){if(e.key){var t=Ld[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=en(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ad[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ma,charCode:function(e){return e.type==="keypress"?en(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?en(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Td=wt(Md),Bd=o({},rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hc=wt(Bd),Od=o({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ma}),kd=wt(Od),Hd=o({},Ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),Nd=wt(Hd),zd=o({},rn,{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}),Ud=wt(zd),jd=o({},Ji,{newState:0,oldState:0}),Id=wt(jd),Fd=[9,13,27,32],Ta=oi&&"CompositionEvent"in window,cr=null;oi&&"documentMode"in document&&(cr=document.documentMode);var Pd=oi&&"TextEvent"in window&&!cr,uc=oi&&(!Ta||cr&&8<cr&&11>=cr),fc=" ",dc=!1;function _c(e,t){switch(e){case"keyup":return Fd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function qd(e,t){switch(e){case"compositionend":return vc(t);case"keypress":return t.which!==32?null:(dc=!0,fc);case"textInput":return e=t.data,e===fc&&dc?null:e;default:return null}}function Gd(e,t){if(xs)return e==="compositionend"||!Ta&&_c(e,t)?(e=ac(),Jr=La=Ai=null,xs=!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 uc&&t.locale!=="ko"?null:t.data;default:return null}}var Wd={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 gc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Wd[e.type]:t==="textarea"}function mc(e,t,i,s){ws?Es?Es.push(s):Es=[s]:ws=s,t=Xn(t,"onChange"),0<t.length&&(i=new sn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var hr=null,ur=null;function $d(e){Ju(e,0)}function nn(e){var t=rr(e);if(Zo(t))return e}function pc(e,t){if(e==="change")return t}var Sc=!1;if(oi){var Ba;if(oi){var Oa="oninput"in document;if(!Oa){var yc=document.createElement("div");yc.setAttribute("oninput","return;"),Oa=typeof yc.oninput=="function"}Ba=Oa}else Ba=!1;Sc=Ba&&(!document.documentMode||9<document.documentMode)}function bc(){hr&&(hr.detachEvent("onpropertychange",Cc),ur=hr=null)}function Cc(e){if(e.propertyName==="value"&&nn(ur)){var t=[];mc(t,ur,e,wa(e)),nc($d,t)}}function Xd(e,t,i){e==="focusin"?(bc(),hr=t,ur=i,hr.attachEvent("onpropertychange",Cc)):e==="focusout"&&bc()}function Yd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nn(ur)}function Vd(e,t){if(e==="click")return nn(t)}function Kd(e,t){if(e==="input"||e==="change")return nn(t)}function Qd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:Qd;function fr(e,t){if(Tt(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 a=i[s];if(!Jt.call(t,a)||!Tt(e[a],t[a]))return!1}return!0}function wc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ec(e,t){var i=wc(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=wc(i)}}function xc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qr(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=Qr(e.document)}return t}function ka(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 Zd=oi&&"documentMode"in document&&11>=document.documentMode,Ls=null,Ha=null,dr=null,Na=!1;function Ac(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Na||Ls==null||Ls!==Qr(s)||(s=Ls,"selectionStart"in s&&ka(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}),dr&&fr(dr,s)||(dr=s,s=Xn(Ha,"onSelect"),0<s.length&&(t=new sn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Ls)))}function es(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var As={animationend:es("Animation","AnimationEnd"),animationiteration:es("Animation","AnimationIteration"),animationstart:es("Animation","AnimationStart"),transitionrun:es("Transition","TransitionRun"),transitionstart:es("Transition","TransitionStart"),transitioncancel:es("Transition","TransitionCancel"),transitionend:es("Transition","TransitionEnd")},za={},Rc={};oi&&(Rc=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function ts(e){if(za[e])return za[e];if(!As[e])return e;var t=As[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Rc)return za[e]=t[i];return e}var Dc=ts("animationend"),Mc=ts("animationiteration"),Tc=ts("animationstart"),Jd=ts("transitionrun"),e_=ts("transitionstart"),t_=ts("transitioncancel"),Bc=ts("transitionend"),Oc=new Map,Ua="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(" ");Ua.push("scrollEnd");function Kt(e,t){Oc.set(e,t),Zi(t,[e])}var an=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)},Ft=[],Rs=0,ja=0;function ln(){for(var e=Rs,t=ja=Rs=0;t<e;){var i=Ft[t];Ft[t++]=null;var s=Ft[t];Ft[t++]=null;var a=Ft[t];Ft[t++]=null;var u=Ft[t];if(Ft[t++]=null,s!==null&&a!==null){var x=s.pending;x===null?a.next=a:(a.next=x.next,x.next=a),s.pending=a}u!==0&&kc(i,a,u)}}function on(e,t,i,s){Ft[Rs++]=e,Ft[Rs++]=t,Ft[Rs++]=i,Ft[Rs++]=s,ja|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Ia(e,t,i,s){return on(e,t,i,s),cn(e)}function is(e,t){return on(e,null,null,t),cn(e)}function kc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var a=!1,u=e.return;u!==null;)u.childLanes|=i,s=u.alternate,s!==null&&(s.childLanes|=i),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(a=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,a&&t!==null&&(a=31-pt(i),e=u.hiddenUpdates,s=e[a],s===null?e[a]=[t]:s.push(t),t.lane=i|536870912),u):null}function cn(e){if(50<Hr)throw Hr=0,Vl=null,Error(j(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ds={};function i_(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 Bt(e,t,i,s){return new i_(e,t,i,s)}function Fa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var i=e.alternate;return i===null?(i=Bt(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 Hc(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 hn(e,t,i,s,a,u){var x=0;if(s=e,typeof e=="function")Fa(e)&&(x=1);else if(typeof e=="string")x=lv(e,i,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case E:return e=Bt(31,i,t,a),e.elementType=E,e.lanes=u,e;case f:return ss(i.children,a,u,t);case r:x=8,a|=24;break;case h:return e=Bt(12,i,t,a|2),e.elementType=h,e.lanes=u,e;case C:return e=Bt(13,i,t,a),e.elementType=C,e.lanes=u,e;case S:return e=Bt(19,i,t,a),e.elementType=S,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c:x=10;break e;case l:x=9;break e;case g:x=11;break e;case w:x=14;break e;case p:x=16,s=null;break e}x=29,i=Error(j(130,e===null?"null":typeof e,"")),s=null}return t=Bt(x,i,t,a),t.elementType=e,t.type=s,t.lanes=u,t}function ss(e,t,i,s){return e=Bt(7,e,s,t),e.lanes=i,e}function Pa(e,t,i){return e=Bt(6,e,null,t),e.lanes=i,e}function Nc(e){var t=Bt(18,null,null,0);return t.stateNode=e,t}function qa(e,t,i){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zc=new WeakMap;function Pt(e,t){if(typeof e=="object"&&e!==null){var i=zc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Dt(t)},zc.set(e,t),t)}return{value:e,source:t,stack:Dt(t)}}var Ms=[],Ts=0,un=null,_r=0,qt=[],Gt=0,Ri=null,ei=1,ti="";function hi(e,t){Ms[Ts++]=_r,Ms[Ts++]=un,un=e,_r=t}function Uc(e,t,i){qt[Gt++]=ei,qt[Gt++]=ti,qt[Gt++]=Ri,Ri=e;var s=ei;e=ti;var a=32-pt(s)-1;s&=~(1<<a),i+=1;var u=32-pt(t)+a;if(30<u){var x=a-a%5;u=(s&(1<<x)-1).toString(32),s>>=x,a-=x,ei=1<<32-pt(t)+a|i<<a|s,ti=u+e}else ei=1<<u|i<<a|s,ti=e}function Ga(e){e.return!==null&&(hi(e,1),Uc(e,1,0))}function Wa(e){for(;e===un;)un=Ms[--Ts],Ms[Ts]=null,_r=Ms[--Ts],Ms[Ts]=null;for(;e===Ri;)Ri=qt[--Gt],qt[Gt]=null,ti=qt[--Gt],qt[Gt]=null,ei=qt[--Gt],qt[Gt]=null}function jc(e,t){qt[Gt++]=ei,qt[Gt++]=ti,qt[Gt++]=Ri,ei=t.id,ti=t.overflow,Ri=e}var _t=null,Ye=null,He=!1,Di=null,Wt=!1,$a=Error(j(519));function Mi(e){var t=Error(j(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vr(Pt(t,e)),$a}function Ic(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[dt]=e,t[Ct]=s,i){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(i=0;i<zr.length;i++)Te(zr[i],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),Jo(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),tc(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||rf(t.textContent,i)?(s.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),s.onScroll!=null&&Te("scroll",t),s.onScrollEnd!=null&&Te("scrollend",t),s.onClick!=null&&(t.onclick=li),t=!0):t=!1,t||Mi(e,!0)}function Fc(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:_t=_t.return}}function Bs(e){if(e!==_t)return!1;if(!He)return Fc(e),He=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||ho(e.type,e.memoizedProps)),i=!i),i&&Ye&&Mi(e),Fc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ye=df(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ye=df(e)}else t===27?(t=Ye,Gi(e.type)?(e=go,go=null,Ye=e):Ye=t):Ye=_t?Xt(e.stateNode.nextSibling):null;return!0}function rs(){Ye=_t=null,He=!1}function Xa(){var e=Di;return e!==null&&(At===null?At=e:At.push.apply(At,e),Di=null),e}function vr(e){Di===null?Di=[e]:Di.push(e)}var Ya=R(null),ns=null,ui=null;function Ti(e,t,i){X(Ya,t._currentValue),t._currentValue=i}function fi(e){e._currentValue=Ya.current,O(Ya)}function Va(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 Ka(e,t,i,s){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var u=a.dependencies;if(u!==null){var x=a.child;u=u.firstContext;e:for(;u!==null;){var B=u;u=a;for(var q=0;q<t.length;q++)if(B.context===t[q]){u.lanes|=i,B=u.alternate,B!==null&&(B.lanes|=i),Va(u.return,i,e),s||(x=null);break e}u=B.next}}else if(a.tag===18){if(x=a.return,x===null)throw Error(j(341));x.lanes|=i,u=x.alternate,u!==null&&(u.lanes|=i),Va(x,i,e),x=null}else x=a.child;if(x!==null)x.return=a;else for(x=a;x!==null;){if(x===e){x=null;break}if(a=x.sibling,a!==null){a.return=x.return,x=a;break}x=x.return}a=x}}function Os(e,t,i,s){e=null;for(var a=t,u=!1;a!==null;){if(!u){if((a.flags&524288)!==0)u=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var x=a.alternate;if(x===null)throw Error(j(387));if(x=x.memoizedProps,x!==null){var B=a.type;Tt(a.pendingProps.value,x.value)||(e!==null?e.push(B):e=[B])}}else if(a===F.current){if(x=a.alternate,x===null)throw Error(j(387));x.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Pr):e=[Pr])}a=a.return}e!==null&&Ka(t,e,i,s),t.flags|=262144}function fn(e){for(e=e.firstContext;e!==null;){if(!Tt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function as(e){ns=e,ui=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return Pc(ns,e)}function dn(e,t){return ns===null&&as(e),Pc(e,t)}function Pc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ui===null){if(e===null)throw Error(j(308));ui=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ui=ui.next=t;return i}var s_=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()})}},r_=U.unstable_scheduleCallback,n_=U.unstable_NormalPriority,rt={$$typeof:c,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qa(){return{controller:new s_,data:new Map,refCount:0}}function gr(e){e.refCount--,e.refCount===0&&r_(n_,function(){e.controller.abort()})}var mr=null,Za=0,ks=0,Hs=null;function a_(e,t){if(mr===null){var i=mr=[];Za=0,ks=to(),Hs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Za++,t.then(qc,qc),t}function qc(){if(--Za===0&&mr!==null){Hs!==null&&(Hs.status="fulfilled");var e=mr;mr=null,ks=0,Hs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function l_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(a){i.push(a)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var a=0;a<i.length;a++)(0,i[a])(t)},function(a){for(s.status="rejected",s.reason=a,a=0;a<i.length;a++)(0,i[a])(void 0)}),s}var Gc=N.S;N.S=function(e,t){Au=Ce(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&a_(e,t),Gc!==null&&Gc(e,t)};var ls=R(null);function Ja(){var e=ls.current;return e!==null?e:Xe.pooledCache}function _n(e,t){t===null?X(ls,ls.current):X(ls,t.pool)}function Wc(){var e=Ja();return e===null?null:{parent:rt._currentValue,pool:e}}var Ns=Error(j(460)),el=Error(j(474)),vn=Error(j(542)),gn={then:function(){}};function $c(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(li,li),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Vc(e),e;default:if(typeof t.status=="string")t.then(li,li);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(j(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=s}},function(s){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Vc(e),e}throw cs=t,Ns}}function os(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(cs=i,Ns):i}}var cs=null;function Yc(){if(cs===null)throw Error(j(459));var e=cs;return cs=null,e}function Vc(e){if(e===Ns||e===vn)throw Error(j(483))}var zs=null,pr=0;function mn(e){var t=pr;return pr+=1,zs===null&&(zs=[]),Xc(zs,e,t)}function Sr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function pn(e,t){throw t.$$typeof===m?Error(j(525)):(e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kc(e){function t(Q,W){if(e){var J=Q.deletions;J===null?(Q.deletions=[W],Q.flags|=16):J.push(W)}}function i(Q,W){if(!e)return null;for(;W!==null;)t(Q,W),W=W.sibling;return null}function s(Q){for(var W=new Map;Q!==null;)Q.key!==null?W.set(Q.key,Q):W.set(Q.index,Q),Q=Q.sibling;return W}function a(Q,W){return Q=ci(Q,W),Q.index=0,Q.sibling=null,Q}function u(Q,W,J){return Q.index=J,e?(J=Q.alternate,J!==null?(J=J.index,J<W?(Q.flags|=67108866,W):J):(Q.flags|=67108866,W)):(Q.flags|=1048576,W)}function x(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function B(Q,W,J,oe){return W===null||W.tag!==6?(W=Pa(J,Q.mode,oe),W.return=Q,W):(W=a(W,J),W.return=Q,W)}function q(Q,W,J,oe){var Se=J.type;return Se===f?le(Q,W,J.props.children,oe,J.key):W!==null&&(W.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===p&&os(Se)===W.type)?(W=a(W,J.props),Sr(W,J),W.return=Q,W):(W=hn(J.type,J.key,J.props,null,Q.mode,oe),Sr(W,J),W.return=Q,W)}function ee(Q,W,J,oe){return W===null||W.tag!==4||W.stateNode.containerInfo!==J.containerInfo||W.stateNode.implementation!==J.implementation?(W=qa(J,Q.mode,oe),W.return=Q,W):(W=a(W,J.children||[]),W.return=Q,W)}function le(Q,W,J,oe,Se){return W===null||W.tag!==7?(W=ss(J,Q.mode,oe,Se),W.return=Q,W):(W=a(W,J),W.return=Q,W)}function ce(Q,W,J){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=Pa(""+W,Q.mode,J),W.return=Q,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return J=hn(W.type,W.key,W.props,null,Q.mode,J),Sr(J,W),J.return=Q,J;case b:return W=qa(W,Q.mode,J),W.return=Q,W;case p:return W=os(W),ce(Q,W,J)}if(Y(W)||A(W))return W=ss(W,Q.mode,J,null),W.return=Q,W;if(typeof W.then=="function")return ce(Q,mn(W),J);if(W.$$typeof===c)return ce(Q,dn(Q,W),J);pn(Q,W)}return null}function ie(Q,W,J,oe){var Se=W!==null?W.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Se!==null?null:B(Q,W,""+J,oe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case y:return J.key===Se?q(Q,W,J,oe):null;case b:return J.key===Se?ee(Q,W,J,oe):null;case p:return J=os(J),ie(Q,W,J,oe)}if(Y(J)||A(J))return Se!==null?null:le(Q,W,J,oe,null);if(typeof J.then=="function")return ie(Q,W,mn(J),oe);if(J.$$typeof===c)return ie(Q,W,dn(Q,J),oe);pn(Q,J)}return null}function ae(Q,W,J,oe,Se){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Q=Q.get(J)||null,B(W,Q,""+oe,Se);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case y:return Q=Q.get(oe.key===null?J:oe.key)||null,q(W,Q,oe,Se);case b:return Q=Q.get(oe.key===null?J:oe.key)||null,ee(W,Q,oe,Se);case p:return oe=os(oe),ae(Q,W,J,oe,Se)}if(Y(oe)||A(oe))return Q=Q.get(J)||null,le(W,Q,oe,Se,null);if(typeof oe.then=="function")return ae(Q,W,J,mn(oe),Se);if(oe.$$typeof===c)return ae(Q,W,J,dn(W,oe),Se);pn(W,oe)}return null}function ve(Q,W,J,oe){for(var Se=null,ze=null,ge=W,Le=W=0,ke=null;ge!==null&&Le<J.length;Le++){ge.index>Le?(ke=ge,ge=null):ke=ge.sibling;var Ue=ie(Q,ge,J[Le],oe);if(Ue===null){ge===null&&(ge=ke);break}e&&ge&&Ue.alternate===null&&t(Q,ge),W=u(Ue,W,Le),ze===null?Se=Ue:ze.sibling=Ue,ze=Ue,ge=ke}if(Le===J.length)return i(Q,ge),He&&hi(Q,Le),Se;if(ge===null){for(;Le<J.length;Le++)ge=ce(Q,J[Le],oe),ge!==null&&(W=u(ge,W,Le),ze===null?Se=ge:ze.sibling=ge,ze=ge);return He&&hi(Q,Le),Se}for(ge=s(ge);Le<J.length;Le++)ke=ae(ge,Q,Le,J[Le],oe),ke!==null&&(e&&ke.alternate!==null&&ge.delete(ke.key===null?Le:ke.key),W=u(ke,W,Le),ze===null?Se=ke:ze.sibling=ke,ze=ke);return e&&ge.forEach(function(Vi){return t(Q,Vi)}),He&&hi(Q,Le),Se}function be(Q,W,J,oe){if(J==null)throw Error(j(151));for(var Se=null,ze=null,ge=W,Le=W=0,ke=null,Ue=J.next();ge!==null&&!Ue.done;Le++,Ue=J.next()){ge.index>Le?(ke=ge,ge=null):ke=ge.sibling;var Vi=ie(Q,ge,Ue.value,oe);if(Vi===null){ge===null&&(ge=ke);break}e&&ge&&Vi.alternate===null&&t(Q,ge),W=u(Vi,W,Le),ze===null?Se=Vi:ze.sibling=Vi,ze=Vi,ge=ke}if(Ue.done)return i(Q,ge),He&&hi(Q,Le),Se;if(ge===null){for(;!Ue.done;Le++,Ue=J.next())Ue=ce(Q,Ue.value,oe),Ue!==null&&(W=u(Ue,W,Le),ze===null?Se=Ue:ze.sibling=Ue,ze=Ue);return He&&hi(Q,Le),Se}for(ge=s(ge);!Ue.done;Le++,Ue=J.next())Ue=ae(ge,Q,Le,Ue.value,oe),Ue!==null&&(e&&Ue.alternate!==null&&ge.delete(Ue.key===null?Le:Ue.key),W=u(Ue,W,Le),ze===null?Se=Ue:ze.sibling=Ue,ze=Ue);return e&&ge.forEach(function(pv){return t(Q,pv)}),He&&hi(Q,Le),Se}function $e(Q,W,J,oe){if(typeof J=="object"&&J!==null&&J.type===f&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case y:e:{for(var Se=J.key;W!==null;){if(W.key===Se){if(Se=J.type,Se===f){if(W.tag===7){i(Q,W.sibling),oe=a(W,J.props.children),oe.return=Q,Q=oe;break e}}else if(W.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===p&&os(Se)===W.type){i(Q,W.sibling),oe=a(W,J.props),Sr(oe,J),oe.return=Q,Q=oe;break e}i(Q,W);break}else t(Q,W);W=W.sibling}J.type===f?(oe=ss(J.props.children,Q.mode,oe,J.key),oe.return=Q,Q=oe):(oe=hn(J.type,J.key,J.props,null,Q.mode,oe),Sr(oe,J),oe.return=Q,Q=oe)}return x(Q);case b:e:{for(Se=J.key;W!==null;){if(W.key===Se)if(W.tag===4&&W.stateNode.containerInfo===J.containerInfo&&W.stateNode.implementation===J.implementation){i(Q,W.sibling),oe=a(W,J.children||[]),oe.return=Q,Q=oe;break e}else{i(Q,W);break}else t(Q,W);W=W.sibling}oe=qa(J,Q.mode,oe),oe.return=Q,Q=oe}return x(Q);case p:return J=os(J),$e(Q,W,J,oe)}if(Y(J))return ve(Q,W,J,oe);if(A(J)){if(Se=A(J),typeof Se!="function")throw Error(j(150));return J=Se.call(J),be(Q,W,J,oe)}if(typeof J.then=="function")return $e(Q,W,mn(J),oe);if(J.$$typeof===c)return $e(Q,W,dn(Q,J),oe);pn(Q,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,W!==null&&W.tag===6?(i(Q,W.sibling),oe=a(W,J),oe.return=Q,Q=oe):(i(Q,W),oe=Pa(J,Q.mode,oe),oe.return=Q,Q=oe),x(Q)):i(Q,W)}return function(Q,W,J,oe){try{pr=0;var Se=$e(Q,W,J,oe);return zs=null,Se}catch(ge){if(ge===Ns||ge===vn)throw ge;var ze=Bt(29,ge,null,Q.mode);return ze.lanes=oe,ze.return=Q,ze}finally{}}}var hs=Kc(!0),Qc=Kc(!1),Bi=!1;function tl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function il(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 Oi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ki(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(je&2)!==0){var a=s.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),s.pending=t,t=cn(e),kc(e,null,i),t}return on(e,s,t,i),cn(e)}function yr(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,Po(e,i)}}function sl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var a=null,u=null;if(i=i.firstBaseUpdate,i!==null){do{var x={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};u===null?a=u=x:u=u.next=x,i=i.next}while(i!==null);u===null?a=u=t:u=u.next=t}else a=u=t;i={baseState:s.baseState,firstBaseUpdate:a,lastBaseUpdate:u,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 rl=!1;function br(){if(rl){var e=Hs;if(e!==null)throw e}}function Cr(e,t,i,s){rl=!1;var a=e.updateQueue;Bi=!1;var u=a.firstBaseUpdate,x=a.lastBaseUpdate,B=a.shared.pending;if(B!==null){a.shared.pending=null;var q=B,ee=q.next;q.next=null,x===null?u=ee:x.next=ee,x=q;var le=e.alternate;le!==null&&(le=le.updateQueue,B=le.lastBaseUpdate,B!==x&&(B===null?le.firstBaseUpdate=ee:B.next=ee,le.lastBaseUpdate=q))}if(u!==null){var ce=a.baseState;x=0,le=ee=q=null,B=u;do{var ie=B.lane&-536870913,ae=ie!==B.lane;if(ae?(Oe&ie)===ie:(s&ie)===ie){ie!==0&&ie===ks&&(rl=!0),le!==null&&(le=le.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var ve=e,be=B;ie=t;var $e=i;switch(be.tag){case 1:if(ve=be.payload,typeof ve=="function"){ce=ve.call($e,ce,ie);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=be.payload,ie=typeof ve=="function"?ve.call($e,ce,ie):ve,ie==null)break e;ce=o({},ce,ie);break e;case 2:Bi=!0}}ie=B.callback,ie!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=a.callbacks,ae===null?a.callbacks=[ie]:ae.push(ie))}else ae={lane:ie,tag:B.tag,payload:B.payload,callback:B.callback,next:null},le===null?(ee=le=ae,q=ce):le=le.next=ae,x|=ie;if(B=B.next,B===null){if(B=a.shared.pending,B===null)break;ae=B,B=ae.next,ae.next=null,a.lastBaseUpdate=ae,a.shared.pending=null}}while(!0);le===null&&(q=ce),a.baseState=q,a.firstBaseUpdate=ee,a.lastBaseUpdate=le,u===null&&(a.shared.lanes=0),ji|=x,e.lanes=x,e.memoizedState=ce}}function Zc(e,t){if(typeof e!="function")throw Error(j(191,e));e.call(t)}function Jc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Zc(i[e],t)}var Us=R(null),Sn=R(0);function eh(e,t){e=bi,X(Sn,e),X(Us,t),bi=e|t.baseLanes}function nl(){X(Sn,bi),X(Us,Us.current)}function al(){bi=Sn.current,O(Us),O(Sn)}var Ot=R(null),$t=null;function Hi(e){var t=e.alternate;X(it,it.current&1),X(Ot,e),$t===null&&(t===null||Us.current!==null||t.memoizedState!==null)&&($t=e)}function ll(e){X(it,it.current),X(Ot,e),$t===null&&($t=e)}function th(e){e.tag===22?(X(it,it.current),X(Ot,e),$t===null&&($t=e)):Ni()}function Ni(){X(it,it.current),X(Ot,Ot.current)}function kt(e){O(Ot),$t===e&&($t=null),O(it)}var it=R(0);function yn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||_o(i)||vo(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 di=0,xe=null,Ge=null,nt=null,bn=!1,js=!1,us=!1,Cn=0,wr=0,Is=null,o_=0;function et(){throw Error(j(321))}function ol(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Tt(e[i],t[i]))return!1;return!0}function cl(e,t,i,s,a,u){return di=u,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Uh:El,us=!1,u=i(s,a),us=!1,js&&(u=sh(t,i,s,a)),ih(e),u}function ih(e){N.H=Lr;var t=Ge!==null&&Ge.next!==null;if(di=0,nt=Ge=xe=null,bn=!1,wr=0,Is=null,t)throw Error(j(300));e===null||at||(e=e.dependencies,e!==null&&fn(e)&&(at=!0))}function sh(e,t,i,s){xe=e;var a=0;do{if(js&&(Is=null),wr=0,js=!1,25<=a)throw Error(j(301));if(a+=1,nt=Ge=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}N.H=jh,u=t(i,s)}while(js);return u}function c_(){var e=N.H,t=e.useState()[0];return t=typeof t.then=="function"?Er(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(xe.flags|=1024),t}function hl(){var e=Cn!==0;return Cn=0,e}function ul(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function fl(e){if(bn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bn=!1}di=0,nt=Ge=xe=null,js=!1,wr=Cn=0,Is=null}function yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?xe.memoizedState=nt=e:nt=nt.next=e,nt}function st(){if(Ge===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=nt===null?xe.memoizedState:nt.next;if(t!==null)nt=t,Ge=e;else{if(e===null)throw xe.alternate===null?Error(j(467)):Error(j(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},nt===null?xe.memoizedState=nt=e:nt=nt.next=e}return nt}function wn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Er(e){var t=wr;return wr+=1,Is===null&&(Is=[]),e=Xc(Is,e,t),t=xe,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Uh:El),e}function En(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Er(e);if(e.$$typeof===c)return vt(e)}throw Error(j(438,String(e)))}function dl(e){var t=null,i=xe.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=xe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=wn(),xe.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]=L;return t.index++,i}function _i(e,t){return typeof t=="function"?t(e):t}function xn(e){var t=st();return _l(t,Ge,e)}function _l(e,t,i){var s=e.queue;if(s===null)throw Error(j(311));s.lastRenderedReducer=i;var a=e.baseQueue,u=s.pending;if(u!==null){if(a!==null){var x=a.next;a.next=u.next,u.next=x}t.baseQueue=a=u,s.pending=null}if(u=e.baseState,a===null)e.memoizedState=u;else{t=a.next;var B=x=null,q=null,ee=t,le=!1;do{var ce=ee.lane&-536870913;if(ce!==ee.lane?(Oe&ce)===ce:(di&ce)===ce){var ie=ee.revertLane;if(ie===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ce===ks&&(le=!0);else if((di&ie)===ie){ee=ee.next,ie===ks&&(le=!0);continue}else ce={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},q===null?(B=q=ce,x=u):q=q.next=ce,xe.lanes|=ie,ji|=ie;ce=ee.action,us&&i(u,ce),u=ee.hasEagerState?ee.eagerState:i(u,ce)}else ie={lane:ce,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},q===null?(B=q=ie,x=u):q=q.next=ie,xe.lanes|=ce,ji|=ce;ee=ee.next}while(ee!==null&&ee!==t);if(q===null?x=u:q.next=B,!Tt(u,e.memoizedState)&&(at=!0,le&&(i=Hs,i!==null)))throw i;e.memoizedState=u,e.baseState=x,e.baseQueue=q,s.lastRenderedState=u}return a===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function vl(e){var t=st(),i=t.queue;if(i===null)throw Error(j(311));i.lastRenderedReducer=e;var s=i.dispatch,a=i.pending,u=t.memoizedState;if(a!==null){i.pending=null;var x=a=a.next;do u=e(u,x.action),x=x.next;while(x!==a);Tt(u,t.memoizedState)||(at=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),i.lastRenderedState=u}return[u,s]}function rh(e,t,i){var s=xe,a=st(),u=He;if(u){if(i===void 0)throw Error(j(407));i=i()}else i=t();var x=!Tt((Ge||a).memoizedState,i);if(x&&(a.memoizedState=i,at=!0),a=a.queue,pl(lh.bind(null,s,a,e),[e]),a.getSnapshot!==t||x||nt!==null&&nt.memoizedState.tag&1){if(s.flags|=2048,Fs(9,{destroy:void 0},ah.bind(null,s,a,i,t),null),Xe===null)throw Error(j(349));u||(di&127)!==0||nh(s,t,i)}return i}function nh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=xe.updateQueue,t===null?(t=wn(),xe.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function ah(e,t,i,s){t.value=i,t.getSnapshot=s,oh(t)&&ch(e)}function lh(e,t,i){return i(function(){oh(t)&&ch(e)})}function oh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Tt(e,i)}catch{return!0}}function ch(e){var t=is(e,2);t!==null&&Rt(t,e,2)}function gl(e){var t=yt();if(typeof e=="function"){var i=e;if(e=i(),us){Mt(!0);try{i()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_i,lastRenderedState:e},t}function hh(e,t,i,s){return e.baseState=i,_l(e,Ge,typeof s=="function"?s:_i)}function h_(e,t,i,s,a){if(Rn(e))throw Error(j(485));if(e=t.action,e!==null){var u={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){u.listeners.push(x)}};N.T!==null?i(!0):u.isTransition=!1,s(u),i=t.pending,i===null?(u.next=t.pending=u,uh(t,u)):(u.next=i.next,t.pending=i.next=u)}}function uh(e,t){var i=t.action,s=t.payload,a=e.state;if(t.isTransition){var u=N.T,x={};N.T=x;try{var B=i(a,s),q=N.S;q!==null&&q(x,B),fh(e,t,B)}catch(ee){ml(e,t,ee)}finally{u!==null&&x.types!==null&&(u.types=x.types),N.T=u}}else try{u=i(a,s),fh(e,t,u)}catch(ee){ml(e,t,ee)}}function fh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){dh(e,t,s)},function(s){return ml(e,t,s)}):dh(e,t,i)}function dh(e,t,i){t.status="fulfilled",t.value=i,_h(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,uh(e,i)))}function ml(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,_h(t),t=t.next;while(t!==s)}e.action=null}function _h(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function vh(e,t){return t}function gh(e,t){if(He){var i=Xe.formState;if(i!==null){e:{var s=xe;if(He){if(Ye){t:{for(var a=Ye,u=Wt;a.nodeType!==8;){if(!u){a=null;break t}if(a=Xt(a.nextSibling),a===null){a=null;break t}}u=a.data,a=u==="F!"||u==="F"?a:null}if(a){Ye=Xt(a.nextSibling),s=a.data==="F!";break e}}Mi(s)}s=!1}s&&(t=i[0])}}return i=yt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vh,lastRenderedState:t},i.queue=s,i=Hh.bind(null,xe,s),s.dispatch=i,s=gl(!1),u=wl.bind(null,xe,!1,s.queue),s=yt(),a={state:t,dispatch:null,action:e,pending:null},s.queue=a,i=h_.bind(null,xe,a,u,i),a.dispatch=i,s.memoizedState=e,[t,i,!1]}function mh(e){var t=st();return ph(t,Ge,e)}function ph(e,t,i){if(t=_l(e,t,vh)[0],e=xn(_i)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Er(t)}catch(x){throw x===Ns?vn:x}else s=t;t=st();var a=t.queue,u=a.dispatch;return i!==t.memoizedState&&(xe.flags|=2048,Fs(9,{destroy:void 0},u_.bind(null,a,i),null)),[s,u,e]}function u_(e,t){e.action=t}function Sh(e){var t=st(),i=Ge;if(i!==null)return ph(t,i,e);st(),t=t.memoizedState,i=st();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Fs(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=xe.updateQueue,t===null&&(t=wn(),xe.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 yh(){return st().memoizedState}function Ln(e,t,i,s){var a=yt();xe.flags|=e,a.memoizedState=Fs(1|t,{destroy:void 0},i,s===void 0?null:s)}function An(e,t,i,s){var a=st();s=s===void 0?null:s;var u=a.memoizedState.inst;Ge!==null&&s!==null&&ol(s,Ge.memoizedState.deps)?a.memoizedState=Fs(t,u,i,s):(xe.flags|=e,a.memoizedState=Fs(1|t,u,i,s))}function bh(e,t){Ln(8390656,8,e,t)}function pl(e,t){An(2048,8,e,t)}function f_(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=wn(),xe.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Ch(e){var t=st().memoizedState;return f_({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(j(440));return t.impl.apply(void 0,arguments)}}function wh(e,t){return An(4,2,e,t)}function Eh(e,t){return An(4,4,e,t)}function xh(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 Lh(e,t,i){i=i!=null?i.concat([e]):null,An(4,4,xh.bind(null,t,e),i)}function Sl(){}function Ah(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ol(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Rh(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ol(t,s[1]))return s[0];if(s=e(),us){Mt(!0);try{e()}finally{Mt(!1)}}return i.memoizedState=[s,t],s}function yl(e,t,i){return i===void 0||(di&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Du(),xe.lanes|=e,ji|=e,i)}function Dh(e,t,i,s){return Tt(i,t)?i:Us.current!==null?(e=yl(e,i,s),Tt(e,t)||(at=!0),e):(di&42)===0||(di&1073741824)!==0&&(Oe&261930)===0?(at=!0,e.memoizedState=i):(e=Du(),xe.lanes|=e,ji|=e,t)}function Mh(e,t,i,s,a){var u=I.p;I.p=u!==0&&8>u?u:8;var x=N.T,B={};N.T=B,wl(e,!1,t,i);try{var q=a(),ee=N.S;if(ee!==null&&ee(B,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var le=l_(q,s);xr(e,t,le,zt(e))}else xr(e,t,s,zt(e))}catch(ce){xr(e,t,{then:function(){},status:"rejected",reason:ce},zt())}finally{I.p=u,x!==null&&B.types!==null&&(x.types=B.types),N.T=x}}function d_(){}function bl(e,t,i,s){if(e.tag!==5)throw Error(j(476));var a=Th(e).queue;Mh(e,a,t,G,i===null?d_:function(){return Bh(e),i(s)})}function Th(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_i,lastRenderedState:G},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_i,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bh(e){var t=Th(e);t.next===null&&(t=e.alternate.memoizedState),xr(e,t.next.queue,{},zt())}function Cl(){return vt(Pr)}function Oh(){return st().memoizedState}function kh(){return st().memoizedState}function __(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=zt();e=Oi(i);var s=ki(t,e,i);s!==null&&(Rt(s,t,i),yr(s,t,i)),t={cache:Qa()},e.payload=t;return}t=t.return}}function v_(e,t,i){var s=zt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Rn(e)?Nh(t,i):(i=Ia(e,t,i,s),i!==null&&(Rt(i,e,s),zh(i,t,s)))}function Hh(e,t,i){var s=zt();xr(e,t,i,s)}function xr(e,t,i,s){var a={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Rn(e))Nh(t,a);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var x=t.lastRenderedState,B=u(x,i);if(a.hasEagerState=!0,a.eagerState=B,Tt(B,x))return on(e,t,a,0),Xe===null&&ln(),!1}catch{}finally{}if(i=Ia(e,t,a,s),i!==null)return Rt(i,e,s),zh(i,t,s),!0}return!1}function wl(e,t,i,s){if(s={lane:2,revertLane:to(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Rn(e)){if(t)throw Error(j(479))}else t=Ia(e,i,s,2),t!==null&&Rt(t,e,2)}function Rn(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Nh(e,t){js=bn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function zh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Po(e,i)}}var Lr={readContext:vt,use:En,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Lr.useEffectEvent=et;var Uh={readContext:vt,use:En,useCallback:function(e,t){return yt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:bh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Ln(4194308,4,xh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Ln(4194308,4,e,t)},useInsertionEffect:function(e,t){Ln(4,2,e,t)},useMemo:function(e,t){var i=yt();t=t===void 0?null:t;var s=e();if(us){Mt(!0);try{e()}finally{Mt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=yt();if(i!==void 0){var a=i(t);if(us){Mt(!0);try{i(t)}finally{Mt(!1)}}}else a=t;return s.memoizedState=s.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},s.queue=e,e=e.dispatch=v_.bind(null,xe,e),[s.memoizedState,e]},useRef:function(e){var t=yt();return e={current:e},t.memoizedState=e},useState:function(e){e=gl(e);var t=e.queue,i=Hh.bind(null,xe,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Sl,useDeferredValue:function(e,t){var i=yt();return yl(i,e,t)},useTransition:function(){var e=gl(!1);return e=Mh.bind(null,xe,e.queue,!0,!1),yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=xe,a=yt();if(He){if(i===void 0)throw Error(j(407));i=i()}else{if(i=t(),Xe===null)throw Error(j(349));(Oe&127)!==0||nh(s,t,i)}a.memoizedState=i;var u={value:i,getSnapshot:t};return a.queue=u,bh(lh.bind(null,s,u,e),[e]),s.flags|=2048,Fs(9,{destroy:void 0},ah.bind(null,s,u,i,t),null),i},useId:function(){var e=yt(),t=Xe.identifierPrefix;if(He){var i=ti,s=ei;i=(s&~(1<<32-pt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Cn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=o_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Cl,useFormState:gh,useActionState:gh,useOptimistic:function(e){var t=yt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=wl.bind(null,xe,!0,i),i.dispatch=t,[e,t]},useMemoCache:dl,useCacheRefresh:function(){return yt().memoizedState=__.bind(null,xe)},useEffectEvent:function(e){var t=yt(),i={impl:e};return t.memoizedState=i,function(){if((je&2)!==0)throw Error(j(440));return i.impl.apply(void 0,arguments)}}},El={readContext:vt,use:En,useCallback:Ah,useContext:vt,useEffect:pl,useImperativeHandle:Lh,useInsertionEffect:wh,useLayoutEffect:Eh,useMemo:Rh,useReducer:xn,useRef:yh,useState:function(){return xn(_i)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=st();return Dh(i,Ge.memoizedState,e,t)},useTransition:function(){var e=xn(_i)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:rh,useId:Oh,useHostTransitionStatus:Cl,useFormState:mh,useActionState:mh,useOptimistic:function(e,t){var i=st();return hh(i,Ge,e,t)},useMemoCache:dl,useCacheRefresh:kh};El.useEffectEvent=Ch;var jh={readContext:vt,use:En,useCallback:Ah,useContext:vt,useEffect:pl,useImperativeHandle:Lh,useInsertionEffect:wh,useLayoutEffect:Eh,useMemo:Rh,useReducer:vl,useRef:yh,useState:function(){return vl(_i)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=st();return Ge===null?yl(i,e,t):Dh(i,Ge.memoizedState,e,t)},useTransition:function(){var e=vl(_i)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:rh,useId:Oh,useHostTransitionStatus:Cl,useFormState:Sh,useActionState:Sh,useOptimistic:function(e,t){var i=st();return Ge!==null?hh(i,Ge,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:dl,useCacheRefresh:kh};jh.useEffectEvent=Ch;function xl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:o({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Ll={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=zt(),a=Oi(s);a.payload=t,i!=null&&(a.callback=i),t=ki(e,a,s),t!==null&&(Rt(t,e,s),yr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=zt(),a=Oi(s);a.tag=1,a.payload=t,i!=null&&(a.callback=i),t=ki(e,a,s),t!==null&&(Rt(t,e,s),yr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=zt(),s=Oi(i);s.tag=2,t!=null&&(s.callback=t),t=ki(e,s,i),t!==null&&(Rt(t,e,i),yr(t,e,i))}};function Ih(e,t,i,s,a,u,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,x):t.prototype&&t.prototype.isPureReactComponent?!fr(i,s)||!fr(a,u):!0}function Fh(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&&Ll.enqueueReplaceState(t,t.state,null)}function fs(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=o({},i));for(var a in e)i[a]===void 0&&(i[a]=e[a])}return i}function Ph(e){an(e)}function qh(e){console.error(e)}function Gh(e){an(e)}function Dn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Wh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Al(e,t,i){return i=Oi(i),i.tag=3,i.payload={element:null},i.callback=function(){Dn(e,t)},i}function $h(e){return e=Oi(e),e.tag=3,e}function Xh(e,t,i,s){var a=i.type.getDerivedStateFromError;if(typeof a=="function"){var u=s.value;e.payload=function(){return a(u)},e.callback=function(){Wh(t,i,s)}}var x=i.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Wh(t,i,s),typeof a!="function"&&(Ii===null?Ii=new Set([this]):Ii.add(this));var B=s.stack;this.componentDidCatch(s.value,{componentStack:B!==null?B:""})})}function g_(e,t,i,s,a){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Os(t,i,a,!0),i=Ot.current,i!==null){switch(i.tag){case 31:case 13:return $t===null?Fn():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=a,s===gn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Zl(e,s,a)),!1;case 22:return i.flags|=65536,s===gn?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)),Zl(e,s,a)),!1}throw Error(j(435,i.tag))}return Zl(e,s,a),Fn(),!1}if(He)return t=Ot.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,s!==$a&&(e=Error(j(422),{cause:s}),vr(Pt(e,i)))):(s!==$a&&(t=Error(j(423),{cause:s}),vr(Pt(t,i))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,s=Pt(s,i),a=Al(e.stateNode,s,a),sl(e,a),tt!==4&&(tt=2)),!1;var u=Error(j(520),{cause:s});if(u=Pt(u,i),kr===null?kr=[u]:kr.push(u),tt!==4&&(tt=2),t===null)return!0;s=Pt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=a&-a,i.lanes|=e,e=Al(i.stateNode,s,e),sl(i,e),!1;case 1:if(t=i.type,u=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ii===null||!Ii.has(u))))return i.flags|=65536,a&=-a,i.lanes|=a,a=$h(a),Xh(a,e,i,s),sl(i,a),!1}i=i.return}while(i!==null);return!1}var Rl=Error(j(461)),at=!1;function gt(e,t,i,s){t.child=e===null?Qc(t,null,i,s):hs(t,e.child,i,s)}function Yh(e,t,i,s,a){i=i.render;var u=t.ref;if("ref"in s){var x={};for(var B in s)B!=="ref"&&(x[B]=s[B])}else x=s;return as(t),s=cl(e,t,i,x,u,a),B=hl(),e!==null&&!at?(ul(e,t,a),vi(e,t,a)):(He&&B&&Ga(t),t.flags|=1,gt(e,t,s,a),t.child)}function Vh(e,t,i,s,a){if(e===null){var u=i.type;return typeof u=="function"&&!Fa(u)&&u.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=u,Kh(e,t,u,s,a)):(e=hn(i.type,null,s,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Nl(e,a)){var x=u.memoizedProps;if(i=i.compare,i=i!==null?i:fr,i(x,s)&&e.ref===t.ref)return vi(e,t,a)}return t.flags|=1,e=ci(u,s),e.ref=t.ref,e.return=t,t.child=e}function Kh(e,t,i,s,a){if(e!==null){var u=e.memoizedProps;if(fr(u,s)&&e.ref===t.ref)if(at=!1,t.pendingProps=s=u,Nl(e,a))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,vi(e,t,a)}return Dl(e,t,i,s,a)}function Qh(e,t,i,s){var a=s.children,u=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(u=u!==null?u.baseLanes|i:i,e!==null){for(s=t.child=e.child,a=0;s!==null;)a=a|s.lanes|s.childLanes,s=s.sibling;s=a&~u}else s=0,t.child=null;return Zh(e,t,u,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_n(t,u!==null?u.cachePool:null),u!==null?eh(t,u):nl(),th(t);else return s=t.lanes=536870912,Zh(e,t,u!==null?u.baseLanes|i:i,i,s)}else u!==null?(_n(t,u.cachePool),eh(t,u),Ni(),t.memoizedState=null):(e!==null&&_n(t,null),nl(),Ni());return gt(e,t,a,i),t.child}function Ar(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Zh(e,t,i,s,a){var u=Ja();return u=u===null?null:{parent:rt._currentValue,pool:u},t.memoizedState={baseLanes:i,cachePool:u},e!==null&&_n(t,null),nl(),th(t),e!==null&&Os(e,t,s,!0),t.childLanes=a,null}function Mn(e,t){return t=Bn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jh(e,t,i){return hs(t,e.child,null,i),e=Mn(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function m_(e,t,i){var s=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(He){if(s.mode==="hidden")return e=Mn(t,s),t.lanes=536870912,Ar(null,e);if(ll(t),(e=Ye)?(e=ff(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Nc(e),i.return=t,t.child=i,_t=t,Ye=null)):e=null,e===null)throw Mi(t);return t.lanes=536870912,null}return Mn(t,s)}var u=e.memoizedState;if(u!==null){var x=u.dehydrated;if(ll(t),a)if(t.flags&256)t.flags&=-257,t=Jh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(j(558));else if(at||Os(e,t,i,!1),a=(i&e.childLanes)!==0,at||a){if(s=Xe,s!==null&&(x=qo(s,i),x!==0&&x!==u.retryLane))throw u.retryLane=x,is(e,x),Rt(s,e,x),Rl;Fn(),t=Jh(e,t,i)}else e=u.treeContext,Ye=Xt(x.nextSibling),_t=t,He=!0,Di=null,Wt=!1,e!==null&&jc(t,e),t=Mn(t,s),t.flags|=4096;return t}return e=ci(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Tn(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(j(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Dl(e,t,i,s,a){return as(t),i=cl(e,t,i,s,void 0,a),s=hl(),e!==null&&!at?(ul(e,t,a),vi(e,t,a)):(He&&s&&Ga(t),t.flags|=1,gt(e,t,i,a),t.child)}function eu(e,t,i,s,a,u){return as(t),t.updateQueue=null,i=sh(t,s,i,a),ih(e),s=hl(),e!==null&&!at?(ul(e,t,u),vi(e,t,u)):(He&&s&&Ga(t),t.flags|=1,gt(e,t,i,u),t.child)}function tu(e,t,i,s,a){if(as(t),t.stateNode===null){var u=Ds,x=i.contextType;typeof x=="object"&&x!==null&&(u=vt(x)),u=new i(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ll,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},tl(t),x=i.contextType,u.context=typeof x=="object"&&x!==null?vt(x):Ds,u.state=t.memoizedState,x=i.getDerivedStateFromProps,typeof x=="function"&&(xl(t,i,x,s),u.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(x=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),x!==u.state&&Ll.enqueueReplaceState(u,u.state,null),Cr(t,s,u,a),br(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var B=t.memoizedProps,q=fs(i,B);u.props=q;var ee=u.context,le=i.contextType;x=Ds,typeof le=="object"&&le!==null&&(x=vt(le));var ce=i.getDerivedStateFromProps;le=typeof ce=="function"||typeof u.getSnapshotBeforeUpdate=="function",B=t.pendingProps!==B,le||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(B||ee!==x)&&Fh(t,u,s,x),Bi=!1;var ie=t.memoizedState;u.state=ie,Cr(t,s,u,a),br(),ee=t.memoizedState,B||ie!==ee||Bi?(typeof ce=="function"&&(xl(t,i,ce,s),ee=t.memoizedState),(q=Bi||Ih(t,i,q,s,ie,ee,x))?(le||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=ee),u.props=s,u.state=ee,u.context=x,s=q):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,il(e,t),x=t.memoizedProps,le=fs(i,x),u.props=le,ce=t.pendingProps,ie=u.context,ee=i.contextType,q=Ds,typeof ee=="object"&&ee!==null&&(q=vt(ee)),B=i.getDerivedStateFromProps,(ee=typeof B=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x!==ce||ie!==q)&&Fh(t,u,s,q),Bi=!1,ie=t.memoizedState,u.state=ie,Cr(t,s,u,a),br();var ae=t.memoizedState;x!==ce||ie!==ae||Bi||e!==null&&e.dependencies!==null&&fn(e.dependencies)?(typeof B=="function"&&(xl(t,i,B,s),ae=t.memoizedState),(le=Bi||Ih(t,i,le,s,ie,ae,q)||e!==null&&e.dependencies!==null&&fn(e.dependencies))?(ee||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,ae,q),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,ae,q)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ae),u.props=s,u.state=ae,u.context=q,s=le):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Tn(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=hs(t,e.child,null,a),t.child=hs(t,null,i,a)):gt(e,t,i,a),t.memoizedState=u.state,e=t.child):e=vi(e,t,a),e}function iu(e,t,i,s){return rs(),t.flags|=256,gt(e,t,i,s),t.child}var Ml={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tl(e){return{baseLanes:e,cachePool:Wc()}}function Bl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Nt),e}function su(e,t,i){var s=t.pendingProps,a=!1,u=(t.flags&128)!==0,x;if((x=u)||(x=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),x&&(a=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(He){if(a?Hi(t):Ni(),(e=Ye)?(e=ff(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Nc(e),i.return=t,t.child=i,_t=t,Ye=null)):e=null,e===null)throw Mi(t);return vo(e)?t.lanes=32:t.lanes=536870912,null}var B=s.children;return s=s.fallback,a?(Ni(),a=t.mode,B=Bn({mode:"hidden",children:B},a),s=ss(s,a,i,null),B.return=t,s.return=t,B.sibling=s,t.child=B,s=t.child,s.memoizedState=Tl(i),s.childLanes=Bl(e,x,i),t.memoizedState=Ml,Ar(null,s)):(Hi(t),Ol(t,B))}var q=e.memoizedState;if(q!==null&&(B=q.dehydrated,B!==null)){if(u)t.flags&256?(Hi(t),t.flags&=-257,t=kl(e,t,i)):t.memoizedState!==null?(Ni(),t.child=e.child,t.flags|=128,t=null):(Ni(),B=s.fallback,a=t.mode,s=Bn({mode:"visible",children:s.children},a),B=ss(B,a,i,null),B.flags|=2,s.return=t,B.return=t,s.sibling=B,t.child=s,hs(t,e.child,null,i),s=t.child,s.memoizedState=Tl(i),s.childLanes=Bl(e,x,i),t.memoizedState=Ml,t=Ar(null,s));else if(Hi(t),vo(B)){if(x=B.nextSibling&&B.nextSibling.dataset,x)var ee=x.dgst;x=ee,s=Error(j(419)),s.stack="",s.digest=x,vr({value:s,source:null,stack:null}),t=kl(e,t,i)}else if(at||Os(e,t,i,!1),x=(i&e.childLanes)!==0,at||x){if(x=Xe,x!==null&&(s=qo(x,i),s!==0&&s!==q.retryLane))throw q.retryLane=s,is(e,s),Rt(x,e,s),Rl;_o(B)||Fn(),t=kl(e,t,i)}else _o(B)?(t.flags|=192,t.child=e.child,t=null):(e=q.treeContext,Ye=Xt(B.nextSibling),_t=t,He=!0,Di=null,Wt=!1,e!==null&&jc(t,e),t=Ol(t,s.children),t.flags|=4096);return t}return a?(Ni(),B=s.fallback,a=t.mode,q=e.child,ee=q.sibling,s=ci(q,{mode:"hidden",children:s.children}),s.subtreeFlags=q.subtreeFlags&65011712,ee!==null?B=ci(ee,B):(B=ss(B,a,i,null),B.flags|=2),B.return=t,s.return=t,s.sibling=B,t.child=s,Ar(null,s),s=t.child,B=e.child.memoizedState,B===null?B=Tl(i):(a=B.cachePool,a!==null?(q=rt._currentValue,a=a.parent!==q?{parent:q,pool:q}:a):a=Wc(),B={baseLanes:B.baseLanes|i,cachePool:a}),s.memoizedState=B,s.childLanes=Bl(e,x,i),t.memoizedState=Ml,Ar(e.child,s)):(Hi(t),i=e.child,e=i.sibling,i=ci(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=i,t.memoizedState=null,i)}function Ol(e,t){return t=Bn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bn(e,t){return e=Bt(22,e,null,t),e.lanes=0,e}function kl(e,t,i){return hs(t,e.child,null,i),e=Ol(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ru(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Va(e.return,t,i)}function Hl(e,t,i,s,a,u){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:a,treeForkCount:u}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=s,x.tail=i,x.tailMode=a,x.treeForkCount=u)}function nu(e,t,i){var s=t.pendingProps,a=s.revealOrder,u=s.tail;s=s.children;var x=it.current,B=(x&2)!==0;if(B?(x=x&1|2,t.flags|=128):x&=1,X(it,x),gt(e,t,s,i),s=He?_r:0,!B&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ru(e,i,t);else if(e.tag===19)ru(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(a){case"forwards":for(i=t.child,a=null;i!==null;)e=i.alternate,e!==null&&yn(e)===null&&(a=i),i=i.sibling;i=a,i===null?(a=t.child,t.child=null):(a=i.sibling,i.sibling=null),Hl(t,!1,a,i,u,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&yn(e)===null){t.child=a;break}e=a.sibling,a.sibling=i,i=a,a=e}Hl(t,!0,i,null,u,s);break;case"together":Hl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function vi(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ji|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Os(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,i=ci(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=ci(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Nl(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&fn(e)))}function p_(e,t,i){switch(t.tag){case 3:k(t,t.stateNode.containerInfo),Ti(t,rt,e.memoizedState.cache),rs();break;case 27:case 5:se(t);break;case 4:k(t,t.stateNode.containerInfo);break;case 10:Ti(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ll(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Hi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?su(e,t,i):(Hi(t),e=vi(e,t,i),e!==null?e.sibling:null);Hi(t);break;case 19:var a=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Os(e,t,i,!1),s=(i&t.childLanes)!==0),a){if(s)return nu(e,t,i);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),X(it,it.current),s)break;return null;case 22:return t.lanes=0,Qh(e,t,i,t.pendingProps);case 24:Ti(t,rt,e.memoizedState.cache)}return vi(e,t,i)}function au(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!Nl(e,i)&&(t.flags&128)===0)return at=!1,p_(e,t,i);at=(e.flags&131072)!==0}else at=!1,He&&(t.flags&1048576)!==0&&Uc(t,_r,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=os(t.elementType),t.type=e,typeof e=="function")Fa(e)?(s=fs(e,s),t.tag=1,t=tu(null,t,e,s,i)):(t.tag=0,t=Dl(null,t,e,s,i));else{if(e!=null){var a=e.$$typeof;if(a===g){t.tag=11,t=Yh(null,t,e,s,i);break e}else if(a===w){t.tag=14,t=Vh(null,t,e,s,i);break e}}throw t=z(e)||e,Error(j(306,t,""))}}return t;case 0:return Dl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,a=fs(s,t.pendingProps),tu(e,t,s,a,i);case 3:e:{if(k(t,t.stateNode.containerInfo),e===null)throw Error(j(387));s=t.pendingProps;var u=t.memoizedState;a=u.element,il(e,t),Cr(t,s,null,i);var x=t.memoizedState;if(s=x.cache,Ti(t,rt,s),s!==u.cache&&Ka(t,[rt],i,!0),br(),s=x.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=iu(e,t,s,i);break e}else if(s!==a){a=Pt(Error(j(424)),t),vr(a),t=iu(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(Ye=Xt(e.firstChild),_t=t,He=!0,Di=null,Wt=!0,i=Qc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(rs(),s===a){t=vi(e,t,i);break e}gt(e,t,s,i)}t=t.child}return t;case 26:return Tn(e,t),e===null?(i=pf(t.type,null,t.pendingProps,null))?t.memoizedState=i:He||(i=t.type,e=t.pendingProps,s=Yn(ue.current).createElement(i),s[dt]=t,s[Ct]=e,mt(s,i,e),ut(s),t.stateNode=s):t.memoizedState=pf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return se(t),e===null&&He&&(s=t.stateNode=vf(t.type,t.pendingProps,ue.current),_t=t,Wt=!0,a=Ye,Gi(t.type)?(go=a,Ye=Xt(s.firstChild)):Ye=a),gt(e,t,t.pendingProps.children,i),Tn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&He&&((a=s=Ye)&&(s=Y_(s,t.type,t.pendingProps,Wt),s!==null?(t.stateNode=s,_t=t,Ye=Xt(s.firstChild),Wt=!1,a=!0):a=!1),a||Mi(t)),se(t),a=t.type,u=t.pendingProps,x=e!==null?e.memoizedProps:null,s=u.children,ho(a,u)?s=null:x!==null&&ho(a,x)&&(t.flags|=32),t.memoizedState!==null&&(a=cl(e,t,c_,null,null,i),Pr._currentValue=a),Tn(e,t),gt(e,t,s,i),t.child;case 6:return e===null&&He&&((e=i=Ye)&&(i=V_(i,t.pendingProps,Wt),i!==null?(t.stateNode=i,_t=t,Ye=null,e=!0):e=!1),e||Mi(t)),null;case 13:return su(e,t,i);case 4:return k(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=hs(t,null,s,i):gt(e,t,s,i),t.child;case 11:return Yh(e,t,t.type,t.pendingProps,i);case 7:return gt(e,t,t.pendingProps,i),t.child;case 8:return gt(e,t,t.pendingProps.children,i),t.child;case 12:return gt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Ti(t,t.type,s.value),gt(e,t,s.children,i),t.child;case 9:return a=t.type._context,s=t.pendingProps.children,as(t),a=vt(a),s=s(a),t.flags|=1,gt(e,t,s,i),t.child;case 14:return Vh(e,t,t.type,t.pendingProps,i);case 15:return Kh(e,t,t.type,t.pendingProps,i);case 19:return nu(e,t,i);case 31:return m_(e,t,i);case 22:return Qh(e,t,i,t.pendingProps);case 24:return as(t),s=vt(rt),e===null?(a=Ja(),a===null&&(a=Xe,u=Qa(),a.pooledCache=u,u.refCount++,u!==null&&(a.pooledCacheLanes|=i),a=u),t.memoizedState={parent:s,cache:a},tl(t),Ti(t,rt,a)):((e.lanes&i)!==0&&(il(e,t),Cr(t,null,null,i),br()),a=e.memoizedState,u=t.memoizedState,a.parent!==s?(a={parent:s,cache:s},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ti(t,rt,s)):(s=u.cache,Ti(t,rt,s),s!==a.cache&&Ka(t,[rt],i,!0))),gt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(j(156,t.tag))}function gi(e){e.flags|=4}function zl(e,t,i,s,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Ou())e.flags|=8192;else throw cs=gn,el}else e.flags&=-16777217}function lu(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wf(t))if(Ou())e.flags|=8192;else throw cs=gn,el}function On(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Io():536870912,e.lanes|=t,Ws|=t)}function Rr(e,t){if(!He)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 Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var a=e.child;a!==null;)i|=a.lanes|a.childLanes,s|=a.subtreeFlags&65011712,s|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)i|=a.lanes|a.childLanes,s|=a.subtreeFlags,s|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function S_(e,t,i){var s=t.pendingProps;switch(Wa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ve(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),fi(rt),ne(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?gi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xa())),Ve(t),null;case 26:var a=t.type,u=t.memoizedState;return e===null?(gi(t),u!==null?(Ve(t),lu(t,u)):(Ve(t),zl(t,a,null,s,i))):u?u!==e.memoizedState?(gi(t),Ve(t),lu(t,u)):(Ve(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&gi(t),Ve(t),zl(t,a,e,s,i)),null;case 27:if(de(t),i=ue.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&gi(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Ve(t),null}e=Z.current,Bs(t)?Ic(t):(e=vf(a,s,i),t.stateNode=e,gi(t))}return Ve(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&gi(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Ve(t),null}if(u=Z.current,Bs(t))Ic(t);else{var x=Yn(ue.current);switch(u){case 1:u=x.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:u=x.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":u=x.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":u=x.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":u=x.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?x.createElement("select",{is:s.is}):x.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?x.createElement(a,{is:s.is}):x.createElement(a)}}u[dt]=t,u[Ct]=s;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)u.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=u;e:switch(mt(u,a,s),a){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&gi(t)}}return Ve(t),zl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&gi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(j(166));if(e=ue.current,Bs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,a=_t,a!==null)switch(a.tag){case 27:case 5:s=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||rf(e.nodeValue,i)),e||Mi(t,!0)}else e=Yn(e).createTextNode(s),e[dt]=t,t.stateNode=e}return Ve(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Bs(t),i!==null){if(e===null){if(!s)throw Error(j(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(557));e[dt]=t}else rs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),e=!1}else i=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(kt(t),t):(kt(t),null);if((t.flags&128)!==0)throw Error(j(558))}return Ve(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!a)throw Error(j(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(j(317));a[dt]=t}else rs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),a=!1}else a=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(kt(t),t):(kt(t),null)}return kt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,a=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(a=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==a&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),On(t,t.updateQueue),Ve(t),null);case 4:return ne(),e===null&&no(t.stateNode.containerInfo),Ve(t),null;case 10:return fi(t.type),Ve(t),null;case 19:if(O(it),s=t.memoizedState,s===null)return Ve(t),null;if(a=(t.flags&128)!==0,u=s.rendering,u===null)if(a)Rr(s,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=yn(e),u!==null){for(t.flags|=128,Rr(s,!1),e=u.updateQueue,t.updateQueue=e,On(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Hc(i,e),i=i.sibling;return X(it,it.current&1|2),He&&hi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ce()>Un&&(t.flags|=128,a=!0,Rr(s,!1),t.lanes=4194304)}else{if(!a)if(e=yn(u),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,On(t,e),Rr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!He)return Ve(t),null}else 2*Ce()-s.renderingStartTime>Un&&i!==536870912&&(t.flags|=128,a=!0,Rr(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ce(),e.sibling=null,i=it.current,X(it,a?i&1|2:i&1),He&&hi(t,s.treeForkCount),e):(Ve(t),null);case 22:case 23:return kt(t),al(),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&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),i=t.updateQueue,i!==null&&On(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&&O(ls),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),fi(rt),Ve(t),null;case 25:return null;case 30:return null}throw Error(j(156,t.tag))}function y_(e,t){switch(Wa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fi(rt),ne(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(kt(t),t.alternate===null)throw Error(j(340));rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(it),null;case 4:return ne(),null;case 10:return fi(t.type),null;case 22:case 23:return kt(t),al(),e!==null&&O(ls),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return fi(rt),null;case 25:return null;default:return null}}function ou(e,t){switch(Wa(t),t.tag){case 3:fi(rt),ne();break;case 26:case 27:case 5:de(t);break;case 4:ne();break;case 31:t.memoizedState!==null&&kt(t);break;case 13:kt(t);break;case 19:O(it);break;case 10:fi(t.type);break;case 22:case 23:kt(t),al(),e!==null&&O(ls);break;case 24:fi(rt)}}function Dr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var a=s.next;i=a;do{if((i.tag&e)===e){s=void 0;var u=i.create,x=i.inst;s=u(),x.destroy=s}i=i.next}while(i!==a)}}catch(B){Fe(t,t.return,B)}}function zi(e,t,i){try{var s=t.updateQueue,a=s!==null?s.lastEffect:null;if(a!==null){var u=a.next;s=u;do{if((s.tag&e)===e){var x=s.inst,B=x.destroy;if(B!==void 0){x.destroy=void 0,a=t;var q=i,ee=B;try{ee()}catch(le){Fe(a,q,le)}}}s=s.next}while(s!==u)}}catch(le){Fe(t,t.return,le)}}function cu(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Jc(t,i)}catch(s){Fe(e,e.return,s)}}}function hu(e,t,i){i.props=fs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Fe(e,t,s)}}function Mr(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(a){Fe(e,t,a)}}function ii(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(a){Fe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(a){Fe(e,t,a)}else i.current=null}function uu(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(a){Fe(e,e.return,a)}}function Ul(e,t,i){try{var s=e.stateNode;P_(s,e.type,i,t),s[Ct]=t}catch(a){Fe(e,e.return,a)}}function fu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gi(e.type)||e.tag===4}function jl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fu(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&&Gi(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 Il(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=li));else if(s!==4&&(s===27&&Gi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Il(e,t,i),e=e.sibling;e!==null;)Il(e,t,i),e=e.sibling}function kn(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&&Gi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(kn(e,t,i),e=e.sibling;e!==null;)kn(e,t,i),e=e.sibling}function du(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);mt(t,s,i),t[dt]=e,t[Ct]=i}catch(u){Fe(e,e.return,u)}}var mi=!1,lt=!1,Fl=!1,_u=typeof WeakSet=="function"?WeakSet:Set,ft=null;function b_(e,t){if(e=e.containerInfo,oo=ta,e=Lc(e),ka(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 a=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{i.nodeType,u.nodeType}catch{i=null;break e}var x=0,B=-1,q=-1,ee=0,le=0,ce=e,ie=null;t:for(;;){for(var ae;ce!==i||a!==0&&ce.nodeType!==3||(B=x+a),ce!==u||s!==0&&ce.nodeType!==3||(q=x+s),ce.nodeType===3&&(x+=ce.nodeValue.length),(ae=ce.firstChild)!==null;)ie=ce,ce=ae;for(;;){if(ce===e)break t;if(ie===i&&++ee===a&&(B=x),ie===u&&++le===s&&(q=x),(ae=ce.nextSibling)!==null)break;ce=ie,ie=ce.parentNode}ce=ae}i=B===-1||q===-1?null:{start:B,end:q}}else i=null}i=i||{start:0,end:0}}else i=null;for(co={focusedElem:e,selectionRange:i},ta=!1,ft=t;ft!==null;)if(t=ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ft=e;else for(;ft!==null;){switch(t=ft,u=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++)a=e[i],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,i=t,a=u.memoizedProps,u=u.memoizedState,s=i.stateNode;try{var ve=fs(i.type,a);e=s.getSnapshotBeforeUpdate(ve,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(be){Fe(i,i.return,be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)fo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":fo(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(j(163))}if(e=t.sibling,e!==null){e.return=t.return,ft=e;break}ft=t.return}}function vu(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Si(e,i),s&4&&Dr(5,i);break;case 1:if(Si(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(x){Fe(i,i.return,x)}else{var a=fs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Fe(i,i.return,x)}}s&64&&cu(i),s&512&&Mr(i,i.return);break;case 3:if(Si(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{Jc(e,t)}catch(x){Fe(i,i.return,x)}}break;case 27:t===null&&s&4&&du(i);case 26:case 5:Si(e,i),t===null&&s&4&&uu(i),s&512&&Mr(i,i.return);break;case 12:Si(e,i);break;case 31:Si(e,i),s&4&&pu(e,i);break;case 13:Si(e,i),s&4&&Su(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=M_.bind(null,i),K_(e,i))));break;case 22:if(s=i.memoizedState!==null||mi,!s){t=t!==null&&t.memoizedState!==null||lt,a=mi;var u=lt;mi=s,(lt=t)&&!u?yi(e,i,(i.subtreeFlags&8772)!==0):Si(e,i),mi=a,lt=u}break;case 30:break;default:Si(e,i)}}function gu(e){var t=e.alternate;t!==null&&(e.alternate=null,gu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ma(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 Ze=null,Et=!1;function pi(e,t,i){for(i=i.child;i!==null;)mu(e,t,i),i=i.sibling}function mu(e,t,i){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Vt,i)}catch{}switch(i.tag){case 26:lt||ii(i,t),pi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:lt||ii(i,t);var s=Ze,a=Et;Gi(i.type)&&(Ze=i.stateNode,Et=!1),pi(e,t,i),jr(i.stateNode),Ze=s,Et=a;break;case 5:lt||ii(i,t);case 6:if(s=Ze,a=Et,Ze=null,pi(e,t,i),Ze=s,Et=a,Ze!==null)if(Et)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(i.stateNode)}catch(u){Fe(i,t,u)}else try{Ze.removeChild(i.stateNode)}catch(u){Fe(i,t,u)}break;case 18:Ze!==null&&(Et?(e=Ze,hf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Js(e)):hf(Ze,i.stateNode));break;case 4:s=Ze,a=Et,Ze=i.stateNode.containerInfo,Et=!0,pi(e,t,i),Ze=s,Et=a;break;case 0:case 11:case 14:case 15:zi(2,i,t),lt||zi(4,i,t),pi(e,t,i);break;case 1:lt||(ii(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&hu(i,t,s)),pi(e,t,i);break;case 21:pi(e,t,i);break;case 22:lt=(s=lt)||i.memoizedState!==null,pi(e,t,i),lt=s;break;default:pi(e,t,i)}}function pu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Js(e)}catch(i){Fe(t,t.return,i)}}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Js(e)}catch(i){Fe(t,t.return,i)}}function C_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _u),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _u),t;default:throw Error(j(435,e.tag))}}function Hn(e,t){var i=C_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var a=T_.bind(null,e,s);s.then(a,a)}})}function xt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var a=i[s],u=e,x=t,B=x;e:for(;B!==null;){switch(B.tag){case 27:if(Gi(B.type)){Ze=B.stateNode,Et=!1;break e}break;case 5:Ze=B.stateNode,Et=!1;break e;case 3:case 4:Ze=B.stateNode.containerInfo,Et=!0;break e}B=B.return}if(Ze===null)throw Error(j(160));mu(u,x,a),Ze=null,Et=!1,u=a.alternate,u!==null&&(u.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yu(t,e),t=t.sibling}var Qt=null;function yu(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xt(t,e),Lt(e),s&4&&(zi(3,e,e.return),Dr(3,e),zi(5,e,e.return));break;case 1:xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),s&64&&mi&&(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 a=Qt;if(xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),s&4){var u=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,a=a.ownerDocument||a;t:switch(s){case"title":u=a.getElementsByTagName("title")[0],(!u||u[sr]||u[dt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=a.createElement(s),a.head.insertBefore(u,a.querySelector("head > title"))),mt(u,s,i),u[dt]=e,ut(u),s=u;break e;case"link":var x=bf("link","href",a).get(s+(i.href||""));if(x){for(var B=0;B<x.length;B++)if(u=x[B],u.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&u.getAttribute("rel")===(i.rel==null?null:i.rel)&&u.getAttribute("title")===(i.title==null?null:i.title)&&u.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){x.splice(B,1);break t}}u=a.createElement(s),mt(u,s,i),a.head.appendChild(u);break;case"meta":if(x=bf("meta","content",a).get(s+(i.content||""))){for(B=0;B<x.length;B++)if(u=x[B],u.getAttribute("content")===(i.content==null?null:""+i.content)&&u.getAttribute("name")===(i.name==null?null:i.name)&&u.getAttribute("property")===(i.property==null?null:i.property)&&u.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&u.getAttribute("charset")===(i.charSet==null?null:i.charSet)){x.splice(B,1);break t}}u=a.createElement(s),mt(u,s,i),a.head.appendChild(u);break;default:throw Error(j(468,s))}u[dt]=e,ut(u),s=u}e.stateNode=s}else Cf(a,e.type,e.stateNode);else e.stateNode=yf(a,s,e.memoizedProps);else u!==s?(u===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):u.count--,s===null?Cf(a,e.type,e.stateNode):yf(a,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ul(e,e.memoizedProps,i.memoizedProps)}break;case 27:xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),i!==null&&s&4&&Ul(e,e.memoizedProps,i.memoizedProps);break;case 5:if(xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),e.flags&32){a=e.stateNode;try{Cs(a,"")}catch(ve){Fe(e,e.return,ve)}}s&4&&e.stateNode!=null&&(a=e.memoizedProps,Ul(e,a,i!==null?i.memoizedProps:a)),s&1024&&(Fl=!0);break;case 6:if(xt(t,e),Lt(e),s&4){if(e.stateNode===null)throw Error(j(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){Fe(e,e.return,ve)}}break;case 3:if(Qn=null,a=Qt,Qt=Vn(t.containerInfo),xt(t,e),Qt=a,Lt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(ve){Fe(e,e.return,ve)}Fl&&(Fl=!1,bu(e));break;case 4:s=Qt,Qt=Vn(e.stateNode.containerInfo),xt(t,e),Lt(e),Qt=s;break;case 12:xt(t,e),Lt(e);break;case 31:xt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 13:xt(t,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(zn=Ce()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 22:a=e.memoizedState!==null;var q=i!==null&&i.memoizedState!==null,ee=mi,le=lt;if(mi=ee||a,lt=le||q,xt(t,e),lt=le,mi=ee,Lt(e),s&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(i===null||q||mi||lt||ds(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){q=i=t;try{if(u=q.stateNode,a)x=u.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{B=q.stateNode;var ce=q.memoizedProps.style,ie=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;B.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(ve){Fe(q,q.return,ve)}}}else if(t.tag===6){if(i===null){q=t;try{q.stateNode.nodeValue=a?"":q.memoizedProps}catch(ve){Fe(q,q.return,ve)}}}else if(t.tag===18){if(i===null){q=t;try{var ae=q.stateNode;a?uf(ae,!0):uf(q.stateNode,!1)}catch(ve){Fe(q,q.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;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,Hn(e,i))));break;case 19:xt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 30:break;case 21:break;default:xt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(fu(s)){i=s;break}s=s.return}if(i==null)throw Error(j(160));switch(i.tag){case 27:var a=i.stateNode,u=jl(e);kn(e,u,a);break;case 5:var x=i.stateNode;i.flags&32&&(Cs(x,""),i.flags&=-33);var B=jl(e);kn(e,B,x);break;case 3:case 4:var q=i.stateNode.containerInfo,ee=jl(e);Il(e,ee,q);break;default:throw Error(j(161))}}catch(le){Fe(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Si(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vu(e,t.alternate,t),t=t.sibling}function ds(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zi(4,t,t.return),ds(t);break;case 1:ii(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&hu(t,t.return,i),ds(t);break;case 27:jr(t.stateNode);case 26:case 5:ii(t,t.return),ds(t);break;case 22:t.memoizedState===null&&ds(t);break;case 30:ds(t);break;default:ds(t)}e=e.sibling}}function yi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,a=e,u=t,x=u.flags;switch(u.tag){case 0:case 11:case 15:yi(a,u,i),Dr(4,u);break;case 1:if(yi(a,u,i),s=u,a=s.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(ee){Fe(s,s.return,ee)}if(s=u,a=s.updateQueue,a!==null){var B=s.stateNode;try{var q=a.shared.hiddenCallbacks;if(q!==null)for(a.shared.hiddenCallbacks=null,a=0;a<q.length;a++)Zc(q[a],B)}catch(ee){Fe(s,s.return,ee)}}i&&x&64&&cu(u),Mr(u,u.return);break;case 27:du(u);case 26:case 5:yi(a,u,i),i&&s===null&&x&4&&uu(u),Mr(u,u.return);break;case 12:yi(a,u,i);break;case 31:yi(a,u,i),i&&x&4&&pu(a,u);break;case 13:yi(a,u,i),i&&x&4&&Su(a,u);break;case 22:u.memoizedState===null&&yi(a,u,i),Mr(u,u.return);break;case 30:break;default:yi(a,u,i)}t=t.sibling}}function Pl(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&&gr(i))}function ql(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gr(e))}function Zt(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cu(e,t,i,s),t=t.sibling}function Cu(e,t,i,s){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Zt(e,t,i,s),a&2048&&Dr(9,t);break;case 1:Zt(e,t,i,s);break;case 3:Zt(e,t,i,s),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gr(e)));break;case 12:if(a&2048){Zt(e,t,i,s),e=t.stateNode;try{var u=t.memoizedProps,x=u.id,B=u.onPostCommit;typeof B=="function"&&B(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(q){Fe(t,t.return,q)}}else Zt(e,t,i,s);break;case 31:Zt(e,t,i,s);break;case 13:Zt(e,t,i,s);break;case 23:break;case 22:u=t.stateNode,x=t.alternate,t.memoizedState!==null?u._visibility&2?Zt(e,t,i,s):Tr(e,t):u._visibility&2?Zt(e,t,i,s):(u._visibility|=2,Ps(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Pl(x,t);break;case 24:Zt(e,t,i,s),a&2048&&ql(t.alternate,t);break;default:Zt(e,t,i,s)}}function Ps(e,t,i,s,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,x=t,B=i,q=s,ee=x.flags;switch(x.tag){case 0:case 11:case 15:Ps(u,x,B,q,a),Dr(8,x);break;case 23:break;case 22:var le=x.stateNode;x.memoizedState!==null?le._visibility&2?Ps(u,x,B,q,a):Tr(u,x):(le._visibility|=2,Ps(u,x,B,q,a)),a&&ee&2048&&Pl(x.alternate,x);break;case 24:Ps(u,x,B,q,a),a&&ee&2048&&ql(x.alternate,x);break;default:Ps(u,x,B,q,a)}t=t.sibling}}function Tr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,a=s.flags;switch(s.tag){case 22:Tr(i,s),a&2048&&Pl(s.alternate,s);break;case 24:Tr(i,s),a&2048&&ql(s.alternate,s);break;default:Tr(i,s)}t=t.sibling}}var Br=8192;function qs(e,t,i){if(e.subtreeFlags&Br)for(e=e.child;e!==null;)wu(e,t,i),e=e.sibling}function wu(e,t,i){switch(e.tag){case 26:qs(e,t,i),e.flags&Br&&e.memoizedState!==null&&ov(i,Qt,e.memoizedState,e.memoizedProps);break;case 5:qs(e,t,i);break;case 3:case 4:var s=Qt;Qt=Vn(e.stateNode.containerInfo),qs(e,t,i),Qt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Br,Br=16777216,qs(e,t,i),Br=s):qs(e,t,i));break;default:qs(e,t,i)}}function Eu(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 Or(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];ft=s,Lu(s,e)}Eu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)xu(e),e=e.sibling}function xu(e){switch(e.tag){case 0:case 11:case 15:Or(e),e.flags&2048&&zi(9,e,e.return);break;case 3:Or(e);break;case 12:Or(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nn(e)):Or(e);break;default:Or(e)}}function Nn(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];ft=s,Lu(s,e)}Eu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zi(8,t,t.return),Nn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Nn(t));break;default:Nn(t)}e=e.sibling}}function Lu(e,t){for(;ft!==null;){var i=ft;switch(i.tag){case 0:case 11:case 15:zi(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:gr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ft=s;else e:for(i=e;ft!==null;){s=ft;var a=s.sibling,u=s.return;if(gu(s),s===i){ft=null;break e}if(a!==null){a.return=u,ft=a;break e}ft=u}}}var w_={getCacheForType:function(e){var t=vt(rt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return vt(rt).controller.signal}},E_=typeof WeakMap=="function"?WeakMap:Map,je=0,Xe=null,Me=null,Oe=0,Ie=0,Ht=null,Ui=!1,Gs=!1,Gl=!1,bi=0,tt=0,ji=0,_s=0,Wl=0,Nt=0,Ws=0,kr=null,At=null,$l=!1,zn=0,Au=0,Un=1/0,jn=null,Ii=null,ct=0,Fi=null,$s=null,Ci=0,Xl=0,Yl=null,Ru=null,Hr=0,Vl=null;function zt(){return(je&2)!==0&&Oe!==0?Oe&-Oe:N.T!==null?to():Go()}function Du(){if(Nt===0)if((Oe&536870912)===0||He){var e=Ki;Ki<<=1,(Ki&3932160)===0&&(Ki=262144),Nt=e}else Nt=536870912;return e=Ot.current,e!==null&&(e.flags|=32),Nt}function Rt(e,t,i){(e===Xe&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(Xs(e,0),Pi(e,Oe,Nt,!1)),ir(e,i),((je&2)===0||e!==Xe)&&(e===Xe&&((je&2)===0&&(_s|=i),tt===4&&Pi(e,Oe,Nt,!1)),si(e))}function Mu(e,t,i){if((je&6)!==0)throw Error(j(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||tr(e,t),a=s?A_(e,t):Ql(e,t,!0),u=s;do{if(a===0){Gs&&!s&&Pi(e,t,0,!1);break}else{if(i=e.current.alternate,u&&!x_(i)){a=Ql(e,t,!1),u=!1;continue}if(a===2){if(u=t,e.errorRecoveryDisabledLanes&u)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var B=e;a=kr;var q=B.current.memoizedState.isDehydrated;if(q&&(Xs(B,x).flags|=256),x=Ql(B,x,!1),x!==2){if(Gl&&!q){B.errorRecoveryDisabledLanes|=u,_s|=u,a=4;break e}u=At,At=a,u!==null&&(At===null?At=u:At.push.apply(At,u))}a=x}if(u=!1,a!==2)continue}}if(a===1){Xs(e,0),Pi(e,t,0,!0);break}e:{switch(s=e,u=a,u){case 0:case 1:throw Error(j(345));case 4:if((t&4194048)!==t)break;case 6:Pi(s,t,Nt,!Ui);break e;case 2:At=null;break;case 3:case 5:break;default:throw Error(j(329))}if((t&62914560)===t&&(a=zn+300-Ce(),10<a)){if(Pi(s,t,Nt,!Ui),Yr(s,0,!0)!==0)break e;Ci=t,s.timeoutHandle=of(Tu.bind(null,s,i,At,jn,$l,t,Nt,_s,Ws,Ui,u,"Throttled",-0,0),a);break e}Tu(s,i,At,jn,$l,t,Nt,_s,Ws,Ui,u,null,-0,0)}}break}while(!0);si(e)}function Tu(e,t,i,s,a,u,x,B,q,ee,le,ce,ie,ae){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:li},wu(t,u,ce);var ve=(u&62914560)===u?zn-Ce():(u&4194048)===u?Au-Ce():0;if(ve=cv(ce,ve),ve!==null){Ci=u,e.cancelPendingCommit=ve(ju.bind(null,e,t,u,i,s,a,x,B,q,le,ce,null,ie,ae)),Pi(e,u,x,!ee);return}}ju(e,t,u,i,s,a,x,B,q)}function x_(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 a=i[s],u=a.getSnapshot;a=a.value;try{if(!Tt(u(),a))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 Pi(e,t,i,s){t&=~Wl,t&=~_s,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var a=t;0<a;){var u=31-pt(a),x=1<<u;s[u]=-1,a&=~x}i!==0&&Fo(e,i,t)}function In(){return(je&6)===0?(Nr(0),!1):!0}function Kl(){if(Me!==null){if(Ie===0)var e=Me.return;else e=Me,ui=ns=null,fl(e),zs=null,pr=0,e=Me;for(;e!==null;)ou(e.alternate,e),e=e.return;Me=null}}function Xs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,W_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ci=0,Kl(),Xe=e,Me=i=ci(e.current,null),Oe=t,Ie=0,Ht=null,Ui=!1,Gs=tr(e,t),Gl=!1,Ws=Nt=Wl=_s=ji=tt=0,At=kr=null,$l=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var a=31-pt(s),u=1<<a;t|=e[a],s&=~u}return bi=t,ln(),i}function Bu(e,t){xe=null,N.H=Lr,t===Ns||t===vn?(t=Yc(),Ie=3):t===el?(t=Yc(),Ie=4):Ie=t===Rl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ht=t,Me===null&&(tt=1,Dn(e,Pt(t,e.current)))}function Ou(){var e=Ot.current;return e===null?!0:(Oe&4194048)===Oe?$t===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===$t:!1}function ku(){var e=N.H;return N.H=Lr,e===null?Lr:e}function Hu(){var e=N.A;return N.A=w_,e}function Fn(){tt=4,Ui||(Oe&4194048)!==Oe&&Ot.current!==null||(Gs=!0),(ji&134217727)===0&&(_s&134217727)===0||Xe===null||Pi(Xe,Oe,Nt,!1)}function Ql(e,t,i){var s=je;je|=2;var a=ku(),u=Hu();(Xe!==e||Oe!==t)&&(jn=null,Xs(e,t)),t=!1;var x=tt;e:do try{if(Ie!==0&&Me!==null){var B=Me,q=Ht;switch(Ie){case 8:Kl(),x=6;break e;case 3:case 2:case 9:case 6:Ot.current===null&&(t=!0);var ee=Ie;if(Ie=0,Ht=null,Ys(e,B,q,ee),i&&Gs){x=0;break e}break;default:ee=Ie,Ie=0,Ht=null,Ys(e,B,q,ee)}}L_(),x=tt;break}catch(le){Bu(e,le)}while(!0);return t&&e.shellSuspendCounter++,ui=ns=null,je=s,N.H=a,N.A=u,Me===null&&(Xe=null,Oe=0,ln()),x}function L_(){for(;Me!==null;)Nu(Me)}function A_(e,t){var i=je;je|=2;var s=ku(),a=Hu();Xe!==e||Oe!==t?(jn=null,Un=Ce()+500,Xs(e,t)):Gs=tr(e,t);e:do try{if(Ie!==0&&Me!==null){t=Me;var u=Ht;t:switch(Ie){case 1:Ie=0,Ht=null,Ys(e,t,u,1);break;case 2:case 9:if($c(u)){Ie=0,Ht=null,zu(t);break}t=function(){Ie!==2&&Ie!==9||Xe!==e||(Ie=7),si(e)},u.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:$c(u)?(Ie=0,Ht=null,zu(t)):(Ie=0,Ht=null,Ys(e,t,u,7));break;case 5:var x=null;switch(Me.tag){case 26:x=Me.memoizedState;case 5:case 27:var B=Me;if(x?wf(x):B.stateNode.complete){Ie=0,Ht=null;var q=B.sibling;if(q!==null)Me=q;else{var ee=B.return;ee!==null?(Me=ee,Pn(ee)):Me=null}break t}}Ie=0,Ht=null,Ys(e,t,u,5);break;case 6:Ie=0,Ht=null,Ys(e,t,u,6);break;case 8:Kl(),tt=6;break e;default:throw Error(j(462))}}R_();break}catch(le){Bu(e,le)}while(!0);return ui=ns=null,N.H=s,N.A=a,je=i,Me!==null?0:(Xe=null,Oe=0,ln(),tt)}function R_(){for(;Me!==null&&!De();)Nu(Me)}function Nu(e){var t=au(e.alternate,e,bi);e.memoizedProps=e.pendingProps,t===null?Pn(e):Me=t}function zu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=eu(i,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=eu(i,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:fl(t);default:ou(i,t),t=Me=Hc(t,bi),t=au(i,t,bi)}e.memoizedProps=e.pendingProps,t===null?Pn(e):Me=t}function Ys(e,t,i,s){ui=ns=null,fl(t),zs=null,pr=0;var a=t.return;try{if(g_(e,a,t,i,Oe)){tt=1,Dn(e,Pt(i,e.current)),Me=null;return}}catch(u){if(a!==null)throw Me=a,u;tt=1,Dn(e,Pt(i,e.current)),Me=null;return}t.flags&32768?(He||s===1?e=!0:Gs||(Oe&536870912)!==0?e=!1:(Ui=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ot.current,s!==null&&s.tag===13&&(s.flags|=16384))),Uu(t,e)):Pn(t)}function Pn(e){var t=e;do{if((t.flags&32768)!==0){Uu(t,Ui);return}e=t.return;var i=S_(t.alternate,t,bi);if(i!==null){Me=i;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);tt===0&&(tt=5)}function Uu(e,t){do{var i=y_(e.alternate,e);if(i!==null){i.flags&=32767,Me=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Me=e;return}Me=e=i}while(e!==null);tt=6,Me=null}function ju(e,t,i,s,a,u,x,B,q){e.cancelPendingCommit=null;do qn();while(ct!==0);if((je&6)!==0)throw Error(j(327));if(t!==null){if(t===e.current)throw Error(j(177));if(u=t.lanes|t.childLanes,u|=ja,ld(e,i,u,x,B,q),e===Xe&&(Me=Xe=null,Oe=0),$s=t,Fi=e,Ci=i,Xl=u,Yl=a,Ru=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,B_(ot,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=N.T,N.T=null,a=I.p,I.p=2,x=je,je|=4;try{b_(e,t,i)}finally{je=x,I.p=a,N.T=s}}ct=1,Iu(),Fu(),Pu()}}function Iu(){if(ct===1){ct=0;var e=Fi,t=$s,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=N.T,N.T=null;var s=I.p;I.p=2;var a=je;je|=4;try{yu(t,e);var u=co,x=Lc(e.containerInfo),B=u.focusedElem,q=u.selectionRange;if(x!==B&&B&&B.ownerDocument&&xc(B.ownerDocument.documentElement,B)){if(q!==null&&ka(B)){var ee=q.start,le=q.end;if(le===void 0&&(le=ee),"selectionStart"in B)B.selectionStart=ee,B.selectionEnd=Math.min(le,B.value.length);else{var ce=B.ownerDocument||document,ie=ce&&ce.defaultView||window;if(ie.getSelection){var ae=ie.getSelection(),ve=B.textContent.length,be=Math.min(q.start,ve),$e=q.end===void 0?be:Math.min(q.end,ve);!ae.extend&&be>$e&&(x=$e,$e=be,be=x);var Q=Ec(B,be),W=Ec(B,$e);if(Q&&W&&(ae.rangeCount!==1||ae.anchorNode!==Q.node||ae.anchorOffset!==Q.offset||ae.focusNode!==W.node||ae.focusOffset!==W.offset)){var J=ce.createRange();J.setStart(Q.node,Q.offset),ae.removeAllRanges(),be>$e?(ae.addRange(J),ae.extend(W.node,W.offset)):(J.setEnd(W.node,W.offset),ae.addRange(J))}}}}for(ce=[],ae=B;ae=ae.parentNode;)ae.nodeType===1&&ce.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<ce.length;B++){var oe=ce[B];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ta=!!oo,co=oo=null}finally{je=a,I.p=s,N.T=i}}e.current=t,ct=2}}function Fu(){if(ct===2){ct=0;var e=Fi,t=$s,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=N.T,N.T=null;var s=I.p;I.p=2;var a=je;je|=4;try{vu(e,t.alternate,t)}finally{je=a,I.p=s,N.T=i}}ct=3}}function Pu(){if(ct===4||ct===3){ct=0,_e();var e=Fi,t=$s,i=Ci,s=Ru;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,$s=Fi=null,qu(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Ii=null),va(i),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Vt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=N.T,a=I.p,I.p=2,N.T=null;try{for(var u=e.onRecoverableError,x=0;x<s.length;x++){var B=s[x];u(B.value,{componentStack:B.stack})}}finally{N.T=t,I.p=a}}(Ci&3)!==0&&qn(),si(e),a=e.pendingLanes,(i&261930)!==0&&(a&42)!==0?e===Vl?Hr++:(Hr=0,Vl=e):Hr=0,Nr(0)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,gr(t)))}function qn(){return Iu(),Fu(),Pu(),Gu()}function Gu(){if(ct!==5)return!1;var e=Fi,t=Xl;Xl=0;var i=va(Ci),s=N.T,a=I.p;try{I.p=32>i?32:i,N.T=null,i=Yl,Yl=null;var u=Fi,x=Ci;if(ct=0,$s=Fi=null,Ci=0,(je&6)!==0)throw Error(j(331));var B=je;if(je|=4,xu(u.current),Cu(u,u.current,x,i),je=B,Nr(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Vt,u)}catch{}return!0}finally{I.p=a,N.T=s,qu(e,t)}}function Wu(e,t,i){t=Pt(i,t),t=Al(e.stateNode,t,2),e=ki(e,t,2),e!==null&&(ir(e,2),si(e))}function Fe(e,t,i){if(e.tag===3)Wu(e,e,i);else for(;t!==null;){if(t.tag===3){Wu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ii===null||!Ii.has(s))){e=Pt(i,e),i=$h(2),s=ki(t,i,2),s!==null&&(Xh(i,s,t,e),ir(s,2),si(s));break}}t=t.return}}function Zl(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new E_;var a=new Set;s.set(t,a)}else a=s.get(t),a===void 0&&(a=new Set,s.set(t,a));a.has(i)||(Gl=!0,a.add(i),e=D_.bind(null,e,t,i),t.then(e,e))}function D_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Xe===e&&(Oe&i)===i&&(tt===4||tt===3&&(Oe&62914560)===Oe&&300>Ce()-zn?(je&2)===0&&Xs(e,0):Wl|=i,Ws===Oe&&(Ws=0)),si(e)}function $u(e,t){t===0&&(t=Io()),e=is(e,t),e!==null&&(ir(e,t),si(e))}function M_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),$u(e,i)}function T_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,a=e.memoizedState;a!==null&&(i=a.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(j(314))}s!==null&&s.delete(t),$u(e,i)}function B_(e,t){return Be(e,t)}var Gn=null,Vs=null,Jl=!1,Wn=!1,eo=!1,qi=0;function si(e){e!==Vs&&e.next===null&&(Vs===null?Gn=Vs=e:Vs=Vs.next=e),Wn=!0,Jl||(Jl=!0,k_())}function Nr(e,t){if(!eo&&Wn){eo=!0;do for(var i=!1,s=Gn;s!==null;){if(e!==0){var a=s.pendingLanes;if(a===0)var u=0;else{var x=s.suspendedLanes,B=s.pingedLanes;u=(1<<31-pt(42|e)+1)-1,u&=a&~(x&~B),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(i=!0,Ku(s,u))}else u=Oe,u=Yr(s,s===Xe?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||tr(s,u)||(i=!0,Ku(s,u));s=s.next}while(i);eo=!1}}function O_(){Xu()}function Xu(){Wn=Jl=!1;var e=0;qi!==0&&G_()&&(e=qi);for(var t=Ce(),i=null,s=Gn;s!==null;){var a=s.next,u=Yu(s,t);u===0?(s.next=null,i===null?Gn=a:i.next=a,a===null&&(Vs=i)):(i=s,(e!==0||(u&3)!==0)&&(Wn=!0)),s=a}ct!==0&&ct!==5||Nr(e),qi!==0&&(qi=0)}function Yu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var x=31-pt(u),B=1<<x,q=a[x];q===-1?((B&i)===0||(B&s)!==0)&&(a[x]=ad(B,t)):q<=t&&(e.expiredLanes|=B),u&=~B}if(t=Xe,i=Oe,i=Yr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ae(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||tr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Ae(s),va(i)){case 2:case 8:i=Ut;break;case 32:i=ot;break;case 268435456:i=Je;break;default:i=ot}return s=Vu.bind(null,e),i=Be(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Ae(s),e.callbackPriority=2,e.callbackNode=null,2}function Vu(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(qn()&&e.callbackNode!==i)return null;var s=Oe;return s=Yr(e,e===Xe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Mu(e,s,t),Yu(e,Ce()),e.callbackNode!=null&&e.callbackNode===i?Vu.bind(null,e):null)}function Ku(e,t){if(qn())return null;Mu(e,t,!0)}function k_(){$_(function(){(je&6)!==0?Be(Pe,O_):Xu()})}function to(){if(qi===0){var e=ks;e===0&&(e=xi,xi<<=1,(xi&261888)===0&&(xi=256)),qi=e}return qi}function Qu(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Zr(""+e)}function Zu(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 H_(e,t,i,s,a){if(t==="submit"&&i&&i.stateNode===a){var u=Qu((a[Ct]||null).action),x=s.submitter;x&&(t=(t=x[Ct]||null)?Qu(t.formAction):x.getAttribute("formAction"),t!==null&&(u=t,x=null));var B=new sn("action","action",null,s,a);e.push({event:B,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(qi!==0){var q=x?Zu(a,x):new FormData(a);bl(i,{pending:!0,data:q,method:a.method,action:u},null,q)}}else typeof u=="function"&&(B.preventDefault(),q=x?Zu(a,x):new FormData(a),bl(i,{pending:!0,data:q,method:a.method,action:u},u,q))},currentTarget:a}]})}}for(var io=0;io<Ua.length;io++){var so=Ua[io],N_=so.toLowerCase(),z_=so[0].toUpperCase()+so.slice(1);Kt(N_,"on"+z_)}Kt(Dc,"onAnimationEnd"),Kt(Mc,"onAnimationIteration"),Kt(Tc,"onAnimationStart"),Kt("dblclick","onDoubleClick"),Kt("focusin","onFocus"),Kt("focusout","onBlur"),Kt(Jd,"onTransitionRun"),Kt(e_,"onTransitionStart"),Kt(t_,"onTransitionCancel"),Kt(Bc,"onTransitionEnd"),ys("onMouseEnter",["mouseout","mouseover"]),ys("onMouseLeave",["mouseout","mouseover"]),ys("onPointerEnter",["pointerout","pointerover"]),ys("onPointerLeave",["pointerout","pointerover"]),Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zr="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(" "),U_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zr));function Ju(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],a=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var x=s.length-1;0<=x;x--){var B=s[x],q=B.instance,ee=B.currentTarget;if(B=B.listener,q!==u&&a.isPropagationStopped())break e;u=B,a.currentTarget=ee;try{u(a)}catch(le){an(le)}a.currentTarget=null,u=q}else for(x=0;x<s.length;x++){if(B=s[x],q=B.instance,ee=B.currentTarget,B=B.listener,q!==u&&a.isPropagationStopped())break e;u=B,a.currentTarget=ee;try{u(a)}catch(le){an(le)}a.currentTarget=null,u=q}}}}function Te(e,t){var i=t[ga];i===void 0&&(i=t[ga]=new Set);var s=e+"__bubble";i.has(s)||(ef(t,e,2,!1),i.add(s))}function ro(e,t,i){var s=0;t&&(s|=4),ef(i,e,s,t)}var $n="_reactListening"+Math.random().toString(36).slice(2);function no(e){if(!e[$n]){e[$n]=!0,Xo.forEach(function(i){i!=="selectionchange"&&(U_.has(i)||ro(i,!1,e),ro(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$n]||(t[$n]=!0,ro("selectionchange",!1,t))}}function ef(e,t,i,s){switch(Mf(t)){case 2:var a=fv;break;case 8:a=dv;break;default:a=bo}i=a.bind(null,t,i,e),a=void 0,!xa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),s?a!==void 0?e.addEventListener(t,i,{capture:!0,passive:a}):e.addEventListener(t,i,!0):a!==void 0?e.addEventListener(t,i,{passive:a}):e.addEventListener(t,i,!1)}function ao(e,t,i,s,a){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var x=s.tag;if(x===3||x===4){var B=s.stateNode.containerInfo;if(B===a)break;if(x===4)for(x=s.return;x!==null;){var q=x.tag;if((q===3||q===4)&&x.stateNode.containerInfo===a)return;x=x.return}for(;B!==null;){if(x=ms(B),x===null)return;if(q=x.tag,q===5||q===6||q===26||q===27){s=u=x;continue e}B=B.parentNode}}s=s.return}nc(function(){var ee=u,le=wa(i),ce=[];e:{var ie=Oc.get(e);if(ie!==void 0){var ae=sn,ve=e;switch(e){case"keypress":if(en(i)===0)break e;case"keydown":case"keyup":ae=Td;break;case"focusin":ve="focus",ae=Da;break;case"focusout":ve="blur",ae=Da;break;case"beforeblur":case"afterblur":ae=Da;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":ae=oc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=Sd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=kd;break;case Dc:case Mc:case Tc:ae=Cd;break;case Bc:ae=Nd;break;case"scroll":case"scrollend":ae=md;break;case"wheel":ae=Ud;break;case"copy":case"cut":case"paste":ae=Ed;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=hc;break;case"toggle":case"beforetoggle":ae=Id}var be=(t&4)!==0,$e=!be&&(e==="scroll"||e==="scrollend"),Q=be?ie!==null?ie+"Capture":null:ie;be=[];for(var W=ee,J;W!==null;){var oe=W;if(J=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||J===null||Q===null||(oe=nr(W,Q),oe!=null&&be.push(Ur(W,oe,J))),$e)break;W=W.return}0<be.length&&(ie=new ae(ie,ve,null,i,le),ce.push({event:ie,listeners:be}))}}if((t&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",ie&&i!==Ca&&(ve=i.relatedTarget||i.fromElement)&&(ms(ve)||ve[gs]))break e;if((ae||ie)&&(ie=le.window===le?le:(ie=le.ownerDocument)?ie.defaultView||ie.parentWindow:window,ae?(ve=i.relatedTarget||i.toElement,ae=ee,ve=ve?ms(ve):null,ve!==null&&($e=re(ve),be=ve.tag,ve!==$e||be!==5&&be!==27&&be!==6)&&(ve=null)):(ae=null,ve=ee),ae!==ve)){if(be=oc,oe="onMouseLeave",Q="onMouseEnter",W="mouse",(e==="pointerout"||e==="pointerover")&&(be=hc,oe="onPointerLeave",Q="onPointerEnter",W="pointer"),$e=ae==null?ie:rr(ae),J=ve==null?ie:rr(ve),ie=new be(oe,W+"leave",ae,i,le),ie.target=$e,ie.relatedTarget=J,oe=null,ms(le)===ee&&(be=new be(Q,W+"enter",ve,i,le),be.target=J,be.relatedTarget=$e,oe=be),$e=oe,ae&&ve)t:{for(be=j_,Q=ae,W=ve,J=0,oe=Q;oe;oe=be(oe))J++;oe=0;for(var Se=W;Se;Se=be(Se))oe++;for(;0<J-oe;)Q=be(Q),J--;for(;0<oe-J;)W=be(W),oe--;for(;J--;){if(Q===W||W!==null&&Q===W.alternate){be=Q;break t}Q=be(Q),W=be(W)}be=null}else be=null;ae!==null&&tf(ce,ie,ae,be,!1),ve!==null&&$e!==null&&tf(ce,$e,ve,be,!0)}}e:{if(ie=ee?rr(ee):window,ae=ie.nodeName&&ie.nodeName.toLowerCase(),ae==="select"||ae==="input"&&ie.type==="file")var ze=pc;else if(gc(ie))if(Sc)ze=Kd;else{ze=Yd;var ge=Xd}else ae=ie.nodeName,!ae||ae.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?ee&&ba(ee.elementType)&&(ze=pc):ze=Vd;if(ze&&(ze=ze(e,ee))){mc(ce,ze,i,le);break e}ge&&ge(e,ie,ee),e==="focusout"&&ee&&ie.type==="number"&&ee.memoizedProps.value!=null&&ya(ie,"number",ie.value)}switch(ge=ee?rr(ee):window,e){case"focusin":(gc(ge)||ge.contentEditable==="true")&&(Ls=ge,Ha=ee,dr=null);break;case"focusout":dr=Ha=Ls=null;break;case"mousedown":Na=!0;break;case"contextmenu":case"mouseup":case"dragend":Na=!1,Ac(ce,i,le);break;case"selectionchange":if(Zd)break;case"keydown":case"keyup":Ac(ce,i,le)}var Le;if(Ta)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else xs?_c(e,i)&&(ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ke="onCompositionStart");ke&&(uc&&i.locale!=="ko"&&(xs||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&xs&&(Le=ac()):(Ai=le,La="value"in Ai?Ai.value:Ai.textContent,xs=!0)),ge=Xn(ee,ke),0<ge.length&&(ke=new cc(ke,e,null,i,le),ce.push({event:ke,listeners:ge}),Le?ke.data=Le:(Le=vc(i),Le!==null&&(ke.data=Le)))),(Le=Pd?qd(e,i):Gd(e,i))&&(ke=Xn(ee,"onBeforeInput"),0<ke.length&&(ge=new cc("onBeforeInput","beforeinput",null,i,le),ce.push({event:ge,listeners:ke}),ge.data=Le)),H_(ce,e,ee,i,le)}Ju(ce,t)})}function Ur(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Xn(e,t){for(var i=t+"Capture",s=[];e!==null;){var a=e,u=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||u===null||(a=nr(e,i),a!=null&&s.unshift(Ur(e,a,u)),a=nr(e,t),a!=null&&s.push(Ur(e,a,u))),e.tag===3)return s;e=e.return}return[]}function j_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tf(e,t,i,s,a){for(var u=t._reactName,x=[];i!==null&&i!==s;){var B=i,q=B.alternate,ee=B.stateNode;if(B=B.tag,q!==null&&q===s)break;B!==5&&B!==26&&B!==27||ee===null||(q=ee,a?(ee=nr(i,u),ee!=null&&x.unshift(Ur(i,ee,q))):a||(ee=nr(i,u),ee!=null&&x.push(Ur(i,ee,q)))),i=i.return}x.length!==0&&e.push({event:t,listeners:x})}var I_=/\r\n?/g,F_=/\u0000|\uFFFD/g;function sf(e){return(typeof e=="string"?e:""+e).replace(I_,`
|
|
49
|
-
`).replace(F_,"")}function rf(e,t){return t=sf(t),sf(e)===t}function We(e,t,i,s,a,u){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Cs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Cs(e,""+s);break;case"className":Kr(e,"class",s);break;case"tabIndex":Kr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Kr(e,i,s);break;case"style":sc(e,s,u);break;case"data":if(t!=="object"){Kr(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=Zr(""+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 u=="function"&&(i==="formAction"?(t!=="input"&&We(e,t,"name",a.name,a,null),We(e,t,"formEncType",a.formEncType,a,null),We(e,t,"formMethod",a.formMethod,a,null),We(e,t,"formTarget",a.formTarget,a,null)):(We(e,t,"encType",a.encType,a,null),We(e,t,"method",a.method,a,null),We(e,t,"target",a.target,a,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Zr(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=li);break;case"onScroll":s!=null&&Te("scroll",e);break;case"onScrollEnd":s!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(a.children!=null)throw Error(j(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=Zr(""+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":Te("beforetoggle",e),Te("toggle",e),Vr(e,"popover",s);break;case"xlinkActuate":ai(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ai(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ai(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ai(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ai(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ai(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ai(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ai(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ai(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Vr(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=vd.get(i)||i,Vr(e,i,s))}}function lo(e,t,i,s,a,u){switch(i){case"style":sc(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(a.children!=null)throw Error(j(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Cs(e,s):(typeof s=="number"||typeof s=="bigint")&&Cs(e,""+s);break;case"onScroll":s!=null&&Te("scroll",e);break;case"onScrollEnd":s!=null&&Te("scrollend",e);break;case"onClick":s!=null&&(e.onclick=li);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(a=i.endsWith("Capture"),t=i.slice(2,a?i.length-7:void 0),u=e[Ct]||null,u=u!=null?u[i]:null,typeof u=="function"&&e.removeEventListener(t,u,a),typeof s=="function")){typeof u!="function"&&u!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,a);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Vr(e,i,s)}}}function mt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var s=!1,a=!1,u;for(u in i)if(i.hasOwnProperty(u)){var x=i[u];if(x!=null)switch(u){case"src":s=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:We(e,t,u,x,i,null)}}a&&We(e,t,"srcSet",i.srcSet,i,null),s&&We(e,t,"src",i.src,i,null);return;case"input":Te("invalid",e);var B=u=x=a=null,q=null,ee=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":a=le;break;case"type":x=le;break;case"checked":q=le;break;case"defaultChecked":ee=le;break;case"value":u=le;break;case"defaultValue":B=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(j(137,t));break;default:We(e,t,s,le,i,null)}}Jo(e,u,B,q,ee,x,a,!1);return;case"select":Te("invalid",e),s=x=u=null;for(a in i)if(i.hasOwnProperty(a)&&(B=i[a],B!=null))switch(a){case"value":u=B;break;case"defaultValue":x=B;break;case"multiple":s=B;default:We(e,t,a,B,i,null)}t=u,i=x,e.multiple=!!s,t!=null?bs(e,!!s,t,!1):i!=null&&bs(e,!!s,i,!0);return;case"textarea":Te("invalid",e),u=a=s=null;for(x in i)if(i.hasOwnProperty(x)&&(B=i[x],B!=null))switch(x){case"value":s=B;break;case"defaultValue":a=B;break;case"children":u=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(j(91));break;default:We(e,t,x,B,i,null)}tc(e,s,a,u);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:We(e,t,q,s,i,null)}return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(s=0;s<zr.length;s++)Te(zr[s],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("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(ee in i)if(i.hasOwnProperty(ee)&&(s=i[ee],s!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:We(e,t,ee,s,i,null)}return;default:if(ba(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&lo(e,t,le,s,i,void 0));return}}for(B in i)i.hasOwnProperty(B)&&(s=i[B],s!=null&&We(e,t,B,s,i,null))}function P_(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 a=null,u=null,x=null,B=null,q=null,ee=null,le=null;for(ae in i){var ce=i[ae];if(i.hasOwnProperty(ae)&&ce!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":q=ce;default:s.hasOwnProperty(ae)||We(e,t,ae,null,s,ce)}}for(var ie in s){var ae=s[ie];if(ce=i[ie],s.hasOwnProperty(ie)&&(ae!=null||ce!=null))switch(ie){case"type":u=ae;break;case"name":a=ae;break;case"checked":ee=ae;break;case"defaultChecked":le=ae;break;case"value":x=ae;break;case"defaultValue":B=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(j(137,t));break;default:ae!==ce&&We(e,t,ie,ae,s,ce)}}Sa(e,x,B,q,ee,le,u,a);return;case"select":ae=x=B=ie=null;for(u in i)if(q=i[u],i.hasOwnProperty(u)&&q!=null)switch(u){case"value":break;case"multiple":ae=q;default:s.hasOwnProperty(u)||We(e,t,u,null,s,q)}for(a in s)if(u=s[a],q=i[a],s.hasOwnProperty(a)&&(u!=null||q!=null))switch(a){case"value":ie=u;break;case"defaultValue":B=u;break;case"multiple":x=u;default:u!==q&&We(e,t,a,u,s,q)}t=B,i=x,s=ae,ie!=null?bs(e,!!i,ie,!1):!!s!=!!i&&(t!=null?bs(e,!!i,t,!0):bs(e,!!i,i?[]:"",!1));return;case"textarea":ae=ie=null;for(B in i)if(a=i[B],i.hasOwnProperty(B)&&a!=null&&!s.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:We(e,t,B,null,s,a)}for(x in s)if(a=s[x],u=i[x],s.hasOwnProperty(x)&&(a!=null||u!=null))switch(x){case"value":ie=a;break;case"defaultValue":ae=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(j(91));break;default:a!==u&&We(e,t,x,a,s,u)}ec(e,ie,ae);return;case"option":for(var ve in i)if(ie=i[ve],i.hasOwnProperty(ve)&&ie!=null&&!s.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:We(e,t,ve,null,s,ie)}for(q in s)if(ie=s[q],ae=i[q],s.hasOwnProperty(q)&&ie!==ae&&(ie!=null||ae!=null))switch(q){case"selected":e.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:We(e,t,q,ie,s,ae)}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 be in i)ie=i[be],i.hasOwnProperty(be)&&ie!=null&&!s.hasOwnProperty(be)&&We(e,t,be,null,s,ie);for(ee in s)if(ie=s[ee],ae=i[ee],s.hasOwnProperty(ee)&&ie!==ae&&(ie!=null||ae!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(j(137,t));break;default:We(e,t,ee,ie,s,ae)}return;default:if(ba(t)){for(var $e in i)ie=i[$e],i.hasOwnProperty($e)&&ie!==void 0&&!s.hasOwnProperty($e)&&lo(e,t,$e,void 0,s,ie);for(le in s)ie=s[le],ae=i[le],!s.hasOwnProperty(le)||ie===ae||ie===void 0&&ae===void 0||lo(e,t,le,ie,s,ae);return}}for(var Q in i)ie=i[Q],i.hasOwnProperty(Q)&&ie!=null&&!s.hasOwnProperty(Q)&&We(e,t,Q,null,s,ie);for(ce in s)ie=s[ce],ae=i[ce],!s.hasOwnProperty(ce)||ie===ae||ie==null&&ae==null||We(e,t,ce,ie,s,ae)}function nf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function q_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var a=i[s],u=a.transferSize,x=a.initiatorType,B=a.duration;if(u&&B&&nf(x)){for(x=0,B=a.responseEnd,s+=1;s<i.length;s++){var q=i[s],ee=q.startTime;if(ee>B)break;var le=q.transferSize,ce=q.initiatorType;le&&nf(ce)&&(q=q.responseEnd,x+=le*(q<B?1:(B-ee)/(q-ee)))}if(--s,t+=8*(u+x)/(a.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 oo=null,co=null;function Yn(e){return e.nodeType===9?e:e.ownerDocument}function af(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 lf(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 ho(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 uo=null;function G_(){var e=window.event;return e&&e.type==="popstate"?e===uo?!1:(uo=e,!0):(uo=null,!1)}var of=typeof setTimeout=="function"?setTimeout:void 0,W_=typeof clearTimeout=="function"?clearTimeout:void 0,cf=typeof Promise=="function"?Promise:void 0,$_=typeof queueMicrotask=="function"?queueMicrotask:typeof cf<"u"?function(e){return cf.resolve(null).then(e).catch(X_)}:of;function X_(e){setTimeout(function(){throw e})}function Gi(e){return e==="head"}function hf(e,t){var i=t,s=0;do{var a=i.nextSibling;if(e.removeChild(i),a&&a.nodeType===8)if(i=a.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(a),Js(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")jr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,jr(i);for(var u=i.firstChild;u;){var x=u.nextSibling,B=u.nodeName;u[sr]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&u.rel.toLowerCase()==="stylesheet"||i.removeChild(u),u=x}}else i==="body"&&jr(e.ownerDocument.body);i=a}while(i);Js(t)}function uf(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 fo(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":fo(i),ma(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Y_(e,t,i,s){for(;e.nodeType===1;){var a=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[sr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Xt(e.nextSibling),e===null)break}return null}function V_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Xt(e.nextSibling),e===null))return null;return e}function ff(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xt(e.nextSibling),e===null))return null;return e}function _o(e){return e.data==="$?"||e.data==="$~"}function vo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function K_(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 Xt(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 go=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Xt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function _f(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 vf(e,t,i){switch(t=Yn(i),e){case"html":if(e=t.documentElement,!e)throw Error(j(452));return e;case"head":if(e=t.head,!e)throw Error(j(453));return e;case"body":if(e=t.body,!e)throw Error(j(454));return e;default:throw Error(j(451))}}function jr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ma(e)}var Yt=new Map,gf=new Set;function Vn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wi=I.d;I.d={f:Q_,r:Z_,D:J_,C:ev,L:tv,m:iv,X:rv,S:sv,M:nv};function Q_(){var e=wi.f(),t=In();return e||t}function Z_(e){var t=ps(e);t!==null&&t.tag===5&&t.type==="form"?Bh(t):wi.r(e)}var Ks=typeof document>"u"?null:document;function mf(e,t,i){var s=Ks;if(s&&typeof t=="string"&&t){var a=It(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof i=="string"&&(a+='[crossorigin="'+i+'"]'),gf.has(a)||(gf.add(a),e={rel:e,crossOrigin:i,href:t},s.querySelector(a)===null&&(t=s.createElement("link"),mt(t,"link",e),ut(t),s.head.appendChild(t)))}}function J_(e){wi.D(e),mf("dns-prefetch",e,null)}function ev(e,t){wi.C(e,t),mf("preconnect",e,t)}function tv(e,t,i){wi.L(e,t,i);var s=Ks;if(s&&e&&t){var a='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&i&&i.imageSrcSet?(a+='[imagesrcset="'+It(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(a+='[imagesizes="'+It(i.imageSizes)+'"]')):a+='[href="'+It(e)+'"]';var u=a;switch(t){case"style":u=Qs(e);break;case"script":u=Zs(e)}Yt.has(u)||(e=o({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Yt.set(u,e),s.querySelector(a)!==null||t==="style"&&s.querySelector(Ir(u))||t==="script"&&s.querySelector(Fr(u))||(t=s.createElement("link"),mt(t,"link",e),ut(t),s.head.appendChild(t)))}}function iv(e,t){wi.m(e,t);var i=Ks;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+It(s)+'"][href="'+It(e)+'"]',u=a;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Zs(e)}if(!Yt.has(u)&&(e=o({rel:"modulepreload",href:e},t),Yt.set(u,e),i.querySelector(a)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Fr(u)))return}s=i.createElement("link"),mt(s,"link",e),ut(s),i.head.appendChild(s)}}}function sv(e,t,i){wi.S(e,t,i);var s=Ks;if(s&&e){var a=Ss(s).hoistableStyles,u=Qs(e);t=t||"default";var x=a.get(u);if(!x){var B={loading:0,preload:null};if(x=s.querySelector(Ir(u)))B.loading=5;else{e=o({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Yt.get(u))&&mo(e,i);var q=x=s.createElement("link");ut(q),mt(q,"link",e),q._p=new Promise(function(ee,le){q.onload=ee,q.onerror=le}),q.addEventListener("load",function(){B.loading|=1}),q.addEventListener("error",function(){B.loading|=2}),B.loading|=4,Kn(x,t,s)}x={type:"stylesheet",instance:x,count:1,state:B},a.set(u,x)}}}function rv(e,t){wi.X(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,a=Zs(e),u=s.get(a);u||(u=i.querySelector(Fr(a)),u||(e=o({src:e,async:!0},t),(t=Yt.get(a))&&po(e,t),u=i.createElement("script"),ut(u),mt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(a,u))}}function nv(e,t){wi.M(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,a=Zs(e),u=s.get(a);u||(u=i.querySelector(Fr(a)),u||(e=o({src:e,async:!0,type:"module"},t),(t=Yt.get(a))&&po(e,t),u=i.createElement("script"),ut(u),mt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(a,u))}}function pf(e,t,i,s){var a=(a=ue.current)?Vn(a):null;if(!a)throw Error(j(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Qs(i.href),i=Ss(a).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=Qs(i.href);var u=Ss(a).hoistableStyles,x=u.get(e);if(x||(a=a.ownerDocument||a,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,x),(u=a.querySelector(Ir(e)))&&!u._p&&(x.instance=u,x.state.loading=5),Yt.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},Yt.set(e,i),u||av(a,e,i,x.state))),t&&s===null)throw Error(j(528,""));return x}if(t&&s!==null)throw Error(j(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zs(i),i=Ss(a).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(j(444,e))}}function Qs(e){return'href="'+It(e)+'"'}function Ir(e){return'link[rel="stylesheet"]['+e+"]"}function Sf(e){return o({},e,{"data-precedence":e.precedence,precedence:null})}function av(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}),mt(t,"link",i),ut(t),e.head.appendChild(t))}function Zs(e){return'[src="'+It(e)+'"]'}function Fr(e){return"script[async]"+e}function yf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+It(i.href)+'"]');if(s)return t.instance=s,ut(s),s;var a=o({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ut(s),mt(s,"style",a),Kn(s,i.precedence,e),t.instance=s;case"stylesheet":a=Qs(i.href);var u=e.querySelector(Ir(a));if(u)return t.state.loading|=4,t.instance=u,ut(u),u;s=Sf(i),(a=Yt.get(a))&&mo(s,a),u=(e.ownerDocument||e).createElement("link"),ut(u);var x=u;return x._p=new Promise(function(B,q){x.onload=B,x.onerror=q}),mt(u,"link",s),t.state.loading|=4,Kn(u,i.precedence,e),t.instance=u;case"script":return u=Zs(i.src),(a=e.querySelector(Fr(u)))?(t.instance=a,ut(a),a):(s=i,(a=Yt.get(u))&&(s=o({},i),po(s,a)),e=e.ownerDocument||e,a=e.createElement("script"),ut(a),mt(a,"link",s),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(j(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Kn(s,i.precedence,e));return t.instance}function Kn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=s.length?s[s.length-1]:null,u=a,x=0;x<s.length;x++){var B=s[x];if(B.dataset.precedence===t)u=B;else if(u!==a)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function mo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function po(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Qn=null;function bf(e,t,i){if(Qn===null){var s=new Map,a=Qn=new Map;a.set(i,s)}else a=Qn,s=a.get(i),s||(s=new Map,a.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),a=0;a<i.length;a++){var u=i[a];if(!(u[sr]||u[dt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var x=u.getAttribute(t)||"";x=e+x;var B=s.get(x);B?B.push(u):s.set(x,[u])}}return s}function Cf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function lv(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 wf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ov(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 a=Qs(s.href),u=t.querySelector(Ir(a));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Zn.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=u,ut(u);return}u=t.ownerDocument||t,s=Sf(s),(a=Yt.get(a))&&mo(s,a),u=u.createElement("link"),ut(u);var x=u;x._p=new Promise(function(B,q){x.onload=B,x.onerror=q}),mt(u,"link",s),i.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Zn.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var So=0;function cv(e,t){return e.stylesheets&&e.count===0&&ea(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ea(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&So===0&&(So=62500*q_());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ea(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>So?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(a)}}:null}function Zn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ea(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Jn=null;function ea(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Jn=new Map,t.forEach(hv,e),Jn=null,Zn.call(e))}function hv(e,t){if(!(t.state.loading&4)){var i=Jn.get(e);if(i)var s=i.get(null);else{i=new Map,Jn.set(e,i);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<a.length;u++){var x=a[u];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(i.set(x.dataset.precedence,x),s=x)}s&&i.set(null,s)}a=t.instance,x=a.getAttribute("data-precedence"),u=i.get(x)||s,u===s&&i.set(null,a),i.set(x,a),this.count++,s=Zn.bind(this),a.addEventListener("load",s),a.addEventListener("error",s),u?u.parentNode.insertBefore(a,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Pr={$$typeof:c,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function uv(e,t,i,s,a,u,x,B,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=da(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=da(0),this.hiddenUpdates=da(null),this.identifierPrefix=s,this.onUncaughtError=a,this.onCaughtError=u,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function Ef(e,t,i,s,a,u,x,B,q,ee,le,ce){return e=new uv(e,t,i,x,q,ee,le,ce,B),t=1,u===!0&&(t|=24),u=Bt(3,null,null,t),e.current=u,u.stateNode=e,t=Qa(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:i,cache:t},tl(u),e}function xf(e){return e?(e=Ds,e):Ds}function Lf(e,t,i,s,a,u){a=xf(a),s.context===null?s.context=a:s.pendingContext=a,s=Oi(t),s.payload={element:i},u=u===void 0?null:u,u!==null&&(s.callback=u),i=ki(e,s,t),i!==null&&(Rt(i,e,t),yr(i,e,t))}function Af(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function yo(e,t){Af(e,t),(e=e.alternate)&&Af(e,t)}function Rf(e){if(e.tag===13||e.tag===31){var t=is(e,67108864);t!==null&&Rt(t,e,67108864),yo(e,67108864)}}function Df(e){if(e.tag===13||e.tag===31){var t=zt();t=_a(t);var i=is(e,t);i!==null&&Rt(i,e,t),yo(e,t)}}var ta=!0;function fv(e,t,i,s){var a=N.T;N.T=null;var u=I.p;try{I.p=2,bo(e,t,i,s)}finally{I.p=u,N.T=a}}function dv(e,t,i,s){var a=N.T;N.T=null;var u=I.p;try{I.p=8,bo(e,t,i,s)}finally{I.p=u,N.T=a}}function bo(e,t,i,s){if(ta){var a=Co(s);if(a===null)ao(e,t,s,ia,i),Tf(e,s);else if(vv(a,e,t,i,s))s.stopPropagation();else if(Tf(e,s),t&4&&-1<_v.indexOf(e)){for(;a!==null;){var u=ps(a);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var x=ni(u.pendingLanes);if(x!==0){var B=u;for(B.pendingLanes|=2,B.entangledLanes|=2;x;){var q=1<<31-pt(x);B.entanglements[1]|=q,x&=~q}si(u),(je&6)===0&&(Un=Ce()+500,Nr(0))}}break;case 31:case 13:B=is(u,2),B!==null&&Rt(B,u,2),In(),yo(u,2)}if(u=Co(s),u===null&&ao(e,t,s,ia,i),u===a)break;a=u}a!==null&&s.stopPropagation()}else ao(e,t,s,null,i)}}function Co(e){return e=wa(e),wo(e)}var ia=null;function wo(e){if(ia=null,e=ms(e),e!==null){var t=re(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=P(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 ia=e,null}function Mf(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(Qe()){case Pe:return 2;case Ut:return 8;case ot:case bt:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Eo=!1,Wi=null,$i=null,Xi=null,qr=new Map,Gr=new Map,Yi=[],_v="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Tf(e,t){switch(e){case"focusin":case"focusout":Wi=null;break;case"dragenter":case"dragleave":$i=null;break;case"mouseover":case"mouseout":Xi=null;break;case"pointerover":case"pointerout":qr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gr.delete(t.pointerId)}}function Wr(e,t,i,s,a,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:u,targetContainers:[a]},t!==null&&(t=ps(t),t!==null&&Rf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function vv(e,t,i,s,a){switch(t){case"focusin":return Wi=Wr(Wi,e,t,i,s,a),!0;case"dragenter":return $i=Wr($i,e,t,i,s,a),!0;case"mouseover":return Xi=Wr(Xi,e,t,i,s,a),!0;case"pointerover":var u=a.pointerId;return qr.set(u,Wr(qr.get(u)||null,e,t,i,s,a)),!0;case"gotpointercapture":return u=a.pointerId,Gr.set(u,Wr(Gr.get(u)||null,e,t,i,s,a)),!0}return!1}function Bf(e){var t=ms(e.target);if(t!==null){var i=re(t);if(i!==null){if(t=i.tag,t===13){if(t=P(i),t!==null){e.blockedOn=t,Wo(e.priority,function(){Df(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,Wo(e.priority,function(){Df(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 sa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Co(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Ca=s,i.target.dispatchEvent(s),Ca=null}else return t=ps(i),t!==null&&Rf(t),e.blockedOn=i,!1;t.shift()}return!0}function Of(e,t,i){sa(e)&&i.delete(t)}function gv(){Eo=!1,Wi!==null&&sa(Wi)&&(Wi=null),$i!==null&&sa($i)&&($i=null),Xi!==null&&sa(Xi)&&(Xi=null),qr.forEach(Of),Gr.forEach(Of)}function ra(e,t){e.blockedOn===t&&(e.blockedOn=null,Eo||(Eo=!0,U.unstable_scheduleCallback(U.unstable_NormalPriority,gv)))}var na=null;function kf(e){na!==e&&(na=e,U.unstable_scheduleCallback(U.unstable_NormalPriority,function(){na===e&&(na=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],a=e[t+2];if(typeof s!="function"){if(wo(s||i)===null)continue;break}var u=ps(i);u!==null&&(e.splice(t,3),t-=3,bl(u,{pending:!0,data:a,method:i.method,action:s},s,a))}}))}function Js(e){function t(q){return ra(q,e)}Wi!==null&&ra(Wi,e),$i!==null&&ra($i,e),Xi!==null&&ra(Xi,e),qr.forEach(t),Gr.forEach(t);for(var i=0;i<Yi.length;i++){var s=Yi[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Yi.length&&(i=Yi[0],i.blockedOn===null);)Bf(i),i.blockedOn===null&&Yi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var a=i[s],u=i[s+1],x=a[Ct]||null;if(typeof u=="function")x||kf(i);else if(x){var B=null;if(u&&u.hasAttribute("formAction")){if(a=u,x=u[Ct]||null)B=x.formAction;else if(wo(a)!==null)continue}else B=x.action;typeof B=="function"?i[s+1]=B:(i.splice(s,3),s-=3),kf(i)}}}function Hf(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(x){return a=x})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,a=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),a!==null&&(a(),a=null)}}}function xo(e){this._internalRoot=e}aa.prototype.render=xo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));var i=t.current,s=zt();Lf(i,s,e,t,null,null)},aa.prototype.unmount=xo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lf(e.current,2,null,e,null,null),In(),t[gs]=null}};function aa(e){this._internalRoot=e}aa.prototype.unstable_scheduleHydration=function(e){if(e){var t=Go();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Yi.length&&t!==0&&t<Yi[i].priority;i++);Yi.splice(i,0,e),i===0&&Bf(e)}};var Nf=V.version;if(Nf!=="19.2.4")throw Error(j(527,Nf,"19.2.4"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=_(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var mv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var la=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!la.isDisabled&&la.supportsFiber)try{Vt=la.inject(mv),ht=la}catch{}}return Xr.createRoot=function(e,t){if(!te(e))throw Error(j(299));var i=!1,s="",a=Ph,u=qh,x=Gh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=Ef(e,1,!1,null,null,i,s,null,a,u,x,Hf),e[gs]=t.current,no(e),new xo(t)},Xr.hydrateRoot=function(e,t,i){if(!te(e))throw Error(j(299));var s=!1,a="",u=Ph,x=qh,B=Gh,q=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(a=i.identifierPrefix),i.onUncaughtError!==void 0&&(u=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(B=i.onRecoverableError),i.formState!==void 0&&(q=i.formState)),t=Ef(e,1,!0,t,i??null,s,a,q,u,x,B,Hf),t.context=xf(null),i=t.current,s=zt(),s=_a(s),a=Oi(s),a.callback=null,ki(i,a,s),i=s,t.current.lanes=i,ir(t,i),si(t),e[gs]=t.current,no(e),new aa(t)},Xr.version="19.2.4",Xr}var $f;function Av(){if($f)return Ro.exports;$f=1;function U(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(U)}catch(V){console.error(V)}}return U(),Ro.exports=Lv(),Ro.exports}var Rv=Av();const Dv=768,Mv=1e3;function ha(){const V=window.location.pathname.match(/^(\/project\/[^/]+\/)/);return V?V[1]:"/"}function ri(U){const V=ha(),$=U.startsWith("/")?U.slice(1):U;return V+$}function Ei(){const U=localStorage.getItem("codev-web-key");return U?{Authorization:`Bearer ${U}`}:{}}async function Tv(){const U=await fetch(ri("api/state"),{headers:Ei()});if(!U.ok)throw new Error(`Failed to fetch state: ${U.status}`);return U.json()}async function Bv(){const U=await fetch(ri("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...Ei()}});if(!U.ok)throw new Error(await U.text());return U.json()}async function Jf(U,V){const $=await fetch(ri("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...Ei()},body:JSON.stringify({path:U,line:V})});if(!$.ok)throw new Error(await $.text());return $.json()}async function Ov(U){const V=await fetch(ri(`api/file/${U}`),{headers:Ei()});if(!V.ok)throw new Error(`Failed to fetch file: ${V.status}`);return V.json()}function Xf(U){return ri(`api/file/${U}/raw`)}async function kv(U,V){const $=await fetch(ri(`api/file/${U}/save`),{method:"POST",headers:{"Content-Type":"application/json",...Ei()},body:JSON.stringify({content:V})});if(!$.ok)throw new Error(await $.text())}async function Hv(U){const V=await fetch(ri(`api/tabs/${U}`),{method:"DELETE",headers:Ei()});if(!V.ok)throw new Error(await V.text())}async function Nv(){const U=await fetch(ri("api/files"),{headers:Ei()});if(!U.ok)throw new Error(`Failed to fetch files: ${U.status}`);return U.json()}function zv(U){return U.terminalId?`${ha()}ws/terminal/${U.terminalId}`:null}async function Uv(){const U=await fetch(ri("api/git/status"),{headers:Ei()});if(!U.ok)throw new Error(`Failed to fetch git status: ${U.status}`);return U.json()}async function jv(){const U=await fetch(ri("api/files/recent"),{headers:Ei()});if(!U.ok)throw new Error(`Failed to fetch recent files: ${U.status}`);return U.json()}function Iv(){const[U,V]=pe.useState(null),[$,j]=pe.useState(null),te=pe.useCallback(async()=>{try{const re=await Tv();V(re),j(null)}catch(re){j(re.message)}},[]);return pe.useEffect(()=>{te();const re=setInterval(te,Mv);return()=>clearInterval(re)},[te]),{state:U,error:$,refresh:te}}function Fv(U){const V=[{id:"dashboard",type:"dashboard",label:"Dashboard",closable:!1}];U!=null&&U.architect&&V.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:U.architect.terminalId});for(const $ of(U==null?void 0:U.builders)??[])V.push({id:`builder-${$.id}`,type:"builder",label:$.name||`Builder ${$.id}`,closable:!0,projectId:$.id,terminalId:$.terminalId});for(const $ of(U==null?void 0:U.utils)??[])!$.terminalId&&(!$.pid||$.pid===0)||V.push({id:`shell-${$.id}`,type:"shell",label:$.name||`Shell ${$.id}`,closable:!0,utilId:$.id,terminalId:$.terminalId});for(const $ of(U==null?void 0:U.annotations)??[]){const j=$.file.split("/").pop()??$.file;V.push({id:`file-${$.id}`,type:"file",label:j,closable:!0,annotationId:$.id,filePath:$.file})}return V}function Pv(U){const[V,$]=pe.useState("dashboard"),j=pe.useRef(null),te=pe.useRef(!1),re=Fv(U);pe.useEffect(()=>{if(te.current||U===null)return;const _=new URLSearchParams(window.location.search).get("tab");if(_){const v=re.find(o=>o.id===_||o.type===_);if(v){$(v.id),te.current=!0;const o=new URL(window.location.href);o.searchParams.delete("tab"),window.history.replaceState({},"",o.toString())}}else te.current=!0},[re,U]),pe.useEffect(()=>{const d=new Set(re.map(_=>_.id));if(j.current===null){U!==null&&(j.current=d);return}for(const _ of re)!j.current.has(_.id)&&_.type!=="architect"&&$(_.id);j.current=d},[re.map(d=>d.id).join(","),U!==null]);const P=pe.useCallback(d=>{$(d)},[]),n=re.find(d=>d.id===V)??re[0];return{tabs:re,activeTab:n,activeTabId:V,selectTab:P}}function qv(U){const[V,$]=pe.useState(()=>typeof window<"u"?window.matchMedia(U).matches:!1);return pe.useEffect(()=>{const j=window.matchMedia(U),te=re=>$(re.matches);return j.addEventListener("change",te),$(j.matches),()=>j.removeEventListener("change",te)},[U]),V}function Gv({left:U,right:V,defaultSplit:$=50}){const[j,te]=pe.useState($),re=pe.useRef(null),P=pe.useRef(!1),n=pe.useCallback(d=>{d.preventDefault(),P.current=!0;const _=o=>{if(!P.current||!re.current)return;const m=re.current.getBoundingClientRect(),y=(o.clientX-m.left)/m.width*100;te(Math.max(20,Math.min(80,y)))},v=()=>{P.current=!1,document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",v)},[]);return K.jsxs("div",{ref:re,className:"split-pane",children:[K.jsx("div",{className:"split-left",style:{width:`${j}%`},children:U}),K.jsx("div",{className:"split-handle",onMouseDown:n,role:"separator","aria-label":"Resize panels"}),K.jsx("div",{className:"split-right",style:{width:`${100-j}%`},children:V})]})}function ed({tabs:U,activeTabId:V,onSelectTab:$,onRefresh:j}){const te=async(re,P)=>{re.stopPropagation();try{await Hv(P.id),j()}catch(n){console.error("Failed to close tab:",n)}};return K.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:U.map(re=>K.jsxs("button",{role:"tab","aria-selected":re.id===V,className:`tab ${re.id===V?"tab-active":""}`,onClick:()=>$(re.id),title:re.label,children:[K.jsx("span",{className:"tab-label",children:re.label}),re.closable&&K.jsx("span",{className:"tab-close",onClick:P=>te(P,re),role:"button","aria-label":`Close ${re.label}`,tabIndex:0,onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),te(P,re))},children:"×"})]},re.id))})}var Bo={exports:{}},Yf;function Wv(){return Yf||(Yf=1,(function(U,V){(function($,j){U.exports=j()})(globalThis,(()=>(()=>{var $={4567:function(P,n,d){var _=this&&this.__decorate||function(l,c,g,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,g):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,g,C);else for(var E=l.length-1;E>=0;E--)(S=l[E])&&(p=(w<3?S(p):w>3?S(c,g,p):S(c,g))||p);return w>3&&p&&Object.defineProperty(c,g,p),p},v=this&&this.__param||function(l,c){return function(g,C){c(g,C,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const o=d(9042),m=d(9924),y=d(844),b=d(4725),f=d(2585),r=d(3656);let h=n.AccessibilityManager=class extends y.Disposable{constructor(l,c,g,C){super(),this._terminal=l,this._coreBrowserService=g,this._renderService=C,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 S=0;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);if(this._topBoundaryFocusListener=S=>this._handleBoundaryFocus(S,0),this._bottomBoundaryFocusListener=S=>this._handleBoundaryFocus(S,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 m.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((S=>this._handleResize(S.rows)))),this.register(this._terminal.onRender((S=>this._refreshRows(S.start,S.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((S=>this._handleChar(S)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
50
|
-
`)))),this.register(this._terminal.onA11yTab((S=>this._handleTab(S)))),this.register(this._terminal.onKey((S=>this._handleKey(S.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,r.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(
|
|
51
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=o.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(l){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(l)||this._charsToConsume.push(l)}_refreshRows(l,c){this._liveRegionDebouncer.refresh(l,c,this._terminal.rows)}_renderRows(l,c){const g=this._terminal.buffer,C=g.lines.length.toString();for(let S=l;S<=c;S++){const w=g.lines.get(g.ydisp+S),p=[],E=(w==null?void 0:w.translateToString(!0,void 0,void 0,p))||"",L=(g.ydisp+S+1).toString(),T=this._rowElements[S];T&&(E.length===0?(T.innerText=" ",this._rowColumns.set(T,[0,1])):(T.textContent=E,this._rowColumns.set(T,p)),T.setAttribute("aria-posinset",L),T.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(l,c){const g=l.target,C=this._rowElements[c===0?1:this._rowElements.length-2];if(g.getAttribute("aria-posinset")===(c===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==C)return;let S,w;if(c===0?(S=g,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(S=this._rowElements.shift(),w=g,this._rowContainer.removeChild(S)),S.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),c===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(c===0?-1:1),this._rowElements[c===0?1:this._rowElements.length-2].focus(),l.preventDefault(),l.stopImmediatePropagation()}_handleSelectionChange(){var E;if(this._rowElements.length===0)return;const l=document.getSelection();if(!l)return;if(l.isCollapsed)return void(this._rowContainer.contains(l.anchorNode)&&this._terminal.clearSelection());if(!l.anchorNode||!l.focusNode)return void console.error("anchorNode and/or focusNode are null");let c={node:l.anchorNode,offset:l.anchorOffset},g={node:l.focusNode,offset:l.focusOffset};if((c.node.compareDocumentPosition(g.node)&Node.DOCUMENT_POSITION_PRECEDING||c.node===g.node&&c.offset>g.offset)&&([c,g]=[g,c]),c.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(c={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(c.node))return;const C=this._rowElements.slice(-1)[0];if(g.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(g={node:C,offset:((E=C.textContent)==null?void 0:E.length)??0}),!this._rowContainer.contains(g.node))return;const S=({node:L,offset:T})=>{const A=L instanceof Text?L.parentNode:L;let M=parseInt(A==null?void 0:A.getAttribute("aria-posinset"),10)-1;if(isNaN(M))return console.warn("row is invalid. Race condition?"),null;const z=this._rowColumns.get(A);if(!z)return console.warn("columns is null. Race condition?"),null;let Y=T<z.length?z[T]:z.slice(-1)[0]+1;return Y>=this._terminal.cols&&(++M,Y=0),{row:M,column:Y}},w=S(c),p=S(g);if(w&&p){if(w.row>p.row||w.row===p.row&&w.column>=p.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(p.row-w.row)*this._terminal.cols-w.column+p.column)}}_handleResize(l){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let c=this._rowContainer.children.length;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);for(;this._rowElements.length>l;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const l=this._coreBrowserService.mainDocument.createElement("div");return l.setAttribute("role","listitem"),l.tabIndex=-1,this._refreshRowDimensions(l),l}_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 l=0;l<this._terminal.rows;l++)this._refreshRowDimensions(this._rowElements[l])}}_refreshRowDimensions(l){l.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=h=_([v(1,f.IInstantiationService),v(2,b.ICoreBrowserService),v(3,b.IRenderService)],h)},3614:(P,n)=>{function d(m){return m.replace(/\r?\n/g,"\r")}function _(m,y){return y?"\x1B[200~"+m+"\x1B[201~":m}function v(m,y,b,f){m=_(m=d(m),b.decPrivateModes.bracketedPasteMode&&f.rawOptions.ignoreBracketedPasteMode!==!0),b.triggerDataEvent(m,!0),y.value=""}function o(m,y,b){const f=b.getBoundingClientRect(),r=m.clientX-f.left-10,h=m.clientY-f.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${r}px`,y.style.top=`${h}px`,y.style.zIndex="1000",y.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=d,n.bracketTextForPaste=_,n.copyHandler=function(m,y){m.clipboardData&&m.clipboardData.setData("text/plain",y.selectionText),m.preventDefault()},n.handlePasteEvent=function(m,y,b,f){m.stopPropagation(),m.clipboardData&&v(m.clipboardData.getData("text/plain"),y,b,f)},n.paste=v,n.moveTextAreaUnderMouseCursor=o,n.rightClickHandler=function(m,y,b,f,r){o(m,y,b),r&&f.rightClickSelect(m),y.value=f.selectionText,y.select()}},7239:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const _=d(1505);n.ColorContrastCache=class{constructor(){this._color=new _.TwoKeyMap,this._css=new _.TwoKeyMap}setCss(v,o,m){this._css.set(v,o,m)}getCss(v,o){return this._css.get(v,o)}setColor(v,o,m){this._color.set(v,o,m)}getColor(v,o){return this._color.get(v,o)}clear(){this._color.clear(),this._css.clear()}}},3656:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(d,_,v,o){d.addEventListener(_,v,o);let m=!1;return{dispose:()=>{m||(m=!0,d.removeEventListener(_,v,o))}}}},3551:function(P,n,d){var _=this&&this.__decorate||function(h,l,c,g){var C,S=arguments.length,w=S<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,l,c,g);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(l,c,w):C(l,c))||w);return S>3&&w&&Object.defineProperty(l,c,w),w},v=this&&this.__param||function(h,l){return function(c,g){l(c,g,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const o=d(3656),m=d(8460),y=d(844),b=d(2585),f=d(4725);let r=n.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(h,l,c,g,C){super(),this._element=h,this._mouseService=l,this._renderService=c,this._bufferService=g,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var S;this._lastMouseEvent=void 0,(S=this._activeProviderReplies)==null||S.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,o.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,o.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const l=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!l)return;this._isMouseOut=!1;const c=h.composedPath();for(let g=0;g<c.length;g++){const C=c[g];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&l.x===this._lastBufferCell.x&&l.y===this._lastBufferCell.y||(this._handleHover(l),this._lastBufferCell=l)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,l){var g,C;this._activeProviderReplies&&l||((g=this._activeProviderReplies)==null||g.forEach((S=>{S==null||S.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let c=!1;for(const[S,w]of this._linkProviderService.linkProviders.entries())l?(C=this._activeProviderReplies)!=null&&C.get(S)&&(c=this._checkLinkProviderResult(S,h,c)):w.provideLinks(h.y,(p=>{var L,T;if(this._isMouseOut)return;const E=p==null?void 0:p.map((A=>({link:A})));(L=this._activeProviderReplies)==null||L.set(S,E),c=this._checkLinkProviderResult(S,h,c),((T=this._activeProviderReplies)==null?void 0:T.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,l){const c=new Set;for(let g=0;g<l.size;g++){const C=l.get(g);if(C)for(let S=0;S<C.length;S++){const w=C[S],p=w.link.range.start.y<h?0:w.link.range.start.x,E=w.link.range.end.y>h?this._bufferService.cols:w.link.range.end.x;for(let L=p;L<=E;L++){if(c.has(L)){C.splice(S--,1);break}c.add(L)}}}}_checkLinkProviderResult(h,l,c){var S;if(!this._activeProviderReplies)return c;const g=this._activeProviderReplies.get(h);let C=!1;for(let w=0;w<h;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(C=!0);if(!C&&g){const w=g.find((p=>this._linkAtPosition(p.link,l)));w&&(c=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!c)for(let w=0;w<this._activeProviderReplies.size;w++){const p=(S=this._activeProviderReplies.get(w))==null?void 0:S.find((E=>this._linkAtPosition(E.link,l)));if(p){c=!0,this._handleNewLink(p);break}}return c}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const l=this._positionFromMouseEvent(h,this._element,this._mouseService);l&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,l)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,l){this._currentLink&&this._lastMouseEvent&&(!h||!l||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=l)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(h.link,l)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var c,g;return(g=(c=this._currentLink)==null?void 0:c.state)==null?void 0:g.decorations.pointerCursor},set:c=>{var g;(g=this._currentLink)!=null&&g.state&&this._currentLink.state.decorations.pointerCursor!==c&&(this._currentLink.state.decorations.pointerCursor=c,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",c))}},underline:{get:()=>{var c,g;return(g=(c=this._currentLink)==null?void 0:c.state)==null?void 0:g.decorations.underline},set:c=>{var g,C,S;(g=this._currentLink)!=null&&g.state&&((S=(C=this._currentLink)==null?void 0:C.state)==null?void 0:S.decorations.underline)!==c&&(this._currentLink.state.decorations.underline=c,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,c))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((c=>{if(!this._currentLink)return;const g=c.start===0?0:c.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+c.end;if(this._currentLink.link.range.start.y>=g&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(g,C),this._lastMouseEvent)){const S=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);S&&this._askForLink(S,!1)}}))))}_linkHover(h,l,c){var g;(g=this._currentLink)!=null&&g.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),l.hover&&l.hover(c,l.text)}_fireUnderlineEvent(h,l){const c=h.range,g=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-g-1,c.end.x,c.end.y-g-1,void 0);(l?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(h,l,c){var g;(g=this._currentLink)!=null&&g.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),l.leave&&l.leave(c,l.text)}_linkAtPosition(h,l){const c=h.range.start.y*this._bufferService.cols+h.range.start.x,g=h.range.end.y*this._bufferService.cols+h.range.end.x,C=l.y*this._bufferService.cols+l.x;return c<=C&&C<=g}_positionFromMouseEvent(h,l,c){const g=c.getCoords(h,l,this._bufferService.cols,this._bufferService.rows);if(g)return{x:g[0],y:g[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,l,c,g,C){return{x1:h,y1:l,x2:c,y2:g,cols:this._bufferService.cols,fg:C}}};n.Linkifier=r=_([v(1,f.IMouseService),v(2,f.IRenderService),v(3,b.IBufferService),v(4,f.ILinkProviderService)],r)},9042:(P,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(P,n,d){var _=this&&this.__decorate||function(f,r,h,l){var c,g=arguments.length,C=g<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,r,h,l);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(C=(g<3?c(C):g>3?c(r,h,C):c(r,h))||C);return g>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(f,r){return function(h,l){r(h,l,f)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const o=d(511),m=d(2585);let y=n.OscLinkProvider=class{constructor(f,r,h){this._bufferService=f,this._optionsService=r,this._oscLinkService=h}provideLinks(f,r){var E;const h=this._bufferService.buffer.lines.get(f-1);if(!h)return void r(void 0);const l=[],c=this._optionsService.rawOptions.linkHandler,g=new o.CellData,C=h.getTrimmedLength();let S=-1,w=-1,p=!1;for(let L=0;L<C;L++)if(w!==-1||h.hasContent(L)){if(h.loadCell(L,g),g.hasExtendedAttrs()&&g.extended.urlId){if(w===-1){w=L,S=g.extended.urlId;continue}p=g.extended.urlId!==S}else w!==-1&&(p=!0);if(p||w!==-1&&L===C-1){const T=(E=this._oscLinkService.getLinkData(S))==null?void 0:E.uri;if(T){const A={start:{x:w+1,y:f},end:{x:L+(p||L!==C-1?0:1),y:f}};let M=!1;if(!(c!=null&&c.allowNonHttpProtocols))try{const z=new URL(T);["http:","https:"].includes(z.protocol)||(M=!0)}catch{M=!0}M||l.push({text:T,range:A,activate:(z,Y)=>c?c.activate(z,Y,A):b(0,Y),hover:(z,Y)=>{var N;return(N=c==null?void 0:c.hover)==null?void 0:N.call(c,z,Y,A)},leave:(z,Y)=>{var N;return(N=c==null?void 0:c.leave)==null?void 0:N.call(c,z,Y,A)}})}p=!1,g.hasExtendedAttrs()&&g.extended.urlId?(w=L,S=g.extended.urlId):(w=-1,S=-1)}}r(l)}};function b(f,r){if(confirm(`Do you want to navigate to ${r}?
|
|
48
|
+
`+s.stack}}var Jt=Object.prototype.hasOwnProperty,Be=U.unstable_scheduleCallback,Ae=U.unstable_cancelCallback,De=U.unstable_shouldYield,_e=U.unstable_requestPaint,be=U.unstable_now,Qe=U.unstable_getCurrentPriorityLevel,Pe=U.unstable_ImmediatePriority,Ut=U.unstable_UserBlockingPriority,ot=U.unstable_NormalPriority,bt=U.unstable_LowPriority,Je=U.unstable_IdlePriority,qe=U.log,Re=U.unstable_setDisableYieldValue,Vt=null,ht=null;function Mt(e){if(typeof qe=="function"&&Re(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Vt,e)}catch{}}var pt=Math.clz32?Math.clz32:fa,vs=Math.log,ua=Math.LN2;function fa(e){return e>>>=0,e===0?32:31-(vs(e)/ua|0)|0}var wi=256,Yi=262144,Vi=4194304;function ri(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 Vr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var a=0,u=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var B=s&134217727;return B!==0?(s=B&~u,s!==0?a=ri(s):(x&=B,x!==0?a=ri(x):i||(i=B&~e,i!==0&&(a=ri(i))))):(B=s&~u,B!==0?a=ri(B):x!==0?a=ri(x):i||(i=s&~e,i!==0&&(a=ri(i)))),a===0?0:t!==0&&t!==a&&(t&u)===0&&(u=a&-a,i=t&-t,u>=i||u===32&&(i&4194048)!==0)?t:a}function tr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function nd(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 Io(){var e=Vi;return Vi<<=1,(Vi&62914560)===0&&(Vi=4194304),e}function da(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ir(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ad(e,t,i,s,a,u){var x=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 B=e.entanglements,P=e.expirationTimes,ee=e.hiddenUpdates;for(i=x&~i;0<i;){var le=31-pt(i),ce=1<<le;B[le]=0,P[le]=-1;var te=ee[le];if(te!==null)for(ee[le]=null,le=0;le<te.length;le++){var ne=te[le];ne!==null&&(ne.lane&=-536870913)}i&=~ce}s!==0&&Fo(e,s,0),u!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=u&~(x&~t))}function Fo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-pt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Po(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-pt(i),a=1<<s;a&t|e[s]&t&&(e[s]|=t),i&=~a}}function qo(e,t){var i=t&-t;return i=(i&42)!==0?1:_a(i),(i&(e.suspendedLanes|t))!==0?0:i}function _a(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 va(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Go(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Mf(e.type))}function Wo(e,t){var i=I.p;try{return I.p=e,t()}finally{I.p=i}}var Ei=Math.random().toString(36).slice(2),dt="__reactFiber$"+Ei,Ct="__reactProps$"+Ei,gs="__reactContainer$"+Ei,ga="__reactEvents$"+Ei,ld="__reactListeners$"+Ei,od="__reactHandles$"+Ei,$o="__reactResources$"+Ei,sr="__reactMarker$"+Ei;function ma(e){delete e[dt],delete e[Ct],delete e[ga],delete e[ld],delete e[od]}function ms(e){var t=e[dt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[gs]||i[dt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=_f(e);e!==null;){if(i=e[dt])return i;e=_f(e)}return t}e=i,i=e.parentNode}return null}function ps(e){if(e=e[dt]||e[gs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(j(33))}function Ss(e){var t=e[$o];return t||(t=e[$o]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[sr]=!0}var Xo=new Set,Yo={};function Ki(e,t){ys(e,t),ys(e+"Capture",t)}function ys(e,t){for(Yo[e]=t,e=0;e<t.length;e++)Xo.add(t[e])}var cd=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]*$"),Vo={},Ko={};function hd(e){return Jt.call(Ko,e)?!0:Jt.call(Vo,e)?!1:cd.test(e)?Ko[e]=!0:(Vo[e]=!0,!1)}function Kr(e,t,i){if(hd(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 Qr(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 ni(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ud(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 a=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(x){i=""+x,u.call(this,x)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pa(e){if(!e._valueTracker){var t=Qo(e)?"checked":"value";e._valueTracker=ud(e,t,""+e[t])}}function Zo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Qo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Zr(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 fd=/[\n"\\]/g;function It(e){return e.replace(fd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Sa(e,t,i,s,a,u,x,B){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?ya(e,x,jt(t)):i!=null?ya(e,x,jt(i)):s!=null&&e.removeAttribute("value"),a==null&&u!=null&&(e.defaultChecked=!!u),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?e.name=""+jt(B):e.removeAttribute("name")}function Jo(e,t,i,s,a,u,x,B){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||i!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){pa(e);return}i=i!=null?""+jt(i):"",t=t!=null?""+jt(t):i,B||t===e.value||(e.value=t),e.defaultValue=t}s=s??a,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=B?e.checked:!!s,e.defaultChecked=!!s,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),pa(e)}function ya(e,t,i){t==="number"&&Zr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function bs(e,t,i,s){if(e=e.options,t){t={};for(var a=0;a<i.length;a++)t["$"+i[a]]=!0;for(i=0;i<e.length;i++)a=t.hasOwnProperty("$"+e[i].value),e[i].selected!==a&&(e[i].selected=a),a&&s&&(e[i].defaultSelected=!0)}else{for(i=""+jt(i),t=null,a=0;a<e.length;a++){if(e[a].value===i){e[a].selected=!0,s&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function ec(e,t,i){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+jt(i):""}function tc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(j(92));if(X(s)){if(1<s.length)throw Error(j(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=jt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),pa(e)}function Cs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var dd=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 ic(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||dd.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function sc(e,t,i){if(t!=null&&typeof t!="object")throw Error(j(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 a in t)s=t[a],t.hasOwnProperty(a)&&i[a]!==s&&ic(e,a,s)}else for(var u in t)t.hasOwnProperty(u)&&ic(e,u,t[u])}function ba(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 _d=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"]]),vd=/^[\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 Jr(e){return vd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ai(){}var Ca=null;function wa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ws=null,Es=null;function rc(e){var t=ps(e);if(t&&(e=t.stateNode)){var i=e[Ct]||null;e:switch(e=t.stateNode,t.type){case"input":if(Sa(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="'+It(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var a=s[Ct]||null;if(!a)throw Error(j(90));Sa(s,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Zo(s)}break e;case"textarea":ec(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&bs(e,!!i.multiple,t,!1)}}}var Ea=!1;function nc(e,t,i){if(Ea)return e(t,i);Ea=!0;try{var s=e(t);return s}finally{if(Ea=!1,(ws!==null||Es!==null)&&(Fn(),ws&&(t=ws,e=Es,Es=ws=null,rc(t),e)))for(t=0;t<e.length;t++)rc(e[t])}}function nr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Ct]||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(j(231,t,typeof i));return i}var li=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xa=!1;if(li)try{var ar={};Object.defineProperty(ar,"passive",{get:function(){xa=!0}}),window.addEventListener("test",ar,ar),window.removeEventListener("test",ar,ar)}catch{xa=!1}var xi=null,La=null,en=null;function ac(){if(en)return en;var e,t=La,i=t.length,s,a="value"in xi?xi.value:xi.textContent,u=a.length;for(e=0;e<i&&t[e]===a[e];e++);var x=i-e;for(s=1;s<=x&&t[i-s]===a[u-s];s++);return en=a.slice(e,1<s?1-s:void 0)}function tn(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 sn(){return!0}function lc(){return!1}function wt(e){function t(i,s,a,u,x){this._reactName=i,this._targetInst=a,this.type=s,this.nativeEvent=u,this.target=x,this.currentTarget=null;for(var B in e)e.hasOwnProperty(B)&&(i=e[B],this[B]=i?i(u):u[B]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?sn:lc,this.isPropagationStopped=lc,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=sn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=sn)},persist:function(){},isPersistent:sn}),t}var Qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rn=wt(Qi),lr=l({},Qi,{view:0,detail:0}),gd=wt(lr),Aa,Ra,or,nn=l({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ma,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==or&&(or&&e.type==="mousemove"?(Aa=e.screenX-or.screenX,Ra=e.screenY-or.screenY):Ra=Aa=0,or=e),Aa)},movementY:function(e){return"movementY"in e?e.movementY:Ra}}),oc=wt(nn),md=l({},nn,{dataTransfer:0}),pd=wt(md),Sd=l({},lr,{relatedTarget:0}),Da=wt(Sd),yd=l({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),bd=wt(yd),Cd=l({},Qi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wd=wt(Cd),Ed=l({},Qi,{data:0}),cc=wt(Ed),xd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ld={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"},Ad={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ad[e])?!!t[e]:!1}function Ma(){return Rd}var Dd=l({},lr,{key:function(e){if(e.key){var t=xd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=tn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ld[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ma,charCode:function(e){return e.type==="keypress"?tn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Md=wt(Dd),Td=l({},nn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hc=wt(Td),Bd=l({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ma}),Od=wt(Bd),kd=l({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hd=wt(kd),zd=l({},nn,{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}),Nd=wt(zd),Ud=l({},Qi,{newState:0,oldState:0}),jd=wt(Ud),Id=[9,13,27,32],Ta=li&&"CompositionEvent"in window,cr=null;li&&"documentMode"in document&&(cr=document.documentMode);var Fd=li&&"TextEvent"in window&&!cr,uc=li&&(!Ta||cr&&8<cr&&11>=cr),fc=" ",dc=!1;function _c(e,t){switch(e){case"keyup":return Id.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function Pd(e,t){switch(e){case"compositionend":return vc(t);case"keypress":return t.which!==32?null:(dc=!0,fc);case"textInput":return e=t.data,e===fc&&dc?null:e;default:return null}}function qd(e,t){if(xs)return e==="compositionend"||!Ta&&_c(e,t)?(e=ac(),en=La=xi=null,xs=!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 uc&&t.locale!=="ko"?null:t.data;default:return null}}var Gd={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 gc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gd[e.type]:t==="textarea"}function mc(e,t,i,s){ws?Es?Es.push(s):Es=[s]:ws=s,t=Yn(t,"onChange"),0<t.length&&(i=new rn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var hr=null,ur=null;function Wd(e){Ju(e,0)}function an(e){var t=rr(e);if(Zo(t))return e}function pc(e,t){if(e==="change")return t}var Sc=!1;if(li){var Ba;if(li){var Oa="oninput"in document;if(!Oa){var yc=document.createElement("div");yc.setAttribute("oninput","return;"),Oa=typeof yc.oninput=="function"}Ba=Oa}else Ba=!1;Sc=Ba&&(!document.documentMode||9<document.documentMode)}function bc(){hr&&(hr.detachEvent("onpropertychange",Cc),ur=hr=null)}function Cc(e){if(e.propertyName==="value"&&an(ur)){var t=[];mc(t,ur,e,wa(e)),nc(Wd,t)}}function $d(e,t,i){e==="focusin"?(bc(),hr=t,ur=i,hr.attachEvent("onpropertychange",Cc)):e==="focusout"&&bc()}function Xd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return an(ur)}function Yd(e,t){if(e==="click")return an(t)}function Vd(e,t){if(e==="input"||e==="change")return an(t)}function Kd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:Kd;function fr(e,t){if(Tt(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 a=i[s];if(!Jt.call(t,a)||!Tt(e[a],t[a]))return!1}return!0}function wc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ec(e,t){var i=wc(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=wc(i)}}function xc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zr(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=Zr(e.document)}return t}function ka(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 Qd=li&&"documentMode"in document&&11>=document.documentMode,Ls=null,Ha=null,dr=null,za=!1;function Ac(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;za||Ls==null||Ls!==Zr(s)||(s=Ls,"selectionStart"in s&&ka(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}),dr&&fr(dr,s)||(dr=s,s=Yn(Ha,"onSelect"),0<s.length&&(t=new rn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Ls)))}function Zi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var As={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionrun:Zi("Transition","TransitionRun"),transitionstart:Zi("Transition","TransitionStart"),transitioncancel:Zi("Transition","TransitionCancel"),transitionend:Zi("Transition","TransitionEnd")},Na={},Rc={};li&&(Rc=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function Ji(e){if(Na[e])return Na[e];if(!As[e])return e;var t=As[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Rc)return Na[e]=t[i];return e}var Dc=Ji("animationend"),Mc=Ji("animationiteration"),Tc=Ji("animationstart"),Zd=Ji("transitionrun"),Jd=Ji("transitionstart"),e_=Ji("transitioncancel"),Bc=Ji("transitionend"),Oc=new Map,Ua="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(" ");Ua.push("scrollEnd");function Kt(e,t){Oc.set(e,t),Ki(t,[e])}var ln=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)},Ft=[],Rs=0,ja=0;function on(){for(var e=Rs,t=ja=Rs=0;t<e;){var i=Ft[t];Ft[t++]=null;var s=Ft[t];Ft[t++]=null;var a=Ft[t];Ft[t++]=null;var u=Ft[t];if(Ft[t++]=null,s!==null&&a!==null){var x=s.pending;x===null?a.next=a:(a.next=x.next,x.next=a),s.pending=a}u!==0&&kc(i,a,u)}}function cn(e,t,i,s){Ft[Rs++]=e,Ft[Rs++]=t,Ft[Rs++]=i,Ft[Rs++]=s,ja|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Ia(e,t,i,s){return cn(e,t,i,s),hn(e)}function es(e,t){return cn(e,null,null,t),hn(e)}function kc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var a=!1,u=e.return;u!==null;)u.childLanes|=i,s=u.alternate,s!==null&&(s.childLanes|=i),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(a=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,a&&t!==null&&(a=31-pt(i),e=u.hiddenUpdates,s=e[a],s===null?e[a]=[t]:s.push(t),t.lane=i|536870912),u):null}function hn(e){if(50<Hr)throw Hr=0,Vl=null,Error(j(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ds={};function t_(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 Bt(e,t,i,s){return new t_(e,t,i,s)}function Fa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var i=e.alternate;return i===null?(i=Bt(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 Hc(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 un(e,t,i,s,a,u){var x=0;if(s=e,typeof e=="function")Fa(e)&&(x=1);else if(typeof e=="string")x=av(e,i,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case E:return e=Bt(31,i,t,a),e.elementType=E,e.lanes=u,e;case f:return ts(i.children,a,u,t);case r:x=8,a|=24;break;case h:return e=Bt(12,i,t,a|2),e.elementType=h,e.lanes=u,e;case C:return e=Bt(13,i,t,a),e.elementType=C,e.lanes=u,e;case S:return e=Bt(19,i,t,a),e.elementType=S,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c:x=10;break e;case o:x=9;break e;case g:x=11;break e;case w:x=14;break e;case p:x=16,s=null;break e}x=29,i=Error(j(130,e===null?"null":typeof e,"")),s=null}return t=Bt(x,i,t,a),t.elementType=e,t.type=s,t.lanes=u,t}function ts(e,t,i,s){return e=Bt(7,e,s,t),e.lanes=i,e}function Pa(e,t,i){return e=Bt(6,e,null,t),e.lanes=i,e}function zc(e){var t=Bt(18,null,null,0);return t.stateNode=e,t}function qa(e,t,i){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Nc=new WeakMap;function Pt(e,t){if(typeof e=="object"&&e!==null){var i=Nc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Dt(t)},Nc.set(e,t),t)}return{value:e,source:t,stack:Dt(t)}}var Ms=[],Ts=0,fn=null,_r=0,qt=[],Gt=0,Li=null,ei=1,ti="";function ci(e,t){Ms[Ts++]=_r,Ms[Ts++]=fn,fn=e,_r=t}function Uc(e,t,i){qt[Gt++]=ei,qt[Gt++]=ti,qt[Gt++]=Li,Li=e;var s=ei;e=ti;var a=32-pt(s)-1;s&=~(1<<a),i+=1;var u=32-pt(t)+a;if(30<u){var x=a-a%5;u=(s&(1<<x)-1).toString(32),s>>=x,a-=x,ei=1<<32-pt(t)+a|i<<a|s,ti=u+e}else ei=1<<u|i<<a|s,ti=e}function Ga(e){e.return!==null&&(ci(e,1),Uc(e,1,0))}function Wa(e){for(;e===fn;)fn=Ms[--Ts],Ms[Ts]=null,_r=Ms[--Ts],Ms[Ts]=null;for(;e===Li;)Li=qt[--Gt],qt[Gt]=null,ti=qt[--Gt],qt[Gt]=null,ei=qt[--Gt],qt[Gt]=null}function jc(e,t){qt[Gt++]=ei,qt[Gt++]=ti,qt[Gt++]=Li,ei=t.id,ti=t.overflow,Li=e}var _t=null,Ye=null,He=!1,Ai=null,Wt=!1,$a=Error(j(519));function Ri(e){var t=Error(j(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vr(Pt(t,e)),$a}function Ic(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[dt]=e,t[Ct]=s,i){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(i=0;i<Nr.length;i++)Te(Nr[i],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),Jo(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),tc(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||rf(t.textContent,i)?(s.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),s.onScroll!=null&&Te("scroll",t),s.onScrollEnd!=null&&Te("scrollend",t),s.onClick!=null&&(t.onclick=ai),t=!0):t=!1,t||Ri(e,!0)}function Fc(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:_t=_t.return}}function Bs(e){if(e!==_t)return!1;if(!He)return Fc(e),He=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||ho(e.type,e.memoizedProps)),i=!i),i&&Ye&&Ri(e),Fc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ye=df(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ye=df(e)}else t===27?(t=Ye,Pi(e.type)?(e=go,go=null,Ye=e):Ye=t):Ye=_t?Xt(e.stateNode.nextSibling):null;return!0}function is(){Ye=_t=null,He=!1}function Xa(){var e=Ai;return e!==null&&(At===null?At=e:At.push.apply(At,e),Ai=null),e}function vr(e){Ai===null?Ai=[e]:Ai.push(e)}var Ya=R(null),ss=null,hi=null;function Di(e,t,i){$(Ya,t._currentValue),t._currentValue=i}function ui(e){e._currentValue=Ya.current,O(Ya)}function Va(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 Ka(e,t,i,s){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var u=a.dependencies;if(u!==null){var x=a.child;u=u.firstContext;e:for(;u!==null;){var B=u;u=a;for(var P=0;P<t.length;P++)if(B.context===t[P]){u.lanes|=i,B=u.alternate,B!==null&&(B.lanes|=i),Va(u.return,i,e),s||(x=null);break e}u=B.next}}else if(a.tag===18){if(x=a.return,x===null)throw Error(j(341));x.lanes|=i,u=x.alternate,u!==null&&(u.lanes|=i),Va(x,i,e),x=null}else x=a.child;if(x!==null)x.return=a;else for(x=a;x!==null;){if(x===e){x=null;break}if(a=x.sibling,a!==null){a.return=x.return,x=a;break}x=x.return}a=x}}function Os(e,t,i,s){e=null;for(var a=t,u=!1;a!==null;){if(!u){if((a.flags&524288)!==0)u=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var x=a.alternate;if(x===null)throw Error(j(387));if(x=x.memoizedProps,x!==null){var B=a.type;Tt(a.pendingProps.value,x.value)||(e!==null?e.push(B):e=[B])}}else if(a===F.current){if(x=a.alternate,x===null)throw Error(j(387));x.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Pr):e=[Pr])}a=a.return}e!==null&&Ka(t,e,i,s),t.flags|=262144}function dn(e){for(e=e.firstContext;e!==null;){if(!Tt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function rs(e){ss=e,hi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return Pc(ss,e)}function _n(e,t){return ss===null&&rs(e),Pc(e,t)}function Pc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},hi===null){if(e===null)throw Error(j(308));hi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else hi=hi.next=t;return i}var i_=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()})}},s_=U.unstable_scheduleCallback,r_=U.unstable_NormalPriority,rt={$$typeof:c,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qa(){return{controller:new i_,data:new Map,refCount:0}}function gr(e){e.refCount--,e.refCount===0&&s_(r_,function(){e.controller.abort()})}var mr=null,Za=0,ks=0,Hs=null;function n_(e,t){if(mr===null){var i=mr=[];Za=0,ks=to(),Hs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Za++,t.then(qc,qc),t}function qc(){if(--Za===0&&mr!==null){Hs!==null&&(Hs.status="fulfilled");var e=mr;mr=null,ks=0,Hs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function a_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(a){i.push(a)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var a=0;a<i.length;a++)(0,i[a])(t)},function(a){for(s.status="rejected",s.reason=a,a=0;a<i.length;a++)(0,i[a])(void 0)}),s}var Gc=z.S;z.S=function(e,t){Au=be(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&n_(e,t),Gc!==null&&Gc(e,t)};var ns=R(null);function Ja(){var e=ns.current;return e!==null?e:Xe.pooledCache}function vn(e,t){t===null?$(ns,ns.current):$(ns,t.pool)}function Wc(){var e=Ja();return e===null?null:{parent:rt._currentValue,pool:e}}var zs=Error(j(460)),el=Error(j(474)),gn=Error(j(542)),mn={then:function(){}};function $c(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ai,ai),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Vc(e),e;default:if(typeof t.status=="string")t.then(ai,ai);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(j(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=s}},function(s){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Vc(e),e}throw ls=t,zs}}function as(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ls=i,zs):i}}var ls=null;function Yc(){if(ls===null)throw Error(j(459));var e=ls;return ls=null,e}function Vc(e){if(e===zs||e===gn)throw Error(j(483))}var Ns=null,pr=0;function pn(e){var t=pr;return pr+=1,Ns===null&&(Ns=[]),Xc(Ns,e,t)}function Sr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Sn(e,t){throw t.$$typeof===m?Error(j(525)):(e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kc(e){function t(K,W){if(e){var J=K.deletions;J===null?(K.deletions=[W],K.flags|=16):J.push(W)}}function i(K,W){if(!e)return null;for(;W!==null;)t(K,W),W=W.sibling;return null}function s(K){for(var W=new Map;K!==null;)K.key!==null?W.set(K.key,K):W.set(K.index,K),K=K.sibling;return W}function a(K,W){return K=oi(K,W),K.index=0,K.sibling=null,K}function u(K,W,J){return K.index=J,e?(J=K.alternate,J!==null?(J=J.index,J<W?(K.flags|=67108866,W):J):(K.flags|=67108866,W)):(K.flags|=1048576,W)}function x(K){return e&&K.alternate===null&&(K.flags|=67108866),K}function B(K,W,J,oe){return W===null||W.tag!==6?(W=Pa(J,K.mode,oe),W.return=K,W):(W=a(W,J),W.return=K,W)}function P(K,W,J,oe){var pe=J.type;return pe===f?le(K,W,J.props.children,oe,J.key):W!==null&&(W.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===p&&as(pe)===W.type)?(W=a(W,J.props),Sr(W,J),W.return=K,W):(W=un(J.type,J.key,J.props,null,K.mode,oe),Sr(W,J),W.return=K,W)}function ee(K,W,J,oe){return W===null||W.tag!==4||W.stateNode.containerInfo!==J.containerInfo||W.stateNode.implementation!==J.implementation?(W=qa(J,K.mode,oe),W.return=K,W):(W=a(W,J.children||[]),W.return=K,W)}function le(K,W,J,oe,pe){return W===null||W.tag!==7?(W=ts(J,K.mode,oe,pe),W.return=K,W):(W=a(W,J),W.return=K,W)}function ce(K,W,J){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=Pa(""+W,K.mode,J),W.return=K,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return J=un(W.type,W.key,W.props,null,K.mode,J),Sr(J,W),J.return=K,J;case b:return W=qa(W,K.mode,J),W.return=K,W;case p:return W=as(W),ce(K,W,J)}if(X(W)||A(W))return W=ts(W,K.mode,J,null),W.return=K,W;if(typeof W.then=="function")return ce(K,pn(W),J);if(W.$$typeof===c)return ce(K,_n(K,W),J);Sn(K,W)}return null}function te(K,W,J,oe){var pe=W!==null?W.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return pe!==null?null:B(K,W,""+J,oe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case y:return J.key===pe?P(K,W,J,oe):null;case b:return J.key===pe?ee(K,W,J,oe):null;case p:return J=as(J),te(K,W,J,oe)}if(X(J)||A(J))return pe!==null?null:le(K,W,J,oe,null);if(typeof J.then=="function")return te(K,W,pn(J),oe);if(J.$$typeof===c)return te(K,W,_n(K,J),oe);Sn(K,J)}return null}function ne(K,W,J,oe,pe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return K=K.get(J)||null,B(W,K,""+oe,pe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case y:return K=K.get(oe.key===null?J:oe.key)||null,P(W,K,oe,pe);case b:return K=K.get(oe.key===null?J:oe.key)||null,ee(W,K,oe,pe);case p:return oe=as(oe),ne(K,W,J,oe,pe)}if(X(oe)||A(oe))return K=K.get(J)||null,le(W,K,oe,pe,null);if(typeof oe.then=="function")return ne(K,W,J,pn(oe),pe);if(oe.$$typeof===c)return ne(K,W,J,_n(W,oe),pe);Sn(W,oe)}return null}function ve(K,W,J,oe){for(var pe=null,Ne=null,ge=W,Le=W=0,ke=null;ge!==null&&Le<J.length;Le++){ge.index>Le?(ke=ge,ge=null):ke=ge.sibling;var Ue=te(K,ge,J[Le],oe);if(Ue===null){ge===null&&(ge=ke);break}e&&ge&&Ue.alternate===null&&t(K,ge),W=u(Ue,W,Le),Ne===null?pe=Ue:Ne.sibling=Ue,Ne=Ue,ge=ke}if(Le===J.length)return i(K,ge),He&&ci(K,Le),pe;if(ge===null){for(;Le<J.length;Le++)ge=ce(K,J[Le],oe),ge!==null&&(W=u(ge,W,Le),Ne===null?pe=ge:Ne.sibling=ge,Ne=ge);return He&&ci(K,Le),pe}for(ge=s(ge);Le<J.length;Le++)ke=ne(ge,K,Le,J[Le],oe),ke!==null&&(e&&ke.alternate!==null&&ge.delete(ke.key===null?Le:ke.key),W=u(ke,W,Le),Ne===null?pe=ke:Ne.sibling=ke,Ne=ke);return e&&ge.forEach(function(Xi){return t(K,Xi)}),He&&ci(K,Le),pe}function ye(K,W,J,oe){if(J==null)throw Error(j(151));for(var pe=null,Ne=null,ge=W,Le=W=0,ke=null,Ue=J.next();ge!==null&&!Ue.done;Le++,Ue=J.next()){ge.index>Le?(ke=ge,ge=null):ke=ge.sibling;var Xi=te(K,ge,Ue.value,oe);if(Xi===null){ge===null&&(ge=ke);break}e&&ge&&Xi.alternate===null&&t(K,ge),W=u(Xi,W,Le),Ne===null?pe=Xi:Ne.sibling=Xi,Ne=Xi,ge=ke}if(Ue.done)return i(K,ge),He&&ci(K,Le),pe;if(ge===null){for(;!Ue.done;Le++,Ue=J.next())Ue=ce(K,Ue.value,oe),Ue!==null&&(W=u(Ue,W,Le),Ne===null?pe=Ue:Ne.sibling=Ue,Ne=Ue);return He&&ci(K,Le),pe}for(ge=s(ge);!Ue.done;Le++,Ue=J.next())Ue=ne(ge,K,Le,Ue.value,oe),Ue!==null&&(e&&Ue.alternate!==null&&ge.delete(Ue.key===null?Le:Ue.key),W=u(Ue,W,Le),Ne===null?pe=Ue:Ne.sibling=Ue,Ne=Ue);return e&&ge.forEach(function(mv){return t(K,mv)}),He&&ci(K,Le),pe}function $e(K,W,J,oe){if(typeof J=="object"&&J!==null&&J.type===f&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case y:e:{for(var pe=J.key;W!==null;){if(W.key===pe){if(pe=J.type,pe===f){if(W.tag===7){i(K,W.sibling),oe=a(W,J.props.children),oe.return=K,K=oe;break e}}else if(W.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===p&&as(pe)===W.type){i(K,W.sibling),oe=a(W,J.props),Sr(oe,J),oe.return=K,K=oe;break e}i(K,W);break}else t(K,W);W=W.sibling}J.type===f?(oe=ts(J.props.children,K.mode,oe,J.key),oe.return=K,K=oe):(oe=un(J.type,J.key,J.props,null,K.mode,oe),Sr(oe,J),oe.return=K,K=oe)}return x(K);case b:e:{for(pe=J.key;W!==null;){if(W.key===pe)if(W.tag===4&&W.stateNode.containerInfo===J.containerInfo&&W.stateNode.implementation===J.implementation){i(K,W.sibling),oe=a(W,J.children||[]),oe.return=K,K=oe;break e}else{i(K,W);break}else t(K,W);W=W.sibling}oe=qa(J,K.mode,oe),oe.return=K,K=oe}return x(K);case p:return J=as(J),$e(K,W,J,oe)}if(X(J))return ve(K,W,J,oe);if(A(J)){if(pe=A(J),typeof pe!="function")throw Error(j(150));return J=pe.call(J),ye(K,W,J,oe)}if(typeof J.then=="function")return $e(K,W,pn(J),oe);if(J.$$typeof===c)return $e(K,W,_n(K,J),oe);Sn(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,W!==null&&W.tag===6?(i(K,W.sibling),oe=a(W,J),oe.return=K,K=oe):(i(K,W),oe=Pa(J,K.mode,oe),oe.return=K,K=oe),x(K)):i(K,W)}return function(K,W,J,oe){try{pr=0;var pe=$e(K,W,J,oe);return Ns=null,pe}catch(ge){if(ge===zs||ge===gn)throw ge;var Ne=Bt(29,ge,null,K.mode);return Ne.lanes=oe,Ne.return=K,Ne}finally{}}}var os=Kc(!0),Qc=Kc(!1),Mi=!1;function tl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function il(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ti(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Bi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(je&2)!==0){var a=s.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),s.pending=t,t=hn(e),kc(e,null,i),t}return cn(e,s,t,i),hn(e)}function yr(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,Po(e,i)}}function sl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var a=null,u=null;if(i=i.firstBaseUpdate,i!==null){do{var x={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};u===null?a=u=x:u=u.next=x,i=i.next}while(i!==null);u===null?a=u=t:u=u.next=t}else a=u=t;i={baseState:s.baseState,firstBaseUpdate:a,lastBaseUpdate:u,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 rl=!1;function br(){if(rl){var e=Hs;if(e!==null)throw e}}function Cr(e,t,i,s){rl=!1;var a=e.updateQueue;Mi=!1;var u=a.firstBaseUpdate,x=a.lastBaseUpdate,B=a.shared.pending;if(B!==null){a.shared.pending=null;var P=B,ee=P.next;P.next=null,x===null?u=ee:x.next=ee,x=P;var le=e.alternate;le!==null&&(le=le.updateQueue,B=le.lastBaseUpdate,B!==x&&(B===null?le.firstBaseUpdate=ee:B.next=ee,le.lastBaseUpdate=P))}if(u!==null){var ce=a.baseState;x=0,le=ee=P=null,B=u;do{var te=B.lane&-536870913,ne=te!==B.lane;if(ne?(Oe&te)===te:(s&te)===te){te!==0&&te===ks&&(rl=!0),le!==null&&(le=le.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var ve=e,ye=B;te=t;var $e=i;switch(ye.tag){case 1:if(ve=ye.payload,typeof ve=="function"){ce=ve.call($e,ce,te);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ye.payload,te=typeof ve=="function"?ve.call($e,ce,te):ve,te==null)break e;ce=l({},ce,te);break e;case 2:Mi=!0}}te=B.callback,te!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=a.callbacks,ne===null?a.callbacks=[te]:ne.push(te))}else ne={lane:te,tag:B.tag,payload:B.payload,callback:B.callback,next:null},le===null?(ee=le=ne,P=ce):le=le.next=ne,x|=te;if(B=B.next,B===null){if(B=a.shared.pending,B===null)break;ne=B,B=ne.next,ne.next=null,a.lastBaseUpdate=ne,a.shared.pending=null}}while(!0);le===null&&(P=ce),a.baseState=P,a.firstBaseUpdate=ee,a.lastBaseUpdate=le,u===null&&(a.shared.lanes=0),Ni|=x,e.lanes=x,e.memoizedState=ce}}function Zc(e,t){if(typeof e!="function")throw Error(j(191,e));e.call(t)}function Jc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Zc(i[e],t)}var Us=R(null),yn=R(0);function eh(e,t){e=yi,$(yn,e),$(Us,t),yi=e|t.baseLanes}function nl(){$(yn,yi),$(Us,Us.current)}function al(){yi=yn.current,O(Us),O(yn)}var Ot=R(null),$t=null;function Oi(e){var t=e.alternate;$(it,it.current&1),$(Ot,e),$t===null&&(t===null||Us.current!==null||t.memoizedState!==null)&&($t=e)}function ll(e){$(it,it.current),$(Ot,e),$t===null&&($t=e)}function th(e){e.tag===22?($(it,it.current),$(Ot,e),$t===null&&($t=e)):ki()}function ki(){$(it,it.current),$(Ot,Ot.current)}function kt(e){O(Ot),$t===e&&($t=null),O(it)}var it=R(0);function bn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||_o(i)||vo(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 fi=0,xe=null,Ge=null,nt=null,Cn=!1,js=!1,cs=!1,wn=0,wr=0,Is=null,l_=0;function et(){throw Error(j(321))}function ol(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Tt(e[i],t[i]))return!1;return!0}function cl(e,t,i,s,a,u){return fi=u,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Uh:El,cs=!1,u=i(s,a),cs=!1,js&&(u=sh(t,i,s,a)),ih(e),u}function ih(e){z.H=Lr;var t=Ge!==null&&Ge.next!==null;if(fi=0,nt=Ge=xe=null,Cn=!1,wr=0,Is=null,t)throw Error(j(300));e===null||at||(e=e.dependencies,e!==null&&dn(e)&&(at=!0))}function sh(e,t,i,s){xe=e;var a=0;do{if(js&&(Is=null),wr=0,js=!1,25<=a)throw Error(j(301));if(a+=1,nt=Ge=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}z.H=jh,u=t(i,s)}while(js);return u}function o_(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?Er(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(xe.flags|=1024),t}function hl(){var e=wn!==0;return wn=0,e}function ul(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function fl(e){if(Cn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Cn=!1}fi=0,nt=Ge=xe=null,js=!1,wr=wn=0,Is=null}function yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?xe.memoizedState=nt=e:nt=nt.next=e,nt}function st(){if(Ge===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=nt===null?xe.memoizedState:nt.next;if(t!==null)nt=t,Ge=e;else{if(e===null)throw xe.alternate===null?Error(j(467)):Error(j(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},nt===null?xe.memoizedState=nt=e:nt=nt.next=e}return nt}function En(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Er(e){var t=wr;return wr+=1,Is===null&&(Is=[]),e=Xc(Is,e,t),t=xe,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Uh:El),e}function xn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Er(e);if(e.$$typeof===c)return vt(e)}throw Error(j(438,String(e)))}function dl(e){var t=null,i=xe.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=xe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=En(),xe.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]=L;return t.index++,i}function di(e,t){return typeof t=="function"?t(e):t}function Ln(e){var t=st();return _l(t,Ge,e)}function _l(e,t,i){var s=e.queue;if(s===null)throw Error(j(311));s.lastRenderedReducer=i;var a=e.baseQueue,u=s.pending;if(u!==null){if(a!==null){var x=a.next;a.next=u.next,u.next=x}t.baseQueue=a=u,s.pending=null}if(u=e.baseState,a===null)e.memoizedState=u;else{t=a.next;var B=x=null,P=null,ee=t,le=!1;do{var ce=ee.lane&-536870913;if(ce!==ee.lane?(Oe&ce)===ce:(fi&ce)===ce){var te=ee.revertLane;if(te===0)P!==null&&(P=P.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ce===ks&&(le=!0);else if((fi&te)===te){ee=ee.next,te===ks&&(le=!0);continue}else ce={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},P===null?(B=P=ce,x=u):P=P.next=ce,xe.lanes|=te,Ni|=te;ce=ee.action,cs&&i(u,ce),u=ee.hasEagerState?ee.eagerState:i(u,ce)}else te={lane:ce,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},P===null?(B=P=te,x=u):P=P.next=te,xe.lanes|=ce,Ni|=ce;ee=ee.next}while(ee!==null&&ee!==t);if(P===null?x=u:P.next=B,!Tt(u,e.memoizedState)&&(at=!0,le&&(i=Hs,i!==null)))throw i;e.memoizedState=u,e.baseState=x,e.baseQueue=P,s.lastRenderedState=u}return a===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function vl(e){var t=st(),i=t.queue;if(i===null)throw Error(j(311));i.lastRenderedReducer=e;var s=i.dispatch,a=i.pending,u=t.memoizedState;if(a!==null){i.pending=null;var x=a=a.next;do u=e(u,x.action),x=x.next;while(x!==a);Tt(u,t.memoizedState)||(at=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),i.lastRenderedState=u}return[u,s]}function rh(e,t,i){var s=xe,a=st(),u=He;if(u){if(i===void 0)throw Error(j(407));i=i()}else i=t();var x=!Tt((Ge||a).memoizedState,i);if(x&&(a.memoizedState=i,at=!0),a=a.queue,pl(lh.bind(null,s,a,e),[e]),a.getSnapshot!==t||x||nt!==null&&nt.memoizedState.tag&1){if(s.flags|=2048,Fs(9,{destroy:void 0},ah.bind(null,s,a,i,t),null),Xe===null)throw Error(j(349));u||(fi&127)!==0||nh(s,t,i)}return i}function nh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=xe.updateQueue,t===null?(t=En(),xe.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function ah(e,t,i,s){t.value=i,t.getSnapshot=s,oh(t)&&ch(e)}function lh(e,t,i){return i(function(){oh(t)&&ch(e)})}function oh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Tt(e,i)}catch{return!0}}function ch(e){var t=es(e,2);t!==null&&Rt(t,e,2)}function gl(e){var t=yt();if(typeof e=="function"){var i=e;if(e=i(),cs){Mt(!0);try{i()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:e},t}function hh(e,t,i,s){return e.baseState=i,_l(e,Ge,typeof s=="function"?s:di)}function c_(e,t,i,s,a){if(Dn(e))throw Error(j(485));if(e=t.action,e!==null){var u={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){u.listeners.push(x)}};z.T!==null?i(!0):u.isTransition=!1,s(u),i=t.pending,i===null?(u.next=t.pending=u,uh(t,u)):(u.next=i.next,t.pending=i.next=u)}}function uh(e,t){var i=t.action,s=t.payload,a=e.state;if(t.isTransition){var u=z.T,x={};z.T=x;try{var B=i(a,s),P=z.S;P!==null&&P(x,B),fh(e,t,B)}catch(ee){ml(e,t,ee)}finally{u!==null&&x.types!==null&&(u.types=x.types),z.T=u}}else try{u=i(a,s),fh(e,t,u)}catch(ee){ml(e,t,ee)}}function fh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){dh(e,t,s)},function(s){return ml(e,t,s)}):dh(e,t,i)}function dh(e,t,i){t.status="fulfilled",t.value=i,_h(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,uh(e,i)))}function ml(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,_h(t),t=t.next;while(t!==s)}e.action=null}function _h(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function vh(e,t){return t}function gh(e,t){if(He){var i=Xe.formState;if(i!==null){e:{var s=xe;if(He){if(Ye){t:{for(var a=Ye,u=Wt;a.nodeType!==8;){if(!u){a=null;break t}if(a=Xt(a.nextSibling),a===null){a=null;break t}}u=a.data,a=u==="F!"||u==="F"?a:null}if(a){Ye=Xt(a.nextSibling),s=a.data==="F!";break e}}Ri(s)}s=!1}s&&(t=i[0])}}return i=yt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vh,lastRenderedState:t},i.queue=s,i=Hh.bind(null,xe,s),s.dispatch=i,s=gl(!1),u=wl.bind(null,xe,!1,s.queue),s=yt(),a={state:t,dispatch:null,action:e,pending:null},s.queue=a,i=c_.bind(null,xe,a,u,i),a.dispatch=i,s.memoizedState=e,[t,i,!1]}function mh(e){var t=st();return ph(t,Ge,e)}function ph(e,t,i){if(t=_l(e,t,vh)[0],e=Ln(di)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Er(t)}catch(x){throw x===zs?gn:x}else s=t;t=st();var a=t.queue,u=a.dispatch;return i!==t.memoizedState&&(xe.flags|=2048,Fs(9,{destroy:void 0},h_.bind(null,a,i),null)),[s,u,e]}function h_(e,t){e.action=t}function Sh(e){var t=st(),i=Ge;if(i!==null)return ph(t,i,e);st(),t=t.memoizedState,i=st();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Fs(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=xe.updateQueue,t===null&&(t=En(),xe.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 yh(){return st().memoizedState}function An(e,t,i,s){var a=yt();xe.flags|=e,a.memoizedState=Fs(1|t,{destroy:void 0},i,s===void 0?null:s)}function Rn(e,t,i,s){var a=st();s=s===void 0?null:s;var u=a.memoizedState.inst;Ge!==null&&s!==null&&ol(s,Ge.memoizedState.deps)?a.memoizedState=Fs(t,u,i,s):(xe.flags|=e,a.memoizedState=Fs(1|t,u,i,s))}function bh(e,t){An(8390656,8,e,t)}function pl(e,t){Rn(2048,8,e,t)}function u_(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=En(),xe.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Ch(e){var t=st().memoizedState;return u_({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(j(440));return t.impl.apply(void 0,arguments)}}function wh(e,t){return Rn(4,2,e,t)}function Eh(e,t){return Rn(4,4,e,t)}function xh(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 Lh(e,t,i){i=i!=null?i.concat([e]):null,Rn(4,4,xh.bind(null,t,e),i)}function Sl(){}function Ah(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ol(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Rh(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ol(t,s[1]))return s[0];if(s=e(),cs){Mt(!0);try{e()}finally{Mt(!1)}}return i.memoizedState=[s,t],s}function yl(e,t,i){return i===void 0||(fi&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Du(),xe.lanes|=e,Ni|=e,i)}function Dh(e,t,i,s){return Tt(i,t)?i:Us.current!==null?(e=yl(e,i,s),Tt(e,t)||(at=!0),e):(fi&42)===0||(fi&1073741824)!==0&&(Oe&261930)===0?(at=!0,e.memoizedState=i):(e=Du(),xe.lanes|=e,Ni|=e,t)}function Mh(e,t,i,s,a){var u=I.p;I.p=u!==0&&8>u?u:8;var x=z.T,B={};z.T=B,wl(e,!1,t,i);try{var P=a(),ee=z.S;if(ee!==null&&ee(B,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var le=a_(P,s);xr(e,t,le,Nt(e))}else xr(e,t,s,Nt(e))}catch(ce){xr(e,t,{then:function(){},status:"rejected",reason:ce},Nt())}finally{I.p=u,x!==null&&B.types!==null&&(x.types=B.types),z.T=x}}function f_(){}function bl(e,t,i,s){if(e.tag!==5)throw Error(j(476));var a=Th(e).queue;Mh(e,a,t,G,i===null?f_:function(){return Bh(e),i(s)})}function Th(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:G},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bh(e){var t=Th(e);t.next===null&&(t=e.alternate.memoizedState),xr(e,t.next.queue,{},Nt())}function Cl(){return vt(Pr)}function Oh(){return st().memoizedState}function kh(){return st().memoizedState}function d_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Nt();e=Ti(i);var s=Bi(t,e,i);s!==null&&(Rt(s,t,i),yr(s,t,i)),t={cache:Qa()},e.payload=t;return}t=t.return}}function __(e,t,i){var s=Nt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Dn(e)?zh(t,i):(i=Ia(e,t,i,s),i!==null&&(Rt(i,e,s),Nh(i,t,s)))}function Hh(e,t,i){var s=Nt();xr(e,t,i,s)}function xr(e,t,i,s){var a={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Dn(e))zh(t,a);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var x=t.lastRenderedState,B=u(x,i);if(a.hasEagerState=!0,a.eagerState=B,Tt(B,x))return cn(e,t,a,0),Xe===null&&on(),!1}catch{}finally{}if(i=Ia(e,t,a,s),i!==null)return Rt(i,e,s),Nh(i,t,s),!0}return!1}function wl(e,t,i,s){if(s={lane:2,revertLane:to(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Dn(e)){if(t)throw Error(j(479))}else t=Ia(e,i,s,2),t!==null&&Rt(t,e,2)}function Dn(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function zh(e,t){js=Cn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Nh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Po(e,i)}}var Lr={readContext:vt,use:xn,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Lr.useEffectEvent=et;var Uh={readContext:vt,use:xn,useCallback:function(e,t){return yt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:bh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,An(4194308,4,xh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return An(4194308,4,e,t)},useInsertionEffect:function(e,t){An(4,2,e,t)},useMemo:function(e,t){var i=yt();t=t===void 0?null:t;var s=e();if(cs){Mt(!0);try{e()}finally{Mt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=yt();if(i!==void 0){var a=i(t);if(cs){Mt(!0);try{i(t)}finally{Mt(!1)}}}else a=t;return s.memoizedState=s.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},s.queue=e,e=e.dispatch=__.bind(null,xe,e),[s.memoizedState,e]},useRef:function(e){var t=yt();return e={current:e},t.memoizedState=e},useState:function(e){e=gl(e);var t=e.queue,i=Hh.bind(null,xe,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Sl,useDeferredValue:function(e,t){var i=yt();return yl(i,e,t)},useTransition:function(){var e=gl(!1);return e=Mh.bind(null,xe,e.queue,!0,!1),yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=xe,a=yt();if(He){if(i===void 0)throw Error(j(407));i=i()}else{if(i=t(),Xe===null)throw Error(j(349));(Oe&127)!==0||nh(s,t,i)}a.memoizedState=i;var u={value:i,getSnapshot:t};return a.queue=u,bh(lh.bind(null,s,u,e),[e]),s.flags|=2048,Fs(9,{destroy:void 0},ah.bind(null,s,u,i,t),null),i},useId:function(){var e=yt(),t=Xe.identifierPrefix;if(He){var i=ti,s=ei;i=(s&~(1<<32-pt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=wn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=l_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Cl,useFormState:gh,useActionState:gh,useOptimistic:function(e){var t=yt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=wl.bind(null,xe,!0,i),i.dispatch=t,[e,t]},useMemoCache:dl,useCacheRefresh:function(){return yt().memoizedState=d_.bind(null,xe)},useEffectEvent:function(e){var t=yt(),i={impl:e};return t.memoizedState=i,function(){if((je&2)!==0)throw Error(j(440));return i.impl.apply(void 0,arguments)}}},El={readContext:vt,use:xn,useCallback:Ah,useContext:vt,useEffect:pl,useImperativeHandle:Lh,useInsertionEffect:wh,useLayoutEffect:Eh,useMemo:Rh,useReducer:Ln,useRef:yh,useState:function(){return Ln(di)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=st();return Dh(i,Ge.memoizedState,e,t)},useTransition:function(){var e=Ln(di)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:rh,useId:Oh,useHostTransitionStatus:Cl,useFormState:mh,useActionState:mh,useOptimistic:function(e,t){var i=st();return hh(i,Ge,e,t)},useMemoCache:dl,useCacheRefresh:kh};El.useEffectEvent=Ch;var jh={readContext:vt,use:xn,useCallback:Ah,useContext:vt,useEffect:pl,useImperativeHandle:Lh,useInsertionEffect:wh,useLayoutEffect:Eh,useMemo:Rh,useReducer:vl,useRef:yh,useState:function(){return vl(di)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=st();return Ge===null?yl(i,e,t):Dh(i,Ge.memoizedState,e,t)},useTransition:function(){var e=vl(di)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:rh,useId:Oh,useHostTransitionStatus:Cl,useFormState:Sh,useActionState:Sh,useOptimistic:function(e,t){var i=st();return Ge!==null?hh(i,Ge,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:dl,useCacheRefresh:kh};jh.useEffectEvent=Ch;function xl(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 Ll={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Nt(),a=Ti(s);a.payload=t,i!=null&&(a.callback=i),t=Bi(e,a,s),t!==null&&(Rt(t,e,s),yr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Nt(),a=Ti(s);a.tag=1,a.payload=t,i!=null&&(a.callback=i),t=Bi(e,a,s),t!==null&&(Rt(t,e,s),yr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Nt(),s=Ti(i);s.tag=2,t!=null&&(s.callback=t),t=Bi(e,s,i),t!==null&&(Rt(t,e,i),yr(t,e,i))}};function Ih(e,t,i,s,a,u,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,x):t.prototype&&t.prototype.isPureReactComponent?!fr(i,s)||!fr(a,u):!0}function Fh(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&&Ll.enqueueReplaceState(t,t.state,null)}function hs(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 a in e)i[a]===void 0&&(i[a]=e[a])}return i}function Ph(e){ln(e)}function qh(e){console.error(e)}function Gh(e){ln(e)}function Mn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Wh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Al(e,t,i){return i=Ti(i),i.tag=3,i.payload={element:null},i.callback=function(){Mn(e,t)},i}function $h(e){return e=Ti(e),e.tag=3,e}function Xh(e,t,i,s){var a=i.type.getDerivedStateFromError;if(typeof a=="function"){var u=s.value;e.payload=function(){return a(u)},e.callback=function(){Wh(t,i,s)}}var x=i.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Wh(t,i,s),typeof a!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var B=s.stack;this.componentDidCatch(s.value,{componentStack:B!==null?B:""})})}function v_(e,t,i,s,a){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Os(t,i,a,!0),i=Ot.current,i!==null){switch(i.tag){case 31:case 13:return $t===null?Pn():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=a,s===mn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Zl(e,s,a)),!1;case 22:return i.flags|=65536,s===mn?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)),Zl(e,s,a)),!1}throw Error(j(435,i.tag))}return Zl(e,s,a),Pn(),!1}if(He)return t=Ot.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,s!==$a&&(e=Error(j(422),{cause:s}),vr(Pt(e,i)))):(s!==$a&&(t=Error(j(423),{cause:s}),vr(Pt(t,i))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,s=Pt(s,i),a=Al(e.stateNode,s,a),sl(e,a),tt!==4&&(tt=2)),!1;var u=Error(j(520),{cause:s});if(u=Pt(u,i),kr===null?kr=[u]:kr.push(u),tt!==4&&(tt=2),t===null)return!0;s=Pt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=a&-a,i.lanes|=e,e=Al(i.stateNode,s,e),sl(i,e),!1;case 1:if(t=i.type,u=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ui===null||!Ui.has(u))))return i.flags|=65536,a&=-a,i.lanes|=a,a=$h(a),Xh(a,e,i,s),sl(i,a),!1}i=i.return}while(i!==null);return!1}var Rl=Error(j(461)),at=!1;function gt(e,t,i,s){t.child=e===null?Qc(t,null,i,s):os(t,e.child,i,s)}function Yh(e,t,i,s,a){i=i.render;var u=t.ref;if("ref"in s){var x={};for(var B in s)B!=="ref"&&(x[B]=s[B])}else x=s;return rs(t),s=cl(e,t,i,x,u,a),B=hl(),e!==null&&!at?(ul(e,t,a),_i(e,t,a)):(He&&B&&Ga(t),t.flags|=1,gt(e,t,s,a),t.child)}function Vh(e,t,i,s,a){if(e===null){var u=i.type;return typeof u=="function"&&!Fa(u)&&u.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=u,Kh(e,t,u,s,a)):(e=un(i.type,null,s,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!zl(e,a)){var x=u.memoizedProps;if(i=i.compare,i=i!==null?i:fr,i(x,s)&&e.ref===t.ref)return _i(e,t,a)}return t.flags|=1,e=oi(u,s),e.ref=t.ref,e.return=t,t.child=e}function Kh(e,t,i,s,a){if(e!==null){var u=e.memoizedProps;if(fr(u,s)&&e.ref===t.ref)if(at=!1,t.pendingProps=s=u,zl(e,a))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,_i(e,t,a)}return Dl(e,t,i,s,a)}function Qh(e,t,i,s){var a=s.children,u=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(u=u!==null?u.baseLanes|i:i,e!==null){for(s=t.child=e.child,a=0;s!==null;)a=a|s.lanes|s.childLanes,s=s.sibling;s=a&~u}else s=0,t.child=null;return Zh(e,t,u,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vn(t,u!==null?u.cachePool:null),u!==null?eh(t,u):nl(),th(t);else return s=t.lanes=536870912,Zh(e,t,u!==null?u.baseLanes|i:i,i,s)}else u!==null?(vn(t,u.cachePool),eh(t,u),ki(),t.memoizedState=null):(e!==null&&vn(t,null),nl(),ki());return gt(e,t,a,i),t.child}function Ar(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Zh(e,t,i,s,a){var u=Ja();return u=u===null?null:{parent:rt._currentValue,pool:u},t.memoizedState={baseLanes:i,cachePool:u},e!==null&&vn(t,null),nl(),th(t),e!==null&&Os(e,t,s,!0),t.childLanes=a,null}function Tn(e,t){return t=On({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jh(e,t,i){return os(t,e.child,null,i),e=Tn(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function g_(e,t,i){var s=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(He){if(s.mode==="hidden")return e=Tn(t,s),t.lanes=536870912,Ar(null,e);if(ll(t),(e=Ye)?(e=ff(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=zc(e),i.return=t,t.child=i,_t=t,Ye=null)):e=null,e===null)throw Ri(t);return t.lanes=536870912,null}return Tn(t,s)}var u=e.memoizedState;if(u!==null){var x=u.dehydrated;if(ll(t),a)if(t.flags&256)t.flags&=-257,t=Jh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(j(558));else if(at||Os(e,t,i,!1),a=(i&e.childLanes)!==0,at||a){if(s=Xe,s!==null&&(x=qo(s,i),x!==0&&x!==u.retryLane))throw u.retryLane=x,es(e,x),Rt(s,e,x),Rl;Pn(),t=Jh(e,t,i)}else e=u.treeContext,Ye=Xt(x.nextSibling),_t=t,He=!0,Ai=null,Wt=!1,e!==null&&jc(t,e),t=Tn(t,s),t.flags|=4096;return t}return e=oi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bn(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(j(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Dl(e,t,i,s,a){return rs(t),i=cl(e,t,i,s,void 0,a),s=hl(),e!==null&&!at?(ul(e,t,a),_i(e,t,a)):(He&&s&&Ga(t),t.flags|=1,gt(e,t,i,a),t.child)}function eu(e,t,i,s,a,u){return rs(t),t.updateQueue=null,i=sh(t,s,i,a),ih(e),s=hl(),e!==null&&!at?(ul(e,t,u),_i(e,t,u)):(He&&s&&Ga(t),t.flags|=1,gt(e,t,i,u),t.child)}function tu(e,t,i,s,a){if(rs(t),t.stateNode===null){var u=Ds,x=i.contextType;typeof x=="object"&&x!==null&&(u=vt(x)),u=new i(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ll,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},tl(t),x=i.contextType,u.context=typeof x=="object"&&x!==null?vt(x):Ds,u.state=t.memoizedState,x=i.getDerivedStateFromProps,typeof x=="function"&&(xl(t,i,x,s),u.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(x=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),x!==u.state&&Ll.enqueueReplaceState(u,u.state,null),Cr(t,s,u,a),br(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var B=t.memoizedProps,P=hs(i,B);u.props=P;var ee=u.context,le=i.contextType;x=Ds,typeof le=="object"&&le!==null&&(x=vt(le));var ce=i.getDerivedStateFromProps;le=typeof ce=="function"||typeof u.getSnapshotBeforeUpdate=="function",B=t.pendingProps!==B,le||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(B||ee!==x)&&Fh(t,u,s,x),Mi=!1;var te=t.memoizedState;u.state=te,Cr(t,s,u,a),br(),ee=t.memoizedState,B||te!==ee||Mi?(typeof ce=="function"&&(xl(t,i,ce,s),ee=t.memoizedState),(P=Mi||Ih(t,i,P,s,te,ee,x))?(le||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=ee),u.props=s,u.state=ee,u.context=x,s=P):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,il(e,t),x=t.memoizedProps,le=hs(i,x),u.props=le,ce=t.pendingProps,te=u.context,ee=i.contextType,P=Ds,typeof ee=="object"&&ee!==null&&(P=vt(ee)),B=i.getDerivedStateFromProps,(ee=typeof B=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x!==ce||te!==P)&&Fh(t,u,s,P),Mi=!1,te=t.memoizedState,u.state=te,Cr(t,s,u,a),br();var ne=t.memoizedState;x!==ce||te!==ne||Mi||e!==null&&e.dependencies!==null&&dn(e.dependencies)?(typeof B=="function"&&(xl(t,i,B,s),ne=t.memoizedState),(le=Mi||Ih(t,i,le,s,te,ne,P)||e!==null&&e.dependencies!==null&&dn(e.dependencies))?(ee||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,ne,P),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,ne,P)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&te===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&te===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ne),u.props=s,u.state=ne,u.context=P,s=le):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&te===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&te===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Bn(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=os(t,e.child,null,a),t.child=os(t,null,i,a)):gt(e,t,i,a),t.memoizedState=u.state,e=t.child):e=_i(e,t,a),e}function iu(e,t,i,s){return is(),t.flags|=256,gt(e,t,i,s),t.child}var Ml={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tl(e){return{baseLanes:e,cachePool:Wc()}}function Bl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=zt),e}function su(e,t,i){var s=t.pendingProps,a=!1,u=(t.flags&128)!==0,x;if((x=u)||(x=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),x&&(a=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(He){if(a?Oi(t):ki(),(e=Ye)?(e=ff(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=zc(e),i.return=t,t.child=i,_t=t,Ye=null)):e=null,e===null)throw Ri(t);return vo(e)?t.lanes=32:t.lanes=536870912,null}var B=s.children;return s=s.fallback,a?(ki(),a=t.mode,B=On({mode:"hidden",children:B},a),s=ts(s,a,i,null),B.return=t,s.return=t,B.sibling=s,t.child=B,s=t.child,s.memoizedState=Tl(i),s.childLanes=Bl(e,x,i),t.memoizedState=Ml,Ar(null,s)):(Oi(t),Ol(t,B))}var P=e.memoizedState;if(P!==null&&(B=P.dehydrated,B!==null)){if(u)t.flags&256?(Oi(t),t.flags&=-257,t=kl(e,t,i)):t.memoizedState!==null?(ki(),t.child=e.child,t.flags|=128,t=null):(ki(),B=s.fallback,a=t.mode,s=On({mode:"visible",children:s.children},a),B=ts(B,a,i,null),B.flags|=2,s.return=t,B.return=t,s.sibling=B,t.child=s,os(t,e.child,null,i),s=t.child,s.memoizedState=Tl(i),s.childLanes=Bl(e,x,i),t.memoizedState=Ml,t=Ar(null,s));else if(Oi(t),vo(B)){if(x=B.nextSibling&&B.nextSibling.dataset,x)var ee=x.dgst;x=ee,s=Error(j(419)),s.stack="",s.digest=x,vr({value:s,source:null,stack:null}),t=kl(e,t,i)}else if(at||Os(e,t,i,!1),x=(i&e.childLanes)!==0,at||x){if(x=Xe,x!==null&&(s=qo(x,i),s!==0&&s!==P.retryLane))throw P.retryLane=s,es(e,s),Rt(x,e,s),Rl;_o(B)||Pn(),t=kl(e,t,i)}else _o(B)?(t.flags|=192,t.child=e.child,t=null):(e=P.treeContext,Ye=Xt(B.nextSibling),_t=t,He=!0,Ai=null,Wt=!1,e!==null&&jc(t,e),t=Ol(t,s.children),t.flags|=4096);return t}return a?(ki(),B=s.fallback,a=t.mode,P=e.child,ee=P.sibling,s=oi(P,{mode:"hidden",children:s.children}),s.subtreeFlags=P.subtreeFlags&65011712,ee!==null?B=oi(ee,B):(B=ts(B,a,i,null),B.flags|=2),B.return=t,s.return=t,s.sibling=B,t.child=s,Ar(null,s),s=t.child,B=e.child.memoizedState,B===null?B=Tl(i):(a=B.cachePool,a!==null?(P=rt._currentValue,a=a.parent!==P?{parent:P,pool:P}:a):a=Wc(),B={baseLanes:B.baseLanes|i,cachePool:a}),s.memoizedState=B,s.childLanes=Bl(e,x,i),t.memoizedState=Ml,Ar(e.child,s)):(Oi(t),i=e.child,e=i.sibling,i=oi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=i,t.memoizedState=null,i)}function Ol(e,t){return t=On({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function On(e,t){return e=Bt(22,e,null,t),e.lanes=0,e}function kl(e,t,i){return os(t,e.child,null,i),e=Ol(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ru(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Va(e.return,t,i)}function Hl(e,t,i,s,a,u){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:a,treeForkCount:u}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=s,x.tail=i,x.tailMode=a,x.treeForkCount=u)}function nu(e,t,i){var s=t.pendingProps,a=s.revealOrder,u=s.tail;s=s.children;var x=it.current,B=(x&2)!==0;if(B?(x=x&1|2,t.flags|=128):x&=1,$(it,x),gt(e,t,s,i),s=He?_r:0,!B&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ru(e,i,t);else if(e.tag===19)ru(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(a){case"forwards":for(i=t.child,a=null;i!==null;)e=i.alternate,e!==null&&bn(e)===null&&(a=i),i=i.sibling;i=a,i===null?(a=t.child,t.child=null):(a=i.sibling,i.sibling=null),Hl(t,!1,a,i,u,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&bn(e)===null){t.child=a;break}e=a.sibling,a.sibling=i,i=a,a=e}Hl(t,!0,i,null,u,s);break;case"together":Hl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function _i(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ni|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Os(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,i=oi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=oi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function zl(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&dn(e)))}function m_(e,t,i){switch(t.tag){case 3:k(t,t.stateNode.containerInfo),Di(t,rt,e.memoizedState.cache),is();break;case 27:case 5:se(t);break;case 4:k(t,t.stateNode.containerInfo);break;case 10:Di(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ll(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Oi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?su(e,t,i):(Oi(t),e=_i(e,t,i),e!==null?e.sibling:null);Oi(t);break;case 19:var a=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Os(e,t,i,!1),s=(i&t.childLanes)!==0),a){if(s)return nu(e,t,i);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),$(it,it.current),s)break;return null;case 22:return t.lanes=0,Qh(e,t,i,t.pendingProps);case 24:Di(t,rt,e.memoizedState.cache)}return _i(e,t,i)}function au(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!zl(e,i)&&(t.flags&128)===0)return at=!1,m_(e,t,i);at=(e.flags&131072)!==0}else at=!1,He&&(t.flags&1048576)!==0&&Uc(t,_r,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=as(t.elementType),t.type=e,typeof e=="function")Fa(e)?(s=hs(e,s),t.tag=1,t=tu(null,t,e,s,i)):(t.tag=0,t=Dl(null,t,e,s,i));else{if(e!=null){var a=e.$$typeof;if(a===g){t.tag=11,t=Yh(null,t,e,s,i);break e}else if(a===w){t.tag=14,t=Vh(null,t,e,s,i);break e}}throw t=N(e)||e,Error(j(306,t,""))}}return t;case 0:return Dl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,a=hs(s,t.pendingProps),tu(e,t,s,a,i);case 3:e:{if(k(t,t.stateNode.containerInfo),e===null)throw Error(j(387));s=t.pendingProps;var u=t.memoizedState;a=u.element,il(e,t),Cr(t,s,null,i);var x=t.memoizedState;if(s=x.cache,Di(t,rt,s),s!==u.cache&&Ka(t,[rt],i,!0),br(),s=x.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=iu(e,t,s,i);break e}else if(s!==a){a=Pt(Error(j(424)),t),vr(a),t=iu(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(Ye=Xt(e.firstChild),_t=t,He=!0,Ai=null,Wt=!0,i=Qc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(is(),s===a){t=_i(e,t,i);break e}gt(e,t,s,i)}t=t.child}return t;case 26:return Bn(e,t),e===null?(i=pf(t.type,null,t.pendingProps,null))?t.memoizedState=i:He||(i=t.type,e=t.pendingProps,s=Vn(ue.current).createElement(i),s[dt]=t,s[Ct]=e,mt(s,i,e),ut(s),t.stateNode=s):t.memoizedState=pf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return se(t),e===null&&He&&(s=t.stateNode=vf(t.type,t.pendingProps,ue.current),_t=t,Wt=!0,a=Ye,Pi(t.type)?(go=a,Ye=Xt(s.firstChild)):Ye=a),gt(e,t,t.pendingProps.children,i),Bn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&He&&((a=s=Ye)&&(s=X_(s,t.type,t.pendingProps,Wt),s!==null?(t.stateNode=s,_t=t,Ye=Xt(s.firstChild),Wt=!1,a=!0):a=!1),a||Ri(t)),se(t),a=t.type,u=t.pendingProps,x=e!==null?e.memoizedProps:null,s=u.children,ho(a,u)?s=null:x!==null&&ho(a,x)&&(t.flags|=32),t.memoizedState!==null&&(a=cl(e,t,o_,null,null,i),Pr._currentValue=a),Bn(e,t),gt(e,t,s,i),t.child;case 6:return e===null&&He&&((e=i=Ye)&&(i=Y_(i,t.pendingProps,Wt),i!==null?(t.stateNode=i,_t=t,Ye=null,e=!0):e=!1),e||Ri(t)),null;case 13:return su(e,t,i);case 4:return k(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=os(t,null,s,i):gt(e,t,s,i),t.child;case 11:return Yh(e,t,t.type,t.pendingProps,i);case 7:return gt(e,t,t.pendingProps,i),t.child;case 8:return gt(e,t,t.pendingProps.children,i),t.child;case 12:return gt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Di(t,t.type,s.value),gt(e,t,s.children,i),t.child;case 9:return a=t.type._context,s=t.pendingProps.children,rs(t),a=vt(a),s=s(a),t.flags|=1,gt(e,t,s,i),t.child;case 14:return Vh(e,t,t.type,t.pendingProps,i);case 15:return Kh(e,t,t.type,t.pendingProps,i);case 19:return nu(e,t,i);case 31:return g_(e,t,i);case 22:return Qh(e,t,i,t.pendingProps);case 24:return rs(t),s=vt(rt),e===null?(a=Ja(),a===null&&(a=Xe,u=Qa(),a.pooledCache=u,u.refCount++,u!==null&&(a.pooledCacheLanes|=i),a=u),t.memoizedState={parent:s,cache:a},tl(t),Di(t,rt,a)):((e.lanes&i)!==0&&(il(e,t),Cr(t,null,null,i),br()),a=e.memoizedState,u=t.memoizedState,a.parent!==s?(a={parent:s,cache:s},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Di(t,rt,s)):(s=u.cache,Di(t,rt,s),s!==a.cache&&Ka(t,[rt],i,!0))),gt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(j(156,t.tag))}function vi(e){e.flags|=4}function Nl(e,t,i,s,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Ou())e.flags|=8192;else throw ls=mn,el}else e.flags&=-16777217}function lu(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wf(t))if(Ou())e.flags|=8192;else throw ls=mn,el}function kn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Io():536870912,e.lanes|=t,Ws|=t)}function Rr(e,t){if(!He)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 Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var a=e.child;a!==null;)i|=a.lanes|a.childLanes,s|=a.subtreeFlags&65011712,s|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)i|=a.lanes|a.childLanes,s|=a.subtreeFlags,s|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function p_(e,t,i){var s=t.pendingProps;switch(Wa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ve(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ui(rt),re(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?vi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xa())),Ve(t),null;case 26:var a=t.type,u=t.memoizedState;return e===null?(vi(t),u!==null?(Ve(t),lu(t,u)):(Ve(t),Nl(t,a,null,s,i))):u?u!==e.memoizedState?(vi(t),Ve(t),lu(t,u)):(Ve(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&vi(t),Ve(t),Nl(t,a,e,s,i)),null;case 27:if(de(t),i=ue.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&vi(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Ve(t),null}e=Q.current,Bs(t)?Ic(t):(e=vf(a,s,i),t.stateNode=e,vi(t))}return Ve(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&vi(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Ve(t),null}if(u=Q.current,Bs(t))Ic(t);else{var x=Vn(ue.current);switch(u){case 1:u=x.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:u=x.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":u=x.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":u=x.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":u=x.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?x.createElement("select",{is:s.is}):x.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?x.createElement(a,{is:s.is}):x.createElement(a)}}u[dt]=t,u[Ct]=s;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)u.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=u;e:switch(mt(u,a,s),a){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&vi(t)}}return Ve(t),Nl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&vi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(j(166));if(e=ue.current,Bs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,a=_t,a!==null)switch(a.tag){case 27:case 5:s=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||rf(e.nodeValue,i)),e||Ri(t,!0)}else e=Vn(e).createTextNode(s),e[dt]=t,t.stateNode=e}return Ve(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Bs(t),i!==null){if(e===null){if(!s)throw Error(j(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(557));e[dt]=t}else is(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),e=!1}else i=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(kt(t),t):(kt(t),null);if((t.flags&128)!==0)throw Error(j(558))}return Ve(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!a)throw Error(j(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(j(317));a[dt]=t}else is(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),a=!1}else a=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(kt(t),t):(kt(t),null)}return kt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,a=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(a=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==a&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),kn(t,t.updateQueue),Ve(t),null);case 4:return re(),e===null&&no(t.stateNode.containerInfo),Ve(t),null;case 10:return ui(t.type),Ve(t),null;case 19:if(O(it),s=t.memoizedState,s===null)return Ve(t),null;if(a=(t.flags&128)!==0,u=s.rendering,u===null)if(a)Rr(s,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=bn(e),u!==null){for(t.flags|=128,Rr(s,!1),e=u.updateQueue,t.updateQueue=e,kn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Hc(i,e),i=i.sibling;return $(it,it.current&1|2),He&&ci(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&be()>jn&&(t.flags|=128,a=!0,Rr(s,!1),t.lanes=4194304)}else{if(!a)if(e=bn(u),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,kn(t,e),Rr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!He)return Ve(t),null}else 2*be()-s.renderingStartTime>jn&&i!==536870912&&(t.flags|=128,a=!0,Rr(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=be(),e.sibling=null,i=it.current,$(it,a?i&1|2:i&1),He&&ci(t,s.treeForkCount),e):(Ve(t),null);case 22:case 23:return kt(t),al(),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&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),i=t.updateQueue,i!==null&&kn(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&&O(ns),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ui(rt),Ve(t),null;case 25:return null;case 30:return null}throw Error(j(156,t.tag))}function S_(e,t){switch(Wa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ui(rt),re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(kt(t),t.alternate===null)throw Error(j(340));is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(it),null;case 4:return re(),null;case 10:return ui(t.type),null;case 22:case 23:return kt(t),al(),e!==null&&O(ns),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ui(rt),null;case 25:return null;default:return null}}function ou(e,t){switch(Wa(t),t.tag){case 3:ui(rt),re();break;case 26:case 27:case 5:de(t);break;case 4:re();break;case 31:t.memoizedState!==null&&kt(t);break;case 13:kt(t);break;case 19:O(it);break;case 10:ui(t.type);break;case 22:case 23:kt(t),al(),e!==null&&O(ns);break;case 24:ui(rt)}}function Dr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var a=s.next;i=a;do{if((i.tag&e)===e){s=void 0;var u=i.create,x=i.inst;s=u(),x.destroy=s}i=i.next}while(i!==a)}}catch(B){Fe(t,t.return,B)}}function Hi(e,t,i){try{var s=t.updateQueue,a=s!==null?s.lastEffect:null;if(a!==null){var u=a.next;s=u;do{if((s.tag&e)===e){var x=s.inst,B=x.destroy;if(B!==void 0){x.destroy=void 0,a=t;var P=i,ee=B;try{ee()}catch(le){Fe(a,P,le)}}}s=s.next}while(s!==u)}}catch(le){Fe(t,t.return,le)}}function cu(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Jc(t,i)}catch(s){Fe(e,e.return,s)}}}function hu(e,t,i){i.props=hs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Fe(e,t,s)}}function Mr(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(a){Fe(e,t,a)}}function ii(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(a){Fe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(a){Fe(e,t,a)}else i.current=null}function uu(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(a){Fe(e,e.return,a)}}function Ul(e,t,i){try{var s=e.stateNode;F_(s,e.type,i,t),s[Ct]=t}catch(a){Fe(e,e.return,a)}}function fu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pi(e.type)||e.tag===4}function jl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Pi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Il(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=ai));else if(s!==4&&(s===27&&Pi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Il(e,t,i),e=e.sibling;e!==null;)Il(e,t,i),e=e.sibling}function Hn(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&&Pi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Hn(e,t,i),e=e.sibling;e!==null;)Hn(e,t,i),e=e.sibling}function du(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);mt(t,s,i),t[dt]=e,t[Ct]=i}catch(u){Fe(e,e.return,u)}}var gi=!1,lt=!1,Fl=!1,_u=typeof WeakSet=="function"?WeakSet:Set,ft=null;function y_(e,t){if(e=e.containerInfo,oo=ia,e=Lc(e),ka(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 a=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{i.nodeType,u.nodeType}catch{i=null;break e}var x=0,B=-1,P=-1,ee=0,le=0,ce=e,te=null;t:for(;;){for(var ne;ce!==i||a!==0&&ce.nodeType!==3||(B=x+a),ce!==u||s!==0&&ce.nodeType!==3||(P=x+s),ce.nodeType===3&&(x+=ce.nodeValue.length),(ne=ce.firstChild)!==null;)te=ce,ce=ne;for(;;){if(ce===e)break t;if(te===i&&++ee===a&&(B=x),te===u&&++le===s&&(P=x),(ne=ce.nextSibling)!==null)break;ce=te,te=ce.parentNode}ce=ne}i=B===-1||P===-1?null:{start:B,end:P}}else i=null}i=i||{start:0,end:0}}else i=null;for(co={focusedElem:e,selectionRange:i},ia=!1,ft=t;ft!==null;)if(t=ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ft=e;else for(;ft!==null;){switch(t=ft,u=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++)a=e[i],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,i=t,a=u.memoizedProps,u=u.memoizedState,s=i.stateNode;try{var ve=hs(i.type,a);e=s.getSnapshotBeforeUpdate(ve,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Fe(i,i.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)fo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":fo(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(j(163))}if(e=t.sibling,e!==null){e.return=t.return,ft=e;break}ft=t.return}}function vu(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:pi(e,i),s&4&&Dr(5,i);break;case 1:if(pi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(x){Fe(i,i.return,x)}else{var a=hs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Fe(i,i.return,x)}}s&64&&cu(i),s&512&&Mr(i,i.return);break;case 3:if(pi(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{Jc(e,t)}catch(x){Fe(i,i.return,x)}}break;case 27:t===null&&s&4&&du(i);case 26:case 5:pi(e,i),t===null&&s&4&&uu(i),s&512&&Mr(i,i.return);break;case 12:pi(e,i);break;case 31:pi(e,i),s&4&&pu(e,i);break;case 13:pi(e,i),s&4&&Su(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=D_.bind(null,i),V_(e,i))));break;case 22:if(s=i.memoizedState!==null||gi,!s){t=t!==null&&t.memoizedState!==null||lt,a=gi;var u=lt;gi=s,(lt=t)&&!u?Si(e,i,(i.subtreeFlags&8772)!==0):pi(e,i),gi=a,lt=u}break;case 30:break;default:pi(e,i)}}function gu(e){var t=e.alternate;t!==null&&(e.alternate=null,gu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ma(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 Ze=null,Et=!1;function mi(e,t,i){for(i=i.child;i!==null;)mu(e,t,i),i=i.sibling}function mu(e,t,i){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Vt,i)}catch{}switch(i.tag){case 26:lt||ii(i,t),mi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:lt||ii(i,t);var s=Ze,a=Et;Pi(i.type)&&(Ze=i.stateNode,Et=!1),mi(e,t,i),jr(i.stateNode),Ze=s,Et=a;break;case 5:lt||ii(i,t);case 6:if(s=Ze,a=Et,Ze=null,mi(e,t,i),Ze=s,Et=a,Ze!==null)if(Et)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(i.stateNode)}catch(u){Fe(i,t,u)}else try{Ze.removeChild(i.stateNode)}catch(u){Fe(i,t,u)}break;case 18:Ze!==null&&(Et?(e=Ze,hf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Js(e)):hf(Ze,i.stateNode));break;case 4:s=Ze,a=Et,Ze=i.stateNode.containerInfo,Et=!0,mi(e,t,i),Ze=s,Et=a;break;case 0:case 11:case 14:case 15:Hi(2,i,t),lt||Hi(4,i,t),mi(e,t,i);break;case 1:lt||(ii(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&hu(i,t,s)),mi(e,t,i);break;case 21:mi(e,t,i);break;case 22:lt=(s=lt)||i.memoizedState!==null,mi(e,t,i),lt=s;break;default:mi(e,t,i)}}function pu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Js(e)}catch(i){Fe(t,t.return,i)}}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Js(e)}catch(i){Fe(t,t.return,i)}}function b_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _u),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _u),t;default:throw Error(j(435,e.tag))}}function zn(e,t){var i=b_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var a=M_.bind(null,e,s);s.then(a,a)}})}function xt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var a=i[s],u=e,x=t,B=x;e:for(;B!==null;){switch(B.tag){case 27:if(Pi(B.type)){Ze=B.stateNode,Et=!1;break e}break;case 5:Ze=B.stateNode,Et=!1;break e;case 3:case 4:Ze=B.stateNode.containerInfo,Et=!0;break e}B=B.return}if(Ze===null)throw Error(j(160));mu(u,x,a),Ze=null,Et=!1,u=a.alternate,u!==null&&(u.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yu(t,e),t=t.sibling}var Qt=null;function yu(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xt(t,e),Lt(e),s&4&&(Hi(3,e,e.return),Dr(3,e),Hi(5,e,e.return));break;case 1:xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),s&64&&gi&&(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 a=Qt;if(xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),s&4){var u=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,a=a.ownerDocument||a;t:switch(s){case"title":u=a.getElementsByTagName("title")[0],(!u||u[sr]||u[dt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=a.createElement(s),a.head.insertBefore(u,a.querySelector("head > title"))),mt(u,s,i),u[dt]=e,ut(u),s=u;break e;case"link":var x=bf("link","href",a).get(s+(i.href||""));if(x){for(var B=0;B<x.length;B++)if(u=x[B],u.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&u.getAttribute("rel")===(i.rel==null?null:i.rel)&&u.getAttribute("title")===(i.title==null?null:i.title)&&u.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){x.splice(B,1);break t}}u=a.createElement(s),mt(u,s,i),a.head.appendChild(u);break;case"meta":if(x=bf("meta","content",a).get(s+(i.content||""))){for(B=0;B<x.length;B++)if(u=x[B],u.getAttribute("content")===(i.content==null?null:""+i.content)&&u.getAttribute("name")===(i.name==null?null:i.name)&&u.getAttribute("property")===(i.property==null?null:i.property)&&u.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&u.getAttribute("charset")===(i.charSet==null?null:i.charSet)){x.splice(B,1);break t}}u=a.createElement(s),mt(u,s,i),a.head.appendChild(u);break;default:throw Error(j(468,s))}u[dt]=e,ut(u),s=u}e.stateNode=s}else Cf(a,e.type,e.stateNode);else e.stateNode=yf(a,s,e.memoizedProps);else u!==s?(u===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):u.count--,s===null?Cf(a,e.type,e.stateNode):yf(a,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ul(e,e.memoizedProps,i.memoizedProps)}break;case 27:xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),i!==null&&s&4&&Ul(e,e.memoizedProps,i.memoizedProps);break;case 5:if(xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),e.flags&32){a=e.stateNode;try{Cs(a,"")}catch(ve){Fe(e,e.return,ve)}}s&4&&e.stateNode!=null&&(a=e.memoizedProps,Ul(e,a,i!==null?i.memoizedProps:a)),s&1024&&(Fl=!0);break;case 6:if(xt(t,e),Lt(e),s&4){if(e.stateNode===null)throw Error(j(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){Fe(e,e.return,ve)}}break;case 3:if(Zn=null,a=Qt,Qt=Kn(t.containerInfo),xt(t,e),Qt=a,Lt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(ve){Fe(e,e.return,ve)}Fl&&(Fl=!1,bu(e));break;case 4:s=Qt,Qt=Kn(e.stateNode.containerInfo),xt(t,e),Lt(e),Qt=s;break;case 12:xt(t,e),Lt(e);break;case 31:xt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 13:xt(t,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Un=be()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 22:a=e.memoizedState!==null;var P=i!==null&&i.memoizedState!==null,ee=gi,le=lt;if(gi=ee||a,lt=le||P,xt(t,e),lt=le,gi=ee,Lt(e),s&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(i===null||P||gi||lt||us(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){P=i=t;try{if(u=P.stateNode,a)x=u.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{B=P.stateNode;var ce=P.memoizedProps.style,te=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;B.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(ve){Fe(P,P.return,ve)}}}else if(t.tag===6){if(i===null){P=t;try{P.stateNode.nodeValue=a?"":P.memoizedProps}catch(ve){Fe(P,P.return,ve)}}}else if(t.tag===18){if(i===null){P=t;try{var ne=P.stateNode;a?uf(ne,!0):uf(P.stateNode,!1)}catch(ve){Fe(P,P.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;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,zn(e,i))));break;case 19:xt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 30:break;case 21:break;default:xt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(fu(s)){i=s;break}s=s.return}if(i==null)throw Error(j(160));switch(i.tag){case 27:var a=i.stateNode,u=jl(e);Hn(e,u,a);break;case 5:var x=i.stateNode;i.flags&32&&(Cs(x,""),i.flags&=-33);var B=jl(e);Hn(e,B,x);break;case 3:case 4:var P=i.stateNode.containerInfo,ee=jl(e);Il(e,ee,P);break;default:throw Error(j(161))}}catch(le){Fe(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vu(e,t.alternate,t),t=t.sibling}function us(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hi(4,t,t.return),us(t);break;case 1:ii(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&hu(t,t.return,i),us(t);break;case 27:jr(t.stateNode);case 26:case 5:ii(t,t.return),us(t);break;case 22:t.memoizedState===null&&us(t);break;case 30:us(t);break;default:us(t)}e=e.sibling}}function Si(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,a=e,u=t,x=u.flags;switch(u.tag){case 0:case 11:case 15:Si(a,u,i),Dr(4,u);break;case 1:if(Si(a,u,i),s=u,a=s.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(ee){Fe(s,s.return,ee)}if(s=u,a=s.updateQueue,a!==null){var B=s.stateNode;try{var P=a.shared.hiddenCallbacks;if(P!==null)for(a.shared.hiddenCallbacks=null,a=0;a<P.length;a++)Zc(P[a],B)}catch(ee){Fe(s,s.return,ee)}}i&&x&64&&cu(u),Mr(u,u.return);break;case 27:du(u);case 26:case 5:Si(a,u,i),i&&s===null&&x&4&&uu(u),Mr(u,u.return);break;case 12:Si(a,u,i);break;case 31:Si(a,u,i),i&&x&4&&pu(a,u);break;case 13:Si(a,u,i),i&&x&4&&Su(a,u);break;case 22:u.memoizedState===null&&Si(a,u,i),Mr(u,u.return);break;case 30:break;default:Si(a,u,i)}t=t.sibling}}function Pl(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&&gr(i))}function ql(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gr(e))}function Zt(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cu(e,t,i,s),t=t.sibling}function Cu(e,t,i,s){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Zt(e,t,i,s),a&2048&&Dr(9,t);break;case 1:Zt(e,t,i,s);break;case 3:Zt(e,t,i,s),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gr(e)));break;case 12:if(a&2048){Zt(e,t,i,s),e=t.stateNode;try{var u=t.memoizedProps,x=u.id,B=u.onPostCommit;typeof B=="function"&&B(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(P){Fe(t,t.return,P)}}else Zt(e,t,i,s);break;case 31:Zt(e,t,i,s);break;case 13:Zt(e,t,i,s);break;case 23:break;case 22:u=t.stateNode,x=t.alternate,t.memoizedState!==null?u._visibility&2?Zt(e,t,i,s):Tr(e,t):u._visibility&2?Zt(e,t,i,s):(u._visibility|=2,Ps(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Pl(x,t);break;case 24:Zt(e,t,i,s),a&2048&&ql(t.alternate,t);break;default:Zt(e,t,i,s)}}function Ps(e,t,i,s,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,x=t,B=i,P=s,ee=x.flags;switch(x.tag){case 0:case 11:case 15:Ps(u,x,B,P,a),Dr(8,x);break;case 23:break;case 22:var le=x.stateNode;x.memoizedState!==null?le._visibility&2?Ps(u,x,B,P,a):Tr(u,x):(le._visibility|=2,Ps(u,x,B,P,a)),a&&ee&2048&&Pl(x.alternate,x);break;case 24:Ps(u,x,B,P,a),a&&ee&2048&&ql(x.alternate,x);break;default:Ps(u,x,B,P,a)}t=t.sibling}}function Tr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,a=s.flags;switch(s.tag){case 22:Tr(i,s),a&2048&&Pl(s.alternate,s);break;case 24:Tr(i,s),a&2048&&ql(s.alternate,s);break;default:Tr(i,s)}t=t.sibling}}var Br=8192;function qs(e,t,i){if(e.subtreeFlags&Br)for(e=e.child;e!==null;)wu(e,t,i),e=e.sibling}function wu(e,t,i){switch(e.tag){case 26:qs(e,t,i),e.flags&Br&&e.memoizedState!==null&&lv(i,Qt,e.memoizedState,e.memoizedProps);break;case 5:qs(e,t,i);break;case 3:case 4:var s=Qt;Qt=Kn(e.stateNode.containerInfo),qs(e,t,i),Qt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Br,Br=16777216,qs(e,t,i),Br=s):qs(e,t,i));break;default:qs(e,t,i)}}function Eu(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 Or(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];ft=s,Lu(s,e)}Eu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)xu(e),e=e.sibling}function xu(e){switch(e.tag){case 0:case 11:case 15:Or(e),e.flags&2048&&Hi(9,e,e.return);break;case 3:Or(e);break;case 12:Or(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nn(e)):Or(e);break;default:Or(e)}}function Nn(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];ft=s,Lu(s,e)}Eu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hi(8,t,t.return),Nn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Nn(t));break;default:Nn(t)}e=e.sibling}}function Lu(e,t){for(;ft!==null;){var i=ft;switch(i.tag){case 0:case 11:case 15:Hi(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:gr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ft=s;else e:for(i=e;ft!==null;){s=ft;var a=s.sibling,u=s.return;if(gu(s),s===i){ft=null;break e}if(a!==null){a.return=u,ft=a;break e}ft=u}}}var C_={getCacheForType:function(e){var t=vt(rt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return vt(rt).controller.signal}},w_=typeof WeakMap=="function"?WeakMap:Map,je=0,Xe=null,Me=null,Oe=0,Ie=0,Ht=null,zi=!1,Gs=!1,Gl=!1,yi=0,tt=0,Ni=0,fs=0,Wl=0,zt=0,Ws=0,kr=null,At=null,$l=!1,Un=0,Au=0,jn=1/0,In=null,Ui=null,ct=0,ji=null,$s=null,bi=0,Xl=0,Yl=null,Ru=null,Hr=0,Vl=null;function Nt(){return(je&2)!==0&&Oe!==0?Oe&-Oe:z.T!==null?to():Go()}function Du(){if(zt===0)if((Oe&536870912)===0||He){var e=Yi;Yi<<=1,(Yi&3932160)===0&&(Yi=262144),zt=e}else zt=536870912;return e=Ot.current,e!==null&&(e.flags|=32),zt}function Rt(e,t,i){(e===Xe&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(Xs(e,0),Ii(e,Oe,zt,!1)),ir(e,i),((je&2)===0||e!==Xe)&&(e===Xe&&((je&2)===0&&(fs|=i),tt===4&&Ii(e,Oe,zt,!1)),si(e))}function Mu(e,t,i){if((je&6)!==0)throw Error(j(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||tr(e,t),a=s?L_(e,t):Ql(e,t,!0),u=s;do{if(a===0){Gs&&!s&&Ii(e,t,0,!1);break}else{if(i=e.current.alternate,u&&!E_(i)){a=Ql(e,t,!1),u=!1;continue}if(a===2){if(u=t,e.errorRecoveryDisabledLanes&u)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var B=e;a=kr;var P=B.current.memoizedState.isDehydrated;if(P&&(Xs(B,x).flags|=256),x=Ql(B,x,!1),x!==2){if(Gl&&!P){B.errorRecoveryDisabledLanes|=u,fs|=u,a=4;break e}u=At,At=a,u!==null&&(At===null?At=u:At.push.apply(At,u))}a=x}if(u=!1,a!==2)continue}}if(a===1){Xs(e,0),Ii(e,t,0,!0);break}e:{switch(s=e,u=a,u){case 0:case 1:throw Error(j(345));case 4:if((t&4194048)!==t)break;case 6:Ii(s,t,zt,!zi);break e;case 2:At=null;break;case 3:case 5:break;default:throw Error(j(329))}if((t&62914560)===t&&(a=Un+300-be(),10<a)){if(Ii(s,t,zt,!zi),Vr(s,0,!0)!==0)break e;bi=t,s.timeoutHandle=of(Tu.bind(null,s,i,At,In,$l,t,zt,fs,Ws,zi,u,"Throttled",-0,0),a);break e}Tu(s,i,At,In,$l,t,zt,fs,Ws,zi,u,null,-0,0)}}break}while(!0);si(e)}function Tu(e,t,i,s,a,u,x,B,P,ee,le,ce,te,ne){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ai},wu(t,u,ce);var ve=(u&62914560)===u?Un-be():(u&4194048)===u?Au-be():0;if(ve=ov(ce,ve),ve!==null){bi=u,e.cancelPendingCommit=ve(ju.bind(null,e,t,u,i,s,a,x,B,P,le,ce,null,te,ne)),Ii(e,u,x,!ee);return}}ju(e,t,u,i,s,a,x,B,P)}function E_(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 a=i[s],u=a.getSnapshot;a=a.value;try{if(!Tt(u(),a))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ii(e,t,i,s){t&=~Wl,t&=~fs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var a=t;0<a;){var u=31-pt(a),x=1<<u;s[u]=-1,a&=~x}i!==0&&Fo(e,i,t)}function Fn(){return(je&6)===0?(zr(0),!1):!0}function Kl(){if(Me!==null){if(Ie===0)var e=Me.return;else e=Me,hi=ss=null,fl(e),Ns=null,pr=0,e=Me;for(;e!==null;)ou(e.alternate,e),e=e.return;Me=null}}function Xs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,G_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),bi=0,Kl(),Xe=e,Me=i=oi(e.current,null),Oe=t,Ie=0,Ht=null,zi=!1,Gs=tr(e,t),Gl=!1,Ws=zt=Wl=fs=Ni=tt=0,At=kr=null,$l=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var a=31-pt(s),u=1<<a;t|=e[a],s&=~u}return yi=t,on(),i}function Bu(e,t){xe=null,z.H=Lr,t===zs||t===gn?(t=Yc(),Ie=3):t===el?(t=Yc(),Ie=4):Ie=t===Rl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ht=t,Me===null&&(tt=1,Mn(e,Pt(t,e.current)))}function Ou(){var e=Ot.current;return e===null?!0:(Oe&4194048)===Oe?$t===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===$t:!1}function ku(){var e=z.H;return z.H=Lr,e===null?Lr:e}function Hu(){var e=z.A;return z.A=C_,e}function Pn(){tt=4,zi||(Oe&4194048)!==Oe&&Ot.current!==null||(Gs=!0),(Ni&134217727)===0&&(fs&134217727)===0||Xe===null||Ii(Xe,Oe,zt,!1)}function Ql(e,t,i){var s=je;je|=2;var a=ku(),u=Hu();(Xe!==e||Oe!==t)&&(In=null,Xs(e,t)),t=!1;var x=tt;e:do try{if(Ie!==0&&Me!==null){var B=Me,P=Ht;switch(Ie){case 8:Kl(),x=6;break e;case 3:case 2:case 9:case 6:Ot.current===null&&(t=!0);var ee=Ie;if(Ie=0,Ht=null,Ys(e,B,P,ee),i&&Gs){x=0;break e}break;default:ee=Ie,Ie=0,Ht=null,Ys(e,B,P,ee)}}x_(),x=tt;break}catch(le){Bu(e,le)}while(!0);return t&&e.shellSuspendCounter++,hi=ss=null,je=s,z.H=a,z.A=u,Me===null&&(Xe=null,Oe=0,on()),x}function x_(){for(;Me!==null;)zu(Me)}function L_(e,t){var i=je;je|=2;var s=ku(),a=Hu();Xe!==e||Oe!==t?(In=null,jn=be()+500,Xs(e,t)):Gs=tr(e,t);e:do try{if(Ie!==0&&Me!==null){t=Me;var u=Ht;t:switch(Ie){case 1:Ie=0,Ht=null,Ys(e,t,u,1);break;case 2:case 9:if($c(u)){Ie=0,Ht=null,Nu(t);break}t=function(){Ie!==2&&Ie!==9||Xe!==e||(Ie=7),si(e)},u.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:$c(u)?(Ie=0,Ht=null,Nu(t)):(Ie=0,Ht=null,Ys(e,t,u,7));break;case 5:var x=null;switch(Me.tag){case 26:x=Me.memoizedState;case 5:case 27:var B=Me;if(x?wf(x):B.stateNode.complete){Ie=0,Ht=null;var P=B.sibling;if(P!==null)Me=P;else{var ee=B.return;ee!==null?(Me=ee,qn(ee)):Me=null}break t}}Ie=0,Ht=null,Ys(e,t,u,5);break;case 6:Ie=0,Ht=null,Ys(e,t,u,6);break;case 8:Kl(),tt=6;break e;default:throw Error(j(462))}}A_();break}catch(le){Bu(e,le)}while(!0);return hi=ss=null,z.H=s,z.A=a,je=i,Me!==null?0:(Xe=null,Oe=0,on(),tt)}function A_(){for(;Me!==null&&!De();)zu(Me)}function zu(e){var t=au(e.alternate,e,yi);e.memoizedProps=e.pendingProps,t===null?qn(e):Me=t}function Nu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=eu(i,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=eu(i,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:fl(t);default:ou(i,t),t=Me=Hc(t,yi),t=au(i,t,yi)}e.memoizedProps=e.pendingProps,t===null?qn(e):Me=t}function Ys(e,t,i,s){hi=ss=null,fl(t),Ns=null,pr=0;var a=t.return;try{if(v_(e,a,t,i,Oe)){tt=1,Mn(e,Pt(i,e.current)),Me=null;return}}catch(u){if(a!==null)throw Me=a,u;tt=1,Mn(e,Pt(i,e.current)),Me=null;return}t.flags&32768?(He||s===1?e=!0:Gs||(Oe&536870912)!==0?e=!1:(zi=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ot.current,s!==null&&s.tag===13&&(s.flags|=16384))),Uu(t,e)):qn(t)}function qn(e){var t=e;do{if((t.flags&32768)!==0){Uu(t,zi);return}e=t.return;var i=p_(t.alternate,t,yi);if(i!==null){Me=i;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);tt===0&&(tt=5)}function Uu(e,t){do{var i=S_(e.alternate,e);if(i!==null){i.flags&=32767,Me=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Me=e;return}Me=e=i}while(e!==null);tt=6,Me=null}function ju(e,t,i,s,a,u,x,B,P){e.cancelPendingCommit=null;do Gn();while(ct!==0);if((je&6)!==0)throw Error(j(327));if(t!==null){if(t===e.current)throw Error(j(177));if(u=t.lanes|t.childLanes,u|=ja,ad(e,i,u,x,B,P),e===Xe&&(Me=Xe=null,Oe=0),$s=t,ji=e,bi=i,Xl=u,Yl=a,Ru=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,T_(ot,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=z.T,z.T=null,a=I.p,I.p=2,x=je,je|=4;try{y_(e,t,i)}finally{je=x,I.p=a,z.T=s}}ct=1,Iu(),Fu(),Pu()}}function Iu(){if(ct===1){ct=0;var e=ji,t=$s,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=z.T,z.T=null;var s=I.p;I.p=2;var a=je;je|=4;try{yu(t,e);var u=co,x=Lc(e.containerInfo),B=u.focusedElem,P=u.selectionRange;if(x!==B&&B&&B.ownerDocument&&xc(B.ownerDocument.documentElement,B)){if(P!==null&&ka(B)){var ee=P.start,le=P.end;if(le===void 0&&(le=ee),"selectionStart"in B)B.selectionStart=ee,B.selectionEnd=Math.min(le,B.value.length);else{var ce=B.ownerDocument||document,te=ce&&ce.defaultView||window;if(te.getSelection){var ne=te.getSelection(),ve=B.textContent.length,ye=Math.min(P.start,ve),$e=P.end===void 0?ye:Math.min(P.end,ve);!ne.extend&&ye>$e&&(x=$e,$e=ye,ye=x);var K=Ec(B,ye),W=Ec(B,$e);if(K&&W&&(ne.rangeCount!==1||ne.anchorNode!==K.node||ne.anchorOffset!==K.offset||ne.focusNode!==W.node||ne.focusOffset!==W.offset)){var J=ce.createRange();J.setStart(K.node,K.offset),ne.removeAllRanges(),ye>$e?(ne.addRange(J),ne.extend(W.node,W.offset)):(J.setEnd(W.node,W.offset),ne.addRange(J))}}}}for(ce=[],ne=B;ne=ne.parentNode;)ne.nodeType===1&&ce.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<ce.length;B++){var oe=ce[B];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ia=!!oo,co=oo=null}finally{je=a,I.p=s,z.T=i}}e.current=t,ct=2}}function Fu(){if(ct===2){ct=0;var e=ji,t=$s,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=z.T,z.T=null;var s=I.p;I.p=2;var a=je;je|=4;try{vu(e,t.alternate,t)}finally{je=a,I.p=s,z.T=i}}ct=3}}function Pu(){if(ct===4||ct===3){ct=0,_e();var e=ji,t=$s,i=bi,s=Ru;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,$s=ji=null,qu(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Ui=null),va(i),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Vt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=z.T,a=I.p,I.p=2,z.T=null;try{for(var u=e.onRecoverableError,x=0;x<s.length;x++){var B=s[x];u(B.value,{componentStack:B.stack})}}finally{z.T=t,I.p=a}}(bi&3)!==0&&Gn(),si(e),a=e.pendingLanes,(i&261930)!==0&&(a&42)!==0?e===Vl?Hr++:(Hr=0,Vl=e):Hr=0,zr(0)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,gr(t)))}function Gn(){return Iu(),Fu(),Pu(),Gu()}function Gu(){if(ct!==5)return!1;var e=ji,t=Xl;Xl=0;var i=va(bi),s=z.T,a=I.p;try{I.p=32>i?32:i,z.T=null,i=Yl,Yl=null;var u=ji,x=bi;if(ct=0,$s=ji=null,bi=0,(je&6)!==0)throw Error(j(331));var B=je;if(je|=4,xu(u.current),Cu(u,u.current,x,i),je=B,zr(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Vt,u)}catch{}return!0}finally{I.p=a,z.T=s,qu(e,t)}}function Wu(e,t,i){t=Pt(i,t),t=Al(e.stateNode,t,2),e=Bi(e,t,2),e!==null&&(ir(e,2),si(e))}function Fe(e,t,i){if(e.tag===3)Wu(e,e,i);else for(;t!==null;){if(t.tag===3){Wu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ui===null||!Ui.has(s))){e=Pt(i,e),i=$h(2),s=Bi(t,i,2),s!==null&&(Xh(i,s,t,e),ir(s,2),si(s));break}}t=t.return}}function Zl(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new w_;var a=new Set;s.set(t,a)}else a=s.get(t),a===void 0&&(a=new Set,s.set(t,a));a.has(i)||(Gl=!0,a.add(i),e=R_.bind(null,e,t,i),t.then(e,e))}function R_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Xe===e&&(Oe&i)===i&&(tt===4||tt===3&&(Oe&62914560)===Oe&&300>be()-Un?(je&2)===0&&Xs(e,0):Wl|=i,Ws===Oe&&(Ws=0)),si(e)}function $u(e,t){t===0&&(t=Io()),e=es(e,t),e!==null&&(ir(e,t),si(e))}function D_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),$u(e,i)}function M_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,a=e.memoizedState;a!==null&&(i=a.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(j(314))}s!==null&&s.delete(t),$u(e,i)}function T_(e,t){return Be(e,t)}var Wn=null,Vs=null,Jl=!1,$n=!1,eo=!1,Fi=0;function si(e){e!==Vs&&e.next===null&&(Vs===null?Wn=Vs=e:Vs=Vs.next=e),$n=!0,Jl||(Jl=!0,O_())}function zr(e,t){if(!eo&&$n){eo=!0;do for(var i=!1,s=Wn;s!==null;){if(e!==0){var a=s.pendingLanes;if(a===0)var u=0;else{var x=s.suspendedLanes,B=s.pingedLanes;u=(1<<31-pt(42|e)+1)-1,u&=a&~(x&~B),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(i=!0,Ku(s,u))}else u=Oe,u=Vr(s,s===Xe?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||tr(s,u)||(i=!0,Ku(s,u));s=s.next}while(i);eo=!1}}function B_(){Xu()}function Xu(){$n=Jl=!1;var e=0;Fi!==0&&q_()&&(e=Fi);for(var t=be(),i=null,s=Wn;s!==null;){var a=s.next,u=Yu(s,t);u===0?(s.next=null,i===null?Wn=a:i.next=a,a===null&&(Vs=i)):(i=s,(e!==0||(u&3)!==0)&&($n=!0)),s=a}ct!==0&&ct!==5||zr(e),Fi!==0&&(Fi=0)}function Yu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var x=31-pt(u),B=1<<x,P=a[x];P===-1?((B&i)===0||(B&s)!==0)&&(a[x]=nd(B,t)):P<=t&&(e.expiredLanes|=B),u&=~B}if(t=Xe,i=Oe,i=Vr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ae(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||tr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Ae(s),va(i)){case 2:case 8:i=Ut;break;case 32:i=ot;break;case 268435456:i=Je;break;default:i=ot}return s=Vu.bind(null,e),i=Be(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Ae(s),e.callbackPriority=2,e.callbackNode=null,2}function Vu(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gn()&&e.callbackNode!==i)return null;var s=Oe;return s=Vr(e,e===Xe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Mu(e,s,t),Yu(e,be()),e.callbackNode!=null&&e.callbackNode===i?Vu.bind(null,e):null)}function Ku(e,t){if(Gn())return null;Mu(e,t,!0)}function O_(){W_(function(){(je&6)!==0?Be(Pe,B_):Xu()})}function to(){if(Fi===0){var e=ks;e===0&&(e=wi,wi<<=1,(wi&261888)===0&&(wi=256)),Fi=e}return Fi}function Qu(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Jr(""+e)}function Zu(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 k_(e,t,i,s,a){if(t==="submit"&&i&&i.stateNode===a){var u=Qu((a[Ct]||null).action),x=s.submitter;x&&(t=(t=x[Ct]||null)?Qu(t.formAction):x.getAttribute("formAction"),t!==null&&(u=t,x=null));var B=new rn("action","action",null,s,a);e.push({event:B,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Fi!==0){var P=x?Zu(a,x):new FormData(a);bl(i,{pending:!0,data:P,method:a.method,action:u},null,P)}}else typeof u=="function"&&(B.preventDefault(),P=x?Zu(a,x):new FormData(a),bl(i,{pending:!0,data:P,method:a.method,action:u},u,P))},currentTarget:a}]})}}for(var io=0;io<Ua.length;io++){var so=Ua[io],H_=so.toLowerCase(),z_=so[0].toUpperCase()+so.slice(1);Kt(H_,"on"+z_)}Kt(Dc,"onAnimationEnd"),Kt(Mc,"onAnimationIteration"),Kt(Tc,"onAnimationStart"),Kt("dblclick","onDoubleClick"),Kt("focusin","onFocus"),Kt("focusout","onBlur"),Kt(Zd,"onTransitionRun"),Kt(Jd,"onTransitionStart"),Kt(e_,"onTransitionCancel"),Kt(Bc,"onTransitionEnd"),ys("onMouseEnter",["mouseout","mouseover"]),ys("onMouseLeave",["mouseout","mouseover"]),ys("onPointerEnter",["pointerout","pointerover"]),ys("onPointerLeave",["pointerout","pointerover"]),Ki("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ki("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ki("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ki("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nr="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(" "),N_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Nr));function Ju(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],a=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var x=s.length-1;0<=x;x--){var B=s[x],P=B.instance,ee=B.currentTarget;if(B=B.listener,P!==u&&a.isPropagationStopped())break e;u=B,a.currentTarget=ee;try{u(a)}catch(le){ln(le)}a.currentTarget=null,u=P}else for(x=0;x<s.length;x++){if(B=s[x],P=B.instance,ee=B.currentTarget,B=B.listener,P!==u&&a.isPropagationStopped())break e;u=B,a.currentTarget=ee;try{u(a)}catch(le){ln(le)}a.currentTarget=null,u=P}}}}function Te(e,t){var i=t[ga];i===void 0&&(i=t[ga]=new Set);var s=e+"__bubble";i.has(s)||(ef(t,e,2,!1),i.add(s))}function ro(e,t,i){var s=0;t&&(s|=4),ef(i,e,s,t)}var Xn="_reactListening"+Math.random().toString(36).slice(2);function no(e){if(!e[Xn]){e[Xn]=!0,Xo.forEach(function(i){i!=="selectionchange"&&(N_.has(i)||ro(i,!1,e),ro(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xn]||(t[Xn]=!0,ro("selectionchange",!1,t))}}function ef(e,t,i,s){switch(Mf(t)){case 2:var a=uv;break;case 8:a=fv;break;default:a=bo}i=a.bind(null,t,i,e),a=void 0,!xa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),s?a!==void 0?e.addEventListener(t,i,{capture:!0,passive:a}):e.addEventListener(t,i,!0):a!==void 0?e.addEventListener(t,i,{passive:a}):e.addEventListener(t,i,!1)}function ao(e,t,i,s,a){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var x=s.tag;if(x===3||x===4){var B=s.stateNode.containerInfo;if(B===a)break;if(x===4)for(x=s.return;x!==null;){var P=x.tag;if((P===3||P===4)&&x.stateNode.containerInfo===a)return;x=x.return}for(;B!==null;){if(x=ms(B),x===null)return;if(P=x.tag,P===5||P===6||P===26||P===27){s=u=x;continue e}B=B.parentNode}}s=s.return}nc(function(){var ee=u,le=wa(i),ce=[];e:{var te=Oc.get(e);if(te!==void 0){var ne=rn,ve=e;switch(e){case"keypress":if(tn(i)===0)break e;case"keydown":case"keyup":ne=Md;break;case"focusin":ve="focus",ne=Da;break;case"focusout":ve="blur",ne=Da;break;case"beforeblur":case"afterblur":ne=Da;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":ne=oc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=pd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=Od;break;case Dc:case Mc:case Tc:ne=bd;break;case Bc:ne=Hd;break;case"scroll":case"scrollend":ne=gd;break;case"wheel":ne=Nd;break;case"copy":case"cut":case"paste":ne=wd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=hc;break;case"toggle":case"beforetoggle":ne=jd}var ye=(t&4)!==0,$e=!ye&&(e==="scroll"||e==="scrollend"),K=ye?te!==null?te+"Capture":null:te;ye=[];for(var W=ee,J;W!==null;){var oe=W;if(J=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||J===null||K===null||(oe=nr(W,K),oe!=null&&ye.push(Ur(W,oe,J))),$e)break;W=W.return}0<ye.length&&(te=new ne(te,ve,null,i,le),ce.push({event:te,listeners:ye}))}}if((t&7)===0){e:{if(te=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",te&&i!==Ca&&(ve=i.relatedTarget||i.fromElement)&&(ms(ve)||ve[gs]))break e;if((ne||te)&&(te=le.window===le?le:(te=le.ownerDocument)?te.defaultView||te.parentWindow:window,ne?(ve=i.relatedTarget||i.toElement,ne=ee,ve=ve?ms(ve):null,ve!==null&&($e=ae(ve),ye=ve.tag,ve!==$e||ye!==5&&ye!==27&&ye!==6)&&(ve=null)):(ne=null,ve=ee),ne!==ve)){if(ye=oc,oe="onMouseLeave",K="onMouseEnter",W="mouse",(e==="pointerout"||e==="pointerover")&&(ye=hc,oe="onPointerLeave",K="onPointerEnter",W="pointer"),$e=ne==null?te:rr(ne),J=ve==null?te:rr(ve),te=new ye(oe,W+"leave",ne,i,le),te.target=$e,te.relatedTarget=J,oe=null,ms(le)===ee&&(ye=new ye(K,W+"enter",ve,i,le),ye.target=J,ye.relatedTarget=$e,oe=ye),$e=oe,ne&&ve)t:{for(ye=U_,K=ne,W=ve,J=0,oe=K;oe;oe=ye(oe))J++;oe=0;for(var pe=W;pe;pe=ye(pe))oe++;for(;0<J-oe;)K=ye(K),J--;for(;0<oe-J;)W=ye(W),oe--;for(;J--;){if(K===W||W!==null&&K===W.alternate){ye=K;break t}K=ye(K),W=ye(W)}ye=null}else ye=null;ne!==null&&tf(ce,te,ne,ye,!1),ve!==null&&$e!==null&&tf(ce,$e,ve,ye,!0)}}e:{if(te=ee?rr(ee):window,ne=te.nodeName&&te.nodeName.toLowerCase(),ne==="select"||ne==="input"&&te.type==="file")var Ne=pc;else if(gc(te))if(Sc)Ne=Vd;else{Ne=Xd;var ge=$d}else ne=te.nodeName,!ne||ne.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&ba(ee.elementType)&&(Ne=pc):Ne=Yd;if(Ne&&(Ne=Ne(e,ee))){mc(ce,Ne,i,le);break e}ge&&ge(e,te,ee),e==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&ya(te,"number",te.value)}switch(ge=ee?rr(ee):window,e){case"focusin":(gc(ge)||ge.contentEditable==="true")&&(Ls=ge,Ha=ee,dr=null);break;case"focusout":dr=Ha=Ls=null;break;case"mousedown":za=!0;break;case"contextmenu":case"mouseup":case"dragend":za=!1,Ac(ce,i,le);break;case"selectionchange":if(Qd)break;case"keydown":case"keyup":Ac(ce,i,le)}var Le;if(Ta)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else xs?_c(e,i)&&(ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ke="onCompositionStart");ke&&(uc&&i.locale!=="ko"&&(xs||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&xs&&(Le=ac()):(xi=le,La="value"in xi?xi.value:xi.textContent,xs=!0)),ge=Yn(ee,ke),0<ge.length&&(ke=new cc(ke,e,null,i,le),ce.push({event:ke,listeners:ge}),Le?ke.data=Le:(Le=vc(i),Le!==null&&(ke.data=Le)))),(Le=Fd?Pd(e,i):qd(e,i))&&(ke=Yn(ee,"onBeforeInput"),0<ke.length&&(ge=new cc("onBeforeInput","beforeinput",null,i,le),ce.push({event:ge,listeners:ke}),ge.data=Le)),k_(ce,e,ee,i,le)}Ju(ce,t)})}function Ur(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Yn(e,t){for(var i=t+"Capture",s=[];e!==null;){var a=e,u=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||u===null||(a=nr(e,i),a!=null&&s.unshift(Ur(e,a,u)),a=nr(e,t),a!=null&&s.push(Ur(e,a,u))),e.tag===3)return s;e=e.return}return[]}function U_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tf(e,t,i,s,a){for(var u=t._reactName,x=[];i!==null&&i!==s;){var B=i,P=B.alternate,ee=B.stateNode;if(B=B.tag,P!==null&&P===s)break;B!==5&&B!==26&&B!==27||ee===null||(P=ee,a?(ee=nr(i,u),ee!=null&&x.unshift(Ur(i,ee,P))):a||(ee=nr(i,u),ee!=null&&x.push(Ur(i,ee,P)))),i=i.return}x.length!==0&&e.push({event:t,listeners:x})}var j_=/\r\n?/g,I_=/\u0000|\uFFFD/g;function sf(e){return(typeof e=="string"?e:""+e).replace(j_,`
|
|
49
|
+
`).replace(I_,"")}function rf(e,t){return t=sf(t),sf(e)===t}function We(e,t,i,s,a,u){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Cs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Cs(e,""+s);break;case"className":Qr(e,"class",s);break;case"tabIndex":Qr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Qr(e,i,s);break;case"style":sc(e,s,u);break;case"data":if(t!=="object"){Qr(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=Jr(""+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 u=="function"&&(i==="formAction"?(t!=="input"&&We(e,t,"name",a.name,a,null),We(e,t,"formEncType",a.formEncType,a,null),We(e,t,"formMethod",a.formMethod,a,null),We(e,t,"formTarget",a.formTarget,a,null)):(We(e,t,"encType",a.encType,a,null),We(e,t,"method",a.method,a,null),We(e,t,"target",a.target,a,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Jr(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ai);break;case"onScroll":s!=null&&Te("scroll",e);break;case"onScrollEnd":s!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(a.children!=null)throw Error(j(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=Jr(""+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":Te("beforetoggle",e),Te("toggle",e),Kr(e,"popover",s);break;case"xlinkActuate":ni(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ni(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ni(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ni(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ni(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ni(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ni(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ni(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ni(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Kr(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=_d.get(i)||i,Kr(e,i,s))}}function lo(e,t,i,s,a,u){switch(i){case"style":sc(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(a.children!=null)throw Error(j(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Cs(e,s):(typeof s=="number"||typeof s=="bigint")&&Cs(e,""+s);break;case"onScroll":s!=null&&Te("scroll",e);break;case"onScrollEnd":s!=null&&Te("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ai);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(a=i.endsWith("Capture"),t=i.slice(2,a?i.length-7:void 0),u=e[Ct]||null,u=u!=null?u[i]:null,typeof u=="function"&&e.removeEventListener(t,u,a),typeof s=="function")){typeof u!="function"&&u!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,a);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Kr(e,i,s)}}}function mt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var s=!1,a=!1,u;for(u in i)if(i.hasOwnProperty(u)){var x=i[u];if(x!=null)switch(u){case"src":s=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:We(e,t,u,x,i,null)}}a&&We(e,t,"srcSet",i.srcSet,i,null),s&&We(e,t,"src",i.src,i,null);return;case"input":Te("invalid",e);var B=u=x=a=null,P=null,ee=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":a=le;break;case"type":x=le;break;case"checked":P=le;break;case"defaultChecked":ee=le;break;case"value":u=le;break;case"defaultValue":B=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(j(137,t));break;default:We(e,t,s,le,i,null)}}Jo(e,u,B,P,ee,x,a,!1);return;case"select":Te("invalid",e),s=x=u=null;for(a in i)if(i.hasOwnProperty(a)&&(B=i[a],B!=null))switch(a){case"value":u=B;break;case"defaultValue":x=B;break;case"multiple":s=B;default:We(e,t,a,B,i,null)}t=u,i=x,e.multiple=!!s,t!=null?bs(e,!!s,t,!1):i!=null&&bs(e,!!s,i,!0);return;case"textarea":Te("invalid",e),u=a=s=null;for(x in i)if(i.hasOwnProperty(x)&&(B=i[x],B!=null))switch(x){case"value":s=B;break;case"defaultValue":a=B;break;case"children":u=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(j(91));break;default:We(e,t,x,B,i,null)}tc(e,s,a,u);return;case"option":for(P in i)if(i.hasOwnProperty(P)&&(s=i[P],s!=null))switch(P){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:We(e,t,P,s,i,null)}return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(s=0;s<Nr.length;s++)Te(Nr[s],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("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(ee in i)if(i.hasOwnProperty(ee)&&(s=i[ee],s!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:We(e,t,ee,s,i,null)}return;default:if(ba(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&lo(e,t,le,s,i,void 0));return}}for(B in i)i.hasOwnProperty(B)&&(s=i[B],s!=null&&We(e,t,B,s,i,null))}function F_(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 a=null,u=null,x=null,B=null,P=null,ee=null,le=null;for(ne in i){var ce=i[ne];if(i.hasOwnProperty(ne)&&ce!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":P=ce;default:s.hasOwnProperty(ne)||We(e,t,ne,null,s,ce)}}for(var te in s){var ne=s[te];if(ce=i[te],s.hasOwnProperty(te)&&(ne!=null||ce!=null))switch(te){case"type":u=ne;break;case"name":a=ne;break;case"checked":ee=ne;break;case"defaultChecked":le=ne;break;case"value":x=ne;break;case"defaultValue":B=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(j(137,t));break;default:ne!==ce&&We(e,t,te,ne,s,ce)}}Sa(e,x,B,P,ee,le,u,a);return;case"select":ne=x=B=te=null;for(u in i)if(P=i[u],i.hasOwnProperty(u)&&P!=null)switch(u){case"value":break;case"multiple":ne=P;default:s.hasOwnProperty(u)||We(e,t,u,null,s,P)}for(a in s)if(u=s[a],P=i[a],s.hasOwnProperty(a)&&(u!=null||P!=null))switch(a){case"value":te=u;break;case"defaultValue":B=u;break;case"multiple":x=u;default:u!==P&&We(e,t,a,u,s,P)}t=B,i=x,s=ne,te!=null?bs(e,!!i,te,!1):!!s!=!!i&&(t!=null?bs(e,!!i,t,!0):bs(e,!!i,i?[]:"",!1));return;case"textarea":ne=te=null;for(B in i)if(a=i[B],i.hasOwnProperty(B)&&a!=null&&!s.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:We(e,t,B,null,s,a)}for(x in s)if(a=s[x],u=i[x],s.hasOwnProperty(x)&&(a!=null||u!=null))switch(x){case"value":te=a;break;case"defaultValue":ne=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(j(91));break;default:a!==u&&We(e,t,x,a,s,u)}ec(e,te,ne);return;case"option":for(var ve in i)if(te=i[ve],i.hasOwnProperty(ve)&&te!=null&&!s.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:We(e,t,ve,null,s,te)}for(P in s)if(te=s[P],ne=i[P],s.hasOwnProperty(P)&&te!==ne&&(te!=null||ne!=null))switch(P){case"selected":e.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:We(e,t,P,te,s,ne)}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 ye in i)te=i[ye],i.hasOwnProperty(ye)&&te!=null&&!s.hasOwnProperty(ye)&&We(e,t,ye,null,s,te);for(ee in s)if(te=s[ee],ne=i[ee],s.hasOwnProperty(ee)&&te!==ne&&(te!=null||ne!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(j(137,t));break;default:We(e,t,ee,te,s,ne)}return;default:if(ba(t)){for(var $e in i)te=i[$e],i.hasOwnProperty($e)&&te!==void 0&&!s.hasOwnProperty($e)&&lo(e,t,$e,void 0,s,te);for(le in s)te=s[le],ne=i[le],!s.hasOwnProperty(le)||te===ne||te===void 0&&ne===void 0||lo(e,t,le,te,s,ne);return}}for(var K in i)te=i[K],i.hasOwnProperty(K)&&te!=null&&!s.hasOwnProperty(K)&&We(e,t,K,null,s,te);for(ce in s)te=s[ce],ne=i[ce],!s.hasOwnProperty(ce)||te===ne||te==null&&ne==null||We(e,t,ce,te,s,ne)}function nf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function P_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var a=i[s],u=a.transferSize,x=a.initiatorType,B=a.duration;if(u&&B&&nf(x)){for(x=0,B=a.responseEnd,s+=1;s<i.length;s++){var P=i[s],ee=P.startTime;if(ee>B)break;var le=P.transferSize,ce=P.initiatorType;le&&nf(ce)&&(P=P.responseEnd,x+=le*(P<B?1:(B-ee)/(P-ee)))}if(--s,t+=8*(u+x)/(a.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 oo=null,co=null;function Vn(e){return e.nodeType===9?e:e.ownerDocument}function af(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 lf(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 ho(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 uo=null;function q_(){var e=window.event;return e&&e.type==="popstate"?e===uo?!1:(uo=e,!0):(uo=null,!1)}var of=typeof setTimeout=="function"?setTimeout:void 0,G_=typeof clearTimeout=="function"?clearTimeout:void 0,cf=typeof Promise=="function"?Promise:void 0,W_=typeof queueMicrotask=="function"?queueMicrotask:typeof cf<"u"?function(e){return cf.resolve(null).then(e).catch($_)}:of;function $_(e){setTimeout(function(){throw e})}function Pi(e){return e==="head"}function hf(e,t){var i=t,s=0;do{var a=i.nextSibling;if(e.removeChild(i),a&&a.nodeType===8)if(i=a.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(a),Js(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")jr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,jr(i);for(var u=i.firstChild;u;){var x=u.nextSibling,B=u.nodeName;u[sr]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&u.rel.toLowerCase()==="stylesheet"||i.removeChild(u),u=x}}else i==="body"&&jr(e.ownerDocument.body);i=a}while(i);Js(t)}function uf(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 fo(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":fo(i),ma(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function X_(e,t,i,s){for(;e.nodeType===1;){var a=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[sr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Xt(e.nextSibling),e===null)break}return null}function Y_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Xt(e.nextSibling),e===null))return null;return e}function ff(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xt(e.nextSibling),e===null))return null;return e}function _o(e){return e.data==="$?"||e.data==="$~"}function vo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function V_(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 Xt(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 go=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Xt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function _f(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 vf(e,t,i){switch(t=Vn(i),e){case"html":if(e=t.documentElement,!e)throw Error(j(452));return e;case"head":if(e=t.head,!e)throw Error(j(453));return e;case"body":if(e=t.body,!e)throw Error(j(454));return e;default:throw Error(j(451))}}function jr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ma(e)}var Yt=new Map,gf=new Set;function Kn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ci=I.d;I.d={f:K_,r:Q_,D:Z_,C:J_,L:ev,m:tv,X:sv,S:iv,M:rv};function K_(){var e=Ci.f(),t=Fn();return e||t}function Q_(e){var t=ps(e);t!==null&&t.tag===5&&t.type==="form"?Bh(t):Ci.r(e)}var Ks=typeof document>"u"?null:document;function mf(e,t,i){var s=Ks;if(s&&typeof t=="string"&&t){var a=It(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof i=="string"&&(a+='[crossorigin="'+i+'"]'),gf.has(a)||(gf.add(a),e={rel:e,crossOrigin:i,href:t},s.querySelector(a)===null&&(t=s.createElement("link"),mt(t,"link",e),ut(t),s.head.appendChild(t)))}}function Z_(e){Ci.D(e),mf("dns-prefetch",e,null)}function J_(e,t){Ci.C(e,t),mf("preconnect",e,t)}function ev(e,t,i){Ci.L(e,t,i);var s=Ks;if(s&&e&&t){var a='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&i&&i.imageSrcSet?(a+='[imagesrcset="'+It(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(a+='[imagesizes="'+It(i.imageSizes)+'"]')):a+='[href="'+It(e)+'"]';var u=a;switch(t){case"style":u=Qs(e);break;case"script":u=Zs(e)}Yt.has(u)||(e=l({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Yt.set(u,e),s.querySelector(a)!==null||t==="style"&&s.querySelector(Ir(u))||t==="script"&&s.querySelector(Fr(u))||(t=s.createElement("link"),mt(t,"link",e),ut(t),s.head.appendChild(t)))}}function tv(e,t){Ci.m(e,t);var i=Ks;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+It(s)+'"][href="'+It(e)+'"]',u=a;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Zs(e)}if(!Yt.has(u)&&(e=l({rel:"modulepreload",href:e},t),Yt.set(u,e),i.querySelector(a)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Fr(u)))return}s=i.createElement("link"),mt(s,"link",e),ut(s),i.head.appendChild(s)}}}function iv(e,t,i){Ci.S(e,t,i);var s=Ks;if(s&&e){var a=Ss(s).hoistableStyles,u=Qs(e);t=t||"default";var x=a.get(u);if(!x){var B={loading:0,preload:null};if(x=s.querySelector(Ir(u)))B.loading=5;else{e=l({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Yt.get(u))&&mo(e,i);var P=x=s.createElement("link");ut(P),mt(P,"link",e),P._p=new Promise(function(ee,le){P.onload=ee,P.onerror=le}),P.addEventListener("load",function(){B.loading|=1}),P.addEventListener("error",function(){B.loading|=2}),B.loading|=4,Qn(x,t,s)}x={type:"stylesheet",instance:x,count:1,state:B},a.set(u,x)}}}function sv(e,t){Ci.X(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,a=Zs(e),u=s.get(a);u||(u=i.querySelector(Fr(a)),u||(e=l({src:e,async:!0},t),(t=Yt.get(a))&&po(e,t),u=i.createElement("script"),ut(u),mt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(a,u))}}function rv(e,t){Ci.M(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,a=Zs(e),u=s.get(a);u||(u=i.querySelector(Fr(a)),u||(e=l({src:e,async:!0,type:"module"},t),(t=Yt.get(a))&&po(e,t),u=i.createElement("script"),ut(u),mt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(a,u))}}function pf(e,t,i,s){var a=(a=ue.current)?Kn(a):null;if(!a)throw Error(j(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Qs(i.href),i=Ss(a).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=Qs(i.href);var u=Ss(a).hoistableStyles,x=u.get(e);if(x||(a=a.ownerDocument||a,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,x),(u=a.querySelector(Ir(e)))&&!u._p&&(x.instance=u,x.state.loading=5),Yt.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},Yt.set(e,i),u||nv(a,e,i,x.state))),t&&s===null)throw Error(j(528,""));return x}if(t&&s!==null)throw Error(j(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zs(i),i=Ss(a).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(j(444,e))}}function Qs(e){return'href="'+It(e)+'"'}function Ir(e){return'link[rel="stylesheet"]['+e+"]"}function Sf(e){return l({},e,{"data-precedence":e.precedence,precedence:null})}function nv(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}),mt(t,"link",i),ut(t),e.head.appendChild(t))}function Zs(e){return'[src="'+It(e)+'"]'}function Fr(e){return"script[async]"+e}function yf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+It(i.href)+'"]');if(s)return t.instance=s,ut(s),s;var a=l({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ut(s),mt(s,"style",a),Qn(s,i.precedence,e),t.instance=s;case"stylesheet":a=Qs(i.href);var u=e.querySelector(Ir(a));if(u)return t.state.loading|=4,t.instance=u,ut(u),u;s=Sf(i),(a=Yt.get(a))&&mo(s,a),u=(e.ownerDocument||e).createElement("link"),ut(u);var x=u;return x._p=new Promise(function(B,P){x.onload=B,x.onerror=P}),mt(u,"link",s),t.state.loading|=4,Qn(u,i.precedence,e),t.instance=u;case"script":return u=Zs(i.src),(a=e.querySelector(Fr(u)))?(t.instance=a,ut(a),a):(s=i,(a=Yt.get(u))&&(s=l({},i),po(s,a)),e=e.ownerDocument||e,a=e.createElement("script"),ut(a),mt(a,"link",s),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(j(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Qn(s,i.precedence,e));return t.instance}function Qn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=s.length?s[s.length-1]:null,u=a,x=0;x<s.length;x++){var B=s[x];if(B.dataset.precedence===t)u=B;else if(u!==a)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function mo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function po(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zn=null;function bf(e,t,i){if(Zn===null){var s=new Map,a=Zn=new Map;a.set(i,s)}else a=Zn,s=a.get(i),s||(s=new Map,a.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),a=0;a<i.length;a++){var u=i[a];if(!(u[sr]||u[dt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var x=u.getAttribute(t)||"";x=e+x;var B=s.get(x);B?B.push(u):s.set(x,[u])}}return s}function Cf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function av(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 wf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function lv(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 a=Qs(s.href),u=t.querySelector(Ir(a));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jn.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=u,ut(u);return}u=t.ownerDocument||t,s=Sf(s),(a=Yt.get(a))&&mo(s,a),u=u.createElement("link"),ut(u);var x=u;x._p=new Promise(function(B,P){x.onload=B,x.onerror=P}),mt(u,"link",s),i.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Jn.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var So=0;function ov(e,t){return e.stylesheets&&e.count===0&&ta(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ta(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&So===0&&(So=62500*P_());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ta(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>So?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(a)}}:null}function Jn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ta(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ea=null;function ta(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ea=new Map,t.forEach(cv,e),ea=null,Jn.call(e))}function cv(e,t){if(!(t.state.loading&4)){var i=ea.get(e);if(i)var s=i.get(null);else{i=new Map,ea.set(e,i);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<a.length;u++){var x=a[u];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(i.set(x.dataset.precedence,x),s=x)}s&&i.set(null,s)}a=t.instance,x=a.getAttribute("data-precedence"),u=i.get(x)||s,u===s&&i.set(null,a),i.set(x,a),this.count++,s=Jn.bind(this),a.addEventListener("load",s),a.addEventListener("error",s),u?u.parentNode.insertBefore(a,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Pr={$$typeof:c,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function hv(e,t,i,s,a,u,x,B,P){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=da(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=da(0),this.hiddenUpdates=da(null),this.identifierPrefix=s,this.onUncaughtError=a,this.onCaughtError=u,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function Ef(e,t,i,s,a,u,x,B,P,ee,le,ce){return e=new hv(e,t,i,x,P,ee,le,ce,B),t=1,u===!0&&(t|=24),u=Bt(3,null,null,t),e.current=u,u.stateNode=e,t=Qa(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:i,cache:t},tl(u),e}function xf(e){return e?(e=Ds,e):Ds}function Lf(e,t,i,s,a,u){a=xf(a),s.context===null?s.context=a:s.pendingContext=a,s=Ti(t),s.payload={element:i},u=u===void 0?null:u,u!==null&&(s.callback=u),i=Bi(e,s,t),i!==null&&(Rt(i,e,t),yr(i,e,t))}function Af(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function yo(e,t){Af(e,t),(e=e.alternate)&&Af(e,t)}function Rf(e){if(e.tag===13||e.tag===31){var t=es(e,67108864);t!==null&&Rt(t,e,67108864),yo(e,67108864)}}function Df(e){if(e.tag===13||e.tag===31){var t=Nt();t=_a(t);var i=es(e,t);i!==null&&Rt(i,e,t),yo(e,t)}}var ia=!0;function uv(e,t,i,s){var a=z.T;z.T=null;var u=I.p;try{I.p=2,bo(e,t,i,s)}finally{I.p=u,z.T=a}}function fv(e,t,i,s){var a=z.T;z.T=null;var u=I.p;try{I.p=8,bo(e,t,i,s)}finally{I.p=u,z.T=a}}function bo(e,t,i,s){if(ia){var a=Co(s);if(a===null)ao(e,t,s,sa,i),Tf(e,s);else if(_v(a,e,t,i,s))s.stopPropagation();else if(Tf(e,s),t&4&&-1<dv.indexOf(e)){for(;a!==null;){var u=ps(a);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var x=ri(u.pendingLanes);if(x!==0){var B=u;for(B.pendingLanes|=2,B.entangledLanes|=2;x;){var P=1<<31-pt(x);B.entanglements[1]|=P,x&=~P}si(u),(je&6)===0&&(jn=be()+500,zr(0))}}break;case 31:case 13:B=es(u,2),B!==null&&Rt(B,u,2),Fn(),yo(u,2)}if(u=Co(s),u===null&&ao(e,t,s,sa,i),u===a)break;a=u}a!==null&&s.stopPropagation()}else ao(e,t,s,null,i)}}function Co(e){return e=wa(e),wo(e)}var sa=null;function wo(e){if(sa=null,e=ms(e),e!==null){var t=ae(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=q(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 sa=e,null}function Mf(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(Qe()){case Pe:return 2;case Ut:return 8;case ot:case bt:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Eo=!1,qi=null,Gi=null,Wi=null,qr=new Map,Gr=new Map,$i=[],dv="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 Tf(e,t){switch(e){case"focusin":case"focusout":qi=null;break;case"dragenter":case"dragleave":Gi=null;break;case"mouseover":case"mouseout":Wi=null;break;case"pointerover":case"pointerout":qr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gr.delete(t.pointerId)}}function Wr(e,t,i,s,a,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:u,targetContainers:[a]},t!==null&&(t=ps(t),t!==null&&Rf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function _v(e,t,i,s,a){switch(t){case"focusin":return qi=Wr(qi,e,t,i,s,a),!0;case"dragenter":return Gi=Wr(Gi,e,t,i,s,a),!0;case"mouseover":return Wi=Wr(Wi,e,t,i,s,a),!0;case"pointerover":var u=a.pointerId;return qr.set(u,Wr(qr.get(u)||null,e,t,i,s,a)),!0;case"gotpointercapture":return u=a.pointerId,Gr.set(u,Wr(Gr.get(u)||null,e,t,i,s,a)),!0}return!1}function Bf(e){var t=ms(e.target);if(t!==null){var i=ae(t);if(i!==null){if(t=i.tag,t===13){if(t=q(i),t!==null){e.blockedOn=t,Wo(e.priority,function(){Df(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,Wo(e.priority,function(){Df(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 ra(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Co(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Ca=s,i.target.dispatchEvent(s),Ca=null}else return t=ps(i),t!==null&&Rf(t),e.blockedOn=i,!1;t.shift()}return!0}function Of(e,t,i){ra(e)&&i.delete(t)}function vv(){Eo=!1,qi!==null&&ra(qi)&&(qi=null),Gi!==null&&ra(Gi)&&(Gi=null),Wi!==null&&ra(Wi)&&(Wi=null),qr.forEach(Of),Gr.forEach(Of)}function na(e,t){e.blockedOn===t&&(e.blockedOn=null,Eo||(Eo=!0,U.unstable_scheduleCallback(U.unstable_NormalPriority,vv)))}var aa=null;function kf(e){aa!==e&&(aa=e,U.unstable_scheduleCallback(U.unstable_NormalPriority,function(){aa===e&&(aa=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],a=e[t+2];if(typeof s!="function"){if(wo(s||i)===null)continue;break}var u=ps(i);u!==null&&(e.splice(t,3),t-=3,bl(u,{pending:!0,data:a,method:i.method,action:s},s,a))}}))}function Js(e){function t(P){return na(P,e)}qi!==null&&na(qi,e),Gi!==null&&na(Gi,e),Wi!==null&&na(Wi,e),qr.forEach(t),Gr.forEach(t);for(var i=0;i<$i.length;i++){var s=$i[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<$i.length&&(i=$i[0],i.blockedOn===null);)Bf(i),i.blockedOn===null&&$i.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var a=i[s],u=i[s+1],x=a[Ct]||null;if(typeof u=="function")x||kf(i);else if(x){var B=null;if(u&&u.hasAttribute("formAction")){if(a=u,x=u[Ct]||null)B=x.formAction;else if(wo(a)!==null)continue}else B=x.action;typeof B=="function"?i[s+1]=B:(i.splice(s,3),s-=3),kf(i)}}}function Hf(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(x){return a=x})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,a=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),a!==null&&(a(),a=null)}}}function xo(e){this._internalRoot=e}la.prototype.render=xo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));var i=t.current,s=Nt();Lf(i,s,e,t,null,null)},la.prototype.unmount=xo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lf(e.current,2,null,e,null,null),Fn(),t[gs]=null}};function la(e){this._internalRoot=e}la.prototype.unstable_scheduleHydration=function(e){if(e){var t=Go();e={blockedOn:null,target:e,priority:t};for(var i=0;i<$i.length&&t!==0&&t<$i[i].priority;i++);$i.splice(i,0,e),i===0&&Bf(e)}};var zf=V.version;if(zf!=="19.2.4")throw Error(j(527,zf,"19.2.4"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=_(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var gv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oa.isDisabled&&oa.supportsFiber)try{Vt=oa.inject(gv),ht=oa}catch{}}return Xr.createRoot=function(e,t){if(!ie(e))throw Error(j(299));var i=!1,s="",a=Ph,u=qh,x=Gh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=Ef(e,1,!1,null,null,i,s,null,a,u,x,Hf),e[gs]=t.current,no(e),new xo(t)},Xr.hydrateRoot=function(e,t,i){if(!ie(e))throw Error(j(299));var s=!1,a="",u=Ph,x=qh,B=Gh,P=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(a=i.identifierPrefix),i.onUncaughtError!==void 0&&(u=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(B=i.onRecoverableError),i.formState!==void 0&&(P=i.formState)),t=Ef(e,1,!0,t,i??null,s,a,P,u,x,B,Hf),t.context=xf(null),i=t.current,s=Nt(),s=_a(s),a=Ti(s),a.callback=null,Bi(i,a,s),i=s,t.current.lanes=i,ir(t,i),si(t),e[gs]=t.current,no(e),new la(t)},Xr.version="19.2.4",Xr}var $f;function Lv(){if($f)return Ro.exports;$f=1;function U(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(U)}catch(V){console.error(V)}}return U(),Ro.exports=xv(),Ro.exports}var Av=Lv();const Rv=768,Dv=1e3;function Yr(){const V=window.location.pathname.match(/^(\/project\/[^/]+\/)/);return V?V[1]:"/"}function ds(U){const V=Yr(),Y=U.startsWith("/")?U.slice(1):U;return V+Y}function _s(){const U=localStorage.getItem("codev-web-key");return U?{Authorization:`Bearer ${U}`}:{}}async function Mv(){const U=await fetch(ds("api/state"),{headers:_s()});if(!U.ok)throw new Error(`Failed to fetch state: ${U.status}`);return U.json()}async function Tv(){const U=await fetch(ds("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",..._s()}});if(!U.ok)throw new Error(await U.text());return U.json()}async function Zf(U,V){const Y=await fetch(ds("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",..._s()},body:JSON.stringify({path:U,line:V})});if(!Y.ok)throw new Error(await Y.text());return Y.json()}async function Bv(U){const V=await fetch(ds(`api/tabs/${U}`),{method:"DELETE",headers:_s()});if(!V.ok)throw new Error(await V.text())}async function Ov(){const U=await fetch(ds("api/files"),{headers:_s()});if(!U.ok)throw new Error(`Failed to fetch files: ${U.status}`);return U.json()}function kv(U){return U.terminalId?`${Yr()}ws/terminal/${U.terminalId}`:null}async function Hv(){const U=await fetch(ds("api/git/status"),{headers:_s()});if(!U.ok)throw new Error(`Failed to fetch git status: ${U.status}`);return U.json()}async function zv(){const U=await fetch(ds("api/files/recent"),{headers:_s()});if(!U.ok)throw new Error(`Failed to fetch recent files: ${U.status}`);return U.json()}function Nv(){const[U,V]=Ce.useState(null),[Y,j]=Ce.useState(null),ie=Ce.useCallback(async()=>{try{const ae=await Mv();V(ae),j(null)}catch(ae){j(ae.message)}},[]);return Ce.useEffect(()=>{ie();const ae=setInterval(ie,Dv);return()=>clearInterval(ae)},[ie]),{state:U,error:Y,refresh:ie}}function Uv(U){const V=[{id:"dashboard",type:"dashboard",label:"Dashboard",closable:!1}];U!=null&&U.architect&&V.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:U.architect.terminalId});for(const Y of(U==null?void 0:U.builders)??[])V.push({id:Y.id,type:"builder",label:Y.name||`Builder ${Y.id}`,closable:!0,projectId:Y.id,terminalId:Y.terminalId});for(const Y of(U==null?void 0:U.utils)??[])!Y.terminalId&&(!Y.pid||Y.pid===0)||V.push({id:Y.id,type:"shell",label:Y.name||`Shell ${Y.id}`,closable:!0,utilId:Y.id,terminalId:Y.terminalId});for(const Y of(U==null?void 0:U.annotations)??[]){const j=Y.file.split("/").pop()??Y.file;V.push({id:Y.id,type:"file",label:j,closable:!0,annotationId:Y.id,filePath:Y.file})}return V}function jv(U){const[V,Y]=Ce.useState("dashboard"),j=Ce.useRef(null),ie=Ce.useRef(!1),ae=Uv(U);Ce.useEffect(()=>{if(ie.current||U===null)return;const _=new URLSearchParams(window.location.search).get("tab");if(_){const v=ae.find(l=>l.id===_||l.type===_);if(v){Y(v.id),ie.current=!0;const l=new URL(window.location.href);l.searchParams.delete("tab"),window.history.replaceState({},"",l.toString())}}else ie.current=!0},[ae,U]),Ce.useEffect(()=>{const d=new Set(ae.map(_=>_.id));if(j.current===null){U!==null&&(j.current=d);return}for(const _ of ae)!j.current.has(_.id)&&_.type!=="architect"&&Y(_.id);j.current=d},[ae.map(d=>d.id).join(","),U!==null]);const q=Ce.useCallback(d=>{Y(d)},[]),n=ae.find(d=>d.id===V)??ae[0];return{tabs:ae,activeTab:n,activeTabId:V,selectTab:q}}function Iv(U){const[V,Y]=Ce.useState(()=>typeof window<"u"?window.matchMedia(U).matches:!1);return Ce.useEffect(()=>{const j=window.matchMedia(U),ie=ae=>Y(ae.matches);return j.addEventListener("change",ie),Y(j.matches),()=>j.removeEventListener("change",ie)},[U]),V}function Fv({left:U,right:V,defaultSplit:Y=50}){const[j,ie]=Ce.useState(Y),ae=Ce.useRef(null),q=Ce.useRef(!1),n=Ce.useCallback(d=>{d.preventDefault(),q.current=!0;const _=l=>{if(!q.current||!ae.current)return;const m=ae.current.getBoundingClientRect(),y=(l.clientX-m.left)/m.width*100;ie(Math.max(20,Math.min(80,y)))},v=()=>{q.current=!1,document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",v)},[]);return Z.jsxs("div",{ref:ae,className:"split-pane",children:[Z.jsx("div",{className:"split-left",style:{width:`${j}%`},children:U}),Z.jsx("div",{className:"split-handle",onMouseDown:n,role:"separator","aria-label":"Resize panels"}),Z.jsx("div",{className:"split-right",style:{width:`${100-j}%`},children:V})]})}function Jf({tabs:U,activeTabId:V,onSelectTab:Y,onRefresh:j}){const ie=async(ae,q)=>{ae.stopPropagation();try{await Bv(q.id),j()}catch(n){console.error("Failed to close tab:",n)}};return Z.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:U.map(ae=>Z.jsxs("button",{role:"tab","aria-selected":ae.id===V,className:`tab ${ae.id===V?"tab-active":""}`,onClick:()=>Y(ae.id),title:ae.label,children:[Z.jsx("span",{className:"tab-label",children:ae.label}),ae.closable&&Z.jsx("span",{className:"tab-close",onClick:q=>ie(q,ae),role:"button","aria-label":`Close ${ae.label}`,tabIndex:0,onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),ie(q,ae))},children:"×"})]},ae.id))})}var Bo={exports:{}},Xf;function Pv(){return Xf||(Xf=1,(function(U,V){(function(Y,j){U.exports=j()})(globalThis,(()=>(()=>{var Y={4567:function(q,n,d){var _=this&&this.__decorate||function(o,c,g,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,g):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,g,C);else for(var E=o.length-1;E>=0;E--)(S=o[E])&&(p=(w<3?S(p):w>3?S(c,g,p):S(c,g))||p);return w>3&&p&&Object.defineProperty(c,g,p),p},v=this&&this.__param||function(o,c){return function(g,C){c(g,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const l=d(9042),m=d(9924),y=d(844),b=d(4725),f=d(2585),r=d(3656);let h=n.AccessibilityManager=class extends y.Disposable{constructor(o,c,g,C){super(),this._terminal=o,this._coreBrowserService=g,this._renderService=C,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 S=0;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);if(this._topBoundaryFocusListener=S=>this._handleBoundaryFocus(S,0),this._bottomBoundaryFocusListener=S=>this._handleBoundaryFocus(S,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 m.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((S=>this._handleResize(S.rows)))),this.register(this._terminal.onRender((S=>this._refreshRows(S.start,S.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((S=>this._handleChar(S)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
50
|
+
`)))),this.register(this._terminal.onA11yTab((S=>this._handleTab(S)))),this.register(this._terminal.onKey((S=>this._handleKey(S.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,r.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let c=0;c<o;c++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
|
|
51
|
+
`&&(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,c){this._liveRegionDebouncer.refresh(o,c,this._terminal.rows)}_renderRows(o,c){const g=this._terminal.buffer,C=g.lines.length.toString();for(let S=o;S<=c;S++){const w=g.lines.get(g.ydisp+S),p=[],E=(w==null?void 0:w.translateToString(!0,void 0,void 0,p))||"",L=(g.ydisp+S+1).toString(),T=this._rowElements[S];T&&(E.length===0?(T.innerText=" ",this._rowColumns.set(T,[0,1])):(T.textContent=E,this._rowColumns.set(T,p)),T.setAttribute("aria-posinset",L),T.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,c){const g=o.target,C=this._rowElements[c===0?1:this._rowElements.length-2];if(g.getAttribute("aria-posinset")===(c===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==C)return;let S,w;if(c===0?(S=g,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(S=this._rowElements.shift(),w=g,this._rowContainer.removeChild(S)),S.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),c===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(c===0?-1:1),this._rowElements[c===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var E;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 c={node:o.anchorNode,offset:o.anchorOffset},g={node:o.focusNode,offset:o.focusOffset};if((c.node.compareDocumentPosition(g.node)&Node.DOCUMENT_POSITION_PRECEDING||c.node===g.node&&c.offset>g.offset)&&([c,g]=[g,c]),c.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(c={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(c.node))return;const C=this._rowElements.slice(-1)[0];if(g.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(g={node:C,offset:((E=C.textContent)==null?void 0:E.length)??0}),!this._rowContainer.contains(g.node))return;const S=({node:L,offset:T})=>{const A=L instanceof Text?L.parentNode:L;let M=parseInt(A==null?void 0:A.getAttribute("aria-posinset"),10)-1;if(isNaN(M))return console.warn("row is invalid. Race condition?"),null;const N=this._rowColumns.get(A);if(!N)return console.warn("columns is null. Race condition?"),null;let X=T<N.length?N[T]:N.slice(-1)[0]+1;return X>=this._terminal.cols&&(++M,X=0),{row:M,column:X}},w=S(c),p=S(g);if(w&&p){if(w.row>p.row||w.row===p.row&&w.column>=p.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(p.row-w.row)*this._terminal.cols-w.column+p.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let c=this._rowContainer.children.length;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);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=h=_([v(1,f.IInstantiationService),v(2,b.ICoreBrowserService),v(3,b.IRenderService)],h)},3614:(q,n)=>{function d(m){return m.replace(/\r?\n/g,"\r")}function _(m,y){return y?"\x1B[200~"+m+"\x1B[201~":m}function v(m,y,b,f){m=_(m=d(m),b.decPrivateModes.bracketedPasteMode&&f.rawOptions.ignoreBracketedPasteMode!==!0),b.triggerDataEvent(m,!0),y.value=""}function l(m,y,b){const f=b.getBoundingClientRect(),r=m.clientX-f.left-10,h=m.clientY-f.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${r}px`,y.style.top=`${h}px`,y.style.zIndex="1000",y.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=d,n.bracketTextForPaste=_,n.copyHandler=function(m,y){m.clipboardData&&m.clipboardData.setData("text/plain",y.selectionText),m.preventDefault()},n.handlePasteEvent=function(m,y,b,f){m.stopPropagation(),m.clipboardData&&v(m.clipboardData.getData("text/plain"),y,b,f)},n.paste=v,n.moveTextAreaUnderMouseCursor=l,n.rightClickHandler=function(m,y,b,f,r){l(m,y,b),r&&f.rightClickSelect(m),y.value=f.selectionText,y.select()}},7239:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const _=d(1505);n.ColorContrastCache=class{constructor(){this._color=new _.TwoKeyMap,this._css=new _.TwoKeyMap}setCss(v,l,m){this._css.set(v,l,m)}getCss(v,l){return this._css.get(v,l)}setColor(v,l,m){this._color.set(v,l,m)}getColor(v,l){return this._color.get(v,l)}clear(){this._color.clear(),this._css.clear()}}},3656:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(d,_,v,l){d.addEventListener(_,v,l);let m=!1;return{dispose:()=>{m||(m=!0,d.removeEventListener(_,v,l))}}}},3551:function(q,n,d){var _=this&&this.__decorate||function(h,o,c,g){var C,S=arguments.length,w=S<3?o:g===null?g=Object.getOwnPropertyDescriptor(o,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,c,g);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(o,c,w):C(o,c))||w);return S>3&&w&&Object.defineProperty(o,c,w),w},v=this&&this.__param||function(h,o){return function(c,g){o(c,g,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const l=d(3656),m=d(8460),y=d(844),b=d(2585),f=d(4725);let r=n.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(h,o,c,g,C){super(),this._element=h,this._mouseService=o,this._renderService=c,this._bufferService=g,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var S;this._lastMouseEvent=void 0,(S=this._activeProviderReplies)==null||S.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(h){this._lastMouseEvent=h;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const c=h.composedPath();for(let g=0;g<c.length;g++){const C=c[g];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,o){var g,C;this._activeProviderReplies&&o||((g=this._activeProviderReplies)==null||g.forEach((S=>{S==null||S.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let c=!1;for(const[S,w]of this._linkProviderService.linkProviders.entries())o?(C=this._activeProviderReplies)!=null&&C.get(S)&&(c=this._checkLinkProviderResult(S,h,c)):w.provideLinks(h.y,(p=>{var L,T;if(this._isMouseOut)return;const E=p==null?void 0:p.map((A=>({link:A})));(L=this._activeProviderReplies)==null||L.set(S,E),c=this._checkLinkProviderResult(S,h,c),((T=this._activeProviderReplies)==null?void 0:T.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,o){const c=new Set;for(let g=0;g<o.size;g++){const C=o.get(g);if(C)for(let S=0;S<C.length;S++){const w=C[S],p=w.link.range.start.y<h?0:w.link.range.start.x,E=w.link.range.end.y>h?this._bufferService.cols:w.link.range.end.x;for(let L=p;L<=E;L++){if(c.has(L)){C.splice(S--,1);break}c.add(L)}}}}_checkLinkProviderResult(h,o,c){var S;if(!this._activeProviderReplies)return c;const g=this._activeProviderReplies.get(h);let C=!1;for(let w=0;w<h;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(C=!0);if(!C&&g){const w=g.find((p=>this._linkAtPosition(p.link,o)));w&&(c=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!c)for(let w=0;w<this._activeProviderReplies.size;w++){const p=(S=this._activeProviderReplies.get(w))==null?void 0:S.find((E=>this._linkAtPosition(E.link,o)));if(p){c=!0,this._handleNewLink(p);break}}return c}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,o){this._currentLink&&this._lastMouseEvent&&(!h||!o||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(h.link,o)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var c,g;return(g=(c=this._currentLink)==null?void 0:c.state)==null?void 0:g.decorations.pointerCursor},set:c=>{var g;(g=this._currentLink)!=null&&g.state&&this._currentLink.state.decorations.pointerCursor!==c&&(this._currentLink.state.decorations.pointerCursor=c,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",c))}},underline:{get:()=>{var c,g;return(g=(c=this._currentLink)==null?void 0:c.state)==null?void 0:g.decorations.underline},set:c=>{var g,C,S;(g=this._currentLink)!=null&&g.state&&((S=(C=this._currentLink)==null?void 0:C.state)==null?void 0:S.decorations.underline)!==c&&(this._currentLink.state.decorations.underline=c,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,c))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((c=>{if(!this._currentLink)return;const g=c.start===0?0:c.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+c.end;if(this._currentLink.link.range.start.y>=g&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(g,C),this._lastMouseEvent)){const S=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);S&&this._askForLink(S,!1)}}))))}_linkHover(h,o,c){var g;(g=this._currentLink)!=null&&g.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(c,o.text)}_fireUnderlineEvent(h,o){const c=h.range,g=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-g-1,c.end.x,c.end.y-g-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(h,o,c){var g;(g=this._currentLink)!=null&&g.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(c,o.text)}_linkAtPosition(h,o){const c=h.range.start.y*this._bufferService.cols+h.range.start.x,g=h.range.end.y*this._bufferService.cols+h.range.end.x,C=o.y*this._bufferService.cols+o.x;return c<=C&&C<=g}_positionFromMouseEvent(h,o,c){const g=c.getCoords(h,o,this._bufferService.cols,this._bufferService.rows);if(g)return{x:g[0],y:g[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,o,c,g,C){return{x1:h,y1:o,x2:c,y2:g,cols:this._bufferService.cols,fg:C}}};n.Linkifier=r=_([v(1,f.IMouseService),v(2,f.IRenderService),v(3,b.IBufferService),v(4,f.ILinkProviderService)],r)},9042:(q,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(q,n,d){var _=this&&this.__decorate||function(f,r,h,o){var c,g=arguments.length,C=g<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,r,h,o);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(C=(g<3?c(C):g>3?c(r,h,C):c(r,h))||C);return g>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(f,r){return function(h,o){r(h,o,f)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const l=d(511),m=d(2585);let y=n.OscLinkProvider=class{constructor(f,r,h){this._bufferService=f,this._optionsService=r,this._oscLinkService=h}provideLinks(f,r){var E;const h=this._bufferService.buffer.lines.get(f-1);if(!h)return void r(void 0);const o=[],c=this._optionsService.rawOptions.linkHandler,g=new l.CellData,C=h.getTrimmedLength();let S=-1,w=-1,p=!1;for(let L=0;L<C;L++)if(w!==-1||h.hasContent(L)){if(h.loadCell(L,g),g.hasExtendedAttrs()&&g.extended.urlId){if(w===-1){w=L,S=g.extended.urlId;continue}p=g.extended.urlId!==S}else w!==-1&&(p=!0);if(p||w!==-1&&L===C-1){const T=(E=this._oscLinkService.getLinkData(S))==null?void 0:E.uri;if(T){const A={start:{x:w+1,y:f},end:{x:L+(p||L!==C-1?0:1),y:f}};let M=!1;if(!(c!=null&&c.allowNonHttpProtocols))try{const N=new URL(T);["http:","https:"].includes(N.protocol)||(M=!0)}catch{M=!0}M||o.push({text:T,range:A,activate:(N,X)=>c?c.activate(N,X,A):b(0,X),hover:(N,X)=>{var z;return(z=c==null?void 0:c.hover)==null?void 0:z.call(c,N,X,A)},leave:(N,X)=>{var z;return(z=c==null?void 0:c.leave)==null?void 0:z.call(c,N,X,A)}})}p=!1,g.hasExtendedAttrs()&&g.extended.urlId?(w=L,S=g.extended.urlId):(w=-1,S=-1)}}r(o)}};function b(f,r){if(confirm(`Do you want to navigate to ${r}?
|
|
52
52
|
|
|
53
|
-
WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=y=_([v(0,m.IBufferService),v(1,m.IOptionsService),v(2,m.IOscLinkService)],y)},6193:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(d,_){this._renderCallback=d,this._coreBrowserService=_,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(d){return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(d,_,v){this._rowCount=v,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,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 d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},3236:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const _=d(3614),v=d(3656),o=d(3551),m=d(9042),y=d(3730),b=d(1680),f=d(3107),r=d(5744),h=d(2950),l=d(1296),c=d(428),g=d(4269),C=d(5114),S=d(8934),w=d(3230),p=d(9312),E=d(4725),L=d(6731),T=d(8055),A=d(8969),M=d(8460),z=d(844),Y=d(6114),N=d(8437),I=d(2584),G=d(7399),D=d(5941),H=d(9074),R=d(2585),O=d(5435),X=d(4567),Z=d(779);class he extends A.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(F={}){super(F),this.browser=Y,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new z.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(R.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Z.LinkProviderService),this._instantiationService.setService(E.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((k,ne)=>this.refresh(k,ne)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((k=>this._reportWindowsOptions(k)))),this.register(this._inputHandler.onColor((k=>this._handleColorEvent(k)))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((k=>this._afterResize(k.cols,k.rows)))),this.register((0,z.toDisposable)((()=>{var k,ne;this._customKeyEventHandler=void 0,(ne=(k=this.element)==null?void 0:k.parentNode)==null||ne.removeChild(this.element)})))}_handleColorEvent(F){if(this._themeService)for(const k of F){let ne,se="";switch(k.index){case 256:ne="foreground",se="10";break;case 257:ne="background",se="11";break;case 258:ne="cursor",se="12";break;default:ne="ansi",se="4;"+k.index}switch(k.type){case 0:const de=T.color.toColorRGB(ne==="ansi"?this._themeService.colors.ansi[k.index]:this._themeService.colors[ne]);this.coreService.triggerDataEvent(`${I.C0.ESC}]${se};${(0,D.toRgbString)(de)}${I.C1_ESCAPED.ST}`);break;case 1:if(ne==="ansi")this._themeService.modifyColors((fe=>fe.ansi[k.index]=T.channels.toColor(...k.color)));else{const fe=ne;this._themeService.modifyColors((we=>we[fe]=T.channels.toColor(...k.color)))}break;case 2:this._themeService.restoreColor(k.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(F){F?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(X.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(F){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var F;return(F=this.textarea)==null?void 0:F.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.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 F=this.buffer.ybase+this.buffer.y,k=this.buffer.lines.get(F);if(!k)return;const ne=Math.min(this.buffer.x,this.cols-1),se=this._renderService.dimensions.css.cell.height,de=k.getWidth(ne),fe=this._renderService.dimensions.css.cell.width*de,we=this.buffer.y*this._renderService.dimensions.css.cell.height,me=ne*this._renderService.dimensions.css.cell.width;this.textarea.style.left=me+"px",this.textarea.style.top=we+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=se+"px",this.textarea.style.lineHeight=se+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(k=>{this.hasSelection()&&(0,_.copyHandler)(k,this._selectionService)})));const F=k=>(0,_.handlePasteEvent)(k,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",F)),this.register((0,v.addDisposableDomListener)(this.element,"paste",F)),Y.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(k=>{k.button===2&&(0,_.rightClickHandler)(k,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(k=>{(0,_.rightClickHandler)(k,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Y.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(k=>{k.button===1&&(0,_.moveTextAreaUnderMouseCursor)(k,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(F=>this._keyUp(F)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(F=>this._keyDown(F)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(F=>this._keyPress(F)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(F=>this._compositionHelper.compositionupdate(F)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(F=>this._inputEvent(F)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(F){var ne;if(!F)throw new Error("Terminal requires a parent element.");if(F.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ne=this.element)==null?void 0:ne.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=F.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"),F.appendChild(this.element);const k=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),k.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,v.addDisposableDomListener)(this.screenElement,"mousemove",(se=>this.updateCursorStyle(se)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),k.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),Y.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(C.CoreBrowserService,this.textarea,F.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(E.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(se=>this._handleTextAreaFocus(se)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(c.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(E.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(E.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(g.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((se=>this._onRender.fire(se)))),this.onResize((se=>this._renderService.resize(se.cols,se.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(S.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(o.Linkifier,this.screenElement)),this.element.appendChild(k);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(b.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((se=>this.scrollLines(se.amount,se.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(p.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((se=>this.scrollLines(se.amount,se.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((se=>this._renderService.handleSelectionChanged(se.start,se.end,se.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((se=>{this.textarea.value=se,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((se=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(f.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(se=>this._selectionService.handleMouseDown(se)))),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(X.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(se=>this._handleScreenReaderModeOptionChange(se)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(se=>{!this._overviewRulerRenderer&&se&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(l.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const F=this,k=this.element;function ne(fe){const we=F._mouseService.getMouseReportCoords(fe,F.screenElement);if(!we)return!1;let me,Ne;switch(fe.overrideType||fe.type){case"mousemove":Ne=32,fe.buttons===void 0?(me=3,fe.button!==void 0&&(me=fe.button<3?fe.button:3)):me=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Ne=0,me=fe.button<3?fe.button:3;break;case"mousedown":Ne=1,me=fe.button<3?fe.button:3;break;case"wheel":if(F._customWheelEventHandler&&F._customWheelEventHandler(fe)===!1||F.viewport.getLinesScrolled(fe)===0)return!1;Ne=fe.deltaY<0?0:1,me=4;break;default:return!1}return!(Ne===void 0||me===void 0||me>4)&&F.coreMouseService.triggerMouseEvent({col:we.col,row:we.row,x:we.x,y:we.y,button:me,action:Ne,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const se={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:fe=>(ne(fe),fe.buttons||(this._document.removeEventListener("mouseup",se.mouseup),se.mousedrag&&this._document.removeEventListener("mousemove",se.mousedrag)),this.cancel(fe)),wheel:fe=>(ne(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&ne(fe)},mousemove:fe=>{fe.buttons||ne(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),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&fe?se.mousemove||(k.addEventListener("mousemove",de.mousemove),se.mousemove=de.mousemove):(k.removeEventListener("mousemove",se.mousemove),se.mousemove=null),16&fe?se.wheel||(k.addEventListener("wheel",de.wheel,{passive:!1}),se.wheel=de.wheel):(k.removeEventListener("wheel",se.wheel),se.wheel=null),2&fe?se.mouseup||(se.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",se.mouseup),se.mouseup=null),4&fe?se.mousedrag||(se.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",se.mousedrag),se.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(k,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return ne(fe),se.mouseup&&this._document.addEventListener("mouseup",se.mouseup),se.mousedrag&&this._document.addEventListener("mousemove",se.mousedrag),this.cancel(fe)}))),this.register((0,v.addDisposableDomListener)(k,"wheel",(fe=>{if(!se.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const we=this.viewport.getLinesScrolled(fe);if(we===0)return;const me=I.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Ne="";for(let Ke=0;Ke<Math.abs(we);Ke++)Ne+=me;return this.coreService.triggerDataEvent(Ne,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(k,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(k,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(F,k){var ne;(ne=this._renderService)==null||ne.refreshRows(F,k)}updateCursorStyle(F){var k;(k=this._selectionService)!=null&&k.shouldColumnSelect(F)?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(F,k,ne=0){var se;ne===1?(super.scrollLines(F,k,ne),this.refresh(0,this.rows-1)):(se=this.viewport)==null||se.scrollLines(F)}paste(F){(0,_.paste)(F,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(F){this._customKeyEventHandler=F}attachCustomWheelEventHandler(F){this._customWheelEventHandler=F}registerLinkProvider(F){return this._linkProviderService.registerLinkProvider(F)}registerCharacterJoiner(F){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const k=this._characterJoinerService.register(F);return this.refresh(0,this.rows-1),k}deregisterCharacterJoiner(F){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(F)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(F){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+F)}registerDecoration(F){return this._decorationService.registerDecoration(F)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(F,k,ne){this._selectionService.setSelection(F,k,ne)}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 F;(F=this._selectionService)==null||F.clearSelection()}selectAll(){var F;(F=this._selectionService)==null||F.selectAll()}selectLines(F,k){var ne;(ne=this._selectionService)==null||ne.selectLines(F,k)}_keyDown(F){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;const k=this.browser.isMac&&this.options.macOptionIsMeta&&F.altKey;if(!k&&!this._compositionHelper.keydown(F))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;k||F.key!=="Dead"&&F.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ne=(0,G.evaluateKeyboardEvent)(F,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(F),ne.type===3||ne.type===2){const se=this.rows-1;return this.scrollLines(ne.type===2?-se:se),this.cancel(F,!0)}return ne.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,F)||(ne.cancel&&this.cancel(F,!0),!ne.key||!!(F.key&&!F.ctrlKey&&!F.altKey&&!F.metaKey&&F.key.length===1&&F.key.charCodeAt(0)>=65&&F.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ne.key!==I.C0.ETX&&ne.key!==I.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ne.key,domEvent:F}),this._showCursor(),this.coreService.triggerDataEvent(ne.key,!0),!this.optionsService.rawOptions.screenReaderMode||F.altKey||F.ctrlKey?this.cancel(F,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(F,k){const ne=F.isMac&&!this.options.macOptionIsMeta&&k.altKey&&!k.ctrlKey&&!k.metaKey||F.isWindows&&k.altKey&&k.ctrlKey&&!k.metaKey||F.isWindows&&k.getModifierState("AltGraph");return k.type==="keypress"?ne:ne&&(!k.keyCode||k.keyCode>47)}_keyUp(F){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1||((function(k){return k.keyCode===16||k.keyCode===17||k.keyCode===18})(F)||this.focus(),this.updateCursorStyle(F),this._keyPressHandled=!1)}_keyPress(F){let k;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;if(this.cancel(F),F.charCode)k=F.charCode;else if(F.which===null||F.which===void 0)k=F.keyCode;else{if(F.which===0||F.charCode===0)return!1;k=F.which}return!(!k||(F.altKey||F.ctrlKey||F.metaKey)&&!this._isThirdLevelShift(this.browser,F)||(k=String.fromCharCode(k),this._onKey.fire({key:k,domEvent:F}),this._showCursor(),this.coreService.triggerDataEvent(k,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(F){if(F.data&&F.inputType==="insertText"&&(!F.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const k=F.data;return this.coreService.triggerDataEvent(k,!0),this.cancel(F),!0}return!1}resize(F,k){F!==this.cols||k!==this.rows?super.resize(F,k):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(F,k){var ne,se;(ne=this._charSizeService)==null||ne.measure(),(se=this.viewport)==null||se.syncScrollArea(!0)}clear(){var F;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 k=1;k<this.rows;k++)this.buffer.lines.push(this.buffer.getBlankLine(N.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(F=this.viewport)==null||F.reset(),this.refresh(0,this.rows-1)}}reset(){var k,ne;this.options.rows=this.rows,this.options.cols=this.cols;const F=this._customKeyEventHandler;this._setup(),super.reset(),(k=this._selectionService)==null||k.reset(),this._decorationService.reset(),(ne=this.viewport)==null||ne.reset(),this._customKeyEventHandler=F,this.refresh(0,this.rows-1)}clearTextureAtlas(){var F;(F=this._renderService)==null||F.clearTextureAtlas()}_reportFocus(){var F;(F=this.element)!=null&&F.classList.contains("focus")?this.coreService.triggerDataEvent(I.C0.ESC+"[I"):this.coreService.triggerDataEvent(I.C0.ESC+"[O")}_reportWindowsOptions(F){if(this._renderService)switch(F){case O.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const k=this._renderService.dimensions.css.canvas.width.toFixed(0),ne=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[4;${ne};${k}t`);break;case O.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const se=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[6;${de};${se}t`)}}cancel(F,k){if(this.options.cancelEvents||k)return F.preventDefault(),F.stopPropagation(),!1}}n.Terminal=he},9924:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(d,_=1e3){this._renderCallback=d,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,_,v){this._rowCount=v,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;const o=Date.now();if(o-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=o,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=o-this._lastRefreshMs,y=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_)}}},1680:function(P,n,d){var _=this&&this.__decorate||function(h,l,c,g){var C,S=arguments.length,w=S<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,l,c,g);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(l,c,w):C(l,c))||w);return S>3&&w&&Object.defineProperty(l,c,w),w},v=this&&this.__param||function(h,l){return function(c,g){l(c,g,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const o=d(3656),m=d(4725),y=d(8460),b=d(844),f=d(2585);let r=n.Viewport=class extends b.Disposable{constructor(h,l,c,g,C,S,w,p){super(),this._viewportElement=h,this._scrollArea=l,this._bufferService=c,this._optionsService=g,this._charSizeService=C,this._renderService=S,this._coreBrowserService=w,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 y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,o.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((E=>this._activeBuffer=E.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((E=>this._renderDimensions=E))),this._handleThemeChange(p.colors),this.register(p.onChangeColors((E=>this._handleThemeChange(E)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.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(h){if(h)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 l=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==l&&(this._lastRecordedBufferHeight=l,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){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 l=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<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(h,l){const c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(l<0&&this._viewportElement.scrollTop!==0||l>0&&c<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const l=this._getPixelsScrolled(h);return l!==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+l:this._smoothScrollState.target+=l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const l=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?l*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._currentRowHeight*this._bufferService.rows),l}getBufferElements(h,l){var p;let c,g="";const C=[],S=l??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let E=h;E<S;E++){const L=w.get(E);if(!L)continue;const T=(p=w.get(E+1))==null?void 0:p.isWrapped;if(g+=L.translateToString(!T),!T||E===w.length-1){const A=document.createElement("div");A.textContent=g,C.push(A),g.length>0&&(c=A),g=""}}return{bufferElements:C,cursorElement:c}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(l/=this._currentRowHeight+0,this._wheelPartialScroll+=l,l=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._bufferService.rows),l}_applyScrollModifier(h,l){const c=this._optionsService.rawOptions.fastScrollModifier;return c==="alt"&&l.altKey||c==="ctrl"&&l.ctrlKey||c==="shift"&&l.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const l=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,l!==0&&(this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}};n.Viewport=r=_([v(2,f.IBufferService),v(3,f.IOptionsService),v(4,m.ICharSizeService),v(5,m.IRenderService),v(6,m.ICoreBrowserService),v(7,m.IThemeService)],r)},3107:function(P,n,d){var _=this&&this.__decorate||function(f,r,h,l){var c,g=arguments.length,C=g<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,r,h,l);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(C=(g<3?c(C):g>3?c(r,h,C):c(r,h))||C);return g>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(f,r){return function(h,l){r(h,l,f)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const o=d(4725),m=d(844),y=d(2585);let b=n.BufferDecorationRenderer=class extends m.Disposable{constructor(f,r,h,l,c){super(),this._screenElement=f,this._bufferService=r,this._coreBrowserService=h,this._decorationService=l,this._renderService=c,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((g=>this._removeDecoration(g)))),this.register((0,m.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 f of this._decorationService.decorations)this._renderDecoration(f);this._dimensionsChanged=!1}_renderDecoration(f){this._refreshStyle(f),this._dimensionsChanged&&this._refreshXPosition(f)}_createElement(f){var l;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((l=f==null?void 0:f.options)==null?void 0:l.layer)==="top"),r.style.width=`${Math.round((f.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(f.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(f.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=f.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(f,r),r}_refreshStyle(f){const r=f.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)f.element&&(f.element.style.display="none",f.onRenderEmitter.fire(f.element));else{let h=this._decorationElements.get(f);h||(h=this._createElement(f),f.element=h,this._decorationElements.set(f,h),this._container.appendChild(h),f.onDispose((()=>{this._decorationElements.delete(f),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",f.onRenderEmitter.fire(h)}}_refreshXPosition(f,r=f.element){if(!r)return;const h=f.options.x??0;(f.options.anchor||"left")==="right"?r.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":r.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(f){var r;(r=this._decorationElements.get(f))==null||r.remove(),this._decorationElements.delete(f),f.dispose()}};n.BufferDecorationRenderer=b=_([v(1,y.IBufferService),v(2,o.ICoreBrowserService),v(3,y.IDecorationService),v(4,o.IRenderService)],b)},5871:(P,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(d){if(d.options.overviewRulerOptions){for(const _ of this._zones)if(_.color===d.options.overviewRulerOptions.color&&_.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(_,d.marker.line))return;if(this._lineAdjacentToZone(_,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(_,d.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(d){this._linePadding=d}_lineIntersectsZone(d,_){return _>=d.startBufferLine&&_<=d.endBufferLine}_lineAdjacentToZone(d,_,v){return _>=d.startBufferLine-this._linePadding[v||"full"]&&_<=d.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(d,_){d.startBufferLine=Math.min(d.startBufferLine,_),d.endBufferLine=Math.max(d.endBufferLine,_)}}},5744:function(P,n,d){var _=this&&this.__decorate||function(c,g,C,S){var w,p=arguments.length,E=p<3?g:S===null?S=Object.getOwnPropertyDescriptor(g,C):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,g,C,S);else for(var L=c.length-1;L>=0;L--)(w=c[L])&&(E=(p<3?w(E):p>3?w(g,C,E):w(g,C))||E);return p>3&&E&&Object.defineProperty(g,C,E),E},v=this&&this.__param||function(c,g){return function(C,S){g(C,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const o=d(5871),m=d(4725),y=d(844),b=d(2585),f={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let l=n.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(c,g,C,S,w,p,E){var T;super(),this._viewportElement=c,this._screenElement=g,this._bufferService=C,this._decorationService=S,this._renderService=w,this._optionsService=p,this._coreBrowserService=E,this._colorZoneStore=new o.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(),(T=this._viewportElement.parentElement)==null||T.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var A;(A=this._canvas)==null||A.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 c=Math.floor(this._canvas.width/3),g=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=c,r.center=g,r.right=c,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){f.full=Math.round(2*this._coreBrowserService.dpr);const c=this._canvas.height/this._bufferService.buffer.lines.length,g=Math.round(Math.max(Math.min(c,12),6)*this._coreBrowserService.dpr);f.left=g,f.center=g,f.right=g}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.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 g of this._decorationService.decorations)this._colorZoneStore.addDecoration(g);this._ctx.lineWidth=1;const c=this._colorZoneStore.zones;for(const g of c)g.position!=="full"&&this._renderColorZone(g);for(const g of c)g.position==="full"&&this._renderColorZone(g);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(h[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-f[c.position||"full"]/2),r[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+f[c.position||"full"]))}_queueRefresh(c,g){this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=g||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=l=_([v(2,b.IBufferService),v(3,b.IDecorationService),v(4,m.IRenderService),v(5,b.IOptionsService),v(6,m.ICoreBrowserService)],l)},2950:function(P,n,d){var _=this&&this.__decorate||function(f,r,h,l){var c,g=arguments.length,C=g<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,r,h,l);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(C=(g<3?c(C):g>3?c(r,h,C):c(r,h))||C);return g>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(f,r){return function(h,l){r(h,l,f)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const o=d(4725),m=d(2585),y=d(2584);let b=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(f,r,h,l,c,g){this._textarea=f,this._compositionView=r,this._bufferService=h,this._optionsService=l,this._coreService=c,this._renderService=g,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(f){this._compositionView.textContent=f.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(f){if(this._isComposing||this._isSendingComposition){if(f.keyCode===229||f.keyCode===16||f.keyCode===17||f.keyCode===18)return!1;this._finalizeComposition(!1)}return f.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(f){if(this._compositionView.classList.remove("active"),this._isComposing=!1,f){const r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,r.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(r.start,r.end):this._textarea.value.substring(r.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}}_handleAnyTextareaChanges(){const f=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(f,"");this._dataAlreadySent=h,r.length>f.length?this._coreService.triggerDataEvent(h,!0):r.length<f.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):r.length===f.length&&r!==f&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(f){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,l=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,c=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=c+"px",this._compositionView.style.top=l+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const g=this._compositionView.getBoundingClientRect();this._textarea.style.left=c+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(g.width,1)+"px",this._textarea.style.height=Math.max(g.height,1)+"px",this._textarea.style.lineHeight=g.height+"px"}f||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=b=_([v(2,m.IBufferService),v(3,m.IOptionsService),v(4,m.ICoreService),v(5,o.IRenderService)],b)},9806:(P,n)=>{function d(_,v,o){const m=o.getBoundingClientRect(),y=_.getComputedStyle(o),b=parseInt(y.getPropertyValue("padding-left")),f=parseInt(y.getPropertyValue("padding-top"));return[v.clientX-m.left-b,v.clientY-m.top-f]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=d,n.getCoords=function(_,v,o,m,y,b,f,r,h){if(!b)return;const l=d(_,v,o);return l?(l[0]=Math.ceil((l[0]+(h?f/2:0))/f),l[1]=Math.ceil(l[1]/r),l[0]=Math.min(Math.max(l[0],1),m+(h?1:0)),l[1]=Math.min(Math.max(l[1],1),y),l):void 0}},9504:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const _=d(2584);function v(r,h,l,c){const g=r-o(r,l),C=h-o(h,l),S=Math.abs(g-C)-(function(w,p,E){let L=0;const T=w-o(w,E),A=p-o(p,E);for(let M=0;M<Math.abs(T-A);M++){const z=m(w,p)==="A"?-1:1,Y=E.buffer.lines.get(T+z*M);Y!=null&&Y.isWrapped&&L++}return L})(r,h,l);return f(S,b(m(r,h),c))}function o(r,h){let l=0,c=h.buffer.lines.get(r),g=c==null?void 0:c.isWrapped;for(;g&&r>=0&&r<h.rows;)l++,c=h.buffer.lines.get(--r),g=c==null?void 0:c.isWrapped;return l}function m(r,h){return r>h?"A":"B"}function y(r,h,l,c,g,C){let S=r,w=h,p="";for(;S!==l||w!==c;)S+=g?1:-1,g&&S>C.cols-1?(p+=C.buffer.translateBufferLineToString(w,!1,r,S),S=0,r=0,w++):!g&&S<0&&(p+=C.buffer.translateBufferLineToString(w,!1,0,r+1),S=C.cols-1,r=S,w--);return p+C.buffer.translateBufferLineToString(w,!1,r,S)}function b(r,h){const l=h?"O":"[";return _.C0.ESC+l+r}function f(r,h){r=Math.floor(r);let l="";for(let c=0;c<r;c++)l+=h;return l}n.moveToCellSequence=function(r,h,l,c){const g=l.buffer.x,C=l.buffer.y;if(!l.buffer.hasScrollback)return(function(p,E,L,T,A,M){return v(E,T,A,M).length===0?"":f(y(p,E,p,E-o(E,A),!1,A).length,b("D",M))})(g,C,0,h,l,c)+v(C,h,l,c)+(function(p,E,L,T,A,M){let z;z=v(E,T,A,M).length>0?T-o(T,A):E;const Y=T,N=(function(I,G,D,H,R,O){let X;return X=v(D,H,R,O).length>0?H-o(H,R):G,I<D&&X<=H||I>=D&&X<H?"C":"D"})(p,E,L,T,A,M);return f(y(p,z,L,Y,N==="C",A).length,b(N,M))})(g,C,r,h,l,c);let S;if(C===h)return S=g>r?"D":"C",f(Math.abs(g-r),b(S,c));S=C>h?"D":"C";const w=Math.abs(C-h);return f((function(p,E){return E.cols-p})(C>h?r:g,l)+(w-1)*l.cols+1+((C>h?g:r)-1),b(S,c))}},1296:function(P,n,d){var _=this&&this.__decorate||function(M,z,Y,N){var I,G=arguments.length,D=G<3?z:N===null?N=Object.getOwnPropertyDescriptor(z,Y):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(M,z,Y,N);else for(var H=M.length-1;H>=0;H--)(I=M[H])&&(D=(G<3?I(D):G>3?I(z,Y,D):I(z,Y))||D);return G>3&&D&&Object.defineProperty(z,Y,D),D},v=this&&this.__param||function(M,z){return function(Y,N){z(Y,N,M)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const o=d(3787),m=d(2550),y=d(2223),b=d(6171),f=d(6052),r=d(4725),h=d(8055),l=d(8460),c=d(844),g=d(2585),C="xterm-dom-renderer-owner-",S="xterm-rows",w="xterm-fg-",p="xterm-bg-",E="xterm-focus",L="xterm-selection";let T=1,A=n.DomRenderer=class extends c.Disposable{constructor(M,z,Y,N,I,G,D,H,R,O,X,Z,he){super(),this._terminal=M,this._document=z,this._element=Y,this._screenElement=N,this._viewportElement=I,this._helperContainer=G,this._linkifier2=D,this._charSizeService=R,this._optionsService=O,this._bufferService=X,this._coreBrowserService=Z,this._themeService=he,this._terminalClass=T++,this._rowElements=[],this._selectionRenderModel=(0,f.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new l.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(S),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(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,b.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=H.createInstance(o.DomRendererRowFactory,document),this._element.classList.add(C+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,c.toDisposable)((()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.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 M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),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/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),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 Y of this._rowElements)Y.style.width=`${this.dimensions.css.canvas.width}px`,Y.style.height=`${this.dimensions.css.cell.height}px`,Y.style.lineHeight=`${this.dimensions.css.cell.height}px`,Y.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const z=`${this._terminalSelector} .${S} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=z,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(M){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let z=`${this._terminalSelector} .${S} { color: ${M.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;z+=`${this._terminalSelector} .${S} .xterm-dim { color: ${h.color.multiplyOpacity(M.foreground,.5).css};}`,z+=`${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 Y=`blink_underline_${this._terminalClass}`,N=`blink_bar_${this._terminalClass}`,I=`blink_block_${this._terminalClass}`;z+=`@keyframes ${Y} { 50% { border-bottom-style: hidden; }}`,z+=`@keyframes ${N} { 50% { box-shadow: none; }}`,z+=`@keyframes ${I} { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,z+=`${this._terminalSelector} .${S}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${S}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${N} 1s step-end infinite;}${this._terminalSelector} .${S}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${I} 1s step-end infinite;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${M.cursor.css} !important; color: ${M.cursorAccent.css} !important;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,z+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[G,D]of M.ansi.entries())z+=`${this._terminalSelector} .${w}${G} { color: ${D.css}; }${this._terminalSelector} .${w}${G}.xterm-dim { color: ${h.color.multiplyOpacity(D,.5).css}; }${this._terminalSelector} .${p}${G} { background-color: ${D.css}; }`;z+=`${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(M.background).css}; }${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${p}${y.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=z}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,z){for(let Y=this._rowElements.length;Y<=z;Y++){const N=this._document.createElement("div");this._rowContainer.appendChild(N),this._rowElements.push(N)}for(;this._rowElements.length>z;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,z){this._refreshRowElements(M,z),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(E),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(E),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(M,z,Y){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,z,Y),this.renderRows(0,this._bufferService.rows-1),!M||!z)return;this._selectionRenderModel.update(this._terminal,M,z,Y);const N=this._selectionRenderModel.viewportStartRow,I=this._selectionRenderModel.viewportEndRow,G=this._selectionRenderModel.viewportCappedStartRow,D=this._selectionRenderModel.viewportCappedEndRow;if(G>=this._bufferService.rows||D<0)return;const H=this._document.createDocumentFragment();if(Y){const R=M[0]>z[0];H.appendChild(this._createSelectionElement(G,R?z[0]:M[0],R?M[0]:z[0],D-G+1))}else{const R=N===G?M[0]:0,O=G===I?z[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(G,R,O));const X=D-G-1;if(H.appendChild(this._createSelectionElement(G+1,0,this._bufferService.cols,X)),G!==D){const Z=I===D?z[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(D,0,Z))}}this._selectionContainer.appendChild(H)}_createSelectionElement(M,z,Y,N=1){const I=this._document.createElement("div"),G=z*this.dimensions.css.cell.width;let D=this.dimensions.css.cell.width*(Y-z);return G+D>this.dimensions.css.canvas.width&&(D=this.dimensions.css.canvas.width-G),I.style.height=N*this.dimensions.css.cell.height+"px",I.style.top=M*this.dimensions.css.cell.height+"px",I.style.left=`${G}px`,I.style.width=`${D}px`,I}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 M of this._rowElements)M.replaceChildren()}renderRows(M,z){const Y=this._bufferService.buffer,N=Y.ybase+Y.y,I=Math.min(Y.x,this._bufferService.cols-1),G=this._optionsService.rawOptions.cursorBlink,D=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let R=M;R<=z;R++){const O=R+Y.ydisp,X=this._rowElements[R],Z=Y.lines.get(O);if(!X||!Z)break;X.replaceChildren(...this._rowFactory.createRow(Z,O,O===N,D,H,I,G,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,z,Y,N,I,G){Y<0&&(M=0),N<0&&(z=0);const D=this._bufferService.rows-1;Y=Math.max(Math.min(Y,D),0),N=Math.max(Math.min(N,D),0),I=Math.min(I,this._bufferService.cols);const H=this._bufferService.buffer,R=H.ybase+H.y,O=Math.min(H.x,I-1),X=this._optionsService.rawOptions.cursorBlink,Z=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=Y;ue<=N;++ue){const F=ue+H.ydisp,k=this._rowElements[ue],ne=H.lines.get(F);if(!k||!ne)break;k.replaceChildren(...this._rowFactory.createRow(ne,F,F===R,Z,he,O,X,this.dimensions.css.cell.width,this._widthCache,G?ue===Y?M:0:-1,G?(ue===N?z:I)-1:-1))}}};n.DomRenderer=A=_([v(7,g.IInstantiationService),v(8,r.ICharSizeService),v(9,g.IOptionsService),v(10,g.IBufferService),v(11,r.ICoreBrowserService),v(12,r.IThemeService)],A)},3787:function(P,n,d){var _=this&&this.__decorate||function(S,w,p,E){var L,T=arguments.length,A=T<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,p):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,w,p,E);else for(var M=S.length-1;M>=0;M--)(L=S[M])&&(A=(T<3?L(A):T>3?L(w,p,A):L(w,p))||A);return T>3&&A&&Object.defineProperty(w,p,A),A},v=this&&this.__param||function(S,w){return function(p,E){w(p,E,S)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const o=d(2223),m=d(643),y=d(511),b=d(2585),f=d(8055),r=d(4725),h=d(4269),l=d(6171),c=d(3734);let g=n.DomRendererRowFactory=class{constructor(S,w,p,E,L,T,A){this._document=S,this._characterJoinerService=w,this._optionsService=p,this._coreBrowserService=E,this._coreService=L,this._decorationService=T,this._themeService=A,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(S,w,p){this._selectionStart=S,this._selectionEnd=w,this._columnSelectMode=p}createRow(S,w,p,E,L,T,A,M,z,Y,N){const I=[],G=this._characterJoinerService.getJoinedCharacters(w),D=this._themeService.colors;let H,R=S.getNoBgTrimmedLength();p&&R<T+1&&(R=T+1);let O=0,X="",Z=0,he=0,ue=0,F=!1,k=0,ne=!1,se=0;const de=[],fe=Y!==-1&&N!==-1;for(let we=0;we<R;we++){S.loadCell(we,this._workCell);let me=this._workCell.getWidth();if(me===0)continue;let Ne=!1,Ke=we,ye=this._workCell;if(G.length>0&&we===G[0][0]){Ne=!0;const Re=G.shift();ye=new h.JoinedCellData(this._workCell,S.translateToString(!0,Re[0],Re[1]),Re[1]-Re[0]),Ke=Re[1]-1,me=ye.getWidth()}const Dt=this._isCellInSelection(we,w),Jt=p&&we===T,Be=fe&&we>=Y&&we<=N;let Ae=!1;this._decorationService.forEachDecorationAtCell(we,w,void 0,(Re=>{Ae=!0}));let De=ye.getChars()||m.WHITESPACE_CELL_CHAR;if(De===" "&&(ye.isUnderline()||ye.isOverline())&&(De=" "),se=me*M-z.get(De,ye.isBold(),ye.isItalic()),H){if(O&&(Dt&&ne||!Dt&&!ne&&ye.bg===Z)&&(Dt&&ne&&D.selectionForeground||ye.fg===he)&&ye.extended.ext===ue&&Be===F&&se===k&&!Jt&&!Ne&&!Ae){ye.isInvisible()?X+=m.WHITESPACE_CELL_CHAR:X+=De,O++;continue}O&&(H.textContent=X),H=this._document.createElement("span"),O=0,X=""}else H=this._document.createElement("span");if(Z=ye.bg,he=ye.fg,ue=ye.extended.ext,F=Be,k=se,ne=Dt,Ne&&T>=we&&T<=Ke&&(T=we),!this._coreService.isCursorHidden&&Jt&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)A&&de.push("xterm-cursor-blink"),de.push(E==="bar"?"xterm-cursor-bar":E==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":de.push("xterm-cursor-outline");break;case"block":de.push("xterm-cursor-block");break;case"bar":de.push("xterm-cursor-bar");break;case"underline":de.push("xterm-cursor-underline")}}if(ye.isBold()&&de.push("xterm-bold"),ye.isItalic()&&de.push("xterm-italic"),ye.isDim()&&de.push("xterm-dim"),X=ye.isInvisible()?m.WHITESPACE_CELL_CHAR:ye.getChars()||m.WHITESPACE_CELL_CHAR,ye.isUnderline()&&(de.push(`xterm-underline-${ye.extended.underlineStyle}`),X===" "&&(X=" "),!ye.isUnderlineColorDefault()))if(ye.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${c.AttributeData.toColorRGB(ye.getUnderlineColor()).join(",")})`;else{let Re=ye.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ye.isBold()&&Re<8&&(Re+=8),H.style.textDecorationColor=D.ansi[Re].css}ye.isOverline()&&(de.push("xterm-overline"),X===" "&&(X=" ")),ye.isStrikethrough()&&de.push("xterm-strikethrough"),Be&&(H.style.textDecoration="underline");let _e=ye.getFgColor(),Ce=ye.getFgColorMode(),Qe=ye.getBgColor(),Pe=ye.getBgColorMode();const Ut=!!ye.isInverse();if(Ut){const Re=_e;_e=Qe,Qe=Re;const Vt=Ce;Ce=Pe,Pe=Vt}let ot,bt,Je,qe=!1;switch(this._decorationService.forEachDecorationAtCell(we,w,void 0,(Re=>{Re.options.layer!=="top"&&qe||(Re.backgroundColorRGB&&(Pe=50331648,Qe=Re.backgroundColorRGB.rgba>>8&16777215,ot=Re.backgroundColorRGB),Re.foregroundColorRGB&&(Ce=50331648,_e=Re.foregroundColorRGB.rgba>>8&16777215,bt=Re.foregroundColorRGB),qe=Re.options.layer==="top")})),!qe&&Dt&&(ot=this._coreBrowserService.isFocused?D.selectionBackgroundOpaque:D.selectionInactiveBackgroundOpaque,Qe=ot.rgba>>8&16777215,Pe=50331648,qe=!0,D.selectionForeground&&(Ce=50331648,_e=D.selectionForeground.rgba>>8&16777215,bt=D.selectionForeground)),qe&&de.push("xterm-decoration-top"),Pe){case 16777216:case 33554432:Je=D.ansi[Qe],de.push(`xterm-bg-${Qe}`);break;case 50331648:Je=f.channels.toColor(Qe>>16,Qe>>8&255,255&Qe),this._addStyle(H,`background-color:#${C((Qe>>>0).toString(16),"0",6)}`);break;default:Ut?(Je=D.foreground,de.push(`xterm-bg-${o.INVERTED_DEFAULT_COLOR}`)):Je=D.background}switch(ot||ye.isDim()&&(ot=f.color.multiplyOpacity(Je,.5)),Ce){case 16777216:case 33554432:ye.isBold()&&_e<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(_e+=8),this._applyMinimumContrast(H,Je,D.ansi[_e],ye,ot,void 0)||de.push(`xterm-fg-${_e}`);break;case 50331648:const Re=f.channels.toColor(_e>>16&255,_e>>8&255,255&_e);this._applyMinimumContrast(H,Je,Re,ye,ot,bt)||this._addStyle(H,`color:#${C(_e.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,Je,D.foreground,ye,ot,bt)||Ut&&de.push(`xterm-fg-${o.INVERTED_DEFAULT_COLOR}`)}de.length&&(H.className=de.join(" "),de.length=0),Jt||Ne||Ae?H.textContent=X:O++,se!==this.defaultSpacing&&(H.style.letterSpacing=`${se}px`),I.push(H),we=Ke}return H&&O&&(H.textContent=X),I}_applyMinimumContrast(S,w,p,E,L,T){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,l.treatGlyphAsBackgroundColor)(E.getCode()))return!1;const A=this._getContrastCache(E);let M;if(L||T||(M=A.getColor(w.rgba,p.rgba)),M===void 0){const z=this._optionsService.rawOptions.minimumContrastRatio/(E.isDim()?2:1);M=f.color.ensureContrastRatio(L||w,T||p,z),A.setColor((L||w).rgba,(T||p).rgba,M??null)}return!!M&&(this._addStyle(S,`color:${M.css}`),!0)}_getContrastCache(S){return S.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(S,w){S.setAttribute("style",`${S.getAttribute("style")||""}${w};`)}_isCellInSelection(S,w){const p=this._selectionStart,E=this._selectionEnd;return!(!p||!E)&&(this._columnSelectMode?p[0]<=E[0]?S>=p[0]&&w>=p[1]&&S<E[0]&&w<=E[1]:S<p[0]&&w>=p[1]&&S>=E[0]&&w<=E[1]:w>p[1]&&w<E[1]||p[1]===E[1]&&w===p[1]&&S>=p[0]&&S<E[0]||p[1]<E[1]&&w===E[1]&&S<E[0]||p[1]<E[1]&&w===p[1]&&S>=p[0])}};function C(S,w,p){for(;S.length<p;)S=w+S;return S}n.DomRendererRowFactory=g=_([v(1,r.ICharacterJoinerService),v(2,b.IOptionsService),v(3,r.ICoreBrowserService),v(4,b.ICoreService),v(5,b.IDecorationService),v(6,r.IThemeService)],g)},2550:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(d,_){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=d.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 v=d.createElement("span");v.classList.add("xterm-char-measure-element");const o=d.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold";const m=d.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const y=d.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[v,o,m,y],this._container.appendChild(v),this._container.appendChild(o),this._container.appendChild(m),this._container.appendChild(y),_.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(d,_,v,o){d===this._font&&_===this._fontSize&&v===this._weight&&o===this._weightBold||(this._font=d,this._fontSize=_,this._weight=v,this._weightBold=o,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${o}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${o}`,this.clear())}get(d,_,v){let o=0;if(!_&&!v&&d.length===1&&(o=d.charCodeAt(0))<256){if(this._flat[o]!==-9999)return this._flat[o];const b=this._measure(d,0);return b>0&&(this._flat[o]=b),b}let m=d;_&&(m+="B"),v&&(m+="I");let y=this._holey.get(m);if(y===void 0){let b=0;_&&(b|=1),v&&(b|=2),y=this._measure(d,b),y>0&&this._holey.set(m,y)}return y}_measure(d,_){const v=this._measureElements[_];return v.textContent=d.repeat(32),v.offsetWidth/32}}},2223:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const _=d(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},6171:(P,n)=>{function d(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=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(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=d,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=_,n.allowRescaling=function(v,o,m,y){return o===1&&m>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!_(v)&&!d(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return d(v)||(function(o){return 9472<=o&&o<=9631})(v)},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(v,o,m=0){return(v-(2*Math.round(o)-m))%(2*Math.round(o))}},6052:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class d{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(v,o,m,y=!1){if(this.selectionStart=o,this.selectionEnd=m,!o||!m||o[0]===m[0]&&o[1]===m[1])return void this.clear();const b=v.buffers.active.ydisp,f=o[1]-b,r=m[1]-b,h=Math.max(f,0),l=Math.min(r,v.rows-1);h>=v.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=f,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=o[0],this.endCol=m[0])}isCellSelected(v,o,m){return!!this.hasSelection&&(m-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?o>=this.startCol&&m>=this.viewportCappedStartRow&&o<this.endCol&&m<=this.viewportCappedEndRow:o<this.startCol&&m>=this.viewportCappedStartRow&&o>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&o>=this.startCol&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&o>=this.startCol)}}n.createSelectionRenderModel=function(){return new d}},456:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(d){this._bufferService=d,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 d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const d=this.selectionStart,_=this.selectionEnd;return!(!d||!_)&&(d[1]>_[1]||d[1]===_[1]&&d[0]>_[0])}handleTrim(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(P,n,d){var _=this&&this.__decorate||function(l,c,g,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,g):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,g,C);else for(var E=l.length-1;E>=0;E--)(S=l[E])&&(p=(w<3?S(p):w>3?S(c,g,p):S(c,g))||p);return w>3&&p&&Object.defineProperty(c,g,p),p},v=this&&this.__param||function(l,c){return function(g,C){c(g,C,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const o=d(2585),m=d(8460),y=d(844);let b=n.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,c,g){super(),this._optionsService=g,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(l,c,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};n.CharSizeService=b=_([v(2,o.IOptionsService)],b);class f extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(c,g){c!==void 0&&c>0&&g!==void 0&&g>0&&(this._result.width=c,this._result.height=g)}}class r extends f{constructor(c,g,C){super(),this._document=c,this._parentElement=g,this._optionsService=C,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 h extends f{constructor(c){super(),this._optionsService=c,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const g=this._ctx.measureText("W");if(!("width"in g&&"fontBoundingBoxAscent"in g&&"fontBoundingBoxDescent"in g))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const c=this._ctx.measureText("W");return this._validateAndSet(c.width,c.fontBoundingBoxAscent+c.fontBoundingBoxDescent),this._result}}},4269:function(P,n,d){var _=this&&this.__decorate||function(h,l,c,g){var C,S=arguments.length,w=S<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,l,c,g);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(l,c,w):C(l,c))||w);return S>3&&w&&Object.defineProperty(l,c,w),w},v=this&&this.__param||function(h,l){return function(c,g){l(c,g,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const o=d(3734),m=d(643),y=d(511),b=d(2585);class f extends o.AttributeData{constructor(l,c,g){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=c,this._width=g}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=f;let r=n.CharacterJoinerService=class td{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(l){const c={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(c),c.id}deregister(l){for(let c=0;c<this._characterJoiners.length;c++)if(this._characterJoiners[c].id===l)return this._characterJoiners.splice(c,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const c=this._bufferService.buffer.lines.get(l);if(!c||c.length===0)return[];const g=[],C=c.translateToString(!0);let S=0,w=0,p=0,E=c.getFg(0),L=c.getBg(0);for(let T=0;T<c.getTrimmedLength();T++)if(c.loadCell(T,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==L){if(T-S>1){const A=this._getJoinedRanges(C,p,w,c,S);for(let M=0;M<A.length;M++)g.push(A[M])}S=T,p=w,E=this._workCell.fg,L=this._workCell.bg}w+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-S>1){const T=this._getJoinedRanges(C,p,w,c,S);for(let A=0;A<T.length;A++)g.push(T[A])}return g}_getJoinedRanges(l,c,g,C,S){const w=l.substring(c,g);let p=[];try{p=this._characterJoiners[0].handler(w)}catch(E){console.error(E)}for(let E=1;E<this._characterJoiners.length;E++)try{const L=this._characterJoiners[E].handler(w);for(let T=0;T<L.length;T++)td._mergeRanges(p,L[T])}catch(L){console.error(L)}return this._stringRangesToCellRanges(p,C,S),p}_stringRangesToCellRanges(l,c,g){let C=0,S=!1,w=0,p=l[C];if(p){for(let E=g;E<this._bufferService.cols;E++){const L=c.getWidth(E),T=c.getString(E).length||m.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!S&&p[0]<=w&&(p[0]=E,S=!0),p[1]<=w){if(p[1]=E,p=l[++C],!p)break;p[0]<=w?(p[0]=E,S=!0):S=!1}w+=T}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(l,c){let g=!1;for(let C=0;C<l.length;C++){const S=l[C];if(g){if(c[1]<=S[0])return l[C-1][1]=c[1],l;if(c[1]<=S[1])return l[C-1][1]=Math.max(c[1],S[1]),l.splice(C,1),l;l.splice(C,1),C--}else{if(c[1]<=S[0])return l.splice(C,0,c),l;if(c[1]<=S[1])return S[0]=Math.min(c[0],S[0]),l;c[0]<S[1]&&(S[0]=Math.min(c[0],S[0]),g=!0)}}return g?l[l.length-1][1]=c[1]:l.push(c),l}};n.CharacterJoinerService=r=_([v(0,b.IBufferService)],r)},5114:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const _=d(844),v=d(8460),o=d(3656);class m extends _.Disposable{constructor(f,r,h){super(),this._textarea=f,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((l=>this._screenDprMonitor.setWindow(l)))),this.register((0,v.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(f){this._window!==f&&(this._window=f,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=m;class y extends _.Disposable{constructor(f){super(),this._parentWindow=f,this._windowResizeListener=this.register(new _.MutableDisposable),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,_.toDisposable)((()=>this.clearListener())))}setWindow(f){this._parentWindow=f,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,o.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var f;this._outerListener&&((f=this._resolutionMediaMatchList)==null||f.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:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const _=d(844);class v extends _.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,_.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const y=this.linkProviders.indexOf(m);y!==-1&&this.linkProviders.splice(y,1)}}}}n.LinkProviderService=v},8934:function(P,n,d){var _=this&&this.__decorate||function(b,f,r,h){var l,c=arguments.length,g=c<3?f:h===null?h=Object.getOwnPropertyDescriptor(f,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(b,f,r,h);else for(var C=b.length-1;C>=0;C--)(l=b[C])&&(g=(c<3?l(g):c>3?l(f,r,g):l(f,r))||g);return c>3&&g&&Object.defineProperty(f,r,g),g},v=this&&this.__param||function(b,f){return function(r,h){f(r,h,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const o=d(4725),m=d(9806);let y=n.MouseService=class{constructor(b,f){this._renderService=b,this._charSizeService=f}getCoords(b,f,r,h,l){return(0,m.getCoords)(window,b,f,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(b,f){const r=(0,m.getCoordsRelativeToElement)(window,b,f);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};n.MouseService=y=_([v(0,o.IRenderService),v(1,o.ICharSizeService)],y)},3230:function(P,n,d){var _=this&&this.__decorate||function(l,c,g,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,g):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,g,C);else for(var E=l.length-1;E>=0;E--)(S=l[E])&&(p=(w<3?S(p):w>3?S(c,g,p):S(c,g))||p);return w>3&&p&&Object.defineProperty(c,g,p),p},v=this&&this.__param||function(l,c){return function(g,C){c(g,C,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const o=d(6193),m=d(4725),y=d(8460),b=d(844),f=d(7226),r=d(2585);let h=n.RenderService=class extends b.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(l,c,g,C,S,w,p,E){super(),this._rowCount=l,this._charSizeService=C,this._renderer=this.register(new b.MutableDisposable),this._pausedResizeTask=new f.DebouncedIdleTask,this._observerDisposable=this.register(new b.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 y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new o.RenderDebouncer(((L,T)=>this._renderRows(L,T)),p),this.register(this._renderDebouncer),this.register(p.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(g.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(S.onDecorationRegistered((()=>this._fullRefresh()))),this.register(S.onDecorationRemoved((()=>this._fullRefresh()))),this.register(g.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(g.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(E.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(p.window,c),this.register(p.onWindowChange((L=>this._registerIntersectionObserver(L,c))))}_registerIntersectionObserver(l,c){if("IntersectionObserver"in l){const g=new l.IntersectionObserver((C=>this._handleIntersectionChange(C[C.length-1])),{threshold:0});g.observe(c),this._observerDisposable.value=(0,b.toDisposable)((()=>g.disconnect()))}}_handleIntersectionChange(l){this._isPaused=l.isIntersecting===void 0?l.intersectionRatio===0:!l.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(l,c,g=!1){this._isPaused?this._needsFullRefresh=!0:(g||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,c,this._rowCount))}_renderRows(l,c){this._renderer.value&&(l=Math.min(l,this._rowCount-1),c=Math.min(c,this._rowCount-1),this._renderer.value.renderRows(l,c),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:l,end:c}),this._onRender.fire({start:l,end:c}),this._isNextRenderRedrawOnly=!0)}resize(l,c){this._rowCount=c,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(l){this._renderer.value=l,this._renderer.value&&(this._renderer.value.onRequestRedraw((c=>this.refreshRows(c.start,c.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(l){return this._renderDebouncer.addRefreshCallback(l)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var l,c;this._renderer.value&&((c=(l=this._renderer.value).clearTextureAtlas)==null||c.call(l),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(l,c){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var g;return(g=this._renderer.value)==null?void 0:g.handleResize(l,c)})):this._renderer.value.handleResize(l,c),this._fullRefresh())}handleCharSizeChanged(){var l;(l=this._renderer.value)==null||l.handleCharSizeChanged()}handleBlur(){var l;(l=this._renderer.value)==null||l.handleBlur()}handleFocus(){var l;(l=this._renderer.value)==null||l.handleFocus()}handleSelectionChanged(l,c,g){var C;this._selectionState.start=l,this._selectionState.end=c,this._selectionState.columnSelectMode=g,(C=this._renderer.value)==null||C.handleSelectionChanged(l,c,g)}handleCursorMove(){var l;(l=this._renderer.value)==null||l.handleCursorMove()}clear(){var l;(l=this._renderer.value)==null||l.clear()}};n.RenderService=h=_([v(2,r.IOptionsService),v(3,m.ICharSizeService),v(4,r.IDecorationService),v(5,r.IBufferService),v(6,m.ICoreBrowserService),v(7,m.IThemeService)],h)},9312:function(P,n,d){var _=this&&this.__decorate||function(p,E,L,T){var A,M=arguments.length,z=M<3?E:T===null?T=Object.getOwnPropertyDescriptor(E,L):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(p,E,L,T);else for(var Y=p.length-1;Y>=0;Y--)(A=p[Y])&&(z=(M<3?A(z):M>3?A(E,L,z):A(E,L))||z);return M>3&&z&&Object.defineProperty(E,L,z),z},v=this&&this.__param||function(p,E){return function(L,T){E(L,T,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const o=d(9806),m=d(9504),y=d(456),b=d(4725),f=d(8460),r=d(844),h=d(6114),l=d(4841),c=d(511),g=d(2585),C=" ",S=new RegExp(C,"g");let w=n.SelectionService=class extends r.Disposable{constructor(p,E,L,T,A,M,z,Y,N){super(),this._element=p,this._screenElement=E,this._linkifier=L,this._bufferService=T,this._coreService=A,this._mouseService=M,this._optionsService=z,this._renderService=Y,this._coreBrowserService=N,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new c.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new f.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new f.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new f.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new f.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=I=>this._handleMouseMove(I),this._mouseUpListener=I=>this._handleMouseUp(I),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((I=>this._handleTrim(I))),this.register(this._bufferService.buffers.onBufferActivate((I=>this._handleBufferActivate(I)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,r.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 p=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;return!(!p||!E||p[0]===E[0]&&p[1]===E[1])}get selectionText(){const p=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;if(!p||!E)return"";const L=this._bufferService.buffer,T=[];if(this._activeSelectionMode===3){if(p[0]===E[0])return"";const A=p[0]<E[0]?p[0]:E[0],M=p[0]<E[0]?E[0]:p[0];for(let z=p[1];z<=E[1];z++){const Y=L.translateBufferLineToString(z,!0,A,M);T.push(Y)}}else{const A=p[1]===E[1]?E[0]:void 0;T.push(L.translateBufferLineToString(p[1],!0,p[0],A));for(let M=p[1]+1;M<=E[1]-1;M++){const z=L.lines.get(M),Y=L.translateBufferLineToString(M,!0);z!=null&&z.isWrapped?T[T.length-1]+=Y:T.push(Y)}if(p[1]!==E[1]){const M=L.lines.get(E[1]),z=L.translateBufferLineToString(E[1],!0,0,E[0]);M&&M.isWrapped?T[T.length-1]+=z:T.push(z)}}return T.map((A=>A.replace(S," "))).join(h.isWindows?`\r
|
|
53
|
+
WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=y=_([v(0,m.IBufferService),v(1,m.IOptionsService),v(2,m.IOscLinkService)],y)},6193:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(d,_){this._renderCallback=d,this._coreBrowserService=_,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(d){return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(d,_,v){this._rowCount=v,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,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 d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},3236:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const _=d(3614),v=d(3656),l=d(3551),m=d(9042),y=d(3730),b=d(1680),f=d(3107),r=d(5744),h=d(2950),o=d(1296),c=d(428),g=d(4269),C=d(5114),S=d(8934),w=d(3230),p=d(9312),E=d(4725),L=d(6731),T=d(8055),A=d(8969),M=d(8460),N=d(844),X=d(6114),z=d(8437),I=d(2584),G=d(7399),D=d(5941),H=d(9074),R=d(2585),O=d(5435),$=d(4567),Q=d(779);class he extends A.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(F={}){super(F),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new N.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(R.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Q.LinkProviderService),this._instantiationService.setService(E.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((k,re)=>this.refresh(k,re)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((k=>this._reportWindowsOptions(k)))),this.register(this._inputHandler.onColor((k=>this._handleColorEvent(k)))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((k=>this._afterResize(k.cols,k.rows)))),this.register((0,N.toDisposable)((()=>{var k,re;this._customKeyEventHandler=void 0,(re=(k=this.element)==null?void 0:k.parentNode)==null||re.removeChild(this.element)})))}_handleColorEvent(F){if(this._themeService)for(const k of F){let re,se="";switch(k.index){case 256:re="foreground",se="10";break;case 257:re="background",se="11";break;case 258:re="cursor",se="12";break;default:re="ansi",se="4;"+k.index}switch(k.type){case 0:const de=T.color.toColorRGB(re==="ansi"?this._themeService.colors.ansi[k.index]:this._themeService.colors[re]);this.coreService.triggerDataEvent(`${I.C0.ESC}]${se};${(0,D.toRgbString)(de)}${I.C1_ESCAPED.ST}`);break;case 1:if(re==="ansi")this._themeService.modifyColors((fe=>fe.ansi[k.index]=T.channels.toColor(...k.color)));else{const fe=re;this._themeService.modifyColors((we=>we[fe]=T.channels.toColor(...k.color)))}break;case 2:this._themeService.restoreColor(k.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(F){F?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance($.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(F){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var F;return(F=this.textarea)==null?void 0:F.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.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 F=this.buffer.ybase+this.buffer.y,k=this.buffer.lines.get(F);if(!k)return;const re=Math.min(this.buffer.x,this.cols-1),se=this._renderService.dimensions.css.cell.height,de=k.getWidth(re),fe=this._renderService.dimensions.css.cell.width*de,we=this.buffer.y*this._renderService.dimensions.css.cell.height,me=re*this._renderService.dimensions.css.cell.width;this.textarea.style.left=me+"px",this.textarea.style.top=we+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=se+"px",this.textarea.style.lineHeight=se+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(k=>{this.hasSelection()&&(0,_.copyHandler)(k,this._selectionService)})));const F=k=>(0,_.handlePasteEvent)(k,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",F)),this.register((0,v.addDisposableDomListener)(this.element,"paste",F)),X.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(k=>{k.button===2&&(0,_.rightClickHandler)(k,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(k=>{(0,_.rightClickHandler)(k,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(k=>{k.button===1&&(0,_.moveTextAreaUnderMouseCursor)(k,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(F=>this._keyUp(F)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(F=>this._keyDown(F)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(F=>this._keyPress(F)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(F=>this._compositionHelper.compositionupdate(F)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(F=>this._inputEvent(F)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(F){var re;if(!F)throw new Error("Terminal requires a parent element.");if(F.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((re=this.element)==null?void 0:re.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=F.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"),F.appendChild(this.element);const k=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),k.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,v.addDisposableDomListener)(this.screenElement,"mousemove",(se=>this.updateCursorStyle(se)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),k.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.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(C.CoreBrowserService,this.textarea,F.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(E.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(se=>this._handleTextAreaFocus(se)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(c.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(E.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(E.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(g.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((se=>this._onRender.fire(se)))),this.onResize((se=>this._renderService.resize(se.cols,se.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(S.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(l.Linkifier,this.screenElement)),this.element.appendChild(k);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(b.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((se=>this.scrollLines(se.amount,se.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(p.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((se=>this.scrollLines(se.amount,se.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((se=>this._renderService.handleSelectionChanged(se.start,se.end,se.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((se=>{this.textarea.value=se,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((se=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(f.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(se=>this._selectionService.handleMouseDown(se)))),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($.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(se=>this._handleScreenReaderModeOptionChange(se)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(se=>{!this._overviewRulerRenderer&&se&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.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 F=this,k=this.element;function re(fe){const we=F._mouseService.getMouseReportCoords(fe,F.screenElement);if(!we)return!1;let me,ze;switch(fe.overrideType||fe.type){case"mousemove":ze=32,fe.buttons===void 0?(me=3,fe.button!==void 0&&(me=fe.button<3?fe.button:3)):me=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":ze=0,me=fe.button<3?fe.button:3;break;case"mousedown":ze=1,me=fe.button<3?fe.button:3;break;case"wheel":if(F._customWheelEventHandler&&F._customWheelEventHandler(fe)===!1||F.viewport.getLinesScrolled(fe)===0)return!1;ze=fe.deltaY<0?0:1,me=4;break;default:return!1}return!(ze===void 0||me===void 0||me>4)&&F.coreMouseService.triggerMouseEvent({col:we.col,row:we.row,x:we.x,y:we.y,button:me,action:ze,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const se={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:fe=>(re(fe),fe.buttons||(this._document.removeEventListener("mouseup",se.mouseup),se.mousedrag&&this._document.removeEventListener("mousemove",se.mousedrag)),this.cancel(fe)),wheel:fe=>(re(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&re(fe)},mousemove:fe=>{fe.buttons||re(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),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&fe?se.mousemove||(k.addEventListener("mousemove",de.mousemove),se.mousemove=de.mousemove):(k.removeEventListener("mousemove",se.mousemove),se.mousemove=null),16&fe?se.wheel||(k.addEventListener("wheel",de.wheel,{passive:!1}),se.wheel=de.wheel):(k.removeEventListener("wheel",se.wheel),se.wheel=null),2&fe?se.mouseup||(se.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",se.mouseup),se.mouseup=null),4&fe?se.mousedrag||(se.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",se.mousedrag),se.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(k,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return re(fe),se.mouseup&&this._document.addEventListener("mouseup",se.mouseup),se.mousedrag&&this._document.addEventListener("mousemove",se.mousedrag),this.cancel(fe)}))),this.register((0,v.addDisposableDomListener)(k,"wheel",(fe=>{if(!se.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const we=this.viewport.getLinesScrolled(fe);if(we===0)return;const me=I.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let ze="";for(let Ke=0;Ke<Math.abs(we);Ke++)ze+=me;return this.coreService.triggerDataEvent(ze,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(k,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(k,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(F,k){var re;(re=this._renderService)==null||re.refreshRows(F,k)}updateCursorStyle(F){var k;(k=this._selectionService)!=null&&k.shouldColumnSelect(F)?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(F,k,re=0){var se;re===1?(super.scrollLines(F,k,re),this.refresh(0,this.rows-1)):(se=this.viewport)==null||se.scrollLines(F)}paste(F){(0,_.paste)(F,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(F){this._customKeyEventHandler=F}attachCustomWheelEventHandler(F){this._customWheelEventHandler=F}registerLinkProvider(F){return this._linkProviderService.registerLinkProvider(F)}registerCharacterJoiner(F){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const k=this._characterJoinerService.register(F);return this.refresh(0,this.rows-1),k}deregisterCharacterJoiner(F){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(F)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(F){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+F)}registerDecoration(F){return this._decorationService.registerDecoration(F)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(F,k,re){this._selectionService.setSelection(F,k,re)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var F;(F=this._selectionService)==null||F.clearSelection()}selectAll(){var F;(F=this._selectionService)==null||F.selectAll()}selectLines(F,k){var re;(re=this._selectionService)==null||re.selectLines(F,k)}_keyDown(F){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;const k=this.browser.isMac&&this.options.macOptionIsMeta&&F.altKey;if(!k&&!this._compositionHelper.keydown(F))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;k||F.key!=="Dead"&&F.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const re=(0,G.evaluateKeyboardEvent)(F,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(F),re.type===3||re.type===2){const se=this.rows-1;return this.scrollLines(re.type===2?-se:se),this.cancel(F,!0)}return re.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,F)||(re.cancel&&this.cancel(F,!0),!re.key||!!(F.key&&!F.ctrlKey&&!F.altKey&&!F.metaKey&&F.key.length===1&&F.key.charCodeAt(0)>=65&&F.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(re.key!==I.C0.ETX&&re.key!==I.C0.CR||(this.textarea.value=""),this._onKey.fire({key:re.key,domEvent:F}),this._showCursor(),this.coreService.triggerDataEvent(re.key,!0),!this.optionsService.rawOptions.screenReaderMode||F.altKey||F.ctrlKey?this.cancel(F,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(F,k){const re=F.isMac&&!this.options.macOptionIsMeta&&k.altKey&&!k.ctrlKey&&!k.metaKey||F.isWindows&&k.altKey&&k.ctrlKey&&!k.metaKey||F.isWindows&&k.getModifierState("AltGraph");return k.type==="keypress"?re:re&&(!k.keyCode||k.keyCode>47)}_keyUp(F){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1||((function(k){return k.keyCode===16||k.keyCode===17||k.keyCode===18})(F)||this.focus(),this.updateCursorStyle(F),this._keyPressHandled=!1)}_keyPress(F){let k;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;if(this.cancel(F),F.charCode)k=F.charCode;else if(F.which===null||F.which===void 0)k=F.keyCode;else{if(F.which===0||F.charCode===0)return!1;k=F.which}return!(!k||(F.altKey||F.ctrlKey||F.metaKey)&&!this._isThirdLevelShift(this.browser,F)||(k=String.fromCharCode(k),this._onKey.fire({key:k,domEvent:F}),this._showCursor(),this.coreService.triggerDataEvent(k,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(F){if(F.data&&F.inputType==="insertText"&&(!F.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const k=F.data;return this.coreService.triggerDataEvent(k,!0),this.cancel(F),!0}return!1}resize(F,k){F!==this.cols||k!==this.rows?super.resize(F,k):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(F,k){var re,se;(re=this._charSizeService)==null||re.measure(),(se=this.viewport)==null||se.syncScrollArea(!0)}clear(){var F;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 k=1;k<this.rows;k++)this.buffer.lines.push(this.buffer.getBlankLine(z.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(F=this.viewport)==null||F.reset(),this.refresh(0,this.rows-1)}}reset(){var k,re;this.options.rows=this.rows,this.options.cols=this.cols;const F=this._customKeyEventHandler;this._setup(),super.reset(),(k=this._selectionService)==null||k.reset(),this._decorationService.reset(),(re=this.viewport)==null||re.reset(),this._customKeyEventHandler=F,this.refresh(0,this.rows-1)}clearTextureAtlas(){var F;(F=this._renderService)==null||F.clearTextureAtlas()}_reportFocus(){var F;(F=this.element)!=null&&F.classList.contains("focus")?this.coreService.triggerDataEvent(I.C0.ESC+"[I"):this.coreService.triggerDataEvent(I.C0.ESC+"[O")}_reportWindowsOptions(F){if(this._renderService)switch(F){case O.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const k=this._renderService.dimensions.css.canvas.width.toFixed(0),re=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[4;${re};${k}t`);break;case O.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const se=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[6;${de};${se}t`)}}cancel(F,k){if(this.options.cancelEvents||k)return F.preventDefault(),F.stopPropagation(),!1}}n.Terminal=he},9924:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(d,_=1e3){this._renderCallback=d,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,_,v){this._rowCount=v,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;const l=Date.now();if(l-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=l,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=l-this._lastRefreshMs,y=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_)}}},1680:function(q,n,d){var _=this&&this.__decorate||function(h,o,c,g){var C,S=arguments.length,w=S<3?o:g===null?g=Object.getOwnPropertyDescriptor(o,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,c,g);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(o,c,w):C(o,c))||w);return S>3&&w&&Object.defineProperty(o,c,w),w},v=this&&this.__param||function(h,o){return function(c,g){o(c,g,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const l=d(3656),m=d(4725),y=d(8460),b=d(844),f=d(2585);let r=n.Viewport=class extends b.Disposable{constructor(h,o,c,g,C,S,w,p){super(),this._viewportElement=h,this._scrollArea=o,this._bufferService=c,this._optionsService=g,this._charSizeService=C,this._renderService=S,this._coreBrowserService=w,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 y.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((E=>this._activeBuffer=E.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((E=>this._renderDimensions=E))),this._handleThemeChange(p.colors),this.register(p.onChangeColors((E=>this._handleThemeChange(E)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.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(h){if(h)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 h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){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 h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<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(h,o){const c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&c<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const o=this._getPixelsScrolled(h);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(h,o))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=h*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:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(h,o){var p;let c,g="";const C=[],S=o??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let E=h;E<S;E++){const L=w.get(E);if(!L)continue;const T=(p=w.get(E+1))==null?void 0:p.isWrapped;if(g+=L.translateToString(!T),!T||E===w.length-1){const A=document.createElement("div");A.textContent=g,C.push(A),g.length>0&&(c=A),g=""}}return{bufferElements:C,cursorElement:c}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.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):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(h,o){const c=this._optionsService.rawOptions.fastScrollModifier;return c==="alt"&&o.altKey||c==="ctrl"&&o.ctrlKey||c==="shift"&&o.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const o=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}};n.Viewport=r=_([v(2,f.IBufferService),v(3,f.IOptionsService),v(4,m.ICharSizeService),v(5,m.IRenderService),v(6,m.ICoreBrowserService),v(7,m.IThemeService)],r)},3107:function(q,n,d){var _=this&&this.__decorate||function(f,r,h,o){var c,g=arguments.length,C=g<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,r,h,o);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(C=(g<3?c(C):g>3?c(r,h,C):c(r,h))||C);return g>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(f,r){return function(h,o){r(h,o,f)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const l=d(4725),m=d(844),y=d(2585);let b=n.BufferDecorationRenderer=class extends m.Disposable{constructor(f,r,h,o,c){super(),this._screenElement=f,this._bufferService=r,this._coreBrowserService=h,this._decorationService=o,this._renderService=c,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((g=>this._removeDecoration(g)))),this.register((0,m.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 f of this._decorationService.decorations)this._renderDecoration(f);this._dimensionsChanged=!1}_renderDecoration(f){this._refreshStyle(f),this._dimensionsChanged&&this._refreshXPosition(f)}_createElement(f){var o;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((o=f==null?void 0:f.options)==null?void 0:o.layer)==="top"),r.style.width=`${Math.round((f.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(f.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(f.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=f.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(f,r),r}_refreshStyle(f){const r=f.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)f.element&&(f.element.style.display="none",f.onRenderEmitter.fire(f.element));else{let h=this._decorationElements.get(f);h||(h=this._createElement(f),f.element=h,this._decorationElements.set(f,h),this._container.appendChild(h),f.onDispose((()=>{this._decorationElements.delete(f),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",f.onRenderEmitter.fire(h)}}_refreshXPosition(f,r=f.element){if(!r)return;const h=f.options.x??0;(f.options.anchor||"left")==="right"?r.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":r.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(f){var r;(r=this._decorationElements.get(f))==null||r.remove(),this._decorationElements.delete(f),f.dispose()}};n.BufferDecorationRenderer=b=_([v(1,y.IBufferService),v(2,l.ICoreBrowserService),v(3,y.IDecorationService),v(4,l.IRenderService)],b)},5871:(q,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(d){if(d.options.overviewRulerOptions){for(const _ of this._zones)if(_.color===d.options.overviewRulerOptions.color&&_.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(_,d.marker.line))return;if(this._lineAdjacentToZone(_,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(_,d.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(d){this._linePadding=d}_lineIntersectsZone(d,_){return _>=d.startBufferLine&&_<=d.endBufferLine}_lineAdjacentToZone(d,_,v){return _>=d.startBufferLine-this._linePadding[v||"full"]&&_<=d.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(d,_){d.startBufferLine=Math.min(d.startBufferLine,_),d.endBufferLine=Math.max(d.endBufferLine,_)}}},5744:function(q,n,d){var _=this&&this.__decorate||function(c,g,C,S){var w,p=arguments.length,E=p<3?g:S===null?S=Object.getOwnPropertyDescriptor(g,C):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,g,C,S);else for(var L=c.length-1;L>=0;L--)(w=c[L])&&(E=(p<3?w(E):p>3?w(g,C,E):w(g,C))||E);return p>3&&E&&Object.defineProperty(g,C,E),E},v=this&&this.__param||function(c,g){return function(C,S){g(C,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const l=d(5871),m=d(4725),y=d(844),b=d(2585),f={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let o=n.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(c,g,C,S,w,p,E){var T;super(),this._viewportElement=c,this._screenElement=g,this._bufferService=C,this._decorationService=S,this._renderService=w,this._optionsService=p,this._coreBrowserService=E,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(),(T=this._viewportElement.parentElement)==null||T.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var A;(A=this._canvas)==null||A.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 c=Math.floor(this._canvas.width/3),g=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=c,r.center=g,r.right=c,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){f.full=Math.round(2*this._coreBrowserService.dpr);const c=this._canvas.height/this._bufferService.buffer.lines.length,g=Math.round(Math.max(Math.min(c,12),6)*this._coreBrowserService.dpr);f.left=g,f.center=g,f.right=g}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.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 g of this._decorationService.decorations)this._colorZoneStore.addDecoration(g);this._ctx.lineWidth=1;const c=this._colorZoneStore.zones;for(const g of c)g.position!=="full"&&this._renderColorZone(g);for(const g of c)g.position==="full"&&this._renderColorZone(g);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(h[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-f[c.position||"full"]/2),r[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+f[c.position||"full"]))}_queueRefresh(c,g){this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=g||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=o=_([v(2,b.IBufferService),v(3,b.IDecorationService),v(4,m.IRenderService),v(5,b.IOptionsService),v(6,m.ICoreBrowserService)],o)},2950:function(q,n,d){var _=this&&this.__decorate||function(f,r,h,o){var c,g=arguments.length,C=g<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,r,h,o);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(C=(g<3?c(C):g>3?c(r,h,C):c(r,h))||C);return g>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(f,r){return function(h,o){r(h,o,f)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const l=d(4725),m=d(2585),y=d(2584);let b=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(f,r,h,o,c,g){this._textarea=f,this._compositionView=r,this._bufferService=h,this._optionsService=o,this._coreService=c,this._renderService=g,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(f){this._compositionView.textContent=f.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(f){if(this._isComposing||this._isSendingComposition){if(f.keyCode===229||f.keyCode===16||f.keyCode===17||f.keyCode===18)return!1;this._finalizeComposition(!1)}return f.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(f){if(this._compositionView.classList.remove("active"),this._isComposing=!1,f){const r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,r.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(r.start,r.end):this._textarea.value.substring(r.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}}_handleAnyTextareaChanges(){const f=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(f,"");this._dataAlreadySent=h,r.length>f.length?this._coreService.triggerDataEvent(h,!0):r.length<f.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):r.length===f.length&&r!==f&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(f){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,c=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=c+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const g=this._compositionView.getBoundingClientRect();this._textarea.style.left=c+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(g.width,1)+"px",this._textarea.style.height=Math.max(g.height,1)+"px",this._textarea.style.lineHeight=g.height+"px"}f||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=b=_([v(2,m.IBufferService),v(3,m.IOptionsService),v(4,m.ICoreService),v(5,l.IRenderService)],b)},9806:(q,n)=>{function d(_,v,l){const m=l.getBoundingClientRect(),y=_.getComputedStyle(l),b=parseInt(y.getPropertyValue("padding-left")),f=parseInt(y.getPropertyValue("padding-top"));return[v.clientX-m.left-b,v.clientY-m.top-f]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=d,n.getCoords=function(_,v,l,m,y,b,f,r,h){if(!b)return;const o=d(_,v,l);return o?(o[0]=Math.ceil((o[0]+(h?f/2:0))/f),o[1]=Math.ceil(o[1]/r),o[0]=Math.min(Math.max(o[0],1),m+(h?1:0)),o[1]=Math.min(Math.max(o[1],1),y),o):void 0}},9504:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const _=d(2584);function v(r,h,o,c){const g=r-l(r,o),C=h-l(h,o),S=Math.abs(g-C)-(function(w,p,E){let L=0;const T=w-l(w,E),A=p-l(p,E);for(let M=0;M<Math.abs(T-A);M++){const N=m(w,p)==="A"?-1:1,X=E.buffer.lines.get(T+N*M);X!=null&&X.isWrapped&&L++}return L})(r,h,o);return f(S,b(m(r,h),c))}function l(r,h){let o=0,c=h.buffer.lines.get(r),g=c==null?void 0:c.isWrapped;for(;g&&r>=0&&r<h.rows;)o++,c=h.buffer.lines.get(--r),g=c==null?void 0:c.isWrapped;return o}function m(r,h){return r>h?"A":"B"}function y(r,h,o,c,g,C){let S=r,w=h,p="";for(;S!==o||w!==c;)S+=g?1:-1,g&&S>C.cols-1?(p+=C.buffer.translateBufferLineToString(w,!1,r,S),S=0,r=0,w++):!g&&S<0&&(p+=C.buffer.translateBufferLineToString(w,!1,0,r+1),S=C.cols-1,r=S,w--);return p+C.buffer.translateBufferLineToString(w,!1,r,S)}function b(r,h){const o=h?"O":"[";return _.C0.ESC+o+r}function f(r,h){r=Math.floor(r);let o="";for(let c=0;c<r;c++)o+=h;return o}n.moveToCellSequence=function(r,h,o,c){const g=o.buffer.x,C=o.buffer.y;if(!o.buffer.hasScrollback)return(function(p,E,L,T,A,M){return v(E,T,A,M).length===0?"":f(y(p,E,p,E-l(E,A),!1,A).length,b("D",M))})(g,C,0,h,o,c)+v(C,h,o,c)+(function(p,E,L,T,A,M){let N;N=v(E,T,A,M).length>0?T-l(T,A):E;const X=T,z=(function(I,G,D,H,R,O){let $;return $=v(D,H,R,O).length>0?H-l(H,R):G,I<D&&$<=H||I>=D&&$<H?"C":"D"})(p,E,L,T,A,M);return f(y(p,N,L,X,z==="C",A).length,b(z,M))})(g,C,r,h,o,c);let S;if(C===h)return S=g>r?"D":"C",f(Math.abs(g-r),b(S,c));S=C>h?"D":"C";const w=Math.abs(C-h);return f((function(p,E){return E.cols-p})(C>h?r:g,o)+(w-1)*o.cols+1+((C>h?g:r)-1),b(S,c))}},1296:function(q,n,d){var _=this&&this.__decorate||function(M,N,X,z){var I,G=arguments.length,D=G<3?N:z===null?z=Object.getOwnPropertyDescriptor(N,X):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(M,N,X,z);else for(var H=M.length-1;H>=0;H--)(I=M[H])&&(D=(G<3?I(D):G>3?I(N,X,D):I(N,X))||D);return G>3&&D&&Object.defineProperty(N,X,D),D},v=this&&this.__param||function(M,N){return function(X,z){N(X,z,M)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const l=d(3787),m=d(2550),y=d(2223),b=d(6171),f=d(6052),r=d(4725),h=d(8055),o=d(8460),c=d(844),g=d(2585),C="xterm-dom-renderer-owner-",S="xterm-rows",w="xterm-fg-",p="xterm-bg-",E="xterm-focus",L="xterm-selection";let T=1,A=n.DomRenderer=class extends c.Disposable{constructor(M,N,X,z,I,G,D,H,R,O,$,Q,he){super(),this._terminal=M,this._document=N,this._element=X,this._screenElement=z,this._viewportElement=I,this._helperContainer=G,this._linkifier2=D,this._charSizeService=R,this._optionsService=O,this._bufferService=$,this._coreBrowserService=Q,this._themeService=he,this._terminalClass=T++,this._rowElements=[],this._selectionRenderModel=(0,f.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(S),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(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,b.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=H.createInstance(l.DomRendererRowFactory,document),this._element.classList.add(C+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,c.toDisposable)((()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.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 M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),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/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),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 N=`${this._terminalSelector} .${S} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=N,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(M){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let N=`${this._terminalSelector} .${S} { color: ${M.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;N+=`${this._terminalSelector} .${S} .xterm-dim { color: ${h.color.multiplyOpacity(M.foreground,.5).css};}`,N+=`${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}`,z=`blink_bar_${this._terminalClass}`,I=`blink_block_${this._terminalClass}`;N+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,N+=`@keyframes ${z} { 50% { box-shadow: none; }}`,N+=`@keyframes ${I} { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,N+=`${this._terminalSelector} .${S}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${S}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${z} 1s step-end infinite;}${this._terminalSelector} .${S}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${I} 1s step-end infinite;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${M.cursor.css} !important; color: ${M.cursorAccent.css} !important;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,N+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[G,D]of M.ansi.entries())N+=`${this._terminalSelector} .${w}${G} { color: ${D.css}; }${this._terminalSelector} .${w}${G}.xterm-dim { color: ${h.color.multiplyOpacity(D,.5).css}; }${this._terminalSelector} .${p}${G} { background-color: ${D.css}; }`;N+=`${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(M.background).css}; }${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${p}${y.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=N}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,N){for(let X=this._rowElements.length;X<=N;X++){const z=this._document.createElement("div");this._rowContainer.appendChild(z),this._rowElements.push(z)}for(;this._rowElements.length>N;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,N){this._refreshRowElements(M,N),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(E),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(E),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(M,N,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,N,X),this.renderRows(0,this._bufferService.rows-1),!M||!N)return;this._selectionRenderModel.update(this._terminal,M,N,X);const z=this._selectionRenderModel.viewportStartRow,I=this._selectionRenderModel.viewportEndRow,G=this._selectionRenderModel.viewportCappedStartRow,D=this._selectionRenderModel.viewportCappedEndRow;if(G>=this._bufferService.rows||D<0)return;const H=this._document.createDocumentFragment();if(X){const R=M[0]>N[0];H.appendChild(this._createSelectionElement(G,R?N[0]:M[0],R?M[0]:N[0],D-G+1))}else{const R=z===G?M[0]:0,O=G===I?N[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(G,R,O));const $=D-G-1;if(H.appendChild(this._createSelectionElement(G+1,0,this._bufferService.cols,$)),G!==D){const Q=I===D?N[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(D,0,Q))}}this._selectionContainer.appendChild(H)}_createSelectionElement(M,N,X,z=1){const I=this._document.createElement("div"),G=N*this.dimensions.css.cell.width;let D=this.dimensions.css.cell.width*(X-N);return G+D>this.dimensions.css.canvas.width&&(D=this.dimensions.css.canvas.width-G),I.style.height=z*this.dimensions.css.cell.height+"px",I.style.top=M*this.dimensions.css.cell.height+"px",I.style.left=`${G}px`,I.style.width=`${D}px`,I}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 M of this._rowElements)M.replaceChildren()}renderRows(M,N){const X=this._bufferService.buffer,z=X.ybase+X.y,I=Math.min(X.x,this._bufferService.cols-1),G=this._optionsService.rawOptions.cursorBlink,D=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let R=M;R<=N;R++){const O=R+X.ydisp,$=this._rowElements[R],Q=X.lines.get(O);if(!$||!Q)break;$.replaceChildren(...this._rowFactory.createRow(Q,O,O===z,D,H,I,G,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,N,X,z,I,G){X<0&&(M=0),z<0&&(N=0);const D=this._bufferService.rows-1;X=Math.max(Math.min(X,D),0),z=Math.max(Math.min(z,D),0),I=Math.min(I,this._bufferService.cols);const H=this._bufferService.buffer,R=H.ybase+H.y,O=Math.min(H.x,I-1),$=this._optionsService.rawOptions.cursorBlink,Q=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=X;ue<=z;++ue){const F=ue+H.ydisp,k=this._rowElements[ue],re=H.lines.get(F);if(!k||!re)break;k.replaceChildren(...this._rowFactory.createRow(re,F,F===R,Q,he,O,$,this.dimensions.css.cell.width,this._widthCache,G?ue===X?M:0:-1,G?(ue===z?N:I)-1:-1))}}};n.DomRenderer=A=_([v(7,g.IInstantiationService),v(8,r.ICharSizeService),v(9,g.IOptionsService),v(10,g.IBufferService),v(11,r.ICoreBrowserService),v(12,r.IThemeService)],A)},3787:function(q,n,d){var _=this&&this.__decorate||function(S,w,p,E){var L,T=arguments.length,A=T<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,p):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,w,p,E);else for(var M=S.length-1;M>=0;M--)(L=S[M])&&(A=(T<3?L(A):T>3?L(w,p,A):L(w,p))||A);return T>3&&A&&Object.defineProperty(w,p,A),A},v=this&&this.__param||function(S,w){return function(p,E){w(p,E,S)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const l=d(2223),m=d(643),y=d(511),b=d(2585),f=d(8055),r=d(4725),h=d(4269),o=d(6171),c=d(3734);let g=n.DomRendererRowFactory=class{constructor(S,w,p,E,L,T,A){this._document=S,this._characterJoinerService=w,this._optionsService=p,this._coreBrowserService=E,this._coreService=L,this._decorationService=T,this._themeService=A,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(S,w,p){this._selectionStart=S,this._selectionEnd=w,this._columnSelectMode=p}createRow(S,w,p,E,L,T,A,M,N,X,z){const I=[],G=this._characterJoinerService.getJoinedCharacters(w),D=this._themeService.colors;let H,R=S.getNoBgTrimmedLength();p&&R<T+1&&(R=T+1);let O=0,$="",Q=0,he=0,ue=0,F=!1,k=0,re=!1,se=0;const de=[],fe=X!==-1&&z!==-1;for(let we=0;we<R;we++){S.loadCell(we,this._workCell);let me=this._workCell.getWidth();if(me===0)continue;let ze=!1,Ke=we,Se=this._workCell;if(G.length>0&&we===G[0][0]){ze=!0;const Re=G.shift();Se=new h.JoinedCellData(this._workCell,S.translateToString(!0,Re[0],Re[1]),Re[1]-Re[0]),Ke=Re[1]-1,me=Se.getWidth()}const Dt=this._isCellInSelection(we,w),Jt=p&&we===T,Be=fe&&we>=X&&we<=z;let Ae=!1;this._decorationService.forEachDecorationAtCell(we,w,void 0,(Re=>{Ae=!0}));let De=Se.getChars()||m.WHITESPACE_CELL_CHAR;if(De===" "&&(Se.isUnderline()||Se.isOverline())&&(De=" "),se=me*M-N.get(De,Se.isBold(),Se.isItalic()),H){if(O&&(Dt&&re||!Dt&&!re&&Se.bg===Q)&&(Dt&&re&&D.selectionForeground||Se.fg===he)&&Se.extended.ext===ue&&Be===F&&se===k&&!Jt&&!ze&&!Ae){Se.isInvisible()?$+=m.WHITESPACE_CELL_CHAR:$+=De,O++;continue}O&&(H.textContent=$),H=this._document.createElement("span"),O=0,$=""}else H=this._document.createElement("span");if(Q=Se.bg,he=Se.fg,ue=Se.extended.ext,F=Be,k=se,re=Dt,ze&&T>=we&&T<=Ke&&(T=we),!this._coreService.isCursorHidden&&Jt&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)A&&de.push("xterm-cursor-blink"),de.push(E==="bar"?"xterm-cursor-bar":E==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":de.push("xterm-cursor-outline");break;case"block":de.push("xterm-cursor-block");break;case"bar":de.push("xterm-cursor-bar");break;case"underline":de.push("xterm-cursor-underline")}}if(Se.isBold()&&de.push("xterm-bold"),Se.isItalic()&&de.push("xterm-italic"),Se.isDim()&&de.push("xterm-dim"),$=Se.isInvisible()?m.WHITESPACE_CELL_CHAR:Se.getChars()||m.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(de.push(`xterm-underline-${Se.extended.underlineStyle}`),$===" "&&($=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${c.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let Re=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&Re<8&&(Re+=8),H.style.textDecorationColor=D.ansi[Re].css}Se.isOverline()&&(de.push("xterm-overline"),$===" "&&($=" ")),Se.isStrikethrough()&&de.push("xterm-strikethrough"),Be&&(H.style.textDecoration="underline");let _e=Se.getFgColor(),be=Se.getFgColorMode(),Qe=Se.getBgColor(),Pe=Se.getBgColorMode();const Ut=!!Se.isInverse();if(Ut){const Re=_e;_e=Qe,Qe=Re;const Vt=be;be=Pe,Pe=Vt}let ot,bt,Je,qe=!1;switch(this._decorationService.forEachDecorationAtCell(we,w,void 0,(Re=>{Re.options.layer!=="top"&&qe||(Re.backgroundColorRGB&&(Pe=50331648,Qe=Re.backgroundColorRGB.rgba>>8&16777215,ot=Re.backgroundColorRGB),Re.foregroundColorRGB&&(be=50331648,_e=Re.foregroundColorRGB.rgba>>8&16777215,bt=Re.foregroundColorRGB),qe=Re.options.layer==="top")})),!qe&&Dt&&(ot=this._coreBrowserService.isFocused?D.selectionBackgroundOpaque:D.selectionInactiveBackgroundOpaque,Qe=ot.rgba>>8&16777215,Pe=50331648,qe=!0,D.selectionForeground&&(be=50331648,_e=D.selectionForeground.rgba>>8&16777215,bt=D.selectionForeground)),qe&&de.push("xterm-decoration-top"),Pe){case 16777216:case 33554432:Je=D.ansi[Qe],de.push(`xterm-bg-${Qe}`);break;case 50331648:Je=f.channels.toColor(Qe>>16,Qe>>8&255,255&Qe),this._addStyle(H,`background-color:#${C((Qe>>>0).toString(16),"0",6)}`);break;default:Ut?(Je=D.foreground,de.push(`xterm-bg-${l.INVERTED_DEFAULT_COLOR}`)):Je=D.background}switch(ot||Se.isDim()&&(ot=f.color.multiplyOpacity(Je,.5)),be){case 16777216:case 33554432:Se.isBold()&&_e<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(_e+=8),this._applyMinimumContrast(H,Je,D.ansi[_e],Se,ot,void 0)||de.push(`xterm-fg-${_e}`);break;case 50331648:const Re=f.channels.toColor(_e>>16&255,_e>>8&255,255&_e);this._applyMinimumContrast(H,Je,Re,Se,ot,bt)||this._addStyle(H,`color:#${C(_e.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,Je,D.foreground,Se,ot,bt)||Ut&&de.push(`xterm-fg-${l.INVERTED_DEFAULT_COLOR}`)}de.length&&(H.className=de.join(" "),de.length=0),Jt||ze||Ae?H.textContent=$:O++,se!==this.defaultSpacing&&(H.style.letterSpacing=`${se}px`),I.push(H),we=Ke}return H&&O&&(H.textContent=$),I}_applyMinimumContrast(S,w,p,E,L,T){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(E.getCode()))return!1;const A=this._getContrastCache(E);let M;if(L||T||(M=A.getColor(w.rgba,p.rgba)),M===void 0){const N=this._optionsService.rawOptions.minimumContrastRatio/(E.isDim()?2:1);M=f.color.ensureContrastRatio(L||w,T||p,N),A.setColor((L||w).rgba,(T||p).rgba,M??null)}return!!M&&(this._addStyle(S,`color:${M.css}`),!0)}_getContrastCache(S){return S.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(S,w){S.setAttribute("style",`${S.getAttribute("style")||""}${w};`)}_isCellInSelection(S,w){const p=this._selectionStart,E=this._selectionEnd;return!(!p||!E)&&(this._columnSelectMode?p[0]<=E[0]?S>=p[0]&&w>=p[1]&&S<E[0]&&w<=E[1]:S<p[0]&&w>=p[1]&&S>=E[0]&&w<=E[1]:w>p[1]&&w<E[1]||p[1]===E[1]&&w===p[1]&&S>=p[0]&&S<E[0]||p[1]<E[1]&&w===E[1]&&S<E[0]||p[1]<E[1]&&w===p[1]&&S>=p[0])}};function C(S,w,p){for(;S.length<p;)S=w+S;return S}n.DomRendererRowFactory=g=_([v(1,r.ICharacterJoinerService),v(2,b.IOptionsService),v(3,r.ICoreBrowserService),v(4,b.ICoreService),v(5,b.IDecorationService),v(6,r.IThemeService)],g)},2550:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(d,_){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=d.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 v=d.createElement("span");v.classList.add("xterm-char-measure-element");const l=d.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontWeight="bold";const m=d.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const y=d.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[v,l,m,y],this._container.appendChild(v),this._container.appendChild(l),this._container.appendChild(m),this._container.appendChild(y),_.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(d,_,v,l){d===this._font&&_===this._fontSize&&v===this._weight&&l===this._weightBold||(this._font=d,this._fontSize=_,this._weight=v,this._weightBold=l,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${l}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${l}`,this.clear())}get(d,_,v){let l=0;if(!_&&!v&&d.length===1&&(l=d.charCodeAt(0))<256){if(this._flat[l]!==-9999)return this._flat[l];const b=this._measure(d,0);return b>0&&(this._flat[l]=b),b}let m=d;_&&(m+="B"),v&&(m+="I");let y=this._holey.get(m);if(y===void 0){let b=0;_&&(b|=1),v&&(b|=2),y=this._measure(d,b),y>0&&this._holey.set(m,y)}return y}_measure(d,_){const v=this._measureElements[_];return v.textContent=d.repeat(32),v.offsetWidth/32}}},2223:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const _=d(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},6171:(q,n)=>{function d(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=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(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=d,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=_,n.allowRescaling=function(v,l,m,y){return l===1&&m>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!_(v)&&!d(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return d(v)||(function(l){return 9472<=l&&l<=9631})(v)},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(v,l,m=0){return(v-(2*Math.round(l)-m))%(2*Math.round(l))}},6052:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class d{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(v,l,m,y=!1){if(this.selectionStart=l,this.selectionEnd=m,!l||!m||l[0]===m[0]&&l[1]===m[1])return void this.clear();const b=v.buffers.active.ydisp,f=l[1]-b,r=m[1]-b,h=Math.max(f,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=f,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=m[0])}isCellSelected(v,l,m){return!!this.hasSelection&&(m-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&m>=this.viewportCappedStartRow&&l<this.endCol&&m<=this.viewportCappedEndRow:l<this.startCol&&m>=this.viewportCappedStartRow&&l>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&l>=this.startCol)}}n.createSelectionRenderModel=function(){return new d}},456:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(d){this._bufferService=d,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 d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const d=this.selectionStart,_=this.selectionEnd;return!(!d||!_)&&(d[1]>_[1]||d[1]===_[1]&&d[0]>_[0])}handleTrim(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(q,n,d){var _=this&&this.__decorate||function(o,c,g,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,g):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,g,C);else for(var E=o.length-1;E>=0;E--)(S=o[E])&&(p=(w<3?S(p):w>3?S(c,g,p):S(c,g))||p);return w>3&&p&&Object.defineProperty(c,g,p),p},v=this&&this.__param||function(o,c){return function(g,C){c(g,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const l=d(2585),m=d(8460),y=d(844);let b=n.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,c,g){super(),this._optionsService=g,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(o,c,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=b=_([v(2,l.IOptionsService)],b);class f extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(c,g){c!==void 0&&c>0&&g!==void 0&&g>0&&(this._result.width=c,this._result.height=g)}}class r extends f{constructor(c,g,C){super(),this._document=c,this._parentElement=g,this._optionsService=C,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 h extends f{constructor(c){super(),this._optionsService=c,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const g=this._ctx.measureText("W");if(!("width"in g&&"fontBoundingBoxAscent"in g&&"fontBoundingBoxDescent"in g))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const c=this._ctx.measureText("W");return this._validateAndSet(c.width,c.fontBoundingBoxAscent+c.fontBoundingBoxDescent),this._result}}},4269:function(q,n,d){var _=this&&this.__decorate||function(h,o,c,g){var C,S=arguments.length,w=S<3?o:g===null?g=Object.getOwnPropertyDescriptor(o,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,c,g);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(o,c,w):C(o,c))||w);return S>3&&w&&Object.defineProperty(o,c,w),w},v=this&&this.__param||function(h,o){return function(c,g){o(c,g,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const l=d(3734),m=d(643),y=d(511),b=d(2585);class f extends l.AttributeData{constructor(o,c,g){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=c,this._width=g}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=f;let r=n.CharacterJoinerService=class ed{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(o){const c={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(c),c.id}deregister(o){for(let c=0;c<this._characterJoiners.length;c++)if(this._characterJoiners[c].id===o)return this._characterJoiners.splice(c,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const c=this._bufferService.buffer.lines.get(o);if(!c||c.length===0)return[];const g=[],C=c.translateToString(!0);let S=0,w=0,p=0,E=c.getFg(0),L=c.getBg(0);for(let T=0;T<c.getTrimmedLength();T++)if(c.loadCell(T,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==L){if(T-S>1){const A=this._getJoinedRanges(C,p,w,c,S);for(let M=0;M<A.length;M++)g.push(A[M])}S=T,p=w,E=this._workCell.fg,L=this._workCell.bg}w+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-S>1){const T=this._getJoinedRanges(C,p,w,c,S);for(let A=0;A<T.length;A++)g.push(T[A])}return g}_getJoinedRanges(o,c,g,C,S){const w=o.substring(c,g);let p=[];try{p=this._characterJoiners[0].handler(w)}catch(E){console.error(E)}for(let E=1;E<this._characterJoiners.length;E++)try{const L=this._characterJoiners[E].handler(w);for(let T=0;T<L.length;T++)ed._mergeRanges(p,L[T])}catch(L){console.error(L)}return this._stringRangesToCellRanges(p,C,S),p}_stringRangesToCellRanges(o,c,g){let C=0,S=!1,w=0,p=o[C];if(p){for(let E=g;E<this._bufferService.cols;E++){const L=c.getWidth(E),T=c.getString(E).length||m.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!S&&p[0]<=w&&(p[0]=E,S=!0),p[1]<=w){if(p[1]=E,p=o[++C],!p)break;p[0]<=w?(p[0]=E,S=!0):S=!1}w+=T}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(o,c){let g=!1;for(let C=0;C<o.length;C++){const S=o[C];if(g){if(c[1]<=S[0])return o[C-1][1]=c[1],o;if(c[1]<=S[1])return o[C-1][1]=Math.max(c[1],S[1]),o.splice(C,1),o;o.splice(C,1),C--}else{if(c[1]<=S[0])return o.splice(C,0,c),o;if(c[1]<=S[1])return S[0]=Math.min(c[0],S[0]),o;c[0]<S[1]&&(S[0]=Math.min(c[0],S[0]),g=!0)}}return g?o[o.length-1][1]=c[1]:o.push(c),o}};n.CharacterJoinerService=r=_([v(0,b.IBufferService)],r)},5114:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const _=d(844),v=d(8460),l=d(3656);class m extends _.Disposable{constructor(f,r,h){super(),this._textarea=f,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,v.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(f){this._window!==f&&(this._window=f,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=m;class y extends _.Disposable{constructor(f){super(),this._parentWindow=f,this._windowResizeListener=this.register(new _.MutableDisposable),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,_.toDisposable)((()=>this.clearListener())))}setWindow(f){this._parentWindow=f,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 f;this._outerListener&&((f=this._resolutionMediaMatchList)==null||f.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:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const _=d(844);class v extends _.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,_.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const y=this.linkProviders.indexOf(m);y!==-1&&this.linkProviders.splice(y,1)}}}}n.LinkProviderService=v},8934:function(q,n,d){var _=this&&this.__decorate||function(b,f,r,h){var o,c=arguments.length,g=c<3?f:h===null?h=Object.getOwnPropertyDescriptor(f,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(b,f,r,h);else for(var C=b.length-1;C>=0;C--)(o=b[C])&&(g=(c<3?o(g):c>3?o(f,r,g):o(f,r))||g);return c>3&&g&&Object.defineProperty(f,r,g),g},v=this&&this.__param||function(b,f){return function(r,h){f(r,h,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const l=d(4725),m=d(9806);let y=n.MouseService=class{constructor(b,f){this._renderService=b,this._charSizeService=f}getCoords(b,f,r,h,o){return(0,m.getCoords)(window,b,f,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(b,f){const r=(0,m.getCoordsRelativeToElement)(window,b,f);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};n.MouseService=y=_([v(0,l.IRenderService),v(1,l.ICharSizeService)],y)},3230:function(q,n,d){var _=this&&this.__decorate||function(o,c,g,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,g):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,g,C);else for(var E=o.length-1;E>=0;E--)(S=o[E])&&(p=(w<3?S(p):w>3?S(c,g,p):S(c,g))||p);return w>3&&p&&Object.defineProperty(c,g,p),p},v=this&&this.__param||function(o,c){return function(g,C){c(g,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const l=d(6193),m=d(4725),y=d(8460),b=d(844),f=d(7226),r=d(2585);let h=n.RenderService=class extends b.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,c,g,C,S,w,p,E){super(),this._rowCount=o,this._charSizeService=C,this._renderer=this.register(new b.MutableDisposable),this._pausedResizeTask=new f.DebouncedIdleTask,this._observerDisposable=this.register(new b.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 y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new l.RenderDebouncer(((L,T)=>this._renderRows(L,T)),p),this.register(this._renderDebouncer),this.register(p.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(g.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(S.onDecorationRegistered((()=>this._fullRefresh()))),this.register(S.onDecorationRemoved((()=>this._fullRefresh()))),this.register(g.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(g.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(E.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(p.window,c),this.register(p.onWindowChange((L=>this._registerIntersectionObserver(L,c))))}_registerIntersectionObserver(o,c){if("IntersectionObserver"in o){const g=new o.IntersectionObserver((C=>this._handleIntersectionChange(C[C.length-1])),{threshold:0});g.observe(c),this._observerDisposable.value=(0,b.toDisposable)((()=>g.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,c,g=!1){this._isPaused?this._needsFullRefresh=!0:(g||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,c,this._rowCount))}_renderRows(o,c){this._renderer.value&&(o=Math.min(o,this._rowCount-1),c=Math.min(c,this._rowCount-1),this._renderer.value.renderRows(o,c),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:c}),this._onRender.fire({start:o,end:c}),this._isNextRenderRedrawOnly=!0)}resize(o,c){this._rowCount=c,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((c=>this.refreshRows(c.start,c.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,c;this._renderer.value&&((c=(o=this._renderer.value).clearTextureAtlas)==null||c.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,c){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var g;return(g=this._renderer.value)==null?void 0:g.handleResize(o,c)})):this._renderer.value.handleResize(o,c),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,c,g){var C;this._selectionState.start=o,this._selectionState.end=c,this._selectionState.columnSelectMode=g,(C=this._renderer.value)==null||C.handleSelectionChanged(o,c,g)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};n.RenderService=h=_([v(2,r.IOptionsService),v(3,m.ICharSizeService),v(4,r.IDecorationService),v(5,r.IBufferService),v(6,m.ICoreBrowserService),v(7,m.IThemeService)],h)},9312:function(q,n,d){var _=this&&this.__decorate||function(p,E,L,T){var A,M=arguments.length,N=M<3?E:T===null?T=Object.getOwnPropertyDescriptor(E,L):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(p,E,L,T);else for(var X=p.length-1;X>=0;X--)(A=p[X])&&(N=(M<3?A(N):M>3?A(E,L,N):A(E,L))||N);return M>3&&N&&Object.defineProperty(E,L,N),N},v=this&&this.__param||function(p,E){return function(L,T){E(L,T,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const l=d(9806),m=d(9504),y=d(456),b=d(4725),f=d(8460),r=d(844),h=d(6114),o=d(4841),c=d(511),g=d(2585),C=" ",S=new RegExp(C,"g");let w=n.SelectionService=class extends r.Disposable{constructor(p,E,L,T,A,M,N,X,z){super(),this._element=p,this._screenElement=E,this._linkifier=L,this._bufferService=T,this._coreService=A,this._mouseService=M,this._optionsService=N,this._renderService=X,this._coreBrowserService=z,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new c.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new f.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new f.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new f.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new f.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=I=>this._handleMouseMove(I),this._mouseUpListener=I=>this._handleMouseUp(I),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((I=>this._handleTrim(I))),this.register(this._bufferService.buffers.onBufferActivate((I=>this._handleBufferActivate(I)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,r.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 p=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;return!(!p||!E||p[0]===E[0]&&p[1]===E[1])}get selectionText(){const p=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;if(!p||!E)return"";const L=this._bufferService.buffer,T=[];if(this._activeSelectionMode===3){if(p[0]===E[0])return"";const A=p[0]<E[0]?p[0]:E[0],M=p[0]<E[0]?E[0]:p[0];for(let N=p[1];N<=E[1];N++){const X=L.translateBufferLineToString(N,!0,A,M);T.push(X)}}else{const A=p[1]===E[1]?E[0]:void 0;T.push(L.translateBufferLineToString(p[1],!0,p[0],A));for(let M=p[1]+1;M<=E[1]-1;M++){const N=L.lines.get(M),X=L.translateBufferLineToString(M,!0);N!=null&&N.isWrapped?T[T.length-1]+=X:T.push(X)}if(p[1]!==E[1]){const M=L.lines.get(E[1]),N=L.translateBufferLineToString(E[1],!0,0,E[0]);M&&M.isWrapped?T[T.length-1]+=N:T.push(N)}}return T.map((A=>A.replace(S," "))).join(h.isWindows?`\r
|
|
54
54
|
`:`
|
|
55
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(p){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&p&&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(p){const E=this._getMouseBufferCoords(p),L=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!!(L&&T&&E)&&this._areCoordsInSelection(E,L,T)}isCellInSelection(p,E){const L=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!(!L||!T)&&this._areCoordsInSelection([p,E],L,T)}_areCoordsInSelection(p,E,L){return p[1]>E[1]&&p[1]<L[1]||E[1]===L[1]&&p[1]===E[1]&&p[0]>=E[0]&&p[0]<L[0]||E[1]<L[1]&&p[1]===L[1]&&p[0]<L[0]||E[1]<L[1]&&p[1]===E[1]&&p[0]>=E[0]}_selectWordAtCursor(p,E){var A,M;const L=(M=(A=this._linkifier.currentLink)==null?void 0:A.link)==null?void 0:M.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,l.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const T=this._getMouseBufferCoords(p);return!!T&&(this._selectWordAt(T,E),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(p,E){this._model.clearSelection(),p=Math.max(p,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,p],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()}_handleTrim(p){this._model.handleTrim(p)&&this.refresh()}_getMouseBufferCoords(p){const E=this._mouseService.getCoords(p,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E}_getMouseEventScrollAmount(p){let E=(0,o.getCoordsRelativeToElement)(this._coreBrowserService.window,p,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return E>=0&&E<=L?0:(E>L&&(E-=L),E=Math.min(Math.max(E,-50),50),E/=50,E/Math.abs(E)+Math.round(14*E))}shouldForceSelection(p){return h.isMac?p.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:p.shiftKey}handleMouseDown(p){if(this._mouseDownTimeStamp=p.timeStamp,(p.button!==2||!this.hasSelection)&&p.button===0){if(!this._enabled){if(!this.shouldForceSelection(p))return;p.stopPropagation()}p.preventDefault(),this._dragScrollAmount=0,this._enabled&&p.shiftKey?this._handleIncrementalClick(p):p.detail===1?this._handleSingleClick(p):p.detail===2?this._handleDoubleClick(p):p.detail===3&&this._handleTripleClick(p),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(p){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(p))}_handleSingleClick(p){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(p)?3:0,this._model.selectionStart=this._getMouseBufferCoords(p),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(p){this._selectWordAtCursor(p,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(p){const E=this._getMouseBufferCoords(p);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))}shouldColumnSelect(p){return p.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(p){if(p.stopImmediatePropagation(),!this._model.selectionStart)return;const E=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(p),!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(p),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const T=L.lines.get(this._model.selectionEnd[1]);T&&T.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}E&&E[0]===this._model.selectionEnd[0]&&E[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 p=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(p.ydisp+this._bufferService.rows,p.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=p.ydisp),this.refresh()}}_handleMouseUp(p){const E=p.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&E<500&&p.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(p,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const T=(0,m.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(T,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const p=this._model.finalSelectionStart,E=this._model.finalSelectionEnd,L=!(!p||!E||p[0]===E[0]&&p[1]===E[1]);L?p&&E&&(this._oldSelectionStart&&this._oldSelectionEnd&&p[0]===this._oldSelectionStart[0]&&p[1]===this._oldSelectionStart[1]&&E[0]===this._oldSelectionEnd[0]&&E[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(p,E,L)):this._oldHasSelection&&this._fireOnSelectionChange(p,E,L)}_fireOnSelectionChange(p,E,L){this._oldSelectionStart=p,this._oldSelectionEnd=E,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(p){this.clearSelection(),this._trimListener.dispose(),this._trimListener=p.activeBuffer.lines.onTrim((E=>this._handleTrim(E)))}_convertViewportColToCharacterIndex(p,E){let L=E;for(let T=0;E>=T;T++){const A=p.loadCell(T,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:A>1&&E!==T&&(L+=A-1)}return L}setSelection(p,E,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[p,E],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(p){this._isClickInSelection(p)||(this._selectWordAtCursor(p,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(p,E,L=!0,T=!0){if(p[0]>=this._bufferService.cols)return;const A=this._bufferService.buffer,M=A.lines.get(p[1]);if(!M)return;const z=A.translateBufferLineToString(p[1],!1);let Y=this._convertViewportColToCharacterIndex(M,p[0]),N=Y;const I=p[0]-Y;let G=0,D=0,H=0,R=0;if(z.charAt(Y)===" "){for(;Y>0&&z.charAt(Y-1)===" ";)Y--;for(;N<z.length&&z.charAt(N+1)===" ";)N++}else{let Z=p[0],he=p[0];M.getWidth(Z)===0&&(G++,Z--),M.getWidth(he)===2&&(D++,he++);const ue=M.getString(he).length;for(ue>1&&(R+=ue-1,N+=ue-1);Z>0&&Y>0&&!this._isCharWordSeparator(M.loadCell(Z-1,this._workCell));){M.loadCell(Z-1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===0?(G++,Z--):F>1&&(H+=F-1,Y-=F-1),Y--,Z--}for(;he<M.length&&N+1<z.length&&!this._isCharWordSeparator(M.loadCell(he+1,this._workCell));){M.loadCell(he+1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===2?(D++,he++):F>1&&(R+=F-1,N+=F-1),N++,he++}}N++;let O=Y+I-G+H,X=Math.min(this._bufferService.cols,N-Y+G+D-H-R);if(E||z.slice(Y,N).trim()!==""){if(L&&O===0&&M.getCodePoint(0)!==32){const Z=A.lines.get(p[1]-1);if(Z&&M.isWrapped&&Z.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,p[1]-1],!1,!0,!1);if(he){const ue=this._bufferService.cols-he.start;O-=ue,X+=ue}}}if(T&&O+X===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){const Z=A.lines.get(p[1]+1);if(Z!=null&&Z.isWrapped&&Z.getCodePoint(0)!==32){const he=this._getWordAt([0,p[1]+1],!1,!1,!0);he&&(X+=he.length)}}return{start:O,length:X}}}_selectWordAt(p,E){const L=this._getWordAt(p,E);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,p[1]--;this._model.selectionStart=[L.start,p[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(p){const E=this._getWordAt(p,!0);if(E){let L=p[1];for(;E.start<0;)E.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,L]}}_isCharWordSeparator(p){return p.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(p.getChars())>=0}_selectLineAt(p){const E=this._bufferService.buffer.getWrappedRangeForLine(p),L={start:{x:0,y:E.first},end:{x:this._bufferService.cols-1,y:E.last}};this._model.selectionStart=[0,E.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,l.getRangeLength)(L,this._bufferService.cols)}};n.SelectionService=w=_([v(3,g.IBufferService),v(4,g.ICoreService),v(5,b.IMouseService),v(6,g.IOptionsService),v(7,b.IRenderService),v(8,b.ICoreBrowserService)],w)},4725:(P,n,d)=>{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(8343);n.ICharSizeService=(0,_.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),n.IMouseService=(0,_.createDecorator)("MouseService"),n.IRenderService=(0,_.createDecorator)("RenderService"),n.ISelectionService=(0,_.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,_.createDecorator)("ThemeService"),n.ILinkProviderService=(0,_.createDecorator)("LinkProviderService")},6731:function(P,n,d){var _=this&&this.__decorate||function(w,p,E,L){var T,A=arguments.length,M=A<3?p:L===null?L=Object.getOwnPropertyDescriptor(p,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(w,p,E,L);else for(var z=w.length-1;z>=0;z--)(T=w[z])&&(M=(A<3?T(M):A>3?T(p,E,M):T(p,E))||M);return A>3&&M&&Object.defineProperty(p,E,M),M},v=this&&this.__param||function(w,p){return function(E,L){p(E,L,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const o=d(7239),m=d(8055),y=d(8460),b=d(844),f=d(2585),r=m.css.toColor("#ffffff"),h=m.css.toColor("#000000"),l=m.css.toColor("#ffffff"),c=m.css.toColor("#000000"),g={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],p=[0,95,135,175,215,255];for(let E=0;E<216;E++){const L=p[E/36%6|0],T=p[E/6%6|0],A=p[E%6];w.push({css:m.channels.toCss(L,T,A),rgba:m.channels.toRgba(L,T,A)})}for(let E=0;E<24;E++){const L=8+10*E;w.push({css:m.channels.toCss(L,L,L),rgba:m.channels.toRgba(L,L,L)})}return w})());let C=n.ThemeService=class extends b.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new o.ColorContrastCache,this._halfContrastCache=new o.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:l,cursorAccent:c,selectionForeground:void 0,selectionBackgroundTransparent:g,selectionBackgroundOpaque:m.color.blend(h,g),selectionInactiveBackgroundTransparent:g,selectionInactiveBackgroundOpaque:m.color.blend(h,g),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(w={}){const p=this._colors;if(p.foreground=S(w.foreground,r),p.background=S(w.background,h),p.cursor=S(w.cursor,l),p.cursorAccent=S(w.cursorAccent,c),p.selectionBackgroundTransparent=S(w.selectionBackground,g),p.selectionBackgroundOpaque=m.color.blend(p.background,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundTransparent=S(w.selectionInactiveBackground,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundOpaque=m.color.blend(p.background,p.selectionInactiveBackgroundTransparent),p.selectionForeground=w.selectionForeground?S(w.selectionForeground,m.NULL_COLOR):void 0,p.selectionForeground===m.NULL_COLOR&&(p.selectionForeground=void 0),m.color.isOpaque(p.selectionBackgroundTransparent)&&(p.selectionBackgroundTransparent=m.color.opacity(p.selectionBackgroundTransparent,.3)),m.color.isOpaque(p.selectionInactiveBackgroundTransparent)&&(p.selectionInactiveBackgroundTransparent=m.color.opacity(p.selectionInactiveBackgroundTransparent,.3)),p.ansi=n.DEFAULT_ANSI_COLORS.slice(),p.ansi[0]=S(w.black,n.DEFAULT_ANSI_COLORS[0]),p.ansi[1]=S(w.red,n.DEFAULT_ANSI_COLORS[1]),p.ansi[2]=S(w.green,n.DEFAULT_ANSI_COLORS[2]),p.ansi[3]=S(w.yellow,n.DEFAULT_ANSI_COLORS[3]),p.ansi[4]=S(w.blue,n.DEFAULT_ANSI_COLORS[4]),p.ansi[5]=S(w.magenta,n.DEFAULT_ANSI_COLORS[5]),p.ansi[6]=S(w.cyan,n.DEFAULT_ANSI_COLORS[6]),p.ansi[7]=S(w.white,n.DEFAULT_ANSI_COLORS[7]),p.ansi[8]=S(w.brightBlack,n.DEFAULT_ANSI_COLORS[8]),p.ansi[9]=S(w.brightRed,n.DEFAULT_ANSI_COLORS[9]),p.ansi[10]=S(w.brightGreen,n.DEFAULT_ANSI_COLORS[10]),p.ansi[11]=S(w.brightYellow,n.DEFAULT_ANSI_COLORS[11]),p.ansi[12]=S(w.brightBlue,n.DEFAULT_ANSI_COLORS[12]),p.ansi[13]=S(w.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),p.ansi[14]=S(w.brightCyan,n.DEFAULT_ANSI_COLORS[14]),p.ansi[15]=S(w.brightWhite,n.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const E=Math.min(p.ansi.length-16,w.extendedAnsi.length);for(let L=0;L<E;L++)p.ansi[L+16]=S(w.extendedAnsi[L],n.DEFAULT_ANSI_COLORS[L+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){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[w]=this._restoreColors.ansi[w]}else for(let p=0;p<this._restoreColors.ansi.length;++p)this._colors.ansi[p]=this._restoreColors.ansi[p]}modifyColors(w){w(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 S(w,p){if(w!==void 0)try{return m.css.toColor(w)}catch{}return p}n.ThemeService=C=_([v(0,f.IOptionsService)],C)},6349:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const _=d(8460),v=d(844);class o extends v.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new _.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new _.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new _.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(y){if(this._maxLength===y)return;const b=new Array(y);for(let f=0;f<Math.min(y,this.length);f++)b[f]=this._array[this._getCyclicIndex(f)];this._array=b,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let b=this._length;b<y;b++)this._array[b]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,b){this._array[this._getCyclicIndex(y)]=b}push(y){this._array[this._getCyclicIndex(this._length)]=y,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(y,b,...f){if(b){for(let r=y;r<this._length-b;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+b)];this._length-=b,this.onDeleteEmitter.fire({index:y,amount:b})}for(let r=this._length-1;r>=y;r--)this._array[this._getCyclicIndex(r+f.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<f.length;r++)this._array[this._getCyclicIndex(y+r)]=f[r];if(f.length&&this.onInsertEmitter.fire({index:y,amount:f.length}),this._length+f.length>this._maxLength){const r=this._length+f.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=f.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,b,f){if(!(b<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+f<0)throw new Error("Cannot shift elements in list beyond index 0");if(f>0){for(let h=b-1;h>=0;h--)this.set(y+h+f,this.get(y+h));const r=y+b+f-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<b;r++)this.set(y+r+f,this.get(y+r))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}n.CircularList=o},1439:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function d(_,v=5){if(typeof _!="object")return _;const o=Array.isArray(_)?[]:{};for(const m in _)o[m]=v<=1?_[m]:_[m]&&d(_[m],v-1);return o}},8055:(P,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 d=0,_=0,v=0,o=0;var m,y,b,f,r;function h(c){const g=c.toString(16);return g.length<2?"0"+g:g}function l(c,g){return c<g?(g+.05)/(c+.05):(c+.05)/(g+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(g,C,S,w){return w!==void 0?`#${h(g)}${h(C)}${h(S)}${h(w)}`:`#${h(g)}${h(C)}${h(S)}`},c.toRgba=function(g,C,S,w=255){return(g<<24|C<<16|S<<8|w)>>>0},c.toColor=function(g,C,S,w){return{css:c.toCss(g,C,S,w),rgba:c.toRgba(g,C,S,w)}}})(m||(n.channels=m={})),(function(c){function g(C,S){return o=Math.round(255*S),[d,_,v]=r.toChannels(C.rgba),{css:m.toCss(d,_,v,o),rgba:m.toRgba(d,_,v,o)}}c.blend=function(C,S){if(o=(255&S.rgba)/255,o===1)return{css:S.css,rgba:S.rgba};const w=S.rgba>>24&255,p=S.rgba>>16&255,E=S.rgba>>8&255,L=C.rgba>>24&255,T=C.rgba>>16&255,A=C.rgba>>8&255;return d=L+Math.round((w-L)*o),_=T+Math.round((p-T)*o),v=A+Math.round((E-A)*o),{css:m.toCss(d,_,v),rgba:m.toRgba(d,_,v)}},c.isOpaque=function(C){return(255&C.rgba)==255},c.ensureContrastRatio=function(C,S,w){const p=r.ensureContrastRatio(C.rgba,S.rgba,w);if(p)return m.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(C){const S=(255|C.rgba)>>>0;return[d,_,v]=r.toChannels(S),{css:m.toCss(d,_,v),rgba:S}},c.opacity=g,c.multiplyOpacity=function(C,S){return o=255&C.rgba,g(C,o*S/255)},c.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(y||(n.color=y={})),(function(c){let g,C;try{const S=document.createElement("canvas");S.width=1,S.height=1;const w=S.getContext("2d",{willReadFrequently:!0});w&&(g=w,g.globalCompositeOperation="copy",C=g.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),m.toColor(d,_,v);case 5:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),o=parseInt(S.slice(4,5).repeat(2),16),m.toColor(d,_,v,o);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const w=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return d=parseInt(w[1]),_=parseInt(w[2]),v=parseInt(w[3]),o=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),m.toColor(d,_,v,o);if(!g||!C)throw new Error("css.toColor: Unsupported css format");if(g.fillStyle=C,g.fillStyle=S,typeof g.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(g.fillRect(0,0,1,1),[d,_,v,o]=g.getImageData(0,0,1,1).data,o!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(d,_,v,o),css:S}}})(b||(n.css=b={})),(function(c){function g(C,S,w){const p=C/255,E=S/255,L=w/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(C){return g(C>>16&255,C>>8&255,255&C)},c.relativeLuminance2=g})(f||(n.rgb=f={})),(function(c){function g(S,w,p){const E=S>>24&255,L=S>>16&255,T=S>>8&255;let A=w>>24&255,M=w>>16&255,z=w>>8&255,Y=l(f.relativeLuminance2(A,M,z),f.relativeLuminance2(E,L,T));for(;Y<p&&(A>0||M>0||z>0);)A-=Math.max(0,Math.ceil(.1*A)),M-=Math.max(0,Math.ceil(.1*M)),z-=Math.max(0,Math.ceil(.1*z)),Y=l(f.relativeLuminance2(A,M,z),f.relativeLuminance2(E,L,T));return(A<<24|M<<16|z<<8|255)>>>0}function C(S,w,p){const E=S>>24&255,L=S>>16&255,T=S>>8&255;let A=w>>24&255,M=w>>16&255,z=w>>8&255,Y=l(f.relativeLuminance2(A,M,z),f.relativeLuminance2(E,L,T));for(;Y<p&&(A<255||M<255||z<255);)A=Math.min(255,A+Math.ceil(.1*(255-A))),M=Math.min(255,M+Math.ceil(.1*(255-M))),z=Math.min(255,z+Math.ceil(.1*(255-z))),Y=l(f.relativeLuminance2(A,M,z),f.relativeLuminance2(E,L,T));return(A<<24|M<<16|z<<8|255)>>>0}c.blend=function(S,w){if(o=(255&w)/255,o===1)return w;const p=w>>24&255,E=w>>16&255,L=w>>8&255,T=S>>24&255,A=S>>16&255,M=S>>8&255;return d=T+Math.round((p-T)*o),_=A+Math.round((E-A)*o),v=M+Math.round((L-M)*o),m.toRgba(d,_,v)},c.ensureContrastRatio=function(S,w,p){const E=f.relativeLuminance(S>>8),L=f.relativeLuminance(w>>8);if(l(E,L)<p){if(L<E){const M=g(S,w,p),z=l(E,f.relativeLuminance(M>>8));if(z<p){const Y=C(S,w,p);return z>l(E,f.relativeLuminance(Y>>8))?M:Y}return M}const T=C(S,w,p),A=l(E,f.relativeLuminance(T>>8));if(A<p){const M=g(S,w,p);return A>l(E,f.relativeLuminance(M>>8))?T:M}return T}},c.reduceLuminance=g,c.increaseLuminance=C,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=l},8969:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const _=d(844),v=d(2585),o=d(4348),m=d(7866),y=d(744),b=d(7302),f=d(6975),r=d(8460),h=d(1753),l=d(1480),c=d(7994),g=d(9282),C=d(5435),S=d(5981),w=d(2660);let p=!1;class E extends _.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((T=>{var A;(A=this._onScrollApi)==null||A.fire(T.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(T){for(const A in T)this.optionsService.options[A]=T[A]}constructor(T){super(),this._windowsWrappingHeuristics=this.register(new _.MutableDisposable),this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new r.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new r.EventEmitter),this._instantiationService=new o.InstantiationService,this.optionsService=this.register(new b.OptionsService(T)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(f.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(l.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(c.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new C.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,r.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,r.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,r.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,r.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((A=>{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((A=>{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 S.WriteBuffer(((A,M)=>this._inputHandler.parse(A,M)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(T,A){this._writeBuffer.write(T,A)}writeSync(T,A){this._logService.logLevel<=v.LogLevelEnum.WARN&&!p&&(this._logService.warn("writeSync is unreliable and will be removed soon."),p=!0),this._writeBuffer.writeSync(T,A)}input(T,A=!0){this.coreService.triggerDataEvent(T,A)}resize(T,A){isNaN(T)||isNaN(A)||(T=Math.max(T,y.MINIMUM_COLS),A=Math.max(A,y.MINIMUM_ROWS),this._bufferService.resize(T,A))}scroll(T,A=!1){this._bufferService.scroll(T,A)}scrollLines(T,A,M){this._bufferService.scrollLines(T,A,M)}scrollPages(T){this.scrollLines(T*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(T){const A=T-this._bufferService.buffer.ydisp;A!==0&&this.scrollLines(A)}registerEscHandler(T,A){return this._inputHandler.registerEscHandler(T,A)}registerDcsHandler(T,A){return this._inputHandler.registerDcsHandler(T,A)}registerCsiHandler(T,A){return this._inputHandler.registerCsiHandler(T,A)}registerOscHandler(T,A){return this._inputHandler.registerOscHandler(T,A)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let T=!1;const A=this.optionsService.rawOptions.windowsPty;A&&A.buildNumber!==void 0&&A.buildNumber!==void 0?T=A.backend==="conpty"&&A.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(T=!0),T?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const T=[];T.push(this.onLineFeed(g.updateWindowsModeWrappedState.bind(null,this._bufferService))),T.push(this.registerCsiHandler({final:"H"},(()=>((0,g.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,_.toDisposable)((()=>{for(const A of T)A.dispose()}))}}}n.CoreTerminal=E},8460:(P,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=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===d)return void this._listeners.splice(_,1)}}})),this._event}fire(d,_){const v=[];for(let o=0;o<this._listeners.length;o++)v.push(this._listeners[o]);for(let o=0;o<v.length;o++)v[o].call(void 0,d,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(d,_){return d((v=>_.fire(v)))},n.runAndSubscribe=function(d,_){return _(void 0),d((v=>_(v)))}},5435:function(P,n,d){var _=this&&this.__decorate||function(G,D,H,R){var O,X=arguments.length,Z=X<3?D:R===null?R=Object.getOwnPropertyDescriptor(D,H):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(G,D,H,R);else for(var he=G.length-1;he>=0;he--)(O=G[he])&&(Z=(X<3?O(Z):X>3?O(D,H,Z):O(D,H))||Z);return X>3&&Z&&Object.defineProperty(D,H,Z),Z},v=this&&this.__param||function(G,D){return function(H,R){D(H,R,G)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const o=d(2584),m=d(7116),y=d(2015),b=d(844),f=d(482),r=d(8437),h=d(8460),l=d(643),c=d(511),g=d(3734),C=d(2585),S=d(1480),w=d(6242),p=d(6351),E=d(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},T=131072;function A(G,D){if(G>24)return D.setWinLines||!1;switch(G){case 1:return!!D.restoreWin;case 2:return!!D.minimizeWin;case 3:return!!D.setWinPosition;case 4:return!!D.setWinSizePixels;case 5:return!!D.raiseWin;case 6:return!!D.lowerWin;case 7:return!!D.refreshWin;case 8:return!!D.setWinSizeChars;case 9:return!!D.maximizeWin;case 10:return!!D.fullscreenWin;case 11:return!!D.getWinState;case 13:return!!D.getWinPosition;case 14:return!!D.getWinSizePixels;case 15:return!!D.getScreenSizePixels;case 16:return!!D.getCellSizePixels;case 18:return!!D.getWinSizeChars;case 19:return!!D.getScreenSizeChars;case 20:return!!D.getIconTitle;case 21:return!!D.getWinTitle;case 22:return!!D.pushTitle;case 23:return!!D.popTitle;case 24:return!!D.setWinLines}return!1}var M;(function(G){G[G.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",G[G.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(n.WindowsOptionsReportType=M={}));let z=0;class Y extends b.Disposable{getAttrData(){return this._curAttrData}constructor(D,H,R,O,X,Z,he,ue,F=new y.EscapeSequenceParser){super(),this._bufferService=D,this._charsetService=H,this._coreService=R,this._logService=O,this._optionsService=X,this._oscLinkService=Z,this._coreMouseService=he,this._unicodeService=ue,this._parser=F,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new f.StringToUtf32,this._utf8Decoder=new f.Utf8ToUtf32,this._workCell=new c.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.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 N(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((k=>this._activeBuffer=k.activeBuffer))),this._parser.setCsiHandlerFallback(((k,ne)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(k),params:ne.toArray()})})),this._parser.setEscHandlerFallback((k=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(k)})})),this._parser.setExecuteHandlerFallback((k=>{this._logService.debug("Unknown EXECUTE code: ",{code:k})})),this._parser.setOscHandlerFallback(((k,ne,se)=>{this._logService.debug("Unknown OSC code: ",{identifier:k,action:ne,data:se})})),this._parser.setDcsHandlerFallback(((k,ne,se)=>{ne==="HOOK"&&(se=se.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(k),action:ne,payload:se})})),this._parser.setPrintHandler(((k,ne,se)=>this.print(k,ne,se))),this._parser.registerCsiHandler({final:"@"},(k=>this.insertChars(k))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(k=>this.scrollLeft(k))),this._parser.registerCsiHandler({final:"A"},(k=>this.cursorUp(k))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(k=>this.scrollRight(k))),this._parser.registerCsiHandler({final:"B"},(k=>this.cursorDown(k))),this._parser.registerCsiHandler({final:"C"},(k=>this.cursorForward(k))),this._parser.registerCsiHandler({final:"D"},(k=>this.cursorBackward(k))),this._parser.registerCsiHandler({final:"E"},(k=>this.cursorNextLine(k))),this._parser.registerCsiHandler({final:"F"},(k=>this.cursorPrecedingLine(k))),this._parser.registerCsiHandler({final:"G"},(k=>this.cursorCharAbsolute(k))),this._parser.registerCsiHandler({final:"H"},(k=>this.cursorPosition(k))),this._parser.registerCsiHandler({final:"I"},(k=>this.cursorForwardTab(k))),this._parser.registerCsiHandler({final:"J"},(k=>this.eraseInDisplay(k,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(k=>this.eraseInDisplay(k,!0))),this._parser.registerCsiHandler({final:"K"},(k=>this.eraseInLine(k,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(k=>this.eraseInLine(k,!0))),this._parser.registerCsiHandler({final:"L"},(k=>this.insertLines(k))),this._parser.registerCsiHandler({final:"M"},(k=>this.deleteLines(k))),this._parser.registerCsiHandler({final:"P"},(k=>this.deleteChars(k))),this._parser.registerCsiHandler({final:"S"},(k=>this.scrollUp(k))),this._parser.registerCsiHandler({final:"T"},(k=>this.scrollDown(k))),this._parser.registerCsiHandler({final:"X"},(k=>this.eraseChars(k))),this._parser.registerCsiHandler({final:"Z"},(k=>this.cursorBackwardTab(k))),this._parser.registerCsiHandler({final:"`"},(k=>this.charPosAbsolute(k))),this._parser.registerCsiHandler({final:"a"},(k=>this.hPositionRelative(k))),this._parser.registerCsiHandler({final:"b"},(k=>this.repeatPrecedingCharacter(k))),this._parser.registerCsiHandler({final:"c"},(k=>this.sendDeviceAttributesPrimary(k))),this._parser.registerCsiHandler({prefix:">",final:"c"},(k=>this.sendDeviceAttributesSecondary(k))),this._parser.registerCsiHandler({final:"d"},(k=>this.linePosAbsolute(k))),this._parser.registerCsiHandler({final:"e"},(k=>this.vPositionRelative(k))),this._parser.registerCsiHandler({final:"f"},(k=>this.hVPosition(k))),this._parser.registerCsiHandler({final:"g"},(k=>this.tabClear(k))),this._parser.registerCsiHandler({final:"h"},(k=>this.setMode(k))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(k=>this.setModePrivate(k))),this._parser.registerCsiHandler({final:"l"},(k=>this.resetMode(k))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(k=>this.resetModePrivate(k))),this._parser.registerCsiHandler({final:"m"},(k=>this.charAttributes(k))),this._parser.registerCsiHandler({final:"n"},(k=>this.deviceStatus(k))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(k=>this.deviceStatusPrivate(k))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(k=>this.softReset(k))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(k=>this.setCursorStyle(k))),this._parser.registerCsiHandler({final:"r"},(k=>this.setScrollRegion(k))),this._parser.registerCsiHandler({final:"s"},(k=>this.saveCursor(k))),this._parser.registerCsiHandler({final:"t"},(k=>this.windowOptions(k))),this._parser.registerCsiHandler({final:"u"},(k=>this.restoreCursor(k))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(k=>this.insertColumns(k))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(k=>this.deleteColumns(k))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(k=>this.selectProtected(k))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(k=>this.requestMode(k,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(k=>this.requestMode(k,!1))),this._parser.setExecuteHandler(o.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(o.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(o.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(o.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(o.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(o.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(o.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(o.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(o.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new w.OscHandler((k=>(this.setTitle(k),this.setIconName(k),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((k=>this.setIconName(k)))),this._parser.registerOscHandler(2,new w.OscHandler((k=>this.setTitle(k)))),this._parser.registerOscHandler(4,new w.OscHandler((k=>this.setOrReportIndexedColor(k)))),this._parser.registerOscHandler(8,new w.OscHandler((k=>this.setHyperlink(k)))),this._parser.registerOscHandler(10,new w.OscHandler((k=>this.setOrReportFgColor(k)))),this._parser.registerOscHandler(11,new w.OscHandler((k=>this.setOrReportBgColor(k)))),this._parser.registerOscHandler(12,new w.OscHandler((k=>this.setOrReportCursorColor(k)))),this._parser.registerOscHandler(104,new w.OscHandler((k=>this.restoreIndexedColor(k)))),this._parser.registerOscHandler(110,new w.OscHandler((k=>this.restoreFgColor(k)))),this._parser.registerOscHandler(111,new w.OscHandler((k=>this.restoreBgColor(k)))),this._parser.registerOscHandler(112,new w.OscHandler((k=>this.restoreCursorColor(k)))),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 k in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:k},(()=>this.selectCharset("("+k))),this._parser.registerEscHandler({intermediates:")",final:k},(()=>this.selectCharset(")"+k))),this._parser.registerEscHandler({intermediates:"*",final:k},(()=>this.selectCharset("*"+k))),this._parser.registerEscHandler({intermediates:"+",final:k},(()=>this.selectCharset("+"+k))),this._parser.registerEscHandler({intermediates:"-",final:k},(()=>this.selectCharset("-"+k))),this._parser.registerEscHandler({intermediates:".",final:k},(()=>this.selectCharset("."+k))),this._parser.registerEscHandler({intermediates:"/",final:k},(()=>this.selectCharset("/"+k)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((k=>(this._logService.error("Parsing error: ",k),k))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new p.DcsHandler(((k,ne)=>this.requestStatusString(k,ne))))}_preserveStack(D,H,R,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=D,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=R,this._parseStack.position=O}_logSlowResolvingAsync(D){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([D,new Promise(((H,R)=>setTimeout((()=>R("#SLOW_TIMEOUT")),5e3)))]).catch((H=>{if(H!=="#SLOW_TIMEOUT")throw H;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(D,H){let R,O=this._activeBuffer.x,X=this._activeBuffer.y,Z=0;const he=this._parseStack.paused;if(he){if(R=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(R),R;O=this._parseStack.cursorStartX,X=this._parseStack.cursorStartY,this._parseStack.paused=!1,D.length>T&&(Z=this._parseStack.position+T)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof D=="string"?` "${D}"`:` "${Array.prototype.map.call(D,(k=>String.fromCharCode(k))).join("")}"`),typeof D=="string"?D.split("").map((k=>k.charCodeAt(0))):D),this._parseBuffer.length<D.length&&this._parseBuffer.length<T&&(this._parseBuffer=new Uint32Array(Math.min(D.length,T))),he||this._dirtyRowTracker.clearRange(),D.length>T)for(let k=Z;k<D.length;k+=T){const ne=k+T<D.length?k+T:D.length,se=typeof D=="string"?this._stringDecoder.decode(D.substring(k,ne),this._parseBuffer):this._utf8Decoder.decode(D.subarray(k,ne),this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,se))return this._preserveStack(O,X,se,k),this._logSlowResolvingAsync(R),R}else if(!he){const k=typeof D=="string"?this._stringDecoder.decode(D,this._parseBuffer):this._utf8Decoder.decode(D,this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,k))return this._preserveStack(O,X,k,0),this._logSlowResolvingAsync(R),R}this._activeBuffer.x===O&&this._activeBuffer.y===X||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),F=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);F<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(F,this._bufferService.rows-1),Math.min(ue,this._bufferService.rows-1))}print(D,H,R){let O,X;const Z=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,F=this._coreService.decPrivateModes.wraparound,k=this._coreService.modes.insertMode,ne=this._curAttrData;let se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&R-H>0&&se.getWidth(this._activeBuffer.x-1)===2&&se.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ne);let de=this._parser.precedingJoinState;for(let fe=H;fe<R;++fe){if(O=D[fe],O<127&&Z){const Ke=Z[String.fromCharCode(O)];Ke&&(O=Ke.charCodeAt(0))}const we=this._unicodeService.charProperties(O,de);X=S.UnicodeService.extractWidth(we);const me=S.UnicodeService.extractShouldJoin(we),Ne=me?S.UnicodeService.extractWidth(de):0;if(de=we,he&&this._onA11yChar.fire((0,f.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+X-Ne>ue){if(F){const Ke=se;let ye=this._activeBuffer.x-Ne;for(this._activeBuffer.x=Ne,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),se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ne>0&&se instanceof r.BufferLine&&se.copyCellsFrom(Ke,ye,0,Ne,!1);ye<ue;)Ke.setCellFromCodepoint(ye++,0,1,ne)}else if(this._activeBuffer.x=ue-1,X===2)continue}if(me&&this._activeBuffer.x){const Ke=se.getWidth(this._activeBuffer.x-1)?1:2;se.addCodepointToCell(this._activeBuffer.x-Ke,O,X);for(let ye=X-Ne;--ye>=0;)se.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}else if(k&&(se.insertCells(this._activeBuffer.x,X-Ne,this._activeBuffer.getNullCell(ne)),se.getWidth(ue-1)===2&&se.setCellFromCodepoint(ue-1,l.NULL_CELL_CODE,l.NULL_CELL_WIDTH,ne)),se.setCellFromCodepoint(this._activeBuffer.x++,O,X,ne),X>0)for(;--X;)se.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}this._parser.precedingJoinState=de,this._activeBuffer.x<ue&&R-H>0&&se.getWidth(this._activeBuffer.x)===0&&!se.hasContent(this._activeBuffer.x)&&se.setCellFromCodepoint(this._activeBuffer.x,0,1,ne),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(D,H){return D.final!=="t"||D.prefix||D.intermediates?this._parser.registerCsiHandler(D,H):this._parser.registerCsiHandler(D,(R=>!A(R.params[0],this._optionsService.rawOptions.windowOptions)||H(R)))}registerDcsHandler(D,H){return this._parser.registerDcsHandler(D,new p.DcsHandler(H))}registerEscHandler(D,H){return this._parser.registerEscHandler(D,H)}registerOscHandler(D,H){return this._parser.registerOscHandler(D,new w.OscHandler(H))}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 D;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&&((D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&D.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const D=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-D),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(D=this._bufferService.cols-1){this._activeBuffer.x=Math.min(D,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(D,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=D,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=D,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(D,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+D,this._activeBuffer.y+H)}cursorUp(D){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,D.params[0]||1)):this._moveCursor(0,-(D.params[0]||1)),!0}cursorDown(D){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,D.params[0]||1)):this._moveCursor(0,D.params[0]||1),!0}cursorForward(D){return this._moveCursor(D.params[0]||1,0),!0}cursorBackward(D){return this._moveCursor(-(D.params[0]||1),0),!0}cursorNextLine(D){return this.cursorDown(D),this._activeBuffer.x=0,!0}cursorPrecedingLine(D){return this.cursorUp(D),this._activeBuffer.x=0,!0}cursorCharAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(D){return this._setCursor(D.length>=2?(D.params[1]||1)-1:0,(D.params[0]||1)-1),!0}charPosAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(D){return this._moveCursor(D.params[0]||1,0),!0}linePosAbsolute(D){return this._setCursor(this._activeBuffer.x,(D.params[0]||1)-1),!0}vPositionRelative(D){return this._moveCursor(0,D.params[0]||1),!0}hVPosition(D){return this.cursorPosition(D),!0}tabClear(D){const H=D.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=D.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=D.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(D){const H=D.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(D,H,R,O=!1,X=!1){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);Z.replaceCells(H,R,this._activeBuffer.getNullCell(this._eraseAttrData()),X),O&&(Z.isWrapped=!1)}_resetBufferLine(D,H=!1){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);R&&(R.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+D),R.isWrapped=!1)}eraseInDisplay(D,H=!1){let R;switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);R<this._bufferService.rows;R++)this._resetBufferLine(R,H);this._dirtyRowTracker.markDirty(R);break;case 1:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(R+1).isWrapped=!1);R--;)this._resetBufferLine(R,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(R=this._bufferService.rows,this._dirtyRowTracker.markDirty(R-1);R--;)this._resetBufferLine(R,H);this._dirtyRowTracker.markDirty(0);break;case 3:const O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(D,H=!1){switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,H);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,H)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(D){this._restrictCursor();let H=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,X=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;H--;)this._activeBuffer.lines.splice(X-1,1),this._activeBuffer.lines.splice(R,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(D){this._restrictCursor();let H=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y;let O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;H--;)this._activeBuffer.lines.splice(R,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(D){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(D){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(D){let H=D.params[0]||1;for(;H--;)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(D){let H=D.params[0]||1;for(;H--;)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(r.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=D.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);O.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=D.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);O.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=D.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);O.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=D.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);O.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(D){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(D.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(D){const H=this._parser.precedingJoinState;if(!H)return!0;const R=D.params[0]||1,O=S.UnicodeService.extractWidth(H),X=this._activeBuffer.x-O,Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(X),he=new Uint32Array(Z.length*R);let ue=0;for(let k=0;k<Z.length;){const ne=Z.codePointAt(k)||0;he[ue++]=ne,k+=ne>65535?2:1}let F=ue;for(let k=1;k<R;++k)he.copyWithin(F,0,ue),F+=ue;return this.print(he,0,F),!0}sendDeviceAttributesPrimary(D){return D.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(o.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(o.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(D){return D.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(o.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(o.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(D.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c")),!0}_is(D){return(this._optionsService.rawOptions.termName+"").indexOf(D)===0}setMode(D){for(let H=0;H<D.length;H++)switch(D.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(D){for(let H=0;H<D.length;H++)switch(D.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.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(D){for(let H=0;H<D.length;H++)switch(D.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(D){for(let H=0;H<D.length;H++)switch(D.params[H]){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(),D.params[H]===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(D,H){const R=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:X}=this._coreMouseService,Z=this._coreService,{buffers:he,cols:ue}=this._bufferService,{active:F,alt:k}=he,ne=this._optionsService.rawOptions,se=me=>me?1:2,de=D.params[0];return fe=de,we=H?de===2?4:de===4?se(Z.modes.insertMode):de===12?3:de===20?se(ne.convertEol):0:de===1?se(R.applicationCursorKeys):de===3?ne.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:de===6?se(R.origin):de===7?se(R.wraparound):de===8?3:de===9?se(O==="X10"):de===12?se(ne.cursorBlink):de===25?se(!Z.isCursorHidden):de===45?se(R.reverseWraparound):de===66?se(R.applicationKeypad):de===67?4:de===1e3?se(O==="VT200"):de===1002?se(O==="DRAG"):de===1003?se(O==="ANY"):de===1004?se(R.sendFocus):de===1005?4:de===1006?se(X==="SGR"):de===1015?4:de===1016?se(X==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?se(F===k):de===2004?se(R.bracketedPasteMode):0,Z.triggerDataEvent(`${o.C0.ESC}[${H?"":"?"}${fe};${we}$y`),!0;var fe,we}_updateAttrColor(D,H,R,O,X){return H===2?(D|=50331648,D&=-16777216,D|=g.AttributeData.fromColorRGB([R,O,X])):H===5&&(D&=-50331904,D|=33554432|255&R),D}_extractColor(D,H,R){const O=[0,0,-1,0,0,0];let X=0,Z=0;do{if(O[Z+X]=D.params[H+Z],D.hasSubParams(H+Z)){const he=D.getSubParams(H+Z);let ue=0;do O[1]===5&&(X=1),O[Z+ue+1+X]=he[ue];while(++ue<he.length&&ue+Z+1+X<O.length);break}if(O[1]===5&&Z+X>=2||O[1]===2&&Z+X>=5)break;O[1]&&(X=1)}while(++Z+H<D.length&&Z+X<O.length);for(let he=2;he<O.length;++he)O[he]===-1&&(O[he]=0);switch(O[0]){case 38:R.fg=this._updateAttrColor(R.fg,O[1],O[3],O[4],O[5]);break;case 48:R.bg=this._updateAttrColor(R.bg,O[1],O[3],O[4],O[5]);break;case 58:R.extended=R.extended.clone(),R.extended.underlineColor=this._updateAttrColor(R.extended.underlineColor,O[1],O[3],O[4],O[5])}return Z}_processUnderline(D,H){H.extended=H.extended.clone(),(!~D||D>5)&&(D=1),H.extended.underlineStyle=D,H.fg|=268435456,D===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(D){D.fg=r.DEFAULT_ATTR_DATA.fg,D.bg=r.DEFAULT_ATTR_DATA.bg,D.extended=D.extended.clone(),D.extended.underlineStyle=0,D.extended.underlineColor&=-67108864,D.updateExtended()}charAttributes(D){if(D.length===1&&D.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=D.length;let R;const O=this._curAttrData;for(let X=0;X<H;X++)R=D.params[X],R>=30&&R<=37?(O.fg&=-50331904,O.fg|=16777216|R-30):R>=40&&R<=47?(O.bg&=-50331904,O.bg|=16777216|R-40):R>=90&&R<=97?(O.fg&=-50331904,O.fg|=16777224|R-90):R>=100&&R<=107?(O.bg&=-50331904,O.bg|=16777224|R-100):R===0?this._processSGR0(O):R===1?O.fg|=134217728:R===3?O.bg|=67108864:R===4?(O.fg|=268435456,this._processUnderline(D.hasSubParams(X)?D.getSubParams(X)[0]:1,O)):R===5?O.fg|=536870912:R===7?O.fg|=67108864:R===8?O.fg|=1073741824:R===9?O.fg|=2147483648:R===2?O.bg|=134217728:R===21?this._processUnderline(2,O):R===22?(O.fg&=-134217729,O.bg&=-134217729):R===23?O.bg&=-67108865:R===24?(O.fg&=-268435457,this._processUnderline(0,O)):R===25?O.fg&=-536870913:R===27?O.fg&=-67108865:R===28?O.fg&=-1073741825:R===29?O.fg&=2147483647:R===39?(O.fg&=-67108864,O.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):R===49?(O.bg&=-67108864,O.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):R===38||R===48||R===58?X+=this._extractColor(D,X,O):R===53?O.bg|=1073741824:R===55?O.bg&=-1073741825:R===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):R===100?(O.fg&=-67108864,O.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",R);return!0}deviceStatus(D){switch(D.params[0]){case 5:this._coreService.triggerDataEvent(`${o.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[${H};${R}R`)}return!0}deviceStatusPrivate(D){if(D.params[0]===6){const H=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[?${H};${R}R`)}return!0}softReset(D){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=r.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(D){const H=D.params[0]||1;switch(H){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 R=H%2==1;return this._optionsService.options.cursorBlink=R,!0}setScrollRegion(D){const H=D.params[0]||1;let R;return(D.length<2||(R=D.params[1])>this._bufferService.rows||R===0)&&(R=this._bufferService.rows),R>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=R-1,this._setCursor(0,0)),!0}windowOptions(D){if(!A(D.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=D.length>1?D.params[1]:0;switch(D.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${o.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:H!==0&&H!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),H!==0&&H!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:H!==0&&H!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),H!==0&&H!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(D){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(D){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(D){return this._windowTitle=D,this._onTitleChange.fire(D),!0}setIconName(D){return this._iconName=D,!0}setOrReportIndexedColor(D){const H=[],R=D.split(";");for(;R.length>1;){const O=R.shift(),X=R.shift();if(/^\d+$/.exec(O)){const Z=parseInt(O);if(I(Z))if(X==="?")H.push({type:0,index:Z});else{const he=(0,E.parseColor)(X);he&&H.push({type:1,index:Z,color:he})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(D){const H=D.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(D,H){this._getCurrentLinkId()&&this._finishHyperlink();const R=D.split(":");let O;const X=R.findIndex((Z=>Z.startsWith("id=")));return X!==-1&&(O=R[X].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,uri:H}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(D,H){const R=D.split(";");for(let O=0;O<R.length&&!(H>=this._specialColors.length);++O,++H)if(R[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const X=(0,E.parseColor)(R[O]);X&&this._onColor.fire([{type:1,index:this._specialColors[H],color:X}])}return!0}setOrReportFgColor(D){return this._setOrReportSpecialColor(D,0)}setOrReportBgColor(D){return this._setOrReportSpecialColor(D,1)}setOrReportCursorColor(D){return this._setOrReportSpecialColor(D,2)}restoreIndexedColor(D){if(!D)return this._onColor.fire([{type:2}]),!0;const H=[],R=D.split(";");for(let O=0;O<R.length;++O)if(/^\d+$/.exec(R[O])){const X=parseInt(R[O]);I(X)&&H.push({type:2,index:X})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(D){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(D){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(D){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,m.DEFAULT_CHARSET),!0}selectCharset(D){return D.length!==2?(this.selectDefaultCharset(),!0):(D[0]==="/"||this._charsetService.setgCharset(L[D[0]],m.CHARSETS[D[1]]||m.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 D=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,D,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=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(D){return this._charsetService.setgLevel(D),!0}screenAlignmentPattern(){const D=new c.CellData;D.content=4194373,D.fg=this._curAttrData.fg,D.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const R=this._activeBuffer.ybase+this._activeBuffer.y+H,O=this._activeBuffer.lines.get(R);O&&(O.fill(D),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(D,H){const R=this._bufferService.buffer,O=this._optionsService.rawOptions;return(X=>(this._coreService.triggerDataEvent(`${o.C0.ESC}${X}${o.C0.ESC}\\`),!0))(D==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:D==='"p'?'P1$r61;1"p':D==="r"?`P1$r${R.scrollTop+1};${R.scrollBottom+1}r`:D==="m"?"P1$r0m":D===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(D,H){this._dirtyRowTracker.markRangeDirty(D,H)}}n.InputHandler=Y;let N=class{constructor(G){this._bufferService=G,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(G){G<this.start?this.start=G:G>this.end&&(this.end=G)}markRangeDirty(G,D){G>D&&(z=G,G=D,D=z),G<this.start&&(this.start=G),D>this.end&&(this.end=D)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function I(G){return 0<=G&&G<256}N=_([v(0,C.IBufferService)],N)},844:(P,n)=>{function d(_){for(const v of _)v.dispose();_.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 _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},n.toDisposable=function(_){return{dispose:_}},n.disposeArray=d,n.getDisposeArrayDisposable=function(_){return{dispose:()=>d(_)}}},1505:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(v,o,m){this._data[v]||(this._data[v]={}),this._data[v][o]=m}get(v,o){return this._data[v]?this._data[v][o]:void 0}clear(){this._data={}}}n.TwoKeyMap=d,n.FourKeyMap=class{constructor(){this._data=new d}set(_,v,o,m,y){this._data.get(_,v)||this._data.set(_,v,new d),this._data.get(_,v).set(o,m,y)}get(_,v,o,m){var y;return(y=this._data.get(_,v))==null?void 0:y.get(o,m)}clear(){this._data.clear()}}},6114:(P,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 d=n.isNode?"node":navigator.userAgent,_=n.isNode?"node":navigator.platform;n.isFirefox=d.includes("Firefox"),n.isLegacyEdge=d.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(d),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=d.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),n.isIpad=_==="iPad",n.isIphone=_==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),n.isLinux=_.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(d)},6106:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let d=0;n.SortedList=class{constructor(_){this._getKey=_,this._array=[]}clear(){this._array.length=0}insert(_){this._array.length!==0?(d=this._search(this._getKey(_)),this._array.splice(d,0,_)):this._array.push(_)}delete(_){if(this._array.length===0)return!1;const v=this._getKey(_);if(v===void 0||(d=this._search(v),d===-1)||this._getKey(this._array[d])!==v)return!1;do if(this._array[d]===_)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===v);return!1}*getKeyIterator(_){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===_)}forEachByKey(_,v){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do v(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===_)}values(){return[...this._array].values()}_search(_){let v=0,o=this._array.length-1;for(;o>=v;){let m=v+o>>1;const y=this._getKey(this._array[m]);if(y>_)o=m-1;else{if(!(y<_)){for(;m>0&&this._getKey(this._array[m-1])===_;)m--;return m}v=m+1}}return v}}},7226:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const _=d(6114);class v{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),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(y){this._idleCallback=void 0;let b=0,f=0,r=y.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),f=Math.max(b,f),h=y.timeRemaining(),1.5*f>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class o extends v{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const b=Date.now()+y;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=o,n.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:o,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const _=d(643);n.updateWindowsModeWrappedState=function(v){const o=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),m=o==null?void 0:o.get(v.cols-1),y=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);y&&m&&(y.isWrapped=m[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&m[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(o){return[o>>>16&255,o>>>8&255,255&o]}static fromColorRGB(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]}clone(){const o=new d;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o}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=d;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(o){this._ext=o}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(o){this._ext&=-469762049,this._ext|=o<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(o){this._ext&=-67108864,this._ext|=67108863&o}get urlId(){return this._urlId}set urlId(o){this._urlId=o}get underlineVariantOffset(){const o=(3758096384&this._ext)>>29;return o<0?4294967288^o:o}set underlineVariantOffset(o){this._ext&=536870911,this._ext|=o<<29&3758096384}constructor(o=0,m=0){this._ext=0,this._urlId=0,this._ext=o,this._urlId=m}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=_},9092:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const _=d(6349),v=d(7226),o=d(3734),m=d(8437),y=d(4634),b=d(511),f=d(643),r=d(4863),h=d(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(l,c,g){this._hasScrollback=l,this._optionsService=c,this._bufferService=g,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=b.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]),this._whitespaceCell=b.CellData.fromCharData([0,f.WHITESPACE_CELL_CHAR,f.WHITESPACE_CELL_WIDTH,f.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(l){return l?(this._nullCell.fg=l.fg,this._nullCell.bg=l.bg,this._nullCell.extended=l.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new o.ExtendedAttrs),this._nullCell}getWhitespaceCell(l){return l?(this._whitespaceCell.fg=l.fg,this._whitespaceCell.bg=l.bg,this._whitespaceCell.extended=l.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new o.ExtendedAttrs),this._whitespaceCell}getBlankLine(l,c){return new m.BufferLine(this._bufferService.cols,this.getNullCell(l),c)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const l=this.ybase+this.y-this.ydisp;return l>=0&&l<this._rows}_getCorrectBufferLength(l){if(!this._hasScrollback)return l;const c=l+this._optionsService.rawOptions.scrollback;return c>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:c}fillViewportRows(l){if(this.lines.length===0){l===void 0&&(l=m.DEFAULT_ATTR_DATA);let c=this._rows;for(;c--;)this.lines.push(this.getBlankLine(l))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(l,c){const g=this.getNullCell(m.DEFAULT_ATTR_DATA);let C=0;const S=this._getCorrectBufferLength(c);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<l)for(let p=0;p<this.lines.length;p++)C+=+this.lines.get(p).resize(l,g);let w=0;if(this._rows<c)for(let p=this._rows;p<c;p++)this.lines.length<c+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new m.BufferLine(l,g)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(l,g)));else for(let p=this._rows;p>c;p--)this.lines.length>c+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){const p=this.lines.length-S;p>0&&(this.lines.trimStart(p),this.ybase=Math.max(this.ybase-p,0),this.ydisp=Math.max(this.ydisp-p,0),this.savedY=Math.max(this.savedY-p,0)),this.lines.maxLength=S}this.x=Math.min(this.x,l-1),this.y=Math.min(this.y,c-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,l-1),this.scrollTop=0}if(this.scrollBottom=c-1,this._isReflowEnabled&&(this._reflow(l,c),this._cols>l))for(let w=0;w<this.lines.length;w++)C+=+this.lines.get(w).resize(l,g);this._cols=l,this._rows=c,this._memoryCleanupQueue.clear(),C>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let l=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,l=!1);let c=0;for(;this._memoryCleanupPosition<this.lines.length;)if(c+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),c>100)return!0;return l}get _isReflowEnabled(){const l=this._optionsService.rawOptions.windowsPty;return l&&l.buildNumber?this._hasScrollback&&l.backend==="conpty"&&l.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(l,c){this._cols!==l&&(l>this._cols?this._reflowLarger(l,c):this._reflowSmaller(l,c))}_reflowLarger(l,c){const g=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,l,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(g.length>0){const C=(0,y.reflowLargerCreateNewLayout)(this.lines,g);(0,y.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(l,c,C.countRemoved)}}_reflowLargerAdjustViewport(l,c,g){const C=this.getNullCell(m.DEFAULT_ATTR_DATA);let S=g;for(;S-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<c&&this.lines.push(new m.BufferLine(l,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-g,0)}_reflowSmaller(l,c){const g=this.getNullCell(m.DEFAULT_ATTR_DATA),C=[];let S=0;for(let w=this.lines.length-1;w>=0;w--){let p=this.lines.get(w);if(!p||!p.isWrapped&&p.getTrimmedLength()<=l)continue;const E=[p];for(;p.isWrapped&&w>0;)p=this.lines.get(--w),E.unshift(p);const L=this.ybase+this.y;if(L>=w&&L<w+E.length)continue;const T=E[E.length-1].getTrimmedLength(),A=(0,y.reflowSmallerGetNewLineLengths)(E,this._cols,l),M=A.length-E.length;let z;z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const Y=[];for(let R=0;R<M;R++){const O=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);Y.push(O)}Y.length>0&&(C.push({start:w+E.length+S,newLines:Y}),S+=Y.length),E.push(...Y);let N=A.length-1,I=A[N];I===0&&(N--,I=A[N]);let G=E.length-M-1,D=T;for(;G>=0;){const R=Math.min(D,I);if(E[N]===void 0)break;if(E[N].copyCellsFrom(E[G],D-R,I-R,R,!0),I-=R,I===0&&(N--,I=A[N]),D-=R,D===0){G--;const O=Math.max(G,0);D=(0,y.getWrappedLineTrimmedLength)(E,O,this._cols)}}for(let R=0;R<E.length;R++)A[R]<l&&E[R].setCell(A[R],g);let H=M-z;for(;H-- >0;)this.ybase===0?this.y<c-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+S)-c&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+c-1)}if(C.length>0){const w=[],p=[];for(let N=0;N<this.lines.length;N++)p.push(this.lines.get(N));const E=this.lines.length;let L=E-1,T=0,A=C[T];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+S);let M=0;for(let N=Math.min(this.lines.maxLength-1,E+S-1);N>=0;N--)if(A&&A.start>L+M){for(let I=A.newLines.length-1;I>=0;I--)this.lines.set(N--,A.newLines[I]);N++,w.push({index:L+1,amount:A.newLines.length}),M+=A.newLines.length,A=C[++T]}else this.lines.set(N,p[L--]);let z=0;for(let N=w.length-1;N>=0;N--)w[N].index+=z,this.lines.onInsertEmitter.fire(w[N]),z+=w[N].amount;const Y=Math.max(0,E+S-this.lines.maxLength);Y>0&&this.lines.onTrimEmitter.fire(Y)}}translateBufferLineToString(l,c,g=0,C){const S=this.lines.get(l);return S?S.translateToString(c,g,C):""}getWrappedRangeForLine(l){let c=l,g=l;for(;c>0&&this.lines.get(c).isWrapped;)c--;for(;g+1<this.lines.length&&this.lines.get(g+1).isWrapped;)g++;return{first:c,last:g}}setupTabStops(l){for(l!=null?this.tabs[l]||(l=this.prevStop(l)):(this.tabs={},l=0);l<this._cols;l+=this._optionsService.rawOptions.tabStopWidth)this.tabs[l]=!0}prevStop(l){for(l==null&&(l=this.x);!this.tabs[--l]&&l>0;);return l>=this._cols?this._cols-1:l<0?0:l}nextStop(l){for(l==null&&(l=this.x);!this.tabs[++l]&&l<this._cols;);return l>=this._cols?this._cols-1:l<0?0:l}clearMarkers(l){this._isClearing=!0;for(let c=0;c<this.markers.length;c++)this.markers[c].line===l&&(this.markers[c].dispose(),this.markers.splice(c--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].dispose(),this.markers.splice(l--,1);this._isClearing=!1}addMarker(l){const c=new r.Marker(l);return this.markers.push(c),c.register(this.lines.onTrim((g=>{c.line-=g,c.line<0&&c.dispose()}))),c.register(this.lines.onInsert((g=>{c.line>=g.index&&(c.line+=g.amount)}))),c.register(this.lines.onDelete((g=>{c.line>=g.index&&c.line<g.index+g.amount&&c.dispose(),c.line>g.index&&(c.line-=g.amount)}))),c.register(c.onDispose((()=>this._removeMarker(c)))),c}_removeMarker(l){this._isClearing||this.markers.splice(this.markers.indexOf(l),1)}}},8437:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const _=d(3734),v=d(511),o=d(643),m=d(482);n.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let y=0;class b{constructor(r,h,l=!1){this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const c=h||v.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]);for(let g=0;g<r;++g)this.setCell(g,c);this.length=r}get(r){const h=this._data[3*r+0],l=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:l?(0,m.stringFromCodePoint)(l):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):l]}set(r,h){this._data[3*r+1]=h[o.CHAR_DATA_ATTR_INDEX],h[o.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[o.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[o.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(r){return this._data[3*r+0]>>22}hasWidth(r){return 12582912&this._data[3*r+0]}getFg(r){return this._data[3*r+1]}getBg(r){return this._data[3*r+2]}hasContent(r){return 4194303&this._data[3*r+0]}getCodePoint(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&h}isCombined(r){return 2097152&this._data[3*r+0]}getString(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r]:2097151&h?(0,m.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return y=3*r,h.content=this._data[y+0],h.fg=this._data[y+1],h.bg=this._data[y+2],2097152&h.content&&(h.combinedData=this._combined[r]),268435456&h.bg&&(h.extended=this._extendedAttrs[r]),h}setCell(r,h){2097152&h.content&&(this._combined[r]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[r]=h.extended),this._data[3*r+0]=h.content,this._data[3*r+1]=h.fg,this._data[3*r+2]=h.bg}setCellFromCodepoint(r,h,l,c){268435456&c.bg&&(this._extendedAttrs[r]=c.extended),this._data[3*r+0]=h|l<<22,this._data[3*r+1]=c.fg,this._data[3*r+2]=c.bg}addCodepointToCell(r,h,l){let c=this._data[3*r+0];2097152&c?this._combined[r]+=(0,m.stringFromCodePoint)(h):2097151&c?(this._combined[r]=(0,m.stringFromCodePoint)(2097151&c)+(0,m.stringFromCodePoint)(h),c&=-2097152,c|=2097152):c=h|4194304,l&&(c&=-12582913,c|=l<<22),this._data[3*r+0]=c}insertCells(r,h,l){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length-r){const c=new v.CellData;for(let g=this.length-r-h-1;g>=0;--g)this.setCell(r+h+g,this.loadCell(r+g,c));for(let g=0;g<h;++g)this.setCell(r+g,l)}else for(let c=r;c<this.length;++c)this.setCell(c,l);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,l)}deleteCells(r,h,l){if(r%=this.length,h<this.length-r){const c=new v.CellData;for(let g=0;g<this.length-r-h;++g)this.setCell(r+g,this.loadCell(r+h+g,c));for(let g=this.length-h;g<this.length;++g)this.setCell(g,l)}else for(let c=r;c<this.length;++c)this.setCell(c,l);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,l)}replaceCells(r,h,l,c=!1){if(c)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,l);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,l),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,l);r<h&&r<this.length;)this.setCell(r++,l)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const l=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*l)this._data=new Uint32Array(this._data.buffer,0,l);else{const c=new Uint32Array(l);c.set(this._data),this._data=c}for(let c=this.length;c<r;++c)this.setCell(c,h)}else{this._data=this._data.subarray(0,l);const c=Object.keys(this._combined);for(let C=0;C<c.length;C++){const S=parseInt(c[C],10);S>=r&&delete this._combined[S]}const g=Object.keys(this._extendedAttrs);for(let C=0;C<g.length;C++){const S=parseInt(g[C],10);S>=r&&delete this._extendedAttrs[S]}}return this.length=r,4*l*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const r=new Uint32Array(this._data.length);return r.set(this._data),this._data=r,1}return 0}fill(r,h=!1){if(h)for(let l=0;l<this.length;++l)this.isProtected(l)||this.setCell(l,r);else{this._combined={},this._extendedAttrs={};for(let l=0;l<this.length;++l)this.setCell(l,r)}}copyFrom(r){this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={};for(const h in r._combined)this._combined[h]=r._combined[h];this._extendedAttrs={};for(const h in r._extendedAttrs)this._extendedAttrs[h]=r._extendedAttrs[h];this.isWrapped=r.isWrapped}clone(){const r=new b(0);r._data=new Uint32Array(this._data),r.length=this.length;for(const h in this._combined)r._combined[h]=this._combined[h];for(const h in this._extendedAttrs)r._extendedAttrs[h]=this._extendedAttrs[h];return r.isWrapped=this.isWrapped,r}getTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0}getNoBgTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0]||50331648&this._data[3*r+2])return r+(this._data[3*r+0]>>22);return 0}copyCellsFrom(r,h,l,c,g){const C=r._data;if(g)for(let w=c-1;w>=0;w--){for(let p=0;p<3;p++)this._data[3*(l+w)+p]=C[3*(h+w)+p];268435456&C[3*(h+w)+2]&&(this._extendedAttrs[l+w]=r._extendedAttrs[h+w])}else for(let w=0;w<c;w++){for(let p=0;p<3;p++)this._data[3*(l+w)+p]=C[3*(h+w)+p];268435456&C[3*(h+w)+2]&&(this._extendedAttrs[l+w]=r._extendedAttrs[h+w])}const S=Object.keys(r._combined);for(let w=0;w<S.length;w++){const p=parseInt(S[w],10);p>=h&&(this._combined[p-h+l]=r._combined[p])}}translateToString(r,h,l,c){h=h??0,l=l??this.length,r&&(l=Math.min(l,this.getTrimmedLength())),c&&(c.length=0);let g="";for(;h<l;){const C=this._data[3*h+0],S=2097151&C,w=2097152&C?this._combined[h]:S?(0,m.stringFromCodePoint)(S):o.WHITESPACE_CELL_CHAR;if(g+=w,c)for(let p=0;p<w.length;++p)c.push(h);h+=C>>22||1}return c&&c.push(h),g}}n.BufferLine=b},4841:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(d,_){if(d.start.y>d.end.y)throw new Error(`Buffer range end (${d.end.x}, ${d.end.y}) cannot be before start (${d.start.x}, ${d.start.y})`);return _*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(P,n)=>{function d(_,v,o){if(v===_.length-1)return _[v].getTrimmedLength();const m=!_[v].hasContent(o-1)&&_[v].getWidth(o-1)===1,y=_[v+1].getWidth(0)===2;return m&&y?o-1:o}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(_,v,o,m,y){const b=[];for(let f=0;f<_.length-1;f++){let r=f,h=_.get(++r);if(!h.isWrapped)continue;const l=[_.get(f)];for(;r<_.length&&h.isWrapped;)l.push(h),h=_.get(++r);if(m>=f&&m<r){f+=l.length-1;continue}let c=0,g=d(l,c,v),C=1,S=0;for(;C<l.length;){const p=d(l,C,v),E=p-S,L=o-g,T=Math.min(E,L);l[c].copyCellsFrom(l[C],S,g,T,!1),g+=T,g===o&&(c++,g=0),S+=T,S===p&&(C++,S=0),g===0&&c!==0&&l[c-1].getWidth(o-1)===2&&(l[c].copyCellsFrom(l[c-1],o-1,g++,1,!1),l[c-1].setCell(o-1,y))}l[c].replaceCells(g,o,y);let w=0;for(let p=l.length-1;p>0&&(p>c||l[p].getTrimmedLength()===0);p--)w++;w>0&&(b.push(f+l.length-w),b.push(w)),f+=l.length-1}return b},n.reflowLargerCreateNewLayout=function(_,v){const o=[];let m=0,y=v[m],b=0;for(let f=0;f<_.length;f++)if(y===f){const r=v[++m];_.onDeleteEmitter.fire({index:f-b,amount:r}),f+=r-1,b+=r,y=v[++m]}else o.push(f);return{layout:o,countRemoved:b}},n.reflowLargerApplyNewLayout=function(_,v){const o=[];for(let m=0;m<v.length;m++)o.push(_.get(v[m]));for(let m=0;m<o.length;m++)_.set(m,o[m]);_.length=v.length},n.reflowSmallerGetNewLineLengths=function(_,v,o){const m=[],y=_.map(((h,l)=>d(_,l,v))).reduce(((h,l)=>h+l));let b=0,f=0,r=0;for(;r<y;){if(y-r<o){m.push(y-r);break}b+=o;const h=d(_,f,v);b>h&&(b-=h,f++);const l=_[f].getWidth(b-1)===2;l&&b--;const c=l?o-1:o;m.push(c),r+=c}return m},n.getWrappedLineTrimmedLength=d},5295:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const _=d(8460),v=d(844),o=d(9092);class m extends v.Disposable{constructor(b,f){super(),this._optionsService=b,this._bufferService=f,this._onBufferActivate=this.register(new _.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 o.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new o.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(b){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(b),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(b,f){this._normal.resize(b,f),this._alt.resize(b,f),this.setupTabStops(b)}setupTabStops(b){this._normal.setupTabStops(b),this._alt.setupTabStops(b)}}n.BufferSet=m},511:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const _=d(482),v=d(643),o=d(3734);class m extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const f=new m;return f.setFromCharData(b),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(b){this.fg=b[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(b[v.CHAR_DATA_CHAR_INDEX].length===2){const r=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[v.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=b[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=m},643:(P,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:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const _=d(8460),v=d(844);class o{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=o._nextId++,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}n.Marker=o,o._nextId=1},7116:(P,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:(P,n)=>{var d,_,v;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,(function(o){o.NUL="\0",o.SOH="",o.STX="",o.ETX="",o.EOT="",o.ENQ="",o.ACK="",o.BEL="\x07",o.BS="\b",o.HT=" ",o.LF=`
|
|
56
|
-
`,o.VT="\v",o.FF="\f",o.CR="\r",o.SO="",o.SI="",o.DLE="",o.DC1="",o.DC2="",o.DC3="",o.DC4="",o.NAK="",o.SYN="",o.ETB="",o.CAN="",o.EM="",o.SUB="",o.ESC="\x1B",o.FS="",o.GS="",o.RS="",o.US="",o.SP=" ",o.DEL=""})(d||(n.C0=d={})),(function(o){o.PAD="",o.HOP="",o.BPH="",o.NBH="",o.IND="",o.NEL="
",o.SSA="",o.ESA="",o.HTS="",o.HTJ="",o.VTS="",o.PLD="",o.PLU="",o.RI="",o.SS2="",o.SS3="",o.DCS="",o.PU1="",o.PU2="",o.STS="",o.CCH="",o.MW="",o.SPA="",o.EPA="",o.SOS="",o.SGCI="",o.SCI="",o.CSI="",o.ST="",o.OSC="",o.PM="",o.APC=""})(_||(n.C1=_={})),(function(o){o.ST=`${d.ESC}\\`})(v||(n.C1_ESCAPED=v={}))},7399:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const _=d(2584),v={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(o,m,y,b){const f={type:0,cancel:!1,key:void 0},r=(o.shiftKey?1:0)|(o.altKey?2:0)|(o.ctrlKey?4:0)|(o.metaKey?8:0);switch(o.keyCode){case 0:o.key==="UIKeyInputUpArrow"?f.key=m?_.C0.ESC+"OA":_.C0.ESC+"[A":o.key==="UIKeyInputLeftArrow"?f.key=m?_.C0.ESC+"OD":_.C0.ESC+"[D":o.key==="UIKeyInputRightArrow"?f.key=m?_.C0.ESC+"OC":_.C0.ESC+"[C":o.key==="UIKeyInputDownArrow"&&(f.key=m?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:f.key=o.ctrlKey?"\b":_.C0.DEL,o.altKey&&(f.key=_.C0.ESC+f.key);break;case 9:if(o.shiftKey){f.key=_.C0.ESC+"[Z";break}f.key=_.C0.HT,f.cancel=!0;break;case 13:f.key=o.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,f.cancel=!0;break;case 27:f.key=_.C0.ESC,o.altKey&&(f.key=_.C0.ESC+_.C0.ESC),f.cancel=!0;break;case 37:if(o.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"D",f.key===_.C0.ESC+"[1;3D"&&(f.key=_.C0.ESC+(y?"b":"[1;5D"))):f.key=m?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(o.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"C",f.key===_.C0.ESC+"[1;3C"&&(f.key=_.C0.ESC+(y?"f":"[1;5C"))):f.key=m?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(o.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"A",y||f.key!==_.C0.ESC+"[1;3A"||(f.key=_.C0.ESC+"[1;5A")):f.key=m?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(o.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"B",y||f.key!==_.C0.ESC+"[1;3B"||(f.key=_.C0.ESC+"[1;5B")):f.key=m?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:o.shiftKey||o.ctrlKey||(f.key=_.C0.ESC+"[2~");break;case 46:f.key=r?_.C0.ESC+"[3;"+(r+1)+"~":_.C0.ESC+"[3~";break;case 36:f.key=r?_.C0.ESC+"[1;"+(r+1)+"H":m?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:f.key=r?_.C0.ESC+"[1;"+(r+1)+"F":m?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:o.shiftKey?f.type=2:o.ctrlKey?f.key=_.C0.ESC+"[5;"+(r+1)+"~":f.key=_.C0.ESC+"[5~";break;case 34:o.shiftKey?f.type=3:o.ctrlKey?f.key=_.C0.ESC+"[6;"+(r+1)+"~":f.key=_.C0.ESC+"[6~";break;case 112:f.key=r?_.C0.ESC+"[1;"+(r+1)+"P":_.C0.ESC+"OP";break;case 113:f.key=r?_.C0.ESC+"[1;"+(r+1)+"Q":_.C0.ESC+"OQ";break;case 114:f.key=r?_.C0.ESC+"[1;"+(r+1)+"R":_.C0.ESC+"OR";break;case 115:f.key=r?_.C0.ESC+"[1;"+(r+1)+"S":_.C0.ESC+"OS";break;case 116:f.key=r?_.C0.ESC+"[15;"+(r+1)+"~":_.C0.ESC+"[15~";break;case 117:f.key=r?_.C0.ESC+"[17;"+(r+1)+"~":_.C0.ESC+"[17~";break;case 118:f.key=r?_.C0.ESC+"[18;"+(r+1)+"~":_.C0.ESC+"[18~";break;case 119:f.key=r?_.C0.ESC+"[19;"+(r+1)+"~":_.C0.ESC+"[19~";break;case 120:f.key=r?_.C0.ESC+"[20;"+(r+1)+"~":_.C0.ESC+"[20~";break;case 121:f.key=r?_.C0.ESC+"[21;"+(r+1)+"~":_.C0.ESC+"[21~";break;case 122:f.key=r?_.C0.ESC+"[23;"+(r+1)+"~":_.C0.ESC+"[23~";break;case 123:f.key=r?_.C0.ESC+"[24;"+(r+1)+"~":_.C0.ESC+"[24~";break;default:if(!o.ctrlKey||o.shiftKey||o.altKey||o.metaKey)if(y&&!b||!o.altKey||o.metaKey)!y||o.altKey||o.ctrlKey||o.shiftKey||!o.metaKey?o.key&&!o.ctrlKey&&!o.altKey&&!o.metaKey&&o.keyCode>=48&&o.key.length===1?f.key=o.key:o.key&&o.ctrlKey&&(o.key==="_"&&(f.key=_.C0.US),o.key==="@"&&(f.key=_.C0.NUL)):o.keyCode===65&&(f.type=1);else{const h=v[o.keyCode],l=h==null?void 0:h[o.shiftKey?1:0];if(l)f.key=_.C0.ESC+l;else if(o.keyCode>=65&&o.keyCode<=90){const c=o.ctrlKey?o.keyCode-64:o.keyCode+32;let g=String.fromCharCode(c);o.shiftKey&&(g=g.toUpperCase()),f.key=_.C0.ESC+g}else if(o.keyCode===32)f.key=_.C0.ESC+(o.ctrlKey?_.C0.NUL:" ");else if(o.key==="Dead"&&o.code.startsWith("Key")){let c=o.code.slice(3,4);o.shiftKey||(c=c.toLowerCase()),f.key=_.C0.ESC+c,f.cancel=!0}}else o.keyCode>=65&&o.keyCode<=90?f.key=String.fromCharCode(o.keyCode-64):o.keyCode===32?f.key=_.C0.NUL:o.keyCode>=51&&o.keyCode<=55?f.key=String.fromCharCode(o.keyCode-51+27):o.keyCode===56?f.key=_.C0.DEL:o.keyCode===219?f.key=_.C0.ESC:o.keyCode===220?f.key=_.C0.FS:o.keyCode===221&&(f.key=_.C0.GS)}return f}},482:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},n.utf32ToString=function(d,_=0,v=d.length){let o="";for(let m=_;m<v;++m){let y=d[m];y>65535?(y-=65536,o+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):o+=String.fromCharCode(y)}return o},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,_){const v=d.length;if(!v)return 0;let o=0,m=0;if(this._interim){const y=d.charCodeAt(m++);56320<=y&&y<=57343?_[o++]=1024*(this._interim-55296)+y-56320+65536:(_[o++]=this._interim,_[o++]=y),this._interim=0}for(let y=m;y<v;++y){const b=d.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,o;const f=d.charCodeAt(y);56320<=f&&f<=57343?_[o++]=1024*(b-55296)+f-56320+65536:(_[o++]=b,_[o++]=f)}else b!==65279&&(_[o++]=b)}return o}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,_){const v=d.length;if(!v)return 0;let o,m,y,b,f=0,r=0,h=0;if(this.interim[0]){let g=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let S,w=0;for(;(S=63&this.interim[++w])&&w<4;)C<<=6,C|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=p-w;for(;h<E;){if(h>=v)return 0;if(S=d[h++],(192&S)!=128){h--,g=!0;break}this.interim[w++]=S,C<<=6,C|=63&S}g||(p===2?C<128?h--:_[f++]=C:p===3?C<2048||C>=55296&&C<=57343||C===65279||(_[f++]=C):C<65536||C>1114111||(_[f++]=C)),this.interim.fill(0)}const l=v-4;let c=h;for(;c<v;){for(;!(!(c<l)||128&(o=d[c])||128&(m=d[c+1])||128&(y=d[c+2])||128&(b=d[c+3]));)_[f++]=o,_[f++]=m,_[f++]=y,_[f++]=b,c+=4;if(o=d[c++],o<128)_[f++]=o;else if((224&o)==192){if(c>=v)return this.interim[0]=o,f;if(m=d[c++],(192&m)!=128){c--;continue}if(r=(31&o)<<6|63&m,r<128){c--;continue}_[f++]=r}else if((240&o)==224){if(c>=v)return this.interim[0]=o,f;if(m=d[c++],(192&m)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=m,f;if(y=d[c++],(192&y)!=128){c--;continue}if(r=(15&o)<<12|(63&m)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;_[f++]=r}else if((248&o)==240){if(c>=v)return this.interim[0]=o,f;if(m=d[c++],(192&m)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=m,f;if(y=d[c++],(192&y)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=m,this.interim[2]=y,f;if(b=d[c++],(192&b)!=128){c--;continue}if(r=(7&o)<<18|(63&m)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;_[f++]=r}}return f}}},225:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const _=d(1480),v=[[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]],o=[[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 m;n.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let y=0;y<v.length;++y)m.fill(0,v[y][0],v[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?m[y]:(function(b,f){let r,h=0,l=f.length-1;if(b<f[0][0]||b>f[l][1])return!1;for(;l>=h;)if(r=h+l>>1,b>f[r][1])h=r+1;else{if(!(b<f[r][0]))return!0;l=r-1}return!1})(y,o)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,b){let f=this.wcwidth(y),r=f===0&&b!==0;if(r){const h=_.UnicodeService.extractWidth(b);h===0?r=!1:h>f&&(f=h)}return _.UnicodeService.createPropertyValue(0,f,r)}}},5981:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const _=d(8460),v=d(844);class o extends v.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,b){if(b!==void 0&&this._syncCalls>b)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let f;for(this._isSyncWriting=!0;f=this._writeBuffer.shift();){this._action(f);const r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,b){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+=y.length,this._writeBuffer.push(y),this._callbacks.push(b),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(b)}_innerWrite(y=0,b=!0){const f=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,b);if(h){const c=g=>Date.now()-f>=12?setTimeout((()=>this._innerWrite(0,g))):this._innerWrite(f,g);return void h.catch((g=>(queueMicrotask((()=>{throw g})),Promise.resolve(!1)))).then(c)}const l=this._callbacks[this._bufferOffset];if(l&&l(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-f>=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=o},5941:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const d=/^([\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})$/,_=/^[\da-f]+$/;function v(o,m){const y=o.toString(16),b=y.length<2?"0"+y:y;switch(m){case 4:return y[0];case 8:return b;case 12:return(b+b).slice(0,3);default:return b+b}}n.parseColor=function(o){if(!o)return;let m=o.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const y=d.exec(m);if(y){const b=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/b*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/b*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/b*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),_.exec(m)&&[3,6,9,12].includes(m.length))){const y=m.length/3,b=[0,0,0];for(let f=0;f<3;++f){const r=parseInt(m.slice(y*f,y*f+y),16);b[f]=y===1?r<<4:y===2?r:y===3?r>>4:r>>8}return b}},n.toRgbString=function(o,m=16){const[y,b,f]=o;return`rgb:${v(y,m)}/${v(b,m)}/${v(f,m)}`}},5770:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const _=d(482),v=d(8742),o=d(5770),m=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(b,f){this._handlers[b]===void 0&&(this._handlers[b]=[]);const r=this._handlers[b];return r.push(f),{dispose:()=>{const h=r.indexOf(f);h!==-1&&r.splice(h,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}reset(){if(this._active.length)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(b,f){if(this.reset(),this._ident=b,this._active=this._handlers[b]||m,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(f);else this._handlerFb(this._ident,"HOOK",f)}put(b,f,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(b,f,r);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(b,f,r))}unhook(b,f=!0){if(this._active.length){let r=!1,h=this._active.length-1,l=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,r=f,l=this._stack.fallThrough,this._stack.paused=!1),!l&&r===!1){for(;h>=0&&(r=this._active[h].unhook(b),r!==!0);h--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,r;h--}for(;h>=0;h--)if(r=this._active[h].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",b);this._active=m,this._ident=0}};const y=new v.Params;y.addParam(0),n.DcsHandler=class{constructor(b){this._handler=b,this._data="",this._params=y,this._hitLimit=!1}hook(b){this._params=b.length>1||b.params[0]?b.clone():y,this._data="",this._hitLimit=!1}put(b,f,r){this._hitLimit||(this._data+=(0,_.utf32ToString)(b,f,r),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(b){let f=!1;if(this._hitLimit)f=!1;else if(b&&(f=this._handler(this._data,this._params),f instanceof Promise))return f.then((r=>(this._params=y,this._data="",this._hitLimit=!1,r)));return this._params=y,this._data="",this._hitLimit=!1,f}}},2015:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const _=d(844),v=d(8742),o=d(6242),m=d(6351);class y{constructor(h){this.table=new Uint8Array(h)}setDefault(h,l){this.table.fill(h<<4|l)}add(h,l,c,g){this.table[l<<8|h]=c<<4|g}addMany(h,l,c,g){for(let C=0;C<h.length;C++)this.table[l<<8|h[C]]=c<<4|g}}n.TransitionTable=y;const b=160;n.VT500_TRANSITION_TABLE=(function(){const r=new y(4095),h=Array.apply(null,Array(256)).map(((w,p)=>p)),l=(w,p)=>h.slice(w,p),c=l(32,127),g=l(0,24);g.push(25),g.push.apply(g,l(28,32));const C=l(0,14);let S;for(S in r.setDefault(1,0),r.addMany(c,0,2,0),C)r.addMany([24,26,153,154],S,3,0),r.addMany(l(128,144),S,3,0),r.addMany(l(144,152),S,3,0),r.add(156,S,0,0),r.add(27,S,11,1),r.add(157,S,4,8),r.addMany([152,158,159],S,0,7),r.add(155,S,11,3),r.add(144,S,11,9);return r.addMany(g,0,3,0),r.addMany(g,1,3,1),r.add(127,1,0,1),r.addMany(g,8,0,8),r.addMany(g,3,3,3),r.add(127,3,0,3),r.addMany(g,4,3,4),r.add(127,4,0,4),r.addMany(g,6,3,6),r.addMany(g,5,3,5),r.add(127,5,0,5),r.addMany(g,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(c,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(l(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(c,7,0,7),r.addMany(g,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(l(64,127),3,7,0),r.addMany(l(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(l(48,60),4,8,4),r.addMany(l(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(l(32,64),6,0,6),r.add(127,6,0,6),r.addMany(l(64,127),6,0,0),r.addMany(l(32,48),3,9,5),r.addMany(l(32,48),5,9,5),r.addMany(l(48,64),5,0,6),r.addMany(l(64,127),5,7,0),r.addMany(l(32,48),4,9,5),r.addMany(l(32,48),1,9,2),r.addMany(l(32,48),2,9,2),r.addMany(l(48,127),2,10,0),r.addMany(l(48,80),1,10,0),r.addMany(l(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(l(96,127),1,10,0),r.add(80,1,11,9),r.addMany(g,9,0,9),r.add(127,9,0,9),r.addMany(l(28,32),9,0,9),r.addMany(l(32,48),9,9,12),r.addMany(l(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(g,11,0,11),r.addMany(l(32,128),11,0,11),r.addMany(l(28,32),11,0,11),r.addMany(g,10,0,10),r.add(127,10,0,10),r.addMany(l(28,32),10,0,10),r.addMany(l(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(l(32,48),10,9,12),r.addMany(g,12,0,12),r.add(127,12,0,12),r.addMany(l(28,32),12,0,12),r.addMany(l(32,48),12,9,12),r.addMany(l(48,64),12,0,11),r.addMany(l(64,127),12,12,13),r.addMany(l(64,127),10,12,13),r.addMany(l(64,127),9,12,13),r.addMany(g,13,13,13),r.addMany(c,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(b,0,2,0),r.add(b,8,5,8),r.add(b,6,0,6),r.add(b,11,0,11),r.add(b,13,13,13),r})();class f extends _.Disposable{constructor(h=n.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new v.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(l,c,g)=>{},this._executeHandlerFb=l=>{},this._csiHandlerFb=(l,c)=>{},this._escHandlerFb=l=>{},this._errorHandlerFb=l=>l,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,_.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new o.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,l=[64,126]){let c=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(c=h.prefix.charCodeAt(0),c&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<h.intermediates.length;++C){const S=h.intermediates.charCodeAt(C);if(32>S||S>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=S}}if(h.final.length!==1)throw new Error("final must be a single byte");const g=h.final.charCodeAt(0);if(l[0]>g||g>l[1])throw new Error(`final must be in range ${l[0]} .. ${l[1]}`);return c<<=8,c|=g,c}identToString(h){const l=[];for(;h;)l.push(String.fromCharCode(255&h)),h>>=8;return l.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,l){const c=this._identifier(h,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);const g=this._escHandlers[c];return g.push(l),{dispose:()=>{const C=g.indexOf(l);C!==-1&&g.splice(C,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,l){this._executeHandlers[h.charCodeAt(0)]=l}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,l){const c=this._identifier(h);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);const g=this._csiHandlers[c];return g.push(l),{dispose:()=>{const C=g.indexOf(l);C!==-1&&g.splice(C,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,l){return this._dcsParser.registerHandler(this._identifier(h),l)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,l){return this._oscParser.registerHandler(h,l)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,l,c,g,C){this._parseStack.state=h,this._parseStack.handlers=l,this._parseStack.handlerPos=c,this._parseStack.transition=g,this._parseStack.chunkPos=C}parse(h,l,c){let g,C=0,S=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(c===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const p=this._parseStack.handlers;let E=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(c===!1&&E>-1){for(;E>=0&&(g=p[E](this._params),g!==!0);E--)if(g instanceof Promise)return this._parseStack.handlerPos=E,g}this._parseStack.handlers=[];break;case 4:if(c===!1&&E>-1){for(;E>=0&&(g=p[E](),g!==!0);E--)if(g instanceof Promise)return this._parseStack.handlerPos=E,g}this._parseStack.handlers=[];break;case 6:if(C=h[this._parseStack.chunkPos],g=this._dcsParser.unhook(C!==24&&C!==26,c),g)return g;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=h[this._parseStack.chunkPos],g=this._oscParser.end(C!==24&&C!==26,c),g)return g;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,w=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let p=w;p<l;++p){switch(C=h[p],S=this._transitions.table[this.currentState<<8|(C<160?C:b)],S>>4){case 2:for(let M=p+1;;++M){if(M>=l||(C=h[M])<32||C>126&&C<b){this._printHandler(h,p,M),p=M-1;break}if(++M>=l||(C=h[M])<32||C>126&&C<b){this._printHandler(h,p,M),p=M-1;break}if(++M>=l||(C=h[M])<32||C>126&&C<b){this._printHandler(h,p,M),p=M-1;break}if(++M>=l||(C=h[M])<32||C>126&&C<b){this._printHandler(h,p,M),p=M-1;break}}break;case 3:this._executeHandlers[C]?this._executeHandlers[C]():this._executeHandlerFb(C),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:p,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const E=this._csiHandlers[this._collect<<8|C];let L=E?E.length-1:-1;for(;L>=0&&(g=E[L](this._params),g!==!0);L--)if(g instanceof Promise)return this._preserveStack(3,E,L,S,p),g;L<0&&this._csiHandlerFb(this._collect<<8|C,this._params),this.precedingJoinState=0;break;case 8:do switch(C){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(C-48)}while(++p<l&&(C=h[p])>47&&C<60);p--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const T=this._escHandlers[this._collect<<8|C];let A=T?T.length-1:-1;for(;A>=0&&(g=T[A](),g!==!0);A--)if(g instanceof Promise)return this._preserveStack(4,T,A,S,p),g;A<0&&this._escHandlerFb(this._collect<<8|C),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|C,this._params);break;case 13:for(let M=p+1;;++M)if(M>=l||(C=h[M])===24||C===26||C===27||C>127&&C<b){this._dcsParser.put(h,p,M),p=M-1;break}break;case 14:if(g=this._dcsParser.unhook(C!==24&&C!==26),g)return this._preserveStack(6,[],0,S,p),g;C===27&&(S|=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 M=p+1;;M++)if(M>=l||(C=h[M])<32||C>127&&C<b){this._oscParser.put(h,p,M),p=M-1;break}break;case 6:if(g=this._oscParser.end(C!==24&&C!==26),g)return this._preserveStack(5,[],0,S,p),g;C===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&S}}}n.EscapeSequenceParser=f},6242:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const _=d(5770),v=d(482),o=[];n.OscParser=class{constructor(){this._state=0,this._active=o,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,y){this._handlers[m]===void 0&&(this._handlers[m]=[]);const b=this._handlers[m];return b.push(y),{dispose:()=>{const f=b.indexOf(y);f!==-1&&b.splice(f,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=o}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=o,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||o,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,y,b){if(this._active.length)for(let f=this._active.length-1;f>=0;f--)this._active[f].put(m,y,b);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(m,y,b))}start(){this.reset(),this._state=1}put(m,y,b){if(this._state!==3){if(this._state===1)for(;y<b;){const f=m[y++];if(f===59){this._state=2,this._start();break}if(f<48||57<f)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+f-48}this._state===2&&b-y>0&&this._put(m,y,b)}}end(m,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let b=!1,f=this._active.length-1,r=!1;if(this._stack.paused&&(f=this._stack.loopPosition-1,b=y,r=this._stack.fallThrough,this._stack.paused=!1),!r&&b===!1){for(;f>=0&&(b=this._active[f].end(m),b!==!0);f--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!1,b;f--}for(;f>=0;f--)if(b=this._active[f].end(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!0,b}else this._handlerFb(this._id,"END",m);this._active=o,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,y,b){this._hitLimit||(this._data+=(0,v.utf32ToString)(m,y,b),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let y=!1;if(this._hitLimit)y=!1;else if(m&&(y=this._handler(this._data),y instanceof Promise))return y.then((b=>(this._data="",this._hitLimit=!1,b)));return this._data="",this._hitLimit=!1,y}}},8742:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const d=2147483647;class _{static fromArray(o){const m=new _;if(!o.length)return m;for(let y=Array.isArray(o[0])?1:0;y<o.length;++y){const b=o[y];if(Array.isArray(b))for(let f=0;f<b.length;++f)m.addSubParam(b[f]);else m.addParam(b)}return m}constructor(o=32,m=32){if(this.maxLength=o,this.maxSubParamsLength=m,m>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(o),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(o),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const o=new _(this.maxLength,this.maxSubParamsLength);return o.params.set(this.params),o.length=this.length,o._subParams.set(this._subParams),o._subParamsLength=this._subParamsLength,o._subParamsIdx.set(this._subParamsIdx),o._rejectDigits=this._rejectDigits,o._rejectSubDigits=this._rejectSubDigits,o._digitIsSub=this._digitIsSub,o}toArray(){const o=[];for(let m=0;m<this.length;++m){o.push(this.params[m]);const y=this._subParamsIdx[m]>>8,b=255&this._subParamsIdx[m];b-y>0&&o.push(Array.prototype.slice.call(this._subParams,y,b))}return o}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(o){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(o<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=o>d?d:o}}addSubParam(o){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(o<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=o>d?d:o,this._subParamsIdx[this.length-1]++}}hasSubParams(o){return(255&this._subParamsIdx[o])-(this._subParamsIdx[o]>>8)>0}getSubParams(o){const m=this._subParamsIdx[o]>>8,y=255&this._subParamsIdx[o];return y-m>0?this._subParams.subarray(m,y):null}getSubParamsAll(){const o={};for(let m=0;m<this.length;++m){const y=this._subParamsIdx[m]>>8,b=255&this._subParamsIdx[m];b-y>0&&(o[m]=this._subParams.slice(y,b))}return o}addDigit(o){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,b=y[m-1];y[m-1]=~b?Math.min(10*b+o,d):o}}n.Params=_},5741:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()}loadAddon(d,_){const v={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(v),_.dispose=()=>this._wrappedAddonDispose(v),_.activate(d)}_wrappedAddonDispose(d){if(d.isDisposed)return;let _=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===d){_=v;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(_,1)}}},8771:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const _=d(3785),v=d(511);n.BufferApiView=class{constructor(o,m){this._buffer=o,this.type=m}init(o){return this._buffer=o,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(o){const m=this._buffer.lines.get(o);if(m)return new _.BufferLineApiView(m)}getNullCell(){return new v.CellData}}},3785:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const _=d(511);n.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,o){if(!(v<0||v>=this._line.length))return o?(this._line.loadCell(v,o),o):this._line.loadCell(v,new _.CellData)}translateToString(v,o,m){return this._line.translateToString(v,o,m)}}},8285:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const _=d(8771),v=d(8460),o=d(844);class m extends o.Disposable{constructor(b){super(),this._core=b,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.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=m},7975:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(d){this._core=d}registerCsiHandler(d,_){return this._core.registerCsiHandler(d,(v=>_(v.toArray())))}addCsiHandler(d,_){return this.registerCsiHandler(d,_)}registerDcsHandler(d,_){return this._core.registerDcsHandler(d,((v,o)=>_(v,o.toArray())))}addDcsHandler(d,_){return this.registerDcsHandler(d,_)}registerEscHandler(d,_){return this._core.registerEscHandler(d,_)}addEscHandler(d,_){return this.registerEscHandler(d,_)}registerOscHandler(d,_){return this._core.registerOscHandler(d,_)}addOscHandler(d,_){return this.registerOscHandler(d,_)}}},7090:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(d){this._core=d}register(d){this._core.unicodeService.register(d)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(d){this._core.unicodeService.activeVersion=d}}},744:function(P,n,d){var _=this&&this.__decorate||function(r,h,l,c){var g,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,l,c);else for(var w=r.length-1;w>=0;w--)(g=r[w])&&(S=(C<3?g(S):C>3?g(h,l,S):g(h,l))||S);return C>3&&S&&Object.defineProperty(h,l,S),S},v=this&&this.__param||function(r,h){return function(l,c){h(l,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const o=d(8460),m=d(844),y=d(5295),b=d(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let f=n.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(r){super(),this.isUserScrolling=!1,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(r.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(r.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(r,this))}resize(r,h){this.cols=r,this.rows=h,this.buffers.resize(r,h),this._onResize.fire({cols:r,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(r,h=!1){const l=this.buffer;let c;c=this._cachedBlankLine,c&&c.length===this.cols&&c.getFg(0)===r.fg&&c.getBg(0)===r.bg||(c=l.getBlankLine(r,h),this._cachedBlankLine=c),c.isWrapped=h;const g=l.ybase+l.scrollTop,C=l.ybase+l.scrollBottom;if(l.scrollTop===0){const S=l.lines.isFull;C===l.lines.length-1?S?l.lines.recycle().copyFrom(c):l.lines.push(c.clone()):l.lines.splice(C+1,0,c.clone()),S?this.isUserScrolling&&(l.ydisp=Math.max(l.ydisp-1,0)):(l.ybase++,this.isUserScrolling||l.ydisp++)}else{const S=C-g+1;l.lines.shiftElements(g+1,S-1,-1),l.lines.set(C,c.clone())}this.isUserScrolling||(l.ydisp=l.ybase),this._onScroll.fire(l.ydisp)}scrollLines(r,h,l){const c=this.buffer;if(r<0){if(c.ydisp===0)return;this.isUserScrolling=!0}else r+c.ydisp>=c.ybase&&(this.isUserScrolling=!1);const g=c.ydisp;c.ydisp=Math.max(Math.min(c.ydisp+r,c.ybase),0),g!==c.ydisp&&(h||this._onScroll.fire(c.ydisp))}};n.BufferService=f=_([v(0,b.IOptionsService)],f)},7994:(P,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(d){this.glevel=d,this.charset=this._charsets[d]}setgCharset(d,_){this._charsets[d]=_,this.glevel===d&&(this.charset=_)}}},1753:function(P,n,d){var _=this&&this.__decorate||function(c,g,C,S){var w,p=arguments.length,E=p<3?g:S===null?S=Object.getOwnPropertyDescriptor(g,C):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,g,C,S);else for(var L=c.length-1;L>=0;L--)(w=c[L])&&(E=(p<3?w(E):p>3?w(g,C,E):w(g,C))||E);return p>3&&E&&Object.defineProperty(g,C,E),E},v=this&&this.__param||function(c,g){return function(C,S){g(C,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const o=d(2585),m=d(8460),y=d(844),b={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:c=>c.button!==4&&c.action===1&&(c.ctrl=!1,c.alt=!1,c.shift=!1,!0)},VT200:{events:19,restrict:c=>c.action!==32},DRAG:{events:23,restrict:c=>c.action!==32||c.button!==3},ANY:{events:31,restrict:c=>!0}};function f(c,g){let C=(c.ctrl?16:0)|(c.shift?4:0)|(c.alt?8:0);return c.button===4?(C|=64,C|=c.action):(C|=3&c.button,4&c.button&&(C|=64),8&c.button&&(C|=128),c.action===32?C|=32:c.action!==0||g||(C|=3)),C}const r=String.fromCharCode,h={DEFAULT:c=>{const g=[f(c,!1)+32,c.col+32,c.row+32];return g[0]>255||g[1]>255||g[2]>255?"":`\x1B[M${r(g[0])}${r(g[1])}${r(g[2])}`},SGR:c=>{const g=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${f(c,!0)};${c.col};${c.row}${g}`},SGR_PIXELS:c=>{const g=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${f(c,!0)};${c.x};${c.y}${g}`}};let l=n.CoreMouseService=class extends y.Disposable{constructor(c,g){super(),this._bufferService=c,this._coreService=g,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(b))this.addProtocol(C,b[C]);for(const C of Object.keys(h))this.addEncoding(C,h[C]);this.reset()}addProtocol(c,g){this._protocols[c]=g}addEncoding(c,g){this._encodings[c]=g}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(c){if(!this._protocols[c])throw new Error(`unknown protocol "${c}"`);this._activeProtocol=c,this._onProtocolChange.fire(this._protocols[c].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(c){if(!this._encodings[c])throw new Error(`unknown encoding "${c}"`);this._activeEncoding=c}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(c){if(c.col<0||c.col>=this._bufferService.cols||c.row<0||c.row>=this._bufferService.rows||c.button===4&&c.action===32||c.button===3&&c.action!==32||c.button!==4&&(c.action===2||c.action===3)||(c.col++,c.row++,c.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,c,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(c))return!1;const g=this._encodings[this._activeEncoding](c);return g&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(g):this._coreService.triggerDataEvent(g,!0)),this._lastEvent=c,!0}explainEvents(c){return{down:!!(1&c),up:!!(2&c),drag:!!(4&c),move:!!(8&c),wheel:!!(16&c)}}_equalEvents(c,g,C){if(C){if(c.x!==g.x||c.y!==g.y)return!1}else if(c.col!==g.col||c.row!==g.row)return!1;return c.button===g.button&&c.action===g.action&&c.ctrl===g.ctrl&&c.alt===g.alt&&c.shift===g.shift}};n.CoreMouseService=l=_([v(0,o.IBufferService),v(1,o.ICoreService)],l)},6975:function(P,n,d){var _=this&&this.__decorate||function(l,c,g,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,g):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,g,C);else for(var E=l.length-1;E>=0;E--)(S=l[E])&&(p=(w<3?S(p):w>3?S(c,g,p):S(c,g))||p);return w>3&&p&&Object.defineProperty(c,g,p),p},v=this&&this.__param||function(l,c){return function(g,C){c(g,C,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const o=d(1439),m=d(8460),y=d(844),b=d(2585),f=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=n.CoreService=class extends y.Disposable{constructor(l,c,g){super(),this._bufferService=l,this._logService=c,this._optionsService=g,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,o.clone)(f),this.decPrivateModes=(0,o.clone)(r)}reset(){this.modes=(0,o.clone)(f),this.decPrivateModes=(0,o.clone)(r)}triggerDataEvent(l,c=!1){if(this._optionsService.rawOptions.disableStdin)return;const g=this._bufferService.buffer;c&&this._optionsService.rawOptions.scrollOnUserInput&&g.ybase!==g.ydisp&&this._onRequestScrollToBottom.fire(),c&&this._onUserInput.fire(),this._logService.debug(`sending data "${l}"`,(()=>l.split("").map((C=>C.charCodeAt(0))))),this._onData.fire(l)}triggerBinaryEvent(l){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${l}"`,(()=>l.split("").map((c=>c.charCodeAt(0))))),this._onBinary.fire(l))}};n.CoreService=h=_([v(0,b.IBufferService),v(1,b.ILogService),v(2,b.IOptionsService)],h)},9074:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const _=d(8055),v=d(8460),o=d(844),m=d(6106);let y=0,b=0;class f extends o.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((l=>l==null?void 0:l.marker.line)),this._onDecorationRegistered=this.register(new v.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new v.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,o.toDisposable)((()=>this.reset())))}registerDecoration(l){if(l.marker.isDisposed)return;const c=new r(l);if(c){const g=c.marker.onDispose((()=>c.dispose()));c.onDispose((()=>{c&&(this._decorations.delete(c)&&this._onDecorationRemoved.fire(c),g.dispose())})),this._decorations.insert(c),this._onDecorationRegistered.fire(c)}return c}reset(){for(const l of this._decorations.values())l.dispose();this._decorations.clear()}*getDecorationsAtCell(l,c,g){let C=0,S=0;for(const w of this._decorations.getKeyIterator(c))C=w.options.x??0,S=C+(w.options.width??1),l>=C&&l<S&&(!g||(w.options.layer??"bottom")===g)&&(yield w)}forEachDecorationAtCell(l,c,g,C){this._decorations.forEachByKey(c,(S=>{y=S.options.x??0,b=y+(S.options.width??1),l>=y&&l<b&&(!g||(S.options.layer??"bottom")===g)&&C(S)}))}}n.DecorationService=f;class r extends o.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=_.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=_.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(l){super(),this.options=l,this.onRenderEmitter=this.register(new v.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new v.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=l.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const _=d(2585),v=d(8343);class o{constructor(...y){this._entries=new Map;for(const[b,f]of y)this.set(b,f)}set(y,b){const f=this._entries.get(y);return this._entries.set(y,b),f}forEach(y){for(const[b,f]of this._entries.entries())y(b,f)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}n.ServiceCollection=o,n.InstantiationService=class{constructor(){this._services=new o,this._services.set(_.IInstantiationService,this)}setService(m,y){this._services.set(m,y)}getService(m){return this._services.get(m)}createInstance(m,...y){const b=(0,v.getServiceDependencies)(m).sort(((h,l)=>h.index-l.index)),f=[];for(const h of b){const l=this._services.get(h.id);if(!l)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${h.id}.`);f.push(l)}const r=b.length>0?b[0].index:y.length;if(y.length!==r)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${r+1} conflicts with ${y.length} static arguments`);return new m(...y,...f)}}},7866:function(P,n,d){var _=this&&this.__decorate||function(r,h,l,c){var g,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,l,c);else for(var w=r.length-1;w>=0;w--)(g=r[w])&&(S=(C<3?g(S):C>3?g(h,l,S):g(h,l))||S);return C>3&&S&&Object.defineProperty(h,l,S),S},v=this&&this.__param||function(r,h){return function(l,c){h(l,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const o=d(844),m=d(2585),y={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let b,f=n.LogService=class extends o.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,l){this._evalLazyOptionalParams(l),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...l)}trace(r,...h){var l;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var l;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var l;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var l;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var l;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=f=_([v(0,m.IOptionsService)],f),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,l){if(typeof l.value!="function")throw new Error("not supported");const c=l.value;l.value=function(...g){if(b.logLevel!==m.LogLevelEnum.TRACE)return c.apply(this,g);b.trace(`GlyphRenderer#${c.name}(${g.map((S=>JSON.stringify(S))).join(", ")})`);const C=c.apply(this,g);return b.trace(`GlyphRenderer#${c.name} return`,C),C}}},7302:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const _=d(8460),v=d(844),o=d(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:o.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends v.Disposable{constructor(f){super(),this._onOptionChange=this.register(new _.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...n.DEFAULT_OPTIONS};for(const h in f)if(h in r)try{const l=f[h];r[h]=this._sanitizeAndValidateOption(h,l)}catch(l){console.error(l)}this.rawOptions=r,this.options={...r},this._setupOptions(),this.register((0,v.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(f,r){return this.onOptionChange((h=>{h===f&&r(this.rawOptions[f])}))}onMultipleOptionChange(f,r){return this.onOptionChange((h=>{f.indexOf(h)!==-1&&r()}))}_setupOptions(){const f=h=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},r=(h,l)=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);l=this._sanitizeAndValidateOption(h,l),this.rawOptions[h]!==l&&(this.rawOptions[h]=l,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const l={get:f.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,l)}}_sanitizeAndValidateOption(f,r){switch(f){case"cursorStyle":if(r||(r=n.DEFAULT_OPTIONS[f]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${f}`);break;case"wordSeparator":r||(r=n.DEFAULT_OPTIONS[f]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=m.includes(r)?r:n.DEFAULT_OPTIONS[f];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${f} cannot be less than 1, value: ${r}`);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(`${f} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${f} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${f} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}n.OptionsService=y},2660:function(P,n,d){var _=this&&this.__decorate||function(y,b,f,r){var h,l=arguments.length,c=l<3?b:r===null?r=Object.getOwnPropertyDescriptor(b,f):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(y,b,f,r);else for(var g=y.length-1;g>=0;g--)(h=y[g])&&(c=(l<3?h(c):l>3?h(b,f,c):h(b,f))||c);return l>3&&c&&Object.defineProperty(b,f,c),c},v=this&&this.__param||function(y,b){return function(f,r){b(f,r,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const o=d(2585);let m=n.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const b=this._bufferService.buffer;if(y.id===void 0){const g=b.addMarker(b.ybase+b.y),C={data:y,id:this._nextId++,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(C,g))),this._dataByLinkId.set(C.id,C),C.id}const f=y,r=this._getEntryIdKey(f),h=this._entriesWithId.get(r);if(h)return this.addLineToLink(h.id,b.ybase+b.y),h.id;const l=b.addMarker(b.ybase+b.y),c={id:this._nextId++,key:this._getEntryIdKey(f),data:f,lines:[l]};return l.onDispose((()=>this._removeMarkerFromLink(c,l))),this._entriesWithId.set(c.key,c),this._dataByLinkId.set(c.id,c),c.id}addLineToLink(y,b){const f=this._dataByLinkId.get(y);if(f&&f.lines.every((r=>r.line!==b))){const r=this._bufferService.buffer.addMarker(b);f.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(f,r)))}}getLinkData(y){var b;return(b=this._dataByLinkId.get(y))==null?void 0:b.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,b){const f=y.lines.indexOf(b);f!==-1&&(y.lines.splice(f,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};n.OscLinkService=m=_([v(0,o.IBufferService)],m)},8343:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const d="di$target",_="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[_]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const o=function(m,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,r,h){r[d]===r?r[_].push({id:f,index:h}):(r[_]=[{id:f,index:h}],r[d]=r)})(o,m,b)};return o.toString=()=>v,n.serviceRegistry.set(v,o),o}},2585:(P,n,d)=>{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(8343);var v;n.IBufferService=(0,_.createDecorator)("BufferService"),n.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),n.ICoreService=(0,_.createDecorator)("CoreService"),n.ICharsetService=(0,_.createDecorator)("CharsetService"),n.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(o){o[o.TRACE=0]="TRACE",o[o.DEBUG=1]="DEBUG",o[o.INFO=2]="INFO",o[o.WARN=3]="WARN",o[o.ERROR=4]="ERROR",o[o.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,_.createDecorator)("LogService"),n.IOptionsService=(0,_.createDecorator)("OptionsService"),n.IOscLinkService=(0,_.createDecorator)("OscLinkService"),n.IUnicodeService=(0,_.createDecorator)("UnicodeService"),n.IDecorationService=(0,_.createDecorator)("DecorationService")},1480:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const _=d(8460),v=d(225);class o{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,b,f=!1){return(16777215&y)<<3|(3&b)<<1|(f?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter,this.onChange=this._onChange.event;const y=new v.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let b=0,f=0;const r=y.length;for(let h=0;h<r;++h){let l=y.charCodeAt(h);if(55296<=l&&l<=56319){if(++h>=r)return b+this.wcwidth(l);const C=y.charCodeAt(h);56320<=C&&C<=57343?l=1024*(l-55296)+C-56320+65536:b+=this.wcwidth(C)}const c=this.charProperties(l,f);let g=o.extractWidth(c);o.extractShouldJoin(c)&&(g-=o.extractWidth(f)),b+=g,f=c}return b}charProperties(y,b){return this._activeProvider.charProperties(y,b)}}n.UnicodeService=o}},j={};function te(P){var n=j[P];if(n!==void 0)return n.exports;var d=j[P]={exports:{}};return $[P].call(d.exports,d,d.exports,te),d.exports}var re={};return(()=>{var P=re;Object.defineProperty(P,"__esModule",{value:!0}),P.Terminal=void 0;const n=te(9042),d=te(3236),_=te(844),v=te(5741),o=te(8285),m=te(7975),y=te(7090),b=["cols","rows"];class f extends _.Disposable{constructor(h){super(),this._core=this.register(new d.Terminal(h)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const l=g=>this._core.options[g],c=(g,C)=>{this._checkReadonlyOptions(g),this._core.options[g]=C};for(const g in this._core.options){const C={get:l.bind(this,g),set:c.bind(this,g)};Object.defineProperty(this._publicOptions,g,C)}}_checkReadonlyOptions(h){if(b.includes(h))throw new Error(`Option "${h}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.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 o.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let l="none";switch(this._core.coreMouseService.activeProtocol){case"X10":l="x10";break;case"VT200":l="vt200";break;case"DRAG":l="drag";break;case"ANY":l="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:l,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const l in h)this._publicOptions[l]=h[l]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,l=!0){this._core.input(h,l)}resize(h,l){this._verifyIntegers(h,l),this._core.resize(h,l)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,l,c){this._verifyIntegers(h,l,c),this._core.select(h,l,c)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,l){this._verifyIntegers(h,l),this._core.selectLines(h,l)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,l){this._core.write(h,l)}writeln(h,l){this._core.write(h),this._core.write(`\r
|
|
57
|
-
`,
|
|
55
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(p){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&p&&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(p){const E=this._getMouseBufferCoords(p),L=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!!(L&&T&&E)&&this._areCoordsInSelection(E,L,T)}isCellInSelection(p,E){const L=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!(!L||!T)&&this._areCoordsInSelection([p,E],L,T)}_areCoordsInSelection(p,E,L){return p[1]>E[1]&&p[1]<L[1]||E[1]===L[1]&&p[1]===E[1]&&p[0]>=E[0]&&p[0]<L[0]||E[1]<L[1]&&p[1]===L[1]&&p[0]<L[0]||E[1]<L[1]&&p[1]===E[1]&&p[0]>=E[0]}_selectWordAtCursor(p,E){var A,M;const L=(M=(A=this._linkifier.currentLink)==null?void 0:A.link)==null?void 0:M.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const T=this._getMouseBufferCoords(p);return!!T&&(this._selectWordAt(T,E),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(p,E){this._model.clearSelection(),p=Math.max(p,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,p],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()}_handleTrim(p){this._model.handleTrim(p)&&this.refresh()}_getMouseBufferCoords(p){const E=this._mouseService.getCoords(p,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E}_getMouseEventScrollAmount(p){let E=(0,l.getCoordsRelativeToElement)(this._coreBrowserService.window,p,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return E>=0&&E<=L?0:(E>L&&(E-=L),E=Math.min(Math.max(E,-50),50),E/=50,E/Math.abs(E)+Math.round(14*E))}shouldForceSelection(p){return h.isMac?p.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:p.shiftKey}handleMouseDown(p){if(this._mouseDownTimeStamp=p.timeStamp,(p.button!==2||!this.hasSelection)&&p.button===0){if(!this._enabled){if(!this.shouldForceSelection(p))return;p.stopPropagation()}p.preventDefault(),this._dragScrollAmount=0,this._enabled&&p.shiftKey?this._handleIncrementalClick(p):p.detail===1?this._handleSingleClick(p):p.detail===2?this._handleDoubleClick(p):p.detail===3&&this._handleTripleClick(p),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(p){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(p))}_handleSingleClick(p){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(p)?3:0,this._model.selectionStart=this._getMouseBufferCoords(p),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(p){this._selectWordAtCursor(p,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(p){const E=this._getMouseBufferCoords(p);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))}shouldColumnSelect(p){return p.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(p){if(p.stopImmediatePropagation(),!this._model.selectionStart)return;const E=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(p),!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(p),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const T=L.lines.get(this._model.selectionEnd[1]);T&&T.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}E&&E[0]===this._model.selectionEnd[0]&&E[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 p=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(p.ydisp+this._bufferService.rows,p.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=p.ydisp),this.refresh()}}_handleMouseUp(p){const E=p.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&E<500&&p.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(p,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const T=(0,m.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(T,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const p=this._model.finalSelectionStart,E=this._model.finalSelectionEnd,L=!(!p||!E||p[0]===E[0]&&p[1]===E[1]);L?p&&E&&(this._oldSelectionStart&&this._oldSelectionEnd&&p[0]===this._oldSelectionStart[0]&&p[1]===this._oldSelectionStart[1]&&E[0]===this._oldSelectionEnd[0]&&E[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(p,E,L)):this._oldHasSelection&&this._fireOnSelectionChange(p,E,L)}_fireOnSelectionChange(p,E,L){this._oldSelectionStart=p,this._oldSelectionEnd=E,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(p){this.clearSelection(),this._trimListener.dispose(),this._trimListener=p.activeBuffer.lines.onTrim((E=>this._handleTrim(E)))}_convertViewportColToCharacterIndex(p,E){let L=E;for(let T=0;E>=T;T++){const A=p.loadCell(T,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:A>1&&E!==T&&(L+=A-1)}return L}setSelection(p,E,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[p,E],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(p){this._isClickInSelection(p)||(this._selectWordAtCursor(p,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(p,E,L=!0,T=!0){if(p[0]>=this._bufferService.cols)return;const A=this._bufferService.buffer,M=A.lines.get(p[1]);if(!M)return;const N=A.translateBufferLineToString(p[1],!1);let X=this._convertViewportColToCharacterIndex(M,p[0]),z=X;const I=p[0]-X;let G=0,D=0,H=0,R=0;if(N.charAt(X)===" "){for(;X>0&&N.charAt(X-1)===" ";)X--;for(;z<N.length&&N.charAt(z+1)===" ";)z++}else{let Q=p[0],he=p[0];M.getWidth(Q)===0&&(G++,Q--),M.getWidth(he)===2&&(D++,he++);const ue=M.getString(he).length;for(ue>1&&(R+=ue-1,z+=ue-1);Q>0&&X>0&&!this._isCharWordSeparator(M.loadCell(Q-1,this._workCell));){M.loadCell(Q-1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===0?(G++,Q--):F>1&&(H+=F-1,X-=F-1),X--,Q--}for(;he<M.length&&z+1<N.length&&!this._isCharWordSeparator(M.loadCell(he+1,this._workCell));){M.loadCell(he+1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===2?(D++,he++):F>1&&(R+=F-1,z+=F-1),z++,he++}}z++;let O=X+I-G+H,$=Math.min(this._bufferService.cols,z-X+G+D-H-R);if(E||N.slice(X,z).trim()!==""){if(L&&O===0&&M.getCodePoint(0)!==32){const Q=A.lines.get(p[1]-1);if(Q&&M.isWrapped&&Q.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,p[1]-1],!1,!0,!1);if(he){const ue=this._bufferService.cols-he.start;O-=ue,$+=ue}}}if(T&&O+$===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){const Q=A.lines.get(p[1]+1);if(Q!=null&&Q.isWrapped&&Q.getCodePoint(0)!==32){const he=this._getWordAt([0,p[1]+1],!1,!1,!0);he&&($+=he.length)}}return{start:O,length:$}}}_selectWordAt(p,E){const L=this._getWordAt(p,E);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,p[1]--;this._model.selectionStart=[L.start,p[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(p){const E=this._getWordAt(p,!0);if(E){let L=p[1];for(;E.start<0;)E.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,L]}}_isCharWordSeparator(p){return p.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(p.getChars())>=0}_selectLineAt(p){const E=this._bufferService.buffer.getWrappedRangeForLine(p),L={start:{x:0,y:E.first},end:{x:this._bufferService.cols-1,y:E.last}};this._model.selectionStart=[0,E.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(L,this._bufferService.cols)}};n.SelectionService=w=_([v(3,g.IBufferService),v(4,g.ICoreService),v(5,b.IMouseService),v(6,g.IOptionsService),v(7,b.IRenderService),v(8,b.ICoreBrowserService)],w)},4725:(q,n,d)=>{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(8343);n.ICharSizeService=(0,_.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),n.IMouseService=(0,_.createDecorator)("MouseService"),n.IRenderService=(0,_.createDecorator)("RenderService"),n.ISelectionService=(0,_.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,_.createDecorator)("ThemeService"),n.ILinkProviderService=(0,_.createDecorator)("LinkProviderService")},6731:function(q,n,d){var _=this&&this.__decorate||function(w,p,E,L){var T,A=arguments.length,M=A<3?p:L===null?L=Object.getOwnPropertyDescriptor(p,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(w,p,E,L);else for(var N=w.length-1;N>=0;N--)(T=w[N])&&(M=(A<3?T(M):A>3?T(p,E,M):T(p,E))||M);return A>3&&M&&Object.defineProperty(p,E,M),M},v=this&&this.__param||function(w,p){return function(E,L){p(E,L,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const l=d(7239),m=d(8055),y=d(8460),b=d(844),f=d(2585),r=m.css.toColor("#ffffff"),h=m.css.toColor("#000000"),o=m.css.toColor("#ffffff"),c=m.css.toColor("#000000"),g={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],p=[0,95,135,175,215,255];for(let E=0;E<216;E++){const L=p[E/36%6|0],T=p[E/6%6|0],A=p[E%6];w.push({css:m.channels.toCss(L,T,A),rgba:m.channels.toRgba(L,T,A)})}for(let E=0;E<24;E++){const L=8+10*E;w.push({css:m.channels.toCss(L,L,L),rgba:m.channels.toRgba(L,L,L)})}return w})());let C=n.ThemeService=class extends b.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new l.ColorContrastCache,this._halfContrastCache=new l.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:o,cursorAccent:c,selectionForeground:void 0,selectionBackgroundTransparent:g,selectionBackgroundOpaque:m.color.blend(h,g),selectionInactiveBackgroundTransparent:g,selectionInactiveBackgroundOpaque:m.color.blend(h,g),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(w={}){const p=this._colors;if(p.foreground=S(w.foreground,r),p.background=S(w.background,h),p.cursor=S(w.cursor,o),p.cursorAccent=S(w.cursorAccent,c),p.selectionBackgroundTransparent=S(w.selectionBackground,g),p.selectionBackgroundOpaque=m.color.blend(p.background,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundTransparent=S(w.selectionInactiveBackground,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundOpaque=m.color.blend(p.background,p.selectionInactiveBackgroundTransparent),p.selectionForeground=w.selectionForeground?S(w.selectionForeground,m.NULL_COLOR):void 0,p.selectionForeground===m.NULL_COLOR&&(p.selectionForeground=void 0),m.color.isOpaque(p.selectionBackgroundTransparent)&&(p.selectionBackgroundTransparent=m.color.opacity(p.selectionBackgroundTransparent,.3)),m.color.isOpaque(p.selectionInactiveBackgroundTransparent)&&(p.selectionInactiveBackgroundTransparent=m.color.opacity(p.selectionInactiveBackgroundTransparent,.3)),p.ansi=n.DEFAULT_ANSI_COLORS.slice(),p.ansi[0]=S(w.black,n.DEFAULT_ANSI_COLORS[0]),p.ansi[1]=S(w.red,n.DEFAULT_ANSI_COLORS[1]),p.ansi[2]=S(w.green,n.DEFAULT_ANSI_COLORS[2]),p.ansi[3]=S(w.yellow,n.DEFAULT_ANSI_COLORS[3]),p.ansi[4]=S(w.blue,n.DEFAULT_ANSI_COLORS[4]),p.ansi[5]=S(w.magenta,n.DEFAULT_ANSI_COLORS[5]),p.ansi[6]=S(w.cyan,n.DEFAULT_ANSI_COLORS[6]),p.ansi[7]=S(w.white,n.DEFAULT_ANSI_COLORS[7]),p.ansi[8]=S(w.brightBlack,n.DEFAULT_ANSI_COLORS[8]),p.ansi[9]=S(w.brightRed,n.DEFAULT_ANSI_COLORS[9]),p.ansi[10]=S(w.brightGreen,n.DEFAULT_ANSI_COLORS[10]),p.ansi[11]=S(w.brightYellow,n.DEFAULT_ANSI_COLORS[11]),p.ansi[12]=S(w.brightBlue,n.DEFAULT_ANSI_COLORS[12]),p.ansi[13]=S(w.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),p.ansi[14]=S(w.brightCyan,n.DEFAULT_ANSI_COLORS[14]),p.ansi[15]=S(w.brightWhite,n.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const E=Math.min(p.ansi.length-16,w.extendedAnsi.length);for(let L=0;L<E;L++)p.ansi[L+16]=S(w.extendedAnsi[L],n.DEFAULT_ANSI_COLORS[L+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){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[w]=this._restoreColors.ansi[w]}else for(let p=0;p<this._restoreColors.ansi.length;++p)this._colors.ansi[p]=this._restoreColors.ansi[p]}modifyColors(w){w(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 S(w,p){if(w!==void 0)try{return m.css.toColor(w)}catch{}return p}n.ThemeService=C=_([v(0,f.IOptionsService)],C)},6349:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const _=d(8460),v=d(844);class l extends v.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new _.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new _.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new _.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(y){if(this._maxLength===y)return;const b=new Array(y);for(let f=0;f<Math.min(y,this.length);f++)b[f]=this._array[this._getCyclicIndex(f)];this._array=b,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let b=this._length;b<y;b++)this._array[b]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,b){this._array[this._getCyclicIndex(y)]=b}push(y){this._array[this._getCyclicIndex(this._length)]=y,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(y,b,...f){if(b){for(let r=y;r<this._length-b;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+b)];this._length-=b,this.onDeleteEmitter.fire({index:y,amount:b})}for(let r=this._length-1;r>=y;r--)this._array[this._getCyclicIndex(r+f.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<f.length;r++)this._array[this._getCyclicIndex(y+r)]=f[r];if(f.length&&this.onInsertEmitter.fire({index:y,amount:f.length}),this._length+f.length>this._maxLength){const r=this._length+f.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=f.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,b,f){if(!(b<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+f<0)throw new Error("Cannot shift elements in list beyond index 0");if(f>0){for(let h=b-1;h>=0;h--)this.set(y+h+f,this.get(y+h));const r=y+b+f-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<b;r++)this.set(y+r+f,this.get(y+r))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}n.CircularList=l},1439:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function d(_,v=5){if(typeof _!="object")return _;const l=Array.isArray(_)?[]:{};for(const m in _)l[m]=v<=1?_[m]:_[m]&&d(_[m],v-1);return l}},8055:(q,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 d=0,_=0,v=0,l=0;var m,y,b,f,r;function h(c){const g=c.toString(16);return g.length<2?"0"+g:g}function o(c,g){return c<g?(g+.05)/(c+.05):(c+.05)/(g+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(g,C,S,w){return w!==void 0?`#${h(g)}${h(C)}${h(S)}${h(w)}`:`#${h(g)}${h(C)}${h(S)}`},c.toRgba=function(g,C,S,w=255){return(g<<24|C<<16|S<<8|w)>>>0},c.toColor=function(g,C,S,w){return{css:c.toCss(g,C,S,w),rgba:c.toRgba(g,C,S,w)}}})(m||(n.channels=m={})),(function(c){function g(C,S){return l=Math.round(255*S),[d,_,v]=r.toChannels(C.rgba),{css:m.toCss(d,_,v,l),rgba:m.toRgba(d,_,v,l)}}c.blend=function(C,S){if(l=(255&S.rgba)/255,l===1)return{css:S.css,rgba:S.rgba};const w=S.rgba>>24&255,p=S.rgba>>16&255,E=S.rgba>>8&255,L=C.rgba>>24&255,T=C.rgba>>16&255,A=C.rgba>>8&255;return d=L+Math.round((w-L)*l),_=T+Math.round((p-T)*l),v=A+Math.round((E-A)*l),{css:m.toCss(d,_,v),rgba:m.toRgba(d,_,v)}},c.isOpaque=function(C){return(255&C.rgba)==255},c.ensureContrastRatio=function(C,S,w){const p=r.ensureContrastRatio(C.rgba,S.rgba,w);if(p)return m.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(C){const S=(255|C.rgba)>>>0;return[d,_,v]=r.toChannels(S),{css:m.toCss(d,_,v),rgba:S}},c.opacity=g,c.multiplyOpacity=function(C,S){return l=255&C.rgba,g(C,l*S/255)},c.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(y||(n.color=y={})),(function(c){let g,C;try{const S=document.createElement("canvas");S.width=1,S.height=1;const w=S.getContext("2d",{willReadFrequently:!0});w&&(g=w,g.globalCompositeOperation="copy",C=g.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),m.toColor(d,_,v);case 5:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),l=parseInt(S.slice(4,5).repeat(2),16),m.toColor(d,_,v,l);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const w=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return d=parseInt(w[1]),_=parseInt(w[2]),v=parseInt(w[3]),l=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),m.toColor(d,_,v,l);if(!g||!C)throw new Error("css.toColor: Unsupported css format");if(g.fillStyle=C,g.fillStyle=S,typeof g.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(g.fillRect(0,0,1,1),[d,_,v,l]=g.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(d,_,v,l),css:S}}})(b||(n.css=b={})),(function(c){function g(C,S,w){const p=C/255,E=S/255,L=w/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(C){return g(C>>16&255,C>>8&255,255&C)},c.relativeLuminance2=g})(f||(n.rgb=f={})),(function(c){function g(S,w,p){const E=S>>24&255,L=S>>16&255,T=S>>8&255;let A=w>>24&255,M=w>>16&255,N=w>>8&255,X=o(f.relativeLuminance2(A,M,N),f.relativeLuminance2(E,L,T));for(;X<p&&(A>0||M>0||N>0);)A-=Math.max(0,Math.ceil(.1*A)),M-=Math.max(0,Math.ceil(.1*M)),N-=Math.max(0,Math.ceil(.1*N)),X=o(f.relativeLuminance2(A,M,N),f.relativeLuminance2(E,L,T));return(A<<24|M<<16|N<<8|255)>>>0}function C(S,w,p){const E=S>>24&255,L=S>>16&255,T=S>>8&255;let A=w>>24&255,M=w>>16&255,N=w>>8&255,X=o(f.relativeLuminance2(A,M,N),f.relativeLuminance2(E,L,T));for(;X<p&&(A<255||M<255||N<255);)A=Math.min(255,A+Math.ceil(.1*(255-A))),M=Math.min(255,M+Math.ceil(.1*(255-M))),N=Math.min(255,N+Math.ceil(.1*(255-N))),X=o(f.relativeLuminance2(A,M,N),f.relativeLuminance2(E,L,T));return(A<<24|M<<16|N<<8|255)>>>0}c.blend=function(S,w){if(l=(255&w)/255,l===1)return w;const p=w>>24&255,E=w>>16&255,L=w>>8&255,T=S>>24&255,A=S>>16&255,M=S>>8&255;return d=T+Math.round((p-T)*l),_=A+Math.round((E-A)*l),v=M+Math.round((L-M)*l),m.toRgba(d,_,v)},c.ensureContrastRatio=function(S,w,p){const E=f.relativeLuminance(S>>8),L=f.relativeLuminance(w>>8);if(o(E,L)<p){if(L<E){const M=g(S,w,p),N=o(E,f.relativeLuminance(M>>8));if(N<p){const X=C(S,w,p);return N>o(E,f.relativeLuminance(X>>8))?M:X}return M}const T=C(S,w,p),A=o(E,f.relativeLuminance(T>>8));if(A<p){const M=g(S,w,p);return A>o(E,f.relativeLuminance(M>>8))?T:M}return T}},c.reduceLuminance=g,c.increaseLuminance=C,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},8969:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const _=d(844),v=d(2585),l=d(4348),m=d(7866),y=d(744),b=d(7302),f=d(6975),r=d(8460),h=d(1753),o=d(1480),c=d(7994),g=d(9282),C=d(5435),S=d(5981),w=d(2660);let p=!1;class E extends _.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((T=>{var A;(A=this._onScrollApi)==null||A.fire(T.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(T){for(const A in T)this.optionsService.options[A]=T[A]}constructor(T){super(),this._windowsWrappingHeuristics=this.register(new _.MutableDisposable),this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new r.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new r.EventEmitter),this._instantiationService=new l.InstantiationService,this.optionsService=this.register(new b.OptionsService(T)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(f.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(c.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new C.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,r.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,r.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,r.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,r.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((A=>{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((A=>{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 S.WriteBuffer(((A,M)=>this._inputHandler.parse(A,M)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(T,A){this._writeBuffer.write(T,A)}writeSync(T,A){this._logService.logLevel<=v.LogLevelEnum.WARN&&!p&&(this._logService.warn("writeSync is unreliable and will be removed soon."),p=!0),this._writeBuffer.writeSync(T,A)}input(T,A=!0){this.coreService.triggerDataEvent(T,A)}resize(T,A){isNaN(T)||isNaN(A)||(T=Math.max(T,y.MINIMUM_COLS),A=Math.max(A,y.MINIMUM_ROWS),this._bufferService.resize(T,A))}scroll(T,A=!1){this._bufferService.scroll(T,A)}scrollLines(T,A,M){this._bufferService.scrollLines(T,A,M)}scrollPages(T){this.scrollLines(T*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(T){const A=T-this._bufferService.buffer.ydisp;A!==0&&this.scrollLines(A)}registerEscHandler(T,A){return this._inputHandler.registerEscHandler(T,A)}registerDcsHandler(T,A){return this._inputHandler.registerDcsHandler(T,A)}registerCsiHandler(T,A){return this._inputHandler.registerCsiHandler(T,A)}registerOscHandler(T,A){return this._inputHandler.registerOscHandler(T,A)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let T=!1;const A=this.optionsService.rawOptions.windowsPty;A&&A.buildNumber!==void 0&&A.buildNumber!==void 0?T=A.backend==="conpty"&&A.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(T=!0),T?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const T=[];T.push(this.onLineFeed(g.updateWindowsModeWrappedState.bind(null,this._bufferService))),T.push(this.registerCsiHandler({final:"H"},(()=>((0,g.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,_.toDisposable)((()=>{for(const A of T)A.dispose()}))}}}n.CoreTerminal=E},8460:(q,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=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===d)return void this._listeners.splice(_,1)}}})),this._event}fire(d,_){const v=[];for(let l=0;l<this._listeners.length;l++)v.push(this._listeners[l]);for(let l=0;l<v.length;l++)v[l].call(void 0,d,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(d,_){return d((v=>_.fire(v)))},n.runAndSubscribe=function(d,_){return _(void 0),d((v=>_(v)))}},5435:function(q,n,d){var _=this&&this.__decorate||function(G,D,H,R){var O,$=arguments.length,Q=$<3?D:R===null?R=Object.getOwnPropertyDescriptor(D,H):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(G,D,H,R);else for(var he=G.length-1;he>=0;he--)(O=G[he])&&(Q=($<3?O(Q):$>3?O(D,H,Q):O(D,H))||Q);return $>3&&Q&&Object.defineProperty(D,H,Q),Q},v=this&&this.__param||function(G,D){return function(H,R){D(H,R,G)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const l=d(2584),m=d(7116),y=d(2015),b=d(844),f=d(482),r=d(8437),h=d(8460),o=d(643),c=d(511),g=d(3734),C=d(2585),S=d(1480),w=d(6242),p=d(6351),E=d(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},T=131072;function A(G,D){if(G>24)return D.setWinLines||!1;switch(G){case 1:return!!D.restoreWin;case 2:return!!D.minimizeWin;case 3:return!!D.setWinPosition;case 4:return!!D.setWinSizePixels;case 5:return!!D.raiseWin;case 6:return!!D.lowerWin;case 7:return!!D.refreshWin;case 8:return!!D.setWinSizeChars;case 9:return!!D.maximizeWin;case 10:return!!D.fullscreenWin;case 11:return!!D.getWinState;case 13:return!!D.getWinPosition;case 14:return!!D.getWinSizePixels;case 15:return!!D.getScreenSizePixels;case 16:return!!D.getCellSizePixels;case 18:return!!D.getWinSizeChars;case 19:return!!D.getScreenSizeChars;case 20:return!!D.getIconTitle;case 21:return!!D.getWinTitle;case 22:return!!D.pushTitle;case 23:return!!D.popTitle;case 24:return!!D.setWinLines}return!1}var M;(function(G){G[G.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",G[G.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(n.WindowsOptionsReportType=M={}));let N=0;class X extends b.Disposable{getAttrData(){return this._curAttrData}constructor(D,H,R,O,$,Q,he,ue,F=new y.EscapeSequenceParser){super(),this._bufferService=D,this._charsetService=H,this._coreService=R,this._logService=O,this._optionsService=$,this._oscLinkService=Q,this._coreMouseService=he,this._unicodeService=ue,this._parser=F,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new f.StringToUtf32,this._utf8Decoder=new f.Utf8ToUtf32,this._workCell=new c.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.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 z(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((k=>this._activeBuffer=k.activeBuffer))),this._parser.setCsiHandlerFallback(((k,re)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(k),params:re.toArray()})})),this._parser.setEscHandlerFallback((k=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(k)})})),this._parser.setExecuteHandlerFallback((k=>{this._logService.debug("Unknown EXECUTE code: ",{code:k})})),this._parser.setOscHandlerFallback(((k,re,se)=>{this._logService.debug("Unknown OSC code: ",{identifier:k,action:re,data:se})})),this._parser.setDcsHandlerFallback(((k,re,se)=>{re==="HOOK"&&(se=se.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(k),action:re,payload:se})})),this._parser.setPrintHandler(((k,re,se)=>this.print(k,re,se))),this._parser.registerCsiHandler({final:"@"},(k=>this.insertChars(k))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(k=>this.scrollLeft(k))),this._parser.registerCsiHandler({final:"A"},(k=>this.cursorUp(k))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(k=>this.scrollRight(k))),this._parser.registerCsiHandler({final:"B"},(k=>this.cursorDown(k))),this._parser.registerCsiHandler({final:"C"},(k=>this.cursorForward(k))),this._parser.registerCsiHandler({final:"D"},(k=>this.cursorBackward(k))),this._parser.registerCsiHandler({final:"E"},(k=>this.cursorNextLine(k))),this._parser.registerCsiHandler({final:"F"},(k=>this.cursorPrecedingLine(k))),this._parser.registerCsiHandler({final:"G"},(k=>this.cursorCharAbsolute(k))),this._parser.registerCsiHandler({final:"H"},(k=>this.cursorPosition(k))),this._parser.registerCsiHandler({final:"I"},(k=>this.cursorForwardTab(k))),this._parser.registerCsiHandler({final:"J"},(k=>this.eraseInDisplay(k,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(k=>this.eraseInDisplay(k,!0))),this._parser.registerCsiHandler({final:"K"},(k=>this.eraseInLine(k,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(k=>this.eraseInLine(k,!0))),this._parser.registerCsiHandler({final:"L"},(k=>this.insertLines(k))),this._parser.registerCsiHandler({final:"M"},(k=>this.deleteLines(k))),this._parser.registerCsiHandler({final:"P"},(k=>this.deleteChars(k))),this._parser.registerCsiHandler({final:"S"},(k=>this.scrollUp(k))),this._parser.registerCsiHandler({final:"T"},(k=>this.scrollDown(k))),this._parser.registerCsiHandler({final:"X"},(k=>this.eraseChars(k))),this._parser.registerCsiHandler({final:"Z"},(k=>this.cursorBackwardTab(k))),this._parser.registerCsiHandler({final:"`"},(k=>this.charPosAbsolute(k))),this._parser.registerCsiHandler({final:"a"},(k=>this.hPositionRelative(k))),this._parser.registerCsiHandler({final:"b"},(k=>this.repeatPrecedingCharacter(k))),this._parser.registerCsiHandler({final:"c"},(k=>this.sendDeviceAttributesPrimary(k))),this._parser.registerCsiHandler({prefix:">",final:"c"},(k=>this.sendDeviceAttributesSecondary(k))),this._parser.registerCsiHandler({final:"d"},(k=>this.linePosAbsolute(k))),this._parser.registerCsiHandler({final:"e"},(k=>this.vPositionRelative(k))),this._parser.registerCsiHandler({final:"f"},(k=>this.hVPosition(k))),this._parser.registerCsiHandler({final:"g"},(k=>this.tabClear(k))),this._parser.registerCsiHandler({final:"h"},(k=>this.setMode(k))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(k=>this.setModePrivate(k))),this._parser.registerCsiHandler({final:"l"},(k=>this.resetMode(k))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(k=>this.resetModePrivate(k))),this._parser.registerCsiHandler({final:"m"},(k=>this.charAttributes(k))),this._parser.registerCsiHandler({final:"n"},(k=>this.deviceStatus(k))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(k=>this.deviceStatusPrivate(k))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(k=>this.softReset(k))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(k=>this.setCursorStyle(k))),this._parser.registerCsiHandler({final:"r"},(k=>this.setScrollRegion(k))),this._parser.registerCsiHandler({final:"s"},(k=>this.saveCursor(k))),this._parser.registerCsiHandler({final:"t"},(k=>this.windowOptions(k))),this._parser.registerCsiHandler({final:"u"},(k=>this.restoreCursor(k))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(k=>this.insertColumns(k))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(k=>this.deleteColumns(k))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(k=>this.selectProtected(k))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(k=>this.requestMode(k,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(k=>this.requestMode(k,!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 w.OscHandler((k=>(this.setTitle(k),this.setIconName(k),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((k=>this.setIconName(k)))),this._parser.registerOscHandler(2,new w.OscHandler((k=>this.setTitle(k)))),this._parser.registerOscHandler(4,new w.OscHandler((k=>this.setOrReportIndexedColor(k)))),this._parser.registerOscHandler(8,new w.OscHandler((k=>this.setHyperlink(k)))),this._parser.registerOscHandler(10,new w.OscHandler((k=>this.setOrReportFgColor(k)))),this._parser.registerOscHandler(11,new w.OscHandler((k=>this.setOrReportBgColor(k)))),this._parser.registerOscHandler(12,new w.OscHandler((k=>this.setOrReportCursorColor(k)))),this._parser.registerOscHandler(104,new w.OscHandler((k=>this.restoreIndexedColor(k)))),this._parser.registerOscHandler(110,new w.OscHandler((k=>this.restoreFgColor(k)))),this._parser.registerOscHandler(111,new w.OscHandler((k=>this.restoreBgColor(k)))),this._parser.registerOscHandler(112,new w.OscHandler((k=>this.restoreCursorColor(k)))),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 k in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:k},(()=>this.selectCharset("("+k))),this._parser.registerEscHandler({intermediates:")",final:k},(()=>this.selectCharset(")"+k))),this._parser.registerEscHandler({intermediates:"*",final:k},(()=>this.selectCharset("*"+k))),this._parser.registerEscHandler({intermediates:"+",final:k},(()=>this.selectCharset("+"+k))),this._parser.registerEscHandler({intermediates:"-",final:k},(()=>this.selectCharset("-"+k))),this._parser.registerEscHandler({intermediates:".",final:k},(()=>this.selectCharset("."+k))),this._parser.registerEscHandler({intermediates:"/",final:k},(()=>this.selectCharset("/"+k)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((k=>(this._logService.error("Parsing error: ",k),k))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new p.DcsHandler(((k,re)=>this.requestStatusString(k,re))))}_preserveStack(D,H,R,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=D,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=R,this._parseStack.position=O}_logSlowResolvingAsync(D){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([D,new Promise(((H,R)=>setTimeout((()=>R("#SLOW_TIMEOUT")),5e3)))]).catch((H=>{if(H!=="#SLOW_TIMEOUT")throw H;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(D,H){let R,O=this._activeBuffer.x,$=this._activeBuffer.y,Q=0;const he=this._parseStack.paused;if(he){if(R=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(R),R;O=this._parseStack.cursorStartX,$=this._parseStack.cursorStartY,this._parseStack.paused=!1,D.length>T&&(Q=this._parseStack.position+T)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof D=="string"?` "${D}"`:` "${Array.prototype.map.call(D,(k=>String.fromCharCode(k))).join("")}"`),typeof D=="string"?D.split("").map((k=>k.charCodeAt(0))):D),this._parseBuffer.length<D.length&&this._parseBuffer.length<T&&(this._parseBuffer=new Uint32Array(Math.min(D.length,T))),he||this._dirtyRowTracker.clearRange(),D.length>T)for(let k=Q;k<D.length;k+=T){const re=k+T<D.length?k+T:D.length,se=typeof D=="string"?this._stringDecoder.decode(D.substring(k,re),this._parseBuffer):this._utf8Decoder.decode(D.subarray(k,re),this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,se))return this._preserveStack(O,$,se,k),this._logSlowResolvingAsync(R),R}else if(!he){const k=typeof D=="string"?this._stringDecoder.decode(D,this._parseBuffer):this._utf8Decoder.decode(D,this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,k))return this._preserveStack(O,$,k,0),this._logSlowResolvingAsync(R),R}this._activeBuffer.x===O&&this._activeBuffer.y===$||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),F=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);F<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(F,this._bufferService.rows-1),Math.min(ue,this._bufferService.rows-1))}print(D,H,R){let O,$;const Q=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,F=this._coreService.decPrivateModes.wraparound,k=this._coreService.modes.insertMode,re=this._curAttrData;let se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&R-H>0&&se.getWidth(this._activeBuffer.x-1)===2&&se.setCellFromCodepoint(this._activeBuffer.x-1,0,1,re);let de=this._parser.precedingJoinState;for(let fe=H;fe<R;++fe){if(O=D[fe],O<127&&Q){const Ke=Q[String.fromCharCode(O)];Ke&&(O=Ke.charCodeAt(0))}const we=this._unicodeService.charProperties(O,de);$=S.UnicodeService.extractWidth(we);const me=S.UnicodeService.extractShouldJoin(we),ze=me?S.UnicodeService.extractWidth(de):0;if(de=we,he&&this._onA11yChar.fire((0,f.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+$-ze>ue){if(F){const Ke=se;let Se=this._activeBuffer.x-ze;for(this._activeBuffer.x=ze,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),se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ze>0&&se instanceof r.BufferLine&&se.copyCellsFrom(Ke,Se,0,ze,!1);Se<ue;)Ke.setCellFromCodepoint(Se++,0,1,re)}else if(this._activeBuffer.x=ue-1,$===2)continue}if(me&&this._activeBuffer.x){const Ke=se.getWidth(this._activeBuffer.x-1)?1:2;se.addCodepointToCell(this._activeBuffer.x-Ke,O,$);for(let Se=$-ze;--Se>=0;)se.setCellFromCodepoint(this._activeBuffer.x++,0,0,re)}else if(k&&(se.insertCells(this._activeBuffer.x,$-ze,this._activeBuffer.getNullCell(re)),se.getWidth(ue-1)===2&&se.setCellFromCodepoint(ue-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,re)),se.setCellFromCodepoint(this._activeBuffer.x++,O,$,re),$>0)for(;--$;)se.setCellFromCodepoint(this._activeBuffer.x++,0,0,re)}this._parser.precedingJoinState=de,this._activeBuffer.x<ue&&R-H>0&&se.getWidth(this._activeBuffer.x)===0&&!se.hasContent(this._activeBuffer.x)&&se.setCellFromCodepoint(this._activeBuffer.x,0,1,re),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(D,H){return D.final!=="t"||D.prefix||D.intermediates?this._parser.registerCsiHandler(D,H):this._parser.registerCsiHandler(D,(R=>!A(R.params[0],this._optionsService.rawOptions.windowOptions)||H(R)))}registerDcsHandler(D,H){return this._parser.registerDcsHandler(D,new p.DcsHandler(H))}registerEscHandler(D,H){return this._parser.registerEscHandler(D,H)}registerOscHandler(D,H){return this._parser.registerOscHandler(D,new w.OscHandler(H))}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 D;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&&((D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&D.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const D=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-D),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(D=this._bufferService.cols-1){this._activeBuffer.x=Math.min(D,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(D,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=D,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=D,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(D,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+D,this._activeBuffer.y+H)}cursorUp(D){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,D.params[0]||1)):this._moveCursor(0,-(D.params[0]||1)),!0}cursorDown(D){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,D.params[0]||1)):this._moveCursor(0,D.params[0]||1),!0}cursorForward(D){return this._moveCursor(D.params[0]||1,0),!0}cursorBackward(D){return this._moveCursor(-(D.params[0]||1),0),!0}cursorNextLine(D){return this.cursorDown(D),this._activeBuffer.x=0,!0}cursorPrecedingLine(D){return this.cursorUp(D),this._activeBuffer.x=0,!0}cursorCharAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(D){return this._setCursor(D.length>=2?(D.params[1]||1)-1:0,(D.params[0]||1)-1),!0}charPosAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(D){return this._moveCursor(D.params[0]||1,0),!0}linePosAbsolute(D){return this._setCursor(this._activeBuffer.x,(D.params[0]||1)-1),!0}vPositionRelative(D){return this._moveCursor(0,D.params[0]||1),!0}hVPosition(D){return this.cursorPosition(D),!0}tabClear(D){const H=D.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=D.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=D.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(D){const H=D.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(D,H,R,O=!1,$=!1){const Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);Q.replaceCells(H,R,this._activeBuffer.getNullCell(this._eraseAttrData()),$),O&&(Q.isWrapped=!1)}_resetBufferLine(D,H=!1){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);R&&(R.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+D),R.isWrapped=!1)}eraseInDisplay(D,H=!1){let R;switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);R<this._bufferService.rows;R++)this._resetBufferLine(R,H);this._dirtyRowTracker.markDirty(R);break;case 1:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(R+1).isWrapped=!1);R--;)this._resetBufferLine(R,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(R=this._bufferService.rows,this._dirtyRowTracker.markDirty(R-1);R--;)this._resetBufferLine(R,H);this._dirtyRowTracker.markDirty(0);break;case 3:const O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(D,H=!1){switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,H);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,H)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(D){this._restrictCursor();let H=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,$=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;H--;)this._activeBuffer.lines.splice($-1,1),this._activeBuffer.lines.splice(R,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(D){this._restrictCursor();let H=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y;let O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;H--;)this._activeBuffer.lines.splice(R,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(D){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(D){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(D){let H=D.params[0]||1;for(;H--;)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(D){let H=D.params[0]||1;for(;H--;)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(r.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=D.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);O.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=D.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);O.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=D.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);O.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=D.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);O.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(D){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(D.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(D){const H=this._parser.precedingJoinState;if(!H)return!0;const R=D.params[0]||1,O=S.UnicodeService.extractWidth(H),$=this._activeBuffer.x-O,Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString($),he=new Uint32Array(Q.length*R);let ue=0;for(let k=0;k<Q.length;){const re=Q.codePointAt(k)||0;he[ue++]=re,k+=re>65535?2:1}let F=ue;for(let k=1;k<R;++k)he.copyWithin(F,0,ue),F+=ue;return this.print(he,0,F),!0}sendDeviceAttributesPrimary(D){return D.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(D){return D.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(D.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(l.C0.ESC+"[>83;40003;0c")),!0}_is(D){return(this._optionsService.rawOptions.termName+"").indexOf(D)===0}setMode(D){for(let H=0;H<D.length;H++)switch(D.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(D){for(let H=0;H<D.length;H++)switch(D.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.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(D){for(let H=0;H<D.length;H++)switch(D.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(D){for(let H=0;H<D.length;H++)switch(D.params[H]){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(),D.params[H]===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(D,H){const R=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:$}=this._coreMouseService,Q=this._coreService,{buffers:he,cols:ue}=this._bufferService,{active:F,alt:k}=he,re=this._optionsService.rawOptions,se=me=>me?1:2,de=D.params[0];return fe=de,we=H?de===2?4:de===4?se(Q.modes.insertMode):de===12?3:de===20?se(re.convertEol):0:de===1?se(R.applicationCursorKeys):de===3?re.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:de===6?se(R.origin):de===7?se(R.wraparound):de===8?3:de===9?se(O==="X10"):de===12?se(re.cursorBlink):de===25?se(!Q.isCursorHidden):de===45?se(R.reverseWraparound):de===66?se(R.applicationKeypad):de===67?4:de===1e3?se(O==="VT200"):de===1002?se(O==="DRAG"):de===1003?se(O==="ANY"):de===1004?se(R.sendFocus):de===1005?4:de===1006?se($==="SGR"):de===1015?4:de===1016?se($==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?se(F===k):de===2004?se(R.bracketedPasteMode):0,Q.triggerDataEvent(`${l.C0.ESC}[${H?"":"?"}${fe};${we}$y`),!0;var fe,we}_updateAttrColor(D,H,R,O,$){return H===2?(D|=50331648,D&=-16777216,D|=g.AttributeData.fromColorRGB([R,O,$])):H===5&&(D&=-50331904,D|=33554432|255&R),D}_extractColor(D,H,R){const O=[0,0,-1,0,0,0];let $=0,Q=0;do{if(O[Q+$]=D.params[H+Q],D.hasSubParams(H+Q)){const he=D.getSubParams(H+Q);let ue=0;do O[1]===5&&($=1),O[Q+ue+1+$]=he[ue];while(++ue<he.length&&ue+Q+1+$<O.length);break}if(O[1]===5&&Q+$>=2||O[1]===2&&Q+$>=5)break;O[1]&&($=1)}while(++Q+H<D.length&&Q+$<O.length);for(let he=2;he<O.length;++he)O[he]===-1&&(O[he]=0);switch(O[0]){case 38:R.fg=this._updateAttrColor(R.fg,O[1],O[3],O[4],O[5]);break;case 48:R.bg=this._updateAttrColor(R.bg,O[1],O[3],O[4],O[5]);break;case 58:R.extended=R.extended.clone(),R.extended.underlineColor=this._updateAttrColor(R.extended.underlineColor,O[1],O[3],O[4],O[5])}return Q}_processUnderline(D,H){H.extended=H.extended.clone(),(!~D||D>5)&&(D=1),H.extended.underlineStyle=D,H.fg|=268435456,D===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(D){D.fg=r.DEFAULT_ATTR_DATA.fg,D.bg=r.DEFAULT_ATTR_DATA.bg,D.extended=D.extended.clone(),D.extended.underlineStyle=0,D.extended.underlineColor&=-67108864,D.updateExtended()}charAttributes(D){if(D.length===1&&D.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=D.length;let R;const O=this._curAttrData;for(let $=0;$<H;$++)R=D.params[$],R>=30&&R<=37?(O.fg&=-50331904,O.fg|=16777216|R-30):R>=40&&R<=47?(O.bg&=-50331904,O.bg|=16777216|R-40):R>=90&&R<=97?(O.fg&=-50331904,O.fg|=16777224|R-90):R>=100&&R<=107?(O.bg&=-50331904,O.bg|=16777224|R-100):R===0?this._processSGR0(O):R===1?O.fg|=134217728:R===3?O.bg|=67108864:R===4?(O.fg|=268435456,this._processUnderline(D.hasSubParams($)?D.getSubParams($)[0]:1,O)):R===5?O.fg|=536870912:R===7?O.fg|=67108864:R===8?O.fg|=1073741824:R===9?O.fg|=2147483648:R===2?O.bg|=134217728:R===21?this._processUnderline(2,O):R===22?(O.fg&=-134217729,O.bg&=-134217729):R===23?O.bg&=-67108865:R===24?(O.fg&=-268435457,this._processUnderline(0,O)):R===25?O.fg&=-536870913:R===27?O.fg&=-67108865:R===28?O.fg&=-1073741825:R===29?O.fg&=2147483647:R===39?(O.fg&=-67108864,O.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):R===49?(O.bg&=-67108864,O.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):R===38||R===48||R===58?$+=this._extractColor(D,$,O):R===53?O.bg|=1073741824:R===55?O.bg&=-1073741825:R===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):R===100?(O.fg&=-67108864,O.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",R);return!0}deviceStatus(D){switch(D.params[0]){case 5:this._coreService.triggerDataEvent(`${l.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[${H};${R}R`)}return!0}deviceStatusPrivate(D){if(D.params[0]===6){const H=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[?${H};${R}R`)}return!0}softReset(D){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=r.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(D){const H=D.params[0]||1;switch(H){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 R=H%2==1;return this._optionsService.options.cursorBlink=R,!0}setScrollRegion(D){const H=D.params[0]||1;let R;return(D.length<2||(R=D.params[1])>this._bufferService.rows||R===0)&&(R=this._bufferService.rows),R>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=R-1,this._setCursor(0,0)),!0}windowOptions(D){if(!A(D.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=D.length>1?D.params[1]:0;switch(D.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.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:H!==0&&H!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),H!==0&&H!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:H!==0&&H!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),H!==0&&H!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(D){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(D){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(D){return this._windowTitle=D,this._onTitleChange.fire(D),!0}setIconName(D){return this._iconName=D,!0}setOrReportIndexedColor(D){const H=[],R=D.split(";");for(;R.length>1;){const O=R.shift(),$=R.shift();if(/^\d+$/.exec(O)){const Q=parseInt(O);if(I(Q))if($==="?")H.push({type:0,index:Q});else{const he=(0,E.parseColor)($);he&&H.push({type:1,index:Q,color:he})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(D){const H=D.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(D,H){this._getCurrentLinkId()&&this._finishHyperlink();const R=D.split(":");let O;const $=R.findIndex((Q=>Q.startsWith("id=")));return $!==-1&&(O=R[$].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,uri:H}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(D,H){const R=D.split(";");for(let O=0;O<R.length&&!(H>=this._specialColors.length);++O,++H)if(R[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const $=(0,E.parseColor)(R[O]);$&&this._onColor.fire([{type:1,index:this._specialColors[H],color:$}])}return!0}setOrReportFgColor(D){return this._setOrReportSpecialColor(D,0)}setOrReportBgColor(D){return this._setOrReportSpecialColor(D,1)}setOrReportCursorColor(D){return this._setOrReportSpecialColor(D,2)}restoreIndexedColor(D){if(!D)return this._onColor.fire([{type:2}]),!0;const H=[],R=D.split(";");for(let O=0;O<R.length;++O)if(/^\d+$/.exec(R[O])){const $=parseInt(R[O]);I($)&&H.push({type:2,index:$})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(D){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(D){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(D){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,m.DEFAULT_CHARSET),!0}selectCharset(D){return D.length!==2?(this.selectDefaultCharset(),!0):(D[0]==="/"||this._charsetService.setgCharset(L[D[0]],m.CHARSETS[D[1]]||m.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 D=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,D,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=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(D){return this._charsetService.setgLevel(D),!0}screenAlignmentPattern(){const D=new c.CellData;D.content=4194373,D.fg=this._curAttrData.fg,D.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const R=this._activeBuffer.ybase+this._activeBuffer.y+H,O=this._activeBuffer.lines.get(R);O&&(O.fill(D),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(D,H){const R=this._bufferService.buffer,O=this._optionsService.rawOptions;return($=>(this._coreService.triggerDataEvent(`${l.C0.ESC}${$}${l.C0.ESC}\\`),!0))(D==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:D==='"p'?'P1$r61;1"p':D==="r"?`P1$r${R.scrollTop+1};${R.scrollBottom+1}r`:D==="m"?"P1$r0m":D===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(D,H){this._dirtyRowTracker.markRangeDirty(D,H)}}n.InputHandler=X;let z=class{constructor(G){this._bufferService=G,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(G){G<this.start?this.start=G:G>this.end&&(this.end=G)}markRangeDirty(G,D){G>D&&(N=G,G=D,D=N),G<this.start&&(this.start=G),D>this.end&&(this.end=D)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function I(G){return 0<=G&&G<256}z=_([v(0,C.IBufferService)],z)},844:(q,n)=>{function d(_){for(const v of _)v.dispose();_.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 _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},n.toDisposable=function(_){return{dispose:_}},n.disposeArray=d,n.getDisposeArrayDisposable=function(_){return{dispose:()=>d(_)}}},1505:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(v,l,m){this._data[v]||(this._data[v]={}),this._data[v][l]=m}get(v,l){return this._data[v]?this._data[v][l]:void 0}clear(){this._data={}}}n.TwoKeyMap=d,n.FourKeyMap=class{constructor(){this._data=new d}set(_,v,l,m,y){this._data.get(_,v)||this._data.set(_,v,new d),this._data.get(_,v).set(l,m,y)}get(_,v,l,m){var y;return(y=this._data.get(_,v))==null?void 0:y.get(l,m)}clear(){this._data.clear()}}},6114:(q,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 d=n.isNode?"node":navigator.userAgent,_=n.isNode?"node":navigator.platform;n.isFirefox=d.includes("Firefox"),n.isLegacyEdge=d.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(d),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=d.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),n.isIpad=_==="iPad",n.isIphone=_==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),n.isLinux=_.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(d)},6106:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let d=0;n.SortedList=class{constructor(_){this._getKey=_,this._array=[]}clear(){this._array.length=0}insert(_){this._array.length!==0?(d=this._search(this._getKey(_)),this._array.splice(d,0,_)):this._array.push(_)}delete(_){if(this._array.length===0)return!1;const v=this._getKey(_);if(v===void 0||(d=this._search(v),d===-1)||this._getKey(this._array[d])!==v)return!1;do if(this._array[d]===_)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===v);return!1}*getKeyIterator(_){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===_)}forEachByKey(_,v){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do v(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===_)}values(){return[...this._array].values()}_search(_){let v=0,l=this._array.length-1;for(;l>=v;){let m=v+l>>1;const y=this._getKey(this._array[m]);if(y>_)l=m-1;else{if(!(y<_)){for(;m>0&&this._getKey(this._array[m-1])===_;)m--;return m}v=m+1}}return v}}},7226:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const _=d(6114);class v{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),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(y){this._idleCallback=void 0;let b=0,f=0,r=y.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),f=Math.max(b,f),h=y.timeRemaining(),1.5*f>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class l extends v{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const b=Date.now()+y;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=l,n.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:l,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const _=d(643);n.updateWindowsModeWrappedState=function(v){const l=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),m=l==null?void 0:l.get(v.cols-1),y=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);y&&m&&(y.isWrapped=m[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&m[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new _}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 d;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=d;class _{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,m=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=m}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=_},9092:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const _=d(6349),v=d(7226),l=d(3734),m=d(8437),y=d(4634),b=d(511),f=d(643),r=d(4863),h=d(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(o,c,g){this._hasScrollback=o,this._optionsService=c,this._bufferService=g,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=b.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]),this._whitespaceCell=b.CellData.fromCharData([0,f.WHITESPACE_CELL_CHAR,f.WHITESPACE_CELL_WIDTH,f.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.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,c){return new m.BufferLine(this._bufferService.cols,this.getNullCell(o),c)}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 c=o+this._optionsService.rawOptions.scrollback;return c>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:c}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=m.DEFAULT_ATTR_DATA);let c=this._rows;for(;c--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,c){const g=this.getNullCell(m.DEFAULT_ATTR_DATA);let C=0;const S=this._getCorrectBufferLength(c);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<o)for(let p=0;p<this.lines.length;p++)C+=+this.lines.get(p).resize(o,g);let w=0;if(this._rows<c)for(let p=this._rows;p<c;p++)this.lines.length<c+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new m.BufferLine(o,g)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(o,g)));else for(let p=this._rows;p>c;p--)this.lines.length>c+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){const p=this.lines.length-S;p>0&&(this.lines.trimStart(p),this.ybase=Math.max(this.ybase-p,0),this.ydisp=Math.max(this.ydisp-p,0),this.savedY=Math.max(this.savedY-p,0)),this.lines.maxLength=S}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,c-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=c-1,this._isReflowEnabled&&(this._reflow(o,c),this._cols>o))for(let w=0;w<this.lines.length;w++)C+=+this.lines.get(w).resize(o,g);this._cols=o,this._rows=c,this._memoryCleanupQueue.clear(),C>.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 c=0;for(;this._memoryCleanupPosition<this.lines.length;)if(c+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),c>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,c){this._cols!==o&&(o>this._cols?this._reflowLarger(o,c):this._reflowSmaller(o,c))}_reflowLarger(o,c){const g=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(g.length>0){const C=(0,y.reflowLargerCreateNewLayout)(this.lines,g);(0,y.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(o,c,C.countRemoved)}}_reflowLargerAdjustViewport(o,c,g){const C=this.getNullCell(m.DEFAULT_ATTR_DATA);let S=g;for(;S-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<c&&this.lines.push(new m.BufferLine(o,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-g,0)}_reflowSmaller(o,c){const g=this.getNullCell(m.DEFAULT_ATTR_DATA),C=[];let S=0;for(let w=this.lines.length-1;w>=0;w--){let p=this.lines.get(w);if(!p||!p.isWrapped&&p.getTrimmedLength()<=o)continue;const E=[p];for(;p.isWrapped&&w>0;)p=this.lines.get(--w),E.unshift(p);const L=this.ybase+this.y;if(L>=w&&L<w+E.length)continue;const T=E[E.length-1].getTrimmedLength(),A=(0,y.reflowSmallerGetNewLineLengths)(E,this._cols,o),M=A.length-E.length;let N;N=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const X=[];for(let R=0;R<M;R++){const O=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);X.push(O)}X.length>0&&(C.push({start:w+E.length+S,newLines:X}),S+=X.length),E.push(...X);let z=A.length-1,I=A[z];I===0&&(z--,I=A[z]);let G=E.length-M-1,D=T;for(;G>=0;){const R=Math.min(D,I);if(E[z]===void 0)break;if(E[z].copyCellsFrom(E[G],D-R,I-R,R,!0),I-=R,I===0&&(z--,I=A[z]),D-=R,D===0){G--;const O=Math.max(G,0);D=(0,y.getWrappedLineTrimmedLength)(E,O,this._cols)}}for(let R=0;R<E.length;R++)A[R]<o&&E[R].setCell(A[R],g);let H=M-N;for(;H-- >0;)this.ybase===0?this.y<c-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+S)-c&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+c-1)}if(C.length>0){const w=[],p=[];for(let z=0;z<this.lines.length;z++)p.push(this.lines.get(z));const E=this.lines.length;let L=E-1,T=0,A=C[T];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+S);let M=0;for(let z=Math.min(this.lines.maxLength-1,E+S-1);z>=0;z--)if(A&&A.start>L+M){for(let I=A.newLines.length-1;I>=0;I--)this.lines.set(z--,A.newLines[I]);z++,w.push({index:L+1,amount:A.newLines.length}),M+=A.newLines.length,A=C[++T]}else this.lines.set(z,p[L--]);let N=0;for(let z=w.length-1;z>=0;z--)w[z].index+=N,this.lines.onInsertEmitter.fire(w[z]),N+=w[z].amount;const X=Math.max(0,E+S-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(o,c,g=0,C){const S=this.lines.get(o);return S?S.translateToString(c,g,C):""}getWrappedRangeForLine(o){let c=o,g=o;for(;c>0&&this.lines.get(c).isWrapped;)c--;for(;g+1<this.lines.length&&this.lines.get(g+1).isWrapped;)g++;return{first:c,last:g}}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 c=0;c<this.markers.length;c++)this.markers[c].line===o&&(this.markers[c].dispose(),this.markers.splice(c--,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 c=new r.Marker(o);return this.markers.push(c),c.register(this.lines.onTrim((g=>{c.line-=g,c.line<0&&c.dispose()}))),c.register(this.lines.onInsert((g=>{c.line>=g.index&&(c.line+=g.amount)}))),c.register(this.lines.onDelete((g=>{c.line>=g.index&&c.line<g.index+g.amount&&c.dispose(),c.line>g.index&&(c.line-=g.amount)}))),c.register(c.onDispose((()=>this._removeMarker(c)))),c}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const _=d(3734),v=d(511),l=d(643),m=d(482);n.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let y=0;class b{constructor(r,h,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const c=h||v.CellData.fromCharData([0,l.NULL_CELL_CHAR,l.NULL_CELL_WIDTH,l.NULL_CELL_CODE]);for(let g=0;g<r;++g)this.setCell(g,c);this.length=r}get(r){const h=this._data[3*r+0],o=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:o?(0,m.stringFromCodePoint)(o):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):o]}set(r,h){this._data[3*r+1]=h[l.CHAR_DATA_ATTR_INDEX],h[l.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[l.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[l.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(r){return this._data[3*r+0]>>22}hasWidth(r){return 12582912&this._data[3*r+0]}getFg(r){return this._data[3*r+1]}getBg(r){return this._data[3*r+2]}hasContent(r){return 4194303&this._data[3*r+0]}getCodePoint(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&h}isCombined(r){return 2097152&this._data[3*r+0]}getString(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r]:2097151&h?(0,m.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return y=3*r,h.content=this._data[y+0],h.fg=this._data[y+1],h.bg=this._data[y+2],2097152&h.content&&(h.combinedData=this._combined[r]),268435456&h.bg&&(h.extended=this._extendedAttrs[r]),h}setCell(r,h){2097152&h.content&&(this._combined[r]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[r]=h.extended),this._data[3*r+0]=h.content,this._data[3*r+1]=h.fg,this._data[3*r+2]=h.bg}setCellFromCodepoint(r,h,o,c){268435456&c.bg&&(this._extendedAttrs[r]=c.extended),this._data[3*r+0]=h|o<<22,this._data[3*r+1]=c.fg,this._data[3*r+2]=c.bg}addCodepointToCell(r,h,o){let c=this._data[3*r+0];2097152&c?this._combined[r]+=(0,m.stringFromCodePoint)(h):2097151&c?(this._combined[r]=(0,m.stringFromCodePoint)(2097151&c)+(0,m.stringFromCodePoint)(h),c&=-2097152,c|=2097152):c=h|4194304,o&&(c&=-12582913,c|=o<<22),this._data[3*r+0]=c}insertCells(r,h,o){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length-r){const c=new v.CellData;for(let g=this.length-r-h-1;g>=0;--g)this.setCell(r+h+g,this.loadCell(r+g,c));for(let g=0;g<h;++g)this.setCell(r+g,o)}else for(let c=r;c<this.length;++c)this.setCell(c,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(r,h,o){if(r%=this.length,h<this.length-r){const c=new v.CellData;for(let g=0;g<this.length-r-h;++g)this.setCell(r+g,this.loadCell(r+h+g,c));for(let g=this.length-h;g<this.length;++g)this.setCell(g,o)}else for(let c=r;c<this.length;++c)this.setCell(c,o);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,o)}replaceCells(r,h,o,c=!1){if(c)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,o),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.setCell(r++,o)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const c=new Uint32Array(o);c.set(this._data),this._data=c}for(let c=this.length;c<r;++c)this.setCell(c,h)}else{this._data=this._data.subarray(0,o);const c=Object.keys(this._combined);for(let C=0;C<c.length;C++){const S=parseInt(c[C],10);S>=r&&delete this._combined[S]}const g=Object.keys(this._extendedAttrs);for(let C=0;C<g.length;C++){const S=parseInt(g[C],10);S>=r&&delete this._extendedAttrs[S]}}return this.length=r,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const r=new Uint32Array(this._data.length);return r.set(this._data),this._data=r,1}return 0}fill(r,h=!1){if(h)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,r);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,r)}}copyFrom(r){this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={};for(const h in r._combined)this._combined[h]=r._combined[h];this._extendedAttrs={};for(const h in r._extendedAttrs)this._extendedAttrs[h]=r._extendedAttrs[h];this.isWrapped=r.isWrapped}clone(){const r=new b(0);r._data=new Uint32Array(this._data),r.length=this.length;for(const h in this._combined)r._combined[h]=this._combined[h];for(const h in this._extendedAttrs)r._extendedAttrs[h]=this._extendedAttrs[h];return r.isWrapped=this.isWrapped,r}getTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0}getNoBgTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0]||50331648&this._data[3*r+2])return r+(this._data[3*r+0]>>22);return 0}copyCellsFrom(r,h,o,c,g){const C=r._data;if(g)for(let w=c-1;w>=0;w--){for(let p=0;p<3;p++)this._data[3*(o+w)+p]=C[3*(h+w)+p];268435456&C[3*(h+w)+2]&&(this._extendedAttrs[o+w]=r._extendedAttrs[h+w])}else for(let w=0;w<c;w++){for(let p=0;p<3;p++)this._data[3*(o+w)+p]=C[3*(h+w)+p];268435456&C[3*(h+w)+2]&&(this._extendedAttrs[o+w]=r._extendedAttrs[h+w])}const S=Object.keys(r._combined);for(let w=0;w<S.length;w++){const p=parseInt(S[w],10);p>=h&&(this._combined[p-h+o]=r._combined[p])}}translateToString(r,h,o,c){h=h??0,o=o??this.length,r&&(o=Math.min(o,this.getTrimmedLength())),c&&(c.length=0);let g="";for(;h<o;){const C=this._data[3*h+0],S=2097151&C,w=2097152&C?this._combined[h]:S?(0,m.stringFromCodePoint)(S):l.WHITESPACE_CELL_CHAR;if(g+=w,c)for(let p=0;p<w.length;++p)c.push(h);h+=C>>22||1}return c&&c.push(h),g}}n.BufferLine=b},4841:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(d,_){if(d.start.y>d.end.y)throw new Error(`Buffer range end (${d.end.x}, ${d.end.y}) cannot be before start (${d.start.x}, ${d.start.y})`);return _*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(q,n)=>{function d(_,v,l){if(v===_.length-1)return _[v].getTrimmedLength();const m=!_[v].hasContent(l-1)&&_[v].getWidth(l-1)===1,y=_[v+1].getWidth(0)===2;return m&&y?l-1:l}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(_,v,l,m,y){const b=[];for(let f=0;f<_.length-1;f++){let r=f,h=_.get(++r);if(!h.isWrapped)continue;const o=[_.get(f)];for(;r<_.length&&h.isWrapped;)o.push(h),h=_.get(++r);if(m>=f&&m<r){f+=o.length-1;continue}let c=0,g=d(o,c,v),C=1,S=0;for(;C<o.length;){const p=d(o,C,v),E=p-S,L=l-g,T=Math.min(E,L);o[c].copyCellsFrom(o[C],S,g,T,!1),g+=T,g===l&&(c++,g=0),S+=T,S===p&&(C++,S=0),g===0&&c!==0&&o[c-1].getWidth(l-1)===2&&(o[c].copyCellsFrom(o[c-1],l-1,g++,1,!1),o[c-1].setCell(l-1,y))}o[c].replaceCells(g,l,y);let w=0;for(let p=o.length-1;p>0&&(p>c||o[p].getTrimmedLength()===0);p--)w++;w>0&&(b.push(f+o.length-w),b.push(w)),f+=o.length-1}return b},n.reflowLargerCreateNewLayout=function(_,v){const l=[];let m=0,y=v[m],b=0;for(let f=0;f<_.length;f++)if(y===f){const r=v[++m];_.onDeleteEmitter.fire({index:f-b,amount:r}),f+=r-1,b+=r,y=v[++m]}else l.push(f);return{layout:l,countRemoved:b}},n.reflowLargerApplyNewLayout=function(_,v){const l=[];for(let m=0;m<v.length;m++)l.push(_.get(v[m]));for(let m=0;m<l.length;m++)_.set(m,l[m]);_.length=v.length},n.reflowSmallerGetNewLineLengths=function(_,v,l){const m=[],y=_.map(((h,o)=>d(_,o,v))).reduce(((h,o)=>h+o));let b=0,f=0,r=0;for(;r<y;){if(y-r<l){m.push(y-r);break}b+=l;const h=d(_,f,v);b>h&&(b-=h,f++);const o=_[f].getWidth(b-1)===2;o&&b--;const c=o?l-1:l;m.push(c),r+=c}return m},n.getWrappedLineTrimmedLength=d},5295:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const _=d(8460),v=d(844),l=d(9092);class m extends v.Disposable{constructor(b,f){super(),this._optionsService=b,this._bufferService=f,this._onBufferActivate=this.register(new _.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(b){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(b),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(b,f){this._normal.resize(b,f),this._alt.resize(b,f),this.setupTabStops(b)}setupTabStops(b){this._normal.setupTabStops(b),this._alt.setupTabStops(b)}}n.BufferSet=m},511:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const _=d(482),v=d(643),l=d(3734);class m extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const f=new m;return f.setFromCharData(b),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(b){this.fg=b[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(b[v.CHAR_DATA_CHAR_INDEX].length===2){const r=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[v.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=b[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=m},643:(q,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:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const _=d(8460),v=d(844);class l{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=l._nextId++,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}n.Marker=l,l._nextId=1},7116:(q,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:(q,n)=>{var d,_,v;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=`
|
|
56
|
+
`,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=""})(d||(n.C0=d={})),(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=""})(_||(n.C1=_={})),(function(l){l.ST=`${d.ESC}\\`})(v||(n.C1_ESCAPED=v={}))},7399:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const _=d(2584),v={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,m,y,b){const f={type:0,cancel:!1,key:void 0},r=(l.shiftKey?1:0)|(l.altKey?2:0)|(l.ctrlKey?4:0)|(l.metaKey?8:0);switch(l.keyCode){case 0:l.key==="UIKeyInputUpArrow"?f.key=m?_.C0.ESC+"OA":_.C0.ESC+"[A":l.key==="UIKeyInputLeftArrow"?f.key=m?_.C0.ESC+"OD":_.C0.ESC+"[D":l.key==="UIKeyInputRightArrow"?f.key=m?_.C0.ESC+"OC":_.C0.ESC+"[C":l.key==="UIKeyInputDownArrow"&&(f.key=m?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:f.key=l.ctrlKey?"\b":_.C0.DEL,l.altKey&&(f.key=_.C0.ESC+f.key);break;case 9:if(l.shiftKey){f.key=_.C0.ESC+"[Z";break}f.key=_.C0.HT,f.cancel=!0;break;case 13:f.key=l.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,f.cancel=!0;break;case 27:f.key=_.C0.ESC,l.altKey&&(f.key=_.C0.ESC+_.C0.ESC),f.cancel=!0;break;case 37:if(l.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"D",f.key===_.C0.ESC+"[1;3D"&&(f.key=_.C0.ESC+(y?"b":"[1;5D"))):f.key=m?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(l.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"C",f.key===_.C0.ESC+"[1;3C"&&(f.key=_.C0.ESC+(y?"f":"[1;5C"))):f.key=m?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(l.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"A",y||f.key!==_.C0.ESC+"[1;3A"||(f.key=_.C0.ESC+"[1;5A")):f.key=m?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(l.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"B",y||f.key!==_.C0.ESC+"[1;3B"||(f.key=_.C0.ESC+"[1;5B")):f.key=m?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:l.shiftKey||l.ctrlKey||(f.key=_.C0.ESC+"[2~");break;case 46:f.key=r?_.C0.ESC+"[3;"+(r+1)+"~":_.C0.ESC+"[3~";break;case 36:f.key=r?_.C0.ESC+"[1;"+(r+1)+"H":m?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:f.key=r?_.C0.ESC+"[1;"+(r+1)+"F":m?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:l.shiftKey?f.type=2:l.ctrlKey?f.key=_.C0.ESC+"[5;"+(r+1)+"~":f.key=_.C0.ESC+"[5~";break;case 34:l.shiftKey?f.type=3:l.ctrlKey?f.key=_.C0.ESC+"[6;"+(r+1)+"~":f.key=_.C0.ESC+"[6~";break;case 112:f.key=r?_.C0.ESC+"[1;"+(r+1)+"P":_.C0.ESC+"OP";break;case 113:f.key=r?_.C0.ESC+"[1;"+(r+1)+"Q":_.C0.ESC+"OQ";break;case 114:f.key=r?_.C0.ESC+"[1;"+(r+1)+"R":_.C0.ESC+"OR";break;case 115:f.key=r?_.C0.ESC+"[1;"+(r+1)+"S":_.C0.ESC+"OS";break;case 116:f.key=r?_.C0.ESC+"[15;"+(r+1)+"~":_.C0.ESC+"[15~";break;case 117:f.key=r?_.C0.ESC+"[17;"+(r+1)+"~":_.C0.ESC+"[17~";break;case 118:f.key=r?_.C0.ESC+"[18;"+(r+1)+"~":_.C0.ESC+"[18~";break;case 119:f.key=r?_.C0.ESC+"[19;"+(r+1)+"~":_.C0.ESC+"[19~";break;case 120:f.key=r?_.C0.ESC+"[20;"+(r+1)+"~":_.C0.ESC+"[20~";break;case 121:f.key=r?_.C0.ESC+"[21;"+(r+1)+"~":_.C0.ESC+"[21~";break;case 122:f.key=r?_.C0.ESC+"[23;"+(r+1)+"~":_.C0.ESC+"[23~";break;case 123:f.key=r?_.C0.ESC+"[24;"+(r+1)+"~":_.C0.ESC+"[24~";break;default:if(!l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)if(y&&!b||!l.altKey||l.metaKey)!y||l.altKey||l.ctrlKey||l.shiftKey||!l.metaKey?l.key&&!l.ctrlKey&&!l.altKey&&!l.metaKey&&l.keyCode>=48&&l.key.length===1?f.key=l.key:l.key&&l.ctrlKey&&(l.key==="_"&&(f.key=_.C0.US),l.key==="@"&&(f.key=_.C0.NUL)):l.keyCode===65&&(f.type=1);else{const h=v[l.keyCode],o=h==null?void 0:h[l.shiftKey?1:0];if(o)f.key=_.C0.ESC+o;else if(l.keyCode>=65&&l.keyCode<=90){const c=l.ctrlKey?l.keyCode-64:l.keyCode+32;let g=String.fromCharCode(c);l.shiftKey&&(g=g.toUpperCase()),f.key=_.C0.ESC+g}else if(l.keyCode===32)f.key=_.C0.ESC+(l.ctrlKey?_.C0.NUL:" ");else if(l.key==="Dead"&&l.code.startsWith("Key")){let c=l.code.slice(3,4);l.shiftKey||(c=c.toLowerCase()),f.key=_.C0.ESC+c,f.cancel=!0}}else l.keyCode>=65&&l.keyCode<=90?f.key=String.fromCharCode(l.keyCode-64):l.keyCode===32?f.key=_.C0.NUL:l.keyCode>=51&&l.keyCode<=55?f.key=String.fromCharCode(l.keyCode-51+27):l.keyCode===56?f.key=_.C0.DEL:l.keyCode===219?f.key=_.C0.ESC:l.keyCode===220?f.key=_.C0.FS:l.keyCode===221&&(f.key=_.C0.GS)}return f}},482:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},n.utf32ToString=function(d,_=0,v=d.length){let l="";for(let m=_;m<v;++m){let y=d[m];y>65535?(y-=65536,l+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):l+=String.fromCharCode(y)}return l},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,_){const v=d.length;if(!v)return 0;let l=0,m=0;if(this._interim){const y=d.charCodeAt(m++);56320<=y&&y<=57343?_[l++]=1024*(this._interim-55296)+y-56320+65536:(_[l++]=this._interim,_[l++]=y),this._interim=0}for(let y=m;y<v;++y){const b=d.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,l;const f=d.charCodeAt(y);56320<=f&&f<=57343?_[l++]=1024*(b-55296)+f-56320+65536:(_[l++]=b,_[l++]=f)}else b!==65279&&(_[l++]=b)}return l}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,_){const v=d.length;if(!v)return 0;let l,m,y,b,f=0,r=0,h=0;if(this.interim[0]){let g=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let S,w=0;for(;(S=63&this.interim[++w])&&w<4;)C<<=6,C|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=p-w;for(;h<E;){if(h>=v)return 0;if(S=d[h++],(192&S)!=128){h--,g=!0;break}this.interim[w++]=S,C<<=6,C|=63&S}g||(p===2?C<128?h--:_[f++]=C:p===3?C<2048||C>=55296&&C<=57343||C===65279||(_[f++]=C):C<65536||C>1114111||(_[f++]=C)),this.interim.fill(0)}const o=v-4;let c=h;for(;c<v;){for(;!(!(c<o)||128&(l=d[c])||128&(m=d[c+1])||128&(y=d[c+2])||128&(b=d[c+3]));)_[f++]=l,_[f++]=m,_[f++]=y,_[f++]=b,c+=4;if(l=d[c++],l<128)_[f++]=l;else if((224&l)==192){if(c>=v)return this.interim[0]=l,f;if(m=d[c++],(192&m)!=128){c--;continue}if(r=(31&l)<<6|63&m,r<128){c--;continue}_[f++]=r}else if((240&l)==224){if(c>=v)return this.interim[0]=l,f;if(m=d[c++],(192&m)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=m,f;if(y=d[c++],(192&y)!=128){c--;continue}if(r=(15&l)<<12|(63&m)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;_[f++]=r}else if((248&l)==240){if(c>=v)return this.interim[0]=l,f;if(m=d[c++],(192&m)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=m,f;if(y=d[c++],(192&y)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=m,this.interim[2]=y,f;if(b=d[c++],(192&b)!=128){c--;continue}if(r=(7&l)<<18|(63&m)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;_[f++]=r}}return f}}},225:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const _=d(1480),v=[[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 m;n.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let y=0;y<v.length;++y)m.fill(0,v[y][0],v[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?m[y]:(function(b,f){let r,h=0,o=f.length-1;if(b<f[0][0]||b>f[o][1])return!1;for(;o>=h;)if(r=h+o>>1,b>f[r][1])h=r+1;else{if(!(b<f[r][0]))return!0;o=r-1}return!1})(y,l)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,b){let f=this.wcwidth(y),r=f===0&&b!==0;if(r){const h=_.UnicodeService.extractWidth(b);h===0?r=!1:h>f&&(f=h)}return _.UnicodeService.createPropertyValue(0,f,r)}}},5981:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const _=d(8460),v=d(844);class l extends v.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,b){if(b!==void 0&&this._syncCalls>b)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let f;for(this._isSyncWriting=!0;f=this._writeBuffer.shift();){this._action(f);const r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,b){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+=y.length,this._writeBuffer.push(y),this._callbacks.push(b),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(b)}_innerWrite(y=0,b=!0){const f=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,b);if(h){const c=g=>Date.now()-f>=12?setTimeout((()=>this._innerWrite(0,g))):this._innerWrite(f,g);return void h.catch((g=>(queueMicrotask((()=>{throw g})),Promise.resolve(!1)))).then(c)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-f>=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:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const d=/^([\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})$/,_=/^[\da-f]+$/;function v(l,m){const y=l.toString(16),b=y.length<2?"0"+y:y;switch(m){case 4:return y[0];case 8:return b;case 12:return(b+b).slice(0,3);default:return b+b}}n.parseColor=function(l){if(!l)return;let m=l.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const y=d.exec(m);if(y){const b=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/b*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/b*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/b*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),_.exec(m)&&[3,6,9,12].includes(m.length))){const y=m.length/3,b=[0,0,0];for(let f=0;f<3;++f){const r=parseInt(m.slice(y*f,y*f+y),16);b[f]=y===1?r<<4:y===2?r:y===3?r>>4:r>>8}return b}},n.toRgbString=function(l,m=16){const[y,b,f]=l;return`rgb:${v(y,m)}/${v(b,m)}/${v(f,m)}`}},5770:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const _=d(482),v=d(8742),l=d(5770),m=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(b,f){this._handlers[b]===void 0&&(this._handlers[b]=[]);const r=this._handlers[b];return r.push(f),{dispose:()=>{const h=r.indexOf(f);h!==-1&&r.splice(h,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}reset(){if(this._active.length)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(b,f){if(this.reset(),this._ident=b,this._active=this._handlers[b]||m,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(f);else this._handlerFb(this._ident,"HOOK",f)}put(b,f,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(b,f,r);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(b,f,r))}unhook(b,f=!0){if(this._active.length){let r=!1,h=this._active.length-1,o=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,r=f,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;h>=0&&(r=this._active[h].unhook(b),r!==!0);h--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,r;h--}for(;h>=0;h--)if(r=this._active[h].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",b);this._active=m,this._ident=0}};const y=new v.Params;y.addParam(0),n.DcsHandler=class{constructor(b){this._handler=b,this._data="",this._params=y,this._hitLimit=!1}hook(b){this._params=b.length>1||b.params[0]?b.clone():y,this._data="",this._hitLimit=!1}put(b,f,r){this._hitLimit||(this._data+=(0,_.utf32ToString)(b,f,r),this._data.length>l.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(b){let f=!1;if(this._hitLimit)f=!1;else if(b&&(f=this._handler(this._data,this._params),f instanceof Promise))return f.then((r=>(this._params=y,this._data="",this._hitLimit=!1,r)));return this._params=y,this._data="",this._hitLimit=!1,f}}},2015:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const _=d(844),v=d(8742),l=d(6242),m=d(6351);class y{constructor(h){this.table=new Uint8Array(h)}setDefault(h,o){this.table.fill(h<<4|o)}add(h,o,c,g){this.table[o<<8|h]=c<<4|g}addMany(h,o,c,g){for(let C=0;C<h.length;C++)this.table[o<<8|h[C]]=c<<4|g}}n.TransitionTable=y;const b=160;n.VT500_TRANSITION_TABLE=(function(){const r=new y(4095),h=Array.apply(null,Array(256)).map(((w,p)=>p)),o=(w,p)=>h.slice(w,p),c=o(32,127),g=o(0,24);g.push(25),g.push.apply(g,o(28,32));const C=o(0,14);let S;for(S in r.setDefault(1,0),r.addMany(c,0,2,0),C)r.addMany([24,26,153,154],S,3,0),r.addMany(o(128,144),S,3,0),r.addMany(o(144,152),S,3,0),r.add(156,S,0,0),r.add(27,S,11,1),r.add(157,S,4,8),r.addMany([152,158,159],S,0,7),r.add(155,S,11,3),r.add(144,S,11,9);return r.addMany(g,0,3,0),r.addMany(g,1,3,1),r.add(127,1,0,1),r.addMany(g,8,0,8),r.addMany(g,3,3,3),r.add(127,3,0,3),r.addMany(g,4,3,4),r.add(127,4,0,4),r.addMany(g,6,3,6),r.addMany(g,5,3,5),r.add(127,5,0,5),r.addMany(g,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(c,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(o(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(c,7,0,7),r.addMany(g,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(o(64,127),3,7,0),r.addMany(o(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(o(48,60),4,8,4),r.addMany(o(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(o(32,64),6,0,6),r.add(127,6,0,6),r.addMany(o(64,127),6,0,0),r.addMany(o(32,48),3,9,5),r.addMany(o(32,48),5,9,5),r.addMany(o(48,64),5,0,6),r.addMany(o(64,127),5,7,0),r.addMany(o(32,48),4,9,5),r.addMany(o(32,48),1,9,2),r.addMany(o(32,48),2,9,2),r.addMany(o(48,127),2,10,0),r.addMany(o(48,80),1,10,0),r.addMany(o(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(o(96,127),1,10,0),r.add(80,1,11,9),r.addMany(g,9,0,9),r.add(127,9,0,9),r.addMany(o(28,32),9,0,9),r.addMany(o(32,48),9,9,12),r.addMany(o(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(g,11,0,11),r.addMany(o(32,128),11,0,11),r.addMany(o(28,32),11,0,11),r.addMany(g,10,0,10),r.add(127,10,0,10),r.addMany(o(28,32),10,0,10),r.addMany(o(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(o(32,48),10,9,12),r.addMany(g,12,0,12),r.add(127,12,0,12),r.addMany(o(28,32),12,0,12),r.addMany(o(32,48),12,9,12),r.addMany(o(48,64),12,0,11),r.addMany(o(64,127),12,12,13),r.addMany(o(64,127),10,12,13),r.addMany(o(64,127),9,12,13),r.addMany(g,13,13,13),r.addMany(c,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(b,0,2,0),r.add(b,8,5,8),r.add(b,6,0,6),r.add(b,11,0,11),r.add(b,13,13,13),r})();class f extends _.Disposable{constructor(h=n.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new v.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,c,g)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,c)=>{},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,_.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 m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,o=[64,126]){let c=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(c=h.prefix.charCodeAt(0),c&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<h.intermediates.length;++C){const S=h.intermediates.charCodeAt(C);if(32>S||S>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=S}}if(h.final.length!==1)throw new Error("final must be a single byte");const g=h.final.charCodeAt(0);if(o[0]>g||g>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return c<<=8,c|=g,c}identToString(h){const o=[];for(;h;)o.push(String.fromCharCode(255&h)),h>>=8;return o.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,o){const c=this._identifier(h,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);const g=this._escHandlers[c];return g.push(o),{dispose:()=>{const C=g.indexOf(o);C!==-1&&g.splice(C,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,o){this._executeHandlers[h.charCodeAt(0)]=o}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,o){const c=this._identifier(h);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);const g=this._csiHandlers[c];return g.push(o),{dispose:()=>{const C=g.indexOf(o);C!==-1&&g.splice(C,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,o){return this._dcsParser.registerHandler(this._identifier(h),o)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,o){return this._oscParser.registerHandler(h,o)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,o,c,g,C){this._parseStack.state=h,this._parseStack.handlers=o,this._parseStack.handlerPos=c,this._parseStack.transition=g,this._parseStack.chunkPos=C}parse(h,o,c){let g,C=0,S=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(c===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const p=this._parseStack.handlers;let E=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(c===!1&&E>-1){for(;E>=0&&(g=p[E](this._params),g!==!0);E--)if(g instanceof Promise)return this._parseStack.handlerPos=E,g}this._parseStack.handlers=[];break;case 4:if(c===!1&&E>-1){for(;E>=0&&(g=p[E](),g!==!0);E--)if(g instanceof Promise)return this._parseStack.handlerPos=E,g}this._parseStack.handlers=[];break;case 6:if(C=h[this._parseStack.chunkPos],g=this._dcsParser.unhook(C!==24&&C!==26,c),g)return g;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=h[this._parseStack.chunkPos],g=this._oscParser.end(C!==24&&C!==26,c),g)return g;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,w=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let p=w;p<o;++p){switch(C=h[p],S=this._transitions.table[this.currentState<<8|(C<160?C:b)],S>>4){case 2:for(let M=p+1;;++M){if(M>=o||(C=h[M])<32||C>126&&C<b){this._printHandler(h,p,M),p=M-1;break}if(++M>=o||(C=h[M])<32||C>126&&C<b){this._printHandler(h,p,M),p=M-1;break}if(++M>=o||(C=h[M])<32||C>126&&C<b){this._printHandler(h,p,M),p=M-1;break}if(++M>=o||(C=h[M])<32||C>126&&C<b){this._printHandler(h,p,M),p=M-1;break}}break;case 3:this._executeHandlers[C]?this._executeHandlers[C]():this._executeHandlerFb(C),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:p,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const E=this._csiHandlers[this._collect<<8|C];let L=E?E.length-1:-1;for(;L>=0&&(g=E[L](this._params),g!==!0);L--)if(g instanceof Promise)return this._preserveStack(3,E,L,S,p),g;L<0&&this._csiHandlerFb(this._collect<<8|C,this._params),this.precedingJoinState=0;break;case 8:do switch(C){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(C-48)}while(++p<o&&(C=h[p])>47&&C<60);p--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const T=this._escHandlers[this._collect<<8|C];let A=T?T.length-1:-1;for(;A>=0&&(g=T[A](),g!==!0);A--)if(g instanceof Promise)return this._preserveStack(4,T,A,S,p),g;A<0&&this._escHandlerFb(this._collect<<8|C),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|C,this._params);break;case 13:for(let M=p+1;;++M)if(M>=o||(C=h[M])===24||C===26||C===27||C>127&&C<b){this._dcsParser.put(h,p,M),p=M-1;break}break;case 14:if(g=this._dcsParser.unhook(C!==24&&C!==26),g)return this._preserveStack(6,[],0,S,p),g;C===27&&(S|=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 M=p+1;;M++)if(M>=o||(C=h[M])<32||C>127&&C<b){this._oscParser.put(h,p,M),p=M-1;break}break;case 6:if(g=this._oscParser.end(C!==24&&C!==26),g)return this._preserveStack(5,[],0,S,p),g;C===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&S}}}n.EscapeSequenceParser=f},6242:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const _=d(5770),v=d(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(m,y){this._handlers[m]===void 0&&(this._handlers[m]=[]);const b=this._handlers[m];return b.push(y),{dispose:()=>{const f=b.indexOf(y);f!==-1&&b.splice(f,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=l}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].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 m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,y,b){if(this._active.length)for(let f=this._active.length-1;f>=0;f--)this._active[f].put(m,y,b);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(m,y,b))}start(){this.reset(),this._state=1}put(m,y,b){if(this._state!==3){if(this._state===1)for(;y<b;){const f=m[y++];if(f===59){this._state=2,this._start();break}if(f<48||57<f)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+f-48}this._state===2&&b-y>0&&this._put(m,y,b)}}end(m,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let b=!1,f=this._active.length-1,r=!1;if(this._stack.paused&&(f=this._stack.loopPosition-1,b=y,r=this._stack.fallThrough,this._stack.paused=!1),!r&&b===!1){for(;f>=0&&(b=this._active[f].end(m),b!==!0);f--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!1,b;f--}for(;f>=0;f--)if(b=this._active[f].end(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!0,b}else this._handlerFb(this._id,"END",m);this._active=l,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,y,b){this._hitLimit||(this._data+=(0,v.utf32ToString)(m,y,b),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let y=!1;if(this._hitLimit)y=!1;else if(m&&(y=this._handler(this._data),y instanceof Promise))return y.then((b=>(this._data="",this._hitLimit=!1,b)));return this._data="",this._hitLimit=!1,y}}},8742:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const d=2147483647;class _{static fromArray(l){const m=new _;if(!l.length)return m;for(let y=Array.isArray(l[0])?1:0;y<l.length;++y){const b=l[y];if(Array.isArray(b))for(let f=0;f<b.length;++f)m.addSubParam(b[f]);else m.addParam(b)}return m}constructor(l=32,m=32){if(this.maxLength=l,this.maxSubParamsLength=m,m>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(l),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(l),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const l=new _(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 m=0;m<this.length;++m){l.push(this.params[m]);const y=this._subParamsIdx[m]>>8,b=255&this._subParamsIdx[m];b-y>0&&l.push(Array.prototype.slice.call(this._subParams,y,b))}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>d?d: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>d?d:l,this._subParamsIdx[this.length-1]++}}hasSubParams(l){return(255&this._subParamsIdx[l])-(this._subParamsIdx[l]>>8)>0}getSubParams(l){const m=this._subParamsIdx[l]>>8,y=255&this._subParamsIdx[l];return y-m>0?this._subParams.subarray(m,y):null}getSubParamsAll(){const l={};for(let m=0;m<this.length;++m){const y=this._subParamsIdx[m]>>8,b=255&this._subParamsIdx[m];b-y>0&&(l[m]=this._subParams.slice(y,b))}return l}addDigit(l){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,b=y[m-1];y[m-1]=~b?Math.min(10*b+l,d):l}}n.Params=_},5741:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()}loadAddon(d,_){const v={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(v),_.dispose=()=>this._wrappedAddonDispose(v),_.activate(d)}_wrappedAddonDispose(d){if(d.isDisposed)return;let _=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===d){_=v;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(_,1)}}},8771:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const _=d(3785),v=d(511);n.BufferApiView=class{constructor(l,m){this._buffer=l,this.type=m}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 m=this._buffer.lines.get(l);if(m)return new _.BufferLineApiView(m)}getNullCell(){return new v.CellData}}},3785:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const _=d(511);n.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,l){if(!(v<0||v>=this._line.length))return l?(this._line.loadCell(v,l),l):this._line.loadCell(v,new _.CellData)}translateToString(v,l,m){return this._line.translateToString(v,l,m)}}},8285:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const _=d(8771),v=d(8460),l=d(844);class m extends l.Disposable{constructor(b){super(),this._core=b,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.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=m},7975:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(d){this._core=d}registerCsiHandler(d,_){return this._core.registerCsiHandler(d,(v=>_(v.toArray())))}addCsiHandler(d,_){return this.registerCsiHandler(d,_)}registerDcsHandler(d,_){return this._core.registerDcsHandler(d,((v,l)=>_(v,l.toArray())))}addDcsHandler(d,_){return this.registerDcsHandler(d,_)}registerEscHandler(d,_){return this._core.registerEscHandler(d,_)}addEscHandler(d,_){return this.registerEscHandler(d,_)}registerOscHandler(d,_){return this._core.registerOscHandler(d,_)}addOscHandler(d,_){return this.registerOscHandler(d,_)}}},7090:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(d){this._core=d}register(d){this._core.unicodeService.register(d)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(d){this._core.unicodeService.activeVersion=d}}},744:function(q,n,d){var _=this&&this.__decorate||function(r,h,o,c){var g,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,o,c);else for(var w=r.length-1;w>=0;w--)(g=r[w])&&(S=(C<3?g(S):C>3?g(h,o,S):g(h,o))||S);return C>3&&S&&Object.defineProperty(h,o,S),S},v=this&&this.__param||function(r,h){return function(o,c){h(o,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const l=d(8460),m=d(844),y=d(5295),b=d(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let f=n.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(r){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(r.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(r.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(r,this))}resize(r,h){this.cols=r,this.rows=h,this.buffers.resize(r,h),this._onResize.fire({cols:r,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(r,h=!1){const o=this.buffer;let c;c=this._cachedBlankLine,c&&c.length===this.cols&&c.getFg(0)===r.fg&&c.getBg(0)===r.bg||(c=o.getBlankLine(r,h),this._cachedBlankLine=c),c.isWrapped=h;const g=o.ybase+o.scrollTop,C=o.ybase+o.scrollBottom;if(o.scrollTop===0){const S=o.lines.isFull;C===o.lines.length-1?S?o.lines.recycle().copyFrom(c):o.lines.push(c.clone()):o.lines.splice(C+1,0,c.clone()),S?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const S=C-g+1;o.lines.shiftElements(g+1,S-1,-1),o.lines.set(C,c.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(r,h,o){const c=this.buffer;if(r<0){if(c.ydisp===0)return;this.isUserScrolling=!0}else r+c.ydisp>=c.ybase&&(this.isUserScrolling=!1);const g=c.ydisp;c.ydisp=Math.max(Math.min(c.ydisp+r,c.ybase),0),g!==c.ydisp&&(h||this._onScroll.fire(c.ydisp))}};n.BufferService=f=_([v(0,b.IOptionsService)],f)},7994:(q,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(d){this.glevel=d,this.charset=this._charsets[d]}setgCharset(d,_){this._charsets[d]=_,this.glevel===d&&(this.charset=_)}}},1753:function(q,n,d){var _=this&&this.__decorate||function(c,g,C,S){var w,p=arguments.length,E=p<3?g:S===null?S=Object.getOwnPropertyDescriptor(g,C):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,g,C,S);else for(var L=c.length-1;L>=0;L--)(w=c[L])&&(E=(p<3?w(E):p>3?w(g,C,E):w(g,C))||E);return p>3&&E&&Object.defineProperty(g,C,E),E},v=this&&this.__param||function(c,g){return function(C,S){g(C,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const l=d(2585),m=d(8460),y=d(844),b={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:c=>c.button!==4&&c.action===1&&(c.ctrl=!1,c.alt=!1,c.shift=!1,!0)},VT200:{events:19,restrict:c=>c.action!==32},DRAG:{events:23,restrict:c=>c.action!==32||c.button!==3},ANY:{events:31,restrict:c=>!0}};function f(c,g){let C=(c.ctrl?16:0)|(c.shift?4:0)|(c.alt?8:0);return c.button===4?(C|=64,C|=c.action):(C|=3&c.button,4&c.button&&(C|=64),8&c.button&&(C|=128),c.action===32?C|=32:c.action!==0||g||(C|=3)),C}const r=String.fromCharCode,h={DEFAULT:c=>{const g=[f(c,!1)+32,c.col+32,c.row+32];return g[0]>255||g[1]>255||g[2]>255?"":`\x1B[M${r(g[0])}${r(g[1])}${r(g[2])}`},SGR:c=>{const g=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${f(c,!0)};${c.col};${c.row}${g}`},SGR_PIXELS:c=>{const g=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${f(c,!0)};${c.x};${c.y}${g}`}};let o=n.CoreMouseService=class extends y.Disposable{constructor(c,g){super(),this._bufferService=c,this._coreService=g,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(b))this.addProtocol(C,b[C]);for(const C of Object.keys(h))this.addEncoding(C,h[C]);this.reset()}addProtocol(c,g){this._protocols[c]=g}addEncoding(c,g){this._encodings[c]=g}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(c){if(!this._protocols[c])throw new Error(`unknown protocol "${c}"`);this._activeProtocol=c,this._onProtocolChange.fire(this._protocols[c].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(c){if(!this._encodings[c])throw new Error(`unknown encoding "${c}"`);this._activeEncoding=c}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(c){if(c.col<0||c.col>=this._bufferService.cols||c.row<0||c.row>=this._bufferService.rows||c.button===4&&c.action===32||c.button===3&&c.action!==32||c.button!==4&&(c.action===2||c.action===3)||(c.col++,c.row++,c.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,c,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(c))return!1;const g=this._encodings[this._activeEncoding](c);return g&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(g):this._coreService.triggerDataEvent(g,!0)),this._lastEvent=c,!0}explainEvents(c){return{down:!!(1&c),up:!!(2&c),drag:!!(4&c),move:!!(8&c),wheel:!!(16&c)}}_equalEvents(c,g,C){if(C){if(c.x!==g.x||c.y!==g.y)return!1}else if(c.col!==g.col||c.row!==g.row)return!1;return c.button===g.button&&c.action===g.action&&c.ctrl===g.ctrl&&c.alt===g.alt&&c.shift===g.shift}};n.CoreMouseService=o=_([v(0,l.IBufferService),v(1,l.ICoreService)],o)},6975:function(q,n,d){var _=this&&this.__decorate||function(o,c,g,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,g):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,g,C);else for(var E=o.length-1;E>=0;E--)(S=o[E])&&(p=(w<3?S(p):w>3?S(c,g,p):S(c,g))||p);return w>3&&p&&Object.defineProperty(c,g,p),p},v=this&&this.__param||function(o,c){return function(g,C){c(g,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const l=d(1439),m=d(8460),y=d(844),b=d(2585),f=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=n.CoreService=class extends y.Disposable{constructor(o,c,g){super(),this._bufferService=o,this._logService=c,this._optionsService=g,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,l.clone)(f),this.decPrivateModes=(0,l.clone)(r)}reset(){this.modes=(0,l.clone)(f),this.decPrivateModes=(0,l.clone)(r)}triggerDataEvent(o,c=!1){if(this._optionsService.rawOptions.disableStdin)return;const g=this._bufferService.buffer;c&&this._optionsService.rawOptions.scrollOnUserInput&&g.ybase!==g.ydisp&&this._onRequestScrollToBottom.fire(),c&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((C=>C.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((c=>c.charCodeAt(0))))),this._onBinary.fire(o))}};n.CoreService=h=_([v(0,b.IBufferService),v(1,b.ILogService),v(2,b.IOptionsService)],h)},9074:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const _=d(8055),v=d(8460),l=d(844),m=d(6106);let y=0,b=0;class f extends l.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((o=>o==null?void 0:o.marker.line)),this._onDecorationRegistered=this.register(new v.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new v.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,l.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const c=new r(o);if(c){const g=c.marker.onDispose((()=>c.dispose()));c.onDispose((()=>{c&&(this._decorations.delete(c)&&this._onDecorationRemoved.fire(c),g.dispose())})),this._decorations.insert(c),this._onDecorationRegistered.fire(c)}return c}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,c,g){let C=0,S=0;for(const w of this._decorations.getKeyIterator(c))C=w.options.x??0,S=C+(w.options.width??1),o>=C&&o<S&&(!g||(w.options.layer??"bottom")===g)&&(yield w)}forEachDecorationAtCell(o,c,g,C){this._decorations.forEachByKey(c,(S=>{y=S.options.x??0,b=y+(S.options.width??1),o>=y&&o<b&&(!g||(S.options.layer??"bottom")===g)&&C(S)}))}}n.DecorationService=f;class r extends l.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=_.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=_.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new v.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new v.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:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const _=d(2585),v=d(8343);class l{constructor(...y){this._entries=new Map;for(const[b,f]of y)this.set(b,f)}set(y,b){const f=this._entries.get(y);return this._entries.set(y,b),f}forEach(y){for(const[b,f]of this._entries.entries())y(b,f)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}n.ServiceCollection=l,n.InstantiationService=class{constructor(){this._services=new l,this._services.set(_.IInstantiationService,this)}setService(m,y){this._services.set(m,y)}getService(m){return this._services.get(m)}createInstance(m,...y){const b=(0,v.getServiceDependencies)(m).sort(((h,o)=>h.index-o.index)),f=[];for(const h of b){const o=this._services.get(h.id);if(!o)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${h.id}.`);f.push(o)}const r=b.length>0?b[0].index:y.length;if(y.length!==r)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${r+1} conflicts with ${y.length} static arguments`);return new m(...y,...f)}}},7866:function(q,n,d){var _=this&&this.__decorate||function(r,h,o,c){var g,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,o,c);else for(var w=r.length-1;w>=0;w--)(g=r[w])&&(S=(C<3?g(S):C>3?g(h,o,S):g(h,o))||S);return C>3&&S&&Object.defineProperty(h,o,S),S},v=this&&this.__param||function(r,h){return function(o,c){h(o,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const l=d(844),m=d(2585),y={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let b,f=n.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=f=_([v(0,m.IOptionsService)],f),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const c=o.value;o.value=function(...g){if(b.logLevel!==m.LogLevelEnum.TRACE)return c.apply(this,g);b.trace(`GlyphRenderer#${c.name}(${g.map((S=>JSON.stringify(S))).join(", ")})`);const C=c.apply(this,g);return b.trace(`GlyphRenderer#${c.name} return`,C),C}}},7302:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const _=d(8460),v=d(844),l=d(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 m=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends v.Disposable{constructor(f){super(),this._onOptionChange=this.register(new _.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...n.DEFAULT_OPTIONS};for(const h in f)if(h in r)try{const o=f[h];r[h]=this._sanitizeAndValidateOption(h,o)}catch(o){console.error(o)}this.rawOptions=r,this.options={...r},this._setupOptions(),this.register((0,v.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(f,r){return this.onOptionChange((h=>{h===f&&r(this.rawOptions[f])}))}onMultipleOptionChange(f,r){return this.onOptionChange((h=>{f.indexOf(h)!==-1&&r()}))}_setupOptions(){const f=h=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},r=(h,o)=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);o=this._sanitizeAndValidateOption(h,o),this.rawOptions[h]!==o&&(this.rawOptions[h]=o,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const o={get:f.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,o)}}_sanitizeAndValidateOption(f,r){switch(f){case"cursorStyle":if(r||(r=n.DEFAULT_OPTIONS[f]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${f}`);break;case"wordSeparator":r||(r=n.DEFAULT_OPTIONS[f]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=m.includes(r)?r:n.DEFAULT_OPTIONS[f];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${f} cannot be less than 1, value: ${r}`);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(`${f} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${f} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${f} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}n.OptionsService=y},2660:function(q,n,d){var _=this&&this.__decorate||function(y,b,f,r){var h,o=arguments.length,c=o<3?b:r===null?r=Object.getOwnPropertyDescriptor(b,f):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(y,b,f,r);else for(var g=y.length-1;g>=0;g--)(h=y[g])&&(c=(o<3?h(c):o>3?h(b,f,c):h(b,f))||c);return o>3&&c&&Object.defineProperty(b,f,c),c},v=this&&this.__param||function(y,b){return function(f,r){b(f,r,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const l=d(2585);let m=n.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const b=this._bufferService.buffer;if(y.id===void 0){const g=b.addMarker(b.ybase+b.y),C={data:y,id:this._nextId++,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(C,g))),this._dataByLinkId.set(C.id,C),C.id}const f=y,r=this._getEntryIdKey(f),h=this._entriesWithId.get(r);if(h)return this.addLineToLink(h.id,b.ybase+b.y),h.id;const o=b.addMarker(b.ybase+b.y),c={id:this._nextId++,key:this._getEntryIdKey(f),data:f,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(c,o))),this._entriesWithId.set(c.key,c),this._dataByLinkId.set(c.id,c),c.id}addLineToLink(y,b){const f=this._dataByLinkId.get(y);if(f&&f.lines.every((r=>r.line!==b))){const r=this._bufferService.buffer.addMarker(b);f.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(f,r)))}}getLinkData(y){var b;return(b=this._dataByLinkId.get(y))==null?void 0:b.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,b){const f=y.lines.indexOf(b);f!==-1&&(y.lines.splice(f,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};n.OscLinkService=m=_([v(0,l.IBufferService)],m)},8343:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const d="di$target",_="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[_]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const l=function(m,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,r,h){r[d]===r?r[_].push({id:f,index:h}):(r[_]=[{id:f,index:h}],r[d]=r)})(l,m,b)};return l.toString=()=>v,n.serviceRegistry.set(v,l),l}},2585:(q,n,d)=>{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(8343);var v;n.IBufferService=(0,_.createDecorator)("BufferService"),n.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),n.ICoreService=(0,_.createDecorator)("CoreService"),n.ICharsetService=(0,_.createDecorator)("CharsetService"),n.IInstantiationService=(0,_.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"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,_.createDecorator)("LogService"),n.IOptionsService=(0,_.createDecorator)("OptionsService"),n.IOscLinkService=(0,_.createDecorator)("OscLinkService"),n.IUnicodeService=(0,_.createDecorator)("UnicodeService"),n.IDecorationService=(0,_.createDecorator)("DecorationService")},1480:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const _=d(8460),v=d(225);class l{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,b,f=!1){return(16777215&y)<<3|(3&b)<<1|(f?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter,this.onChange=this._onChange.event;const y=new v.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let b=0,f=0;const r=y.length;for(let h=0;h<r;++h){let o=y.charCodeAt(h);if(55296<=o&&o<=56319){if(++h>=r)return b+this.wcwidth(o);const C=y.charCodeAt(h);56320<=C&&C<=57343?o=1024*(o-55296)+C-56320+65536:b+=this.wcwidth(C)}const c=this.charProperties(o,f);let g=l.extractWidth(c);l.extractShouldJoin(c)&&(g-=l.extractWidth(f)),b+=g,f=c}return b}charProperties(y,b){return this._activeProvider.charProperties(y,b)}}n.UnicodeService=l}},j={};function ie(q){var n=j[q];if(n!==void 0)return n.exports;var d=j[q]={exports:{}};return Y[q].call(d.exports,d,d.exports,ie),d.exports}var ae={};return(()=>{var q=ae;Object.defineProperty(q,"__esModule",{value:!0}),q.Terminal=void 0;const n=ie(9042),d=ie(3236),_=ie(844),v=ie(5741),l=ie(8285),m=ie(7975),y=ie(7090),b=["cols","rows"];class f extends _.Disposable{constructor(h){super(),this._core=this.register(new d.Terminal(h)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const o=g=>this._core.options[g],c=(g,C)=>{this._checkReadonlyOptions(g),this._core.options[g]=C};for(const g in this._core.options){const C={get:o.bind(this,g),set:c.bind(this,g)};Object.defineProperty(this._publicOptions,g,C)}}_checkReadonlyOptions(h){if(b.includes(h))throw new Error(`Option "${h}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.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 h=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:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const o in h)this._publicOptions[o]=h[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,o=!0){this._core.input(h,o)}resize(h,o){this._verifyIntegers(h,o),this._core.resize(h,o)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,o,c){this._verifyIntegers(h,o,c),this._core.select(h,o,c)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,o){this._verifyIntegers(h,o),this._core.selectLines(h,o)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,o){this._core.write(h,o)}writeln(h,o){this._core.write(h),this._core.write(`\r
|
|
57
|
+
`,o)}paste(h){this._core.paste(h)}refresh(h,o){this._verifyIntegers(h,o),this._core.refresh(h,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return n}_verifyIntegers(...h){for(const o of h)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const o of h)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}q.Terminal=f})(),ae})()))})(Bo)),Bo.exports}var qv=Pv(),Oo={exports:{}},Yf;function Gv(){return Yf||(Yf=1,(function(U,V){(function(Y,j){U.exports=j()})(self,(()=>(()=>{var Y={};return(()=>{var j=Y;Object.defineProperty(j,"__esModule",{value:!0}),j.FitAddon=void 0,j.FitAddon=class{activate(ie){this._terminal=ie}dispose(){}fit(){const ie=this.proposeDimensions();if(!ie||!this._terminal||isNaN(ie.cols)||isNaN(ie.rows))return;const ae=this._terminal._core;this._terminal.rows===ie.rows&&this._terminal.cols===ie.cols||(ae._renderService.clear(),this._terminal.resize(ie.cols,ie.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ie=this._terminal._core,ae=ie._renderService.dimensions;if(ae.css.cell.width===0||ae.css.cell.height===0)return;const q=this._terminal.options.scrollback===0?0:ie.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(n.getPropertyValue("height")),_=Math.max(0,parseInt(n.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),l=d-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),m=_-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-q;return{cols:Math.max(2,Math.floor(m/ae.css.cell.width)),rows:Math.max(1,Math.floor(l/ae.css.cell.height))}}}})(),Y})()))})(Oo)),Oo.exports}var Wv=Gv(),ko={exports:{}},Vf;function $v(){return Vf||(Vf=1,(function(U,V){(function(Y,j){U.exports=j()})(self,(()=>(()=>{var Y={965:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GlyphRenderer=void 0;const _=d(374),v=d(509),l=d(855),m=d(859),y=d(381),b=11,f=b*Float32Array.BYTES_PER_ELEMENT;let r,h=0,o=0,c=0;class g extends m.Disposable{constructor(S,w,p,E){super(),this._terminal=S,this._gl=w,this._dimensions=p,this._optionsService=E,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const L=this._gl;v.TextureAtlas.maxAtlasPages===void 0&&(v.TextureAtlas.maxAtlasPages=Math.min(32,(0,_.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS))),v.TextureAtlas.maxTextureSize=(0,_.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_SIZE))),this._program=(0,_.throwIfFalsy)((0,y.createProgram)(L,`#version 300 es
|
|
58
58
|
layout (location = 0) in vec2 a_unitquad;
|
|
59
59
|
layout (location = 1) in vec2 a_cellpos;
|
|
60
60
|
layout (location = 2) in vec2 a_offset;
|
|
@@ -74,13 +74,13 @@ void main() {
|
|
|
74
74
|
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
75
75
|
v_texpage = int(a_texpage);
|
|
76
76
|
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
77
|
-
}`,(function(
|
|
77
|
+
}`,(function(z){let I="";for(let G=1;G<z;G++)I+=` else if (v_texpage == ${G}) { outColor = texture(u_texture[${G}], v_texcoord); }`;return`#version 300 es
|
|
78
78
|
precision lowp float;
|
|
79
79
|
|
|
80
80
|
in vec2 v_texcoord;
|
|
81
81
|
flat in int v_texpage;
|
|
82
82
|
|
|
83
|
-
uniform sampler2D u_texture[${
|
|
83
|
+
uniform sampler2D u_texture[${z}];
|
|
84
84
|
|
|
85
85
|
out vec4 outColor;
|
|
86
86
|
|
|
@@ -88,7 +88,7 @@ void main() {
|
|
|
88
88
|
if (v_texpage == 0) {
|
|
89
89
|
outColor = texture(u_texture[0], v_texcoord);
|
|
90
90
|
} ${I}
|
|
91
|
-
}`})(v.TextureAtlas.maxAtlasPages))),this.register((0,m.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const T=new Float32Array([0,0,1,0,0,1,1,1]),A=L.createBuffer();this.register((0,m.toDisposable)((()=>L.deleteBuffer(A)))),L.bindBuffer(L.ARRAY_BUFFER,A),L.bufferData(L.ARRAY_BUFFER,T,L.STATIC_DRAW),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const M=new Uint8Array([0,1,2,3]),
|
|
91
|
+
}`})(v.TextureAtlas.maxAtlasPages))),this.register((0,m.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const T=new Float32Array([0,0,1,0,0,1,1,1]),A=L.createBuffer();this.register((0,m.toDisposable)((()=>L.deleteBuffer(A)))),L.bindBuffer(L.ARRAY_BUFFER,A),L.bufferData(L.ARRAY_BUFFER,T,L.STATIC_DRAW),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const M=new Uint8Array([0,1,2,3]),N=L.createBuffer();this.register((0,m.toDisposable)((()=>L.deleteBuffer(N)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,N),L.bufferData(L.ELEMENT_ARRAY_BUFFER,M,L.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(L.createBuffer()),this.register((0,m.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,2,L.FLOAT,!1,f,0),L.vertexAttribDivisor(2,1),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,L.FLOAT,!1,f,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(3,1),L.enableVertexAttribArray(4),L.vertexAttribPointer(4,1,L.FLOAT,!1,f,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(4,1),L.enableVertexAttribArray(5),L.vertexAttribPointer(5,2,L.FLOAT,!1,f,5*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(5,1),L.enableVertexAttribArray(6),L.vertexAttribPointer(6,2,L.FLOAT,!1,f,7*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(6,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,f,9*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.useProgram(this._program);const X=new Int32Array(v.TextureAtlas.maxAtlasPages);for(let z=0;z<v.TextureAtlas.maxAtlasPages;z++)X[z]=z;L.uniform1iv(this._textureLocation,X),L.uniformMatrix4fv(this._projectionLocation,!1,y.PROJECTION_MATRIX),this._atlasTextures=[];for(let z=0;z<v.TextureAtlas.maxAtlasPages;z++){const I=new y.GLTexture((0,_.throwIfFalsy)(L.createTexture()));this.register((0,m.toDisposable)((()=>L.deleteTexture(I.texture)))),L.activeTexture(L.TEXTURE0+z),L.bindTexture(L.TEXTURE_2D,I.texture),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),L.texImage2D(L.TEXTURE_2D,0,L.RGBA,1,1,0,L.RGBA,L.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[z]=I}L.enable(L.BLEND),L.blendFunc(L.SRC_ALPHA,L.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(S,w,p,E,L,T,A,M,N){this._updateCell(this._vertices.attributes,S,w,p,E,L,T,A,M,N)}_updateCell(S,w,p,E,L,T,A,M,N,X){h=(p*this._terminal.cols+w)*b,E!==l.NULL_CELL_CODE&&E!==void 0?this._atlas&&(r=M&&M.length>1?this._atlas.getRasterizedGlyphCombinedChar(M,L,T,A,!1):this._atlas.getRasterizedGlyph(E,L,T,A,!1),o=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),L!==X&&r.offset.x>o?(c=r.offset.x-o,S[h]=-(r.offset.x-c)+this._dimensions.device.char.left,S[h+1]=-r.offset.y+this._dimensions.device.char.top,S[h+2]=(r.size.x-c)/this._dimensions.device.canvas.width,S[h+3]=r.size.y/this._dimensions.device.canvas.height,S[h+4]=r.texturePage,S[h+5]=r.texturePositionClipSpace.x+c/this._atlas.pages[r.texturePage].canvas.width,S[h+6]=r.texturePositionClipSpace.y,S[h+7]=r.sizeClipSpace.x-c/this._atlas.pages[r.texturePage].canvas.width,S[h+8]=r.sizeClipSpace.y):(S[h]=-r.offset.x+this._dimensions.device.char.left,S[h+1]=-r.offset.y+this._dimensions.device.char.top,S[h+2]=r.size.x/this._dimensions.device.canvas.width,S[h+3]=r.size.y/this._dimensions.device.canvas.height,S[h+4]=r.texturePage,S[h+5]=r.texturePositionClipSpace.x,S[h+6]=r.texturePositionClipSpace.y,S[h+7]=r.sizeClipSpace.x,S[h+8]=r.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,_.allowRescaling)(E,N,r.size.x,this._dimensions.device.cell.width)&&(S[h+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):S.fill(0,h,h+b-1-2)}clear(){const S=this._terminal,w=S.cols*S.rows*b;this._vertices.count!==w?this._vertices.attributes=new Float32Array(w):this._vertices.attributes.fill(0);let p=0;for(;p<this._vertices.attributesBuffers.length;p++)this._vertices.count!==w?this._vertices.attributesBuffers[p]=new Float32Array(w):this._vertices.attributesBuffers[p].fill(0);this._vertices.count=w,p=0;for(let E=0;E<S.rows;E++)for(let L=0;L<S.cols;L++)this._vertices.attributes[p+9]=L/S.cols,this._vertices.attributes[p+10]=E/S.rows,p+=b}handleResize(){const S=this._gl;S.useProgram(this._program),S.viewport(0,0,S.canvas.width,S.canvas.height),S.uniform2f(this._resolutionLocation,S.canvas.width,S.canvas.height),this.clear()}render(S){if(!this._atlas)return;const w=this._gl;w.useProgram(this._program),w.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const p=this._vertices.attributesBuffers[this._activeBuffer];let E=0;for(let L=0;L<S.lineLengths.length;L++){const T=L*this._terminal.cols*b,A=this._vertices.attributes.subarray(T,T+S.lineLengths[L]*b);p.set(A,E),E+=A.length}w.bindBuffer(w.ARRAY_BUFFER,this._attributesBuffer),w.bufferData(w.ARRAY_BUFFER,p.subarray(0,E),w.STREAM_DRAW);for(let L=0;L<this._atlas.pages.length;L++)this._atlas.pages[L].version!==this._atlasTextures[L].version&&this._bindAtlasPageTexture(w,this._atlas,L);w.drawElementsInstanced(w.TRIANGLE_STRIP,4,w.UNSIGNED_BYTE,0,E/b)}setAtlas(S){this._atlas=S;for(const w of this._atlasTextures)w.version=-1}_bindAtlasPageTexture(S,w,p){S.activeTexture(S.TEXTURE0+p),S.bindTexture(S.TEXTURE_2D,this._atlasTextures[p].texture),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,w.pages[p].canvas),S.generateMipmap(S.TEXTURE_2D),this._atlasTextures[p].version=w.pages[p].version}setDimensions(S){this._dimensions=S}}n.GlyphRenderer=g},742:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RectangleRenderer=void 0;const _=d(374),v=d(859),l=d(310),m=d(381),y=8*Float32Array.BYTES_PER_ELEMENT;class b{constructor(){this.attributes=new Float32Array(160),this.count=0}}let f=0,r=0,h=0,o=0,c=0,g=0,C=0;class S extends v.Disposable{constructor(p,E,L,T){super(),this._terminal=p,this._gl=E,this._dimensions=L,this._themeService=T,this._vertices=new b,this._verticesCursor=new b;const A=this._gl;this._program=(0,_.throwIfFalsy)((0,m.createProgram)(A,`#version 300 es
|
|
92
92
|
layout (location = 0) in vec2 a_position;
|
|
93
93
|
layout (location = 1) in vec2 a_size;
|
|
94
94
|
layout (location = 2) in vec4 a_color;
|
|
@@ -111,7 +111,7 @@ out vec4 outColor;
|
|
|
111
111
|
|
|
112
112
|
void main() {
|
|
113
113
|
outColor = v_color;
|
|
114
|
-
}`)),this.register((0,v.toDisposable)((()=>A.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(A.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=A.createVertexArray(),A.bindVertexArray(this._vertexArrayObject);const M=new Float32Array([0,0,1,0,0,1,1,1]),z=A.createBuffer();this.register((0,v.toDisposable)((()=>A.deleteBuffer(z)))),A.bindBuffer(A.ARRAY_BUFFER,z),A.bufferData(A.ARRAY_BUFFER,M,A.STATIC_DRAW),A.enableVertexAttribArray(3),A.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const Y=new Uint8Array([0,1,2,3]),N=A.createBuffer();this.register((0,v.toDisposable)((()=>A.deleteBuffer(N)))),A.bindBuffer(A.ELEMENT_ARRAY_BUFFER,N),A.bufferData(A.ELEMENT_ARRAY_BUFFER,Y,A.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(A.createBuffer()),this.register((0,v.toDisposable)((()=>A.deleteBuffer(this._attributesBuffer)))),A.bindBuffer(A.ARRAY_BUFFER,this._attributesBuffer),A.enableVertexAttribArray(0),A.vertexAttribPointer(0,2,A.FLOAT,!1,y,0),A.vertexAttribDivisor(0,1),A.enableVertexAttribArray(1),A.vertexAttribPointer(1,2,A.FLOAT,!1,y,2*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(1,1),A.enableVertexAttribArray(2),A.vertexAttribPointer(2,4,A.FLOAT,!1,y,4*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(2,1),this._updateCachedColors(T.colors),this.register(this._themeService.onChangeColors((I=>{this._updateCachedColors(I),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(p){const E=this._gl;E.useProgram(this._program),E.bindVertexArray(this._vertexArrayObject),E.uniformMatrix4fv(this._projectionLocation,!1,m.PROJECTION_MATRIX),E.bindBuffer(E.ARRAY_BUFFER,this._attributesBuffer),E.bufferData(E.ARRAY_BUFFER,p.attributes,E.DYNAMIC_DRAW),E.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,E.UNSIGNED_BYTE,0,p.count)}handleResize(){this._updateViewportRectangle()}setDimensions(p){this._dimensions=p}_updateCachedColors(p){this._bgFloat=this._colorToFloat32Array(p.background),this._cursorFloat=this._colorToFloat32Array(p.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(p){const E=this._terminal,L=this._vertices;let T,A,M,z,Y,N,I,G,D,H,R,O=1;for(T=0;T<E.rows;T++){for(M=-1,z=0,Y=0,N=!1,A=0;A<E.cols;A++)I=(T*E.cols+A)*o.RENDER_MODEL_INDICIES_PER_CELL,G=p.cells[I+o.RENDER_MODEL_BG_OFFSET],D=p.cells[I+o.RENDER_MODEL_FG_OFFSET],H=!!(67108864&D),(G!==z||D!==Y&&(N||H))&&((z!==0||N&&Y!==0)&&(R=8*O++,this._updateRectangle(L,R,Y,z,M,A,T)),M=A,z=G,Y=D,N=H);(z!==0||N&&Y!==0)&&(R=8*O++,this._updateRectangle(L,R,Y,z,M,E.cols,T))}L.count=O}updateCursor(p){const E=this._verticesCursor,L=p.cursor;if(!L||L.style==="block")return void(E.count=0);let T,A=0;L.style!=="bar"&&L.style!=="outline"||(T=8*A++,this._addRectangleFloat(E.attributes,T,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(T=8*A++,this._addRectangleFloat(E.attributes,T,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(T=8*A++,this._addRectangleFloat(E.attributes,T,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),T=8*A++,this._addRectangleFloat(E.attributes,T,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),E.count=A}_updateRectangle(p,E,L,T,A,M,z){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:f=(16777215&L)<<8;break;default:f=this._themeService.colors.foreground.rgba}else switch(50331648&T){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&T].rgba;break;case 50331648:f=(16777215&T)<<8;break;default:f=this._themeService.colors.background.rgba}p.attributes.length<E+4&&(p.attributes=(0,m.expandFloat32Array)(p.attributes,this._terminal.rows*this._terminal.cols*8)),r=A*this._dimensions.device.cell.width,h=z*this._dimensions.device.cell.height,l=(f>>24&255)/255,c=(f>>16&255)/255,g=(f>>8&255)/255,C=1,this._addRectangle(p.attributes,E,r,h,(M-A)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,l,c,g,C)}_addRectangle(p,E,L,T,A,M,z,Y,N,I){p[E]=L/this._dimensions.device.canvas.width,p[E+1]=T/this._dimensions.device.canvas.height,p[E+2]=A/this._dimensions.device.canvas.width,p[E+3]=M/this._dimensions.device.canvas.height,p[E+4]=z,p[E+5]=Y,p[E+6]=N,p[E+7]=I}_addRectangleFloat(p,E,L,T,A,M,z){p[E]=L/this._dimensions.device.canvas.width,p[E+1]=T/this._dimensions.device.canvas.height,p[E+2]=A/this._dimensions.device.canvas.width,p[E+3]=M/this._dimensions.device.canvas.height,p[E+4]=z[0],p[E+5]=z[1],p[E+6]=z[2],p[E+7]=z[3]}_colorToFloat32Array(p){return new Float32Array([(p.rgba>>24&255)/255,(p.rgba>>16&255)/255,(p.rgba>>8&255)/255,(255&p.rgba)/255])}}n.RectangleRenderer=S},310:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderModel=n.COMBINED_CHAR_BIT_MASK=n.RENDER_MODEL_EXT_OFFSET=n.RENDER_MODEL_FG_OFFSET=n.RENDER_MODEL_BG_OFFSET=n.RENDER_MODEL_INDICIES_PER_CELL=void 0;const _=d(296);n.RENDER_MODEL_INDICIES_PER_CELL=4,n.RENDER_MODEL_BG_OFFSET=1,n.RENDER_MODEL_FG_OFFSET=2,n.RENDER_MODEL_EXT_OFFSET=3,n.COMBINED_CHAR_BIT_MASK=2147483648,n.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,_.createSelectionRenderModel)()}resize(v,o){const m=v*o*n.RENDER_MODEL_INDICIES_PER_CELL;m!==this.cells.length&&(this.cells=new Uint32Array(m),this.lineLengths=new Uint32Array(o))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;const _=d(820),v=d(274),o=d(627),m=d(457),y=d(56),b=d(374),f=d(345),r=d(859),h=d(147),l=d(782),c=d(855),g=d(965),C=d(742),S=d(310),w=d(733);class p extends r.Disposable{constructor(A,M,z,Y,N,I,G,D,H){super(),this._terminal=A,this._characterJoinerService=M,this._charSizeService=z,this._coreBrowserService=Y,this._coreService=N,this._decorationService=I,this._optionsService=G,this._themeService=D,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new S.RenderModel,this._workCell=new l.CellData,this._workCell2=new l.CellData,this._rectangleRenderer=this.register(new r.MutableDisposable),this._glyphRenderer=this.register(new r.MutableDisposable),this._onChangeTextureAtlas=this.register(new f.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new f.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new f.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new f.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new f.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new v.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new w.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,G,this._themeService)],this.dimensions=(0,b.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(G.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const R={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",R),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextlost",(O=>{console.log("webglcontextlost event received"),O.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(O)}),3e3)}))),this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextrestored",(O=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,o.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((O,X)=>this._setCanvasDevicePixelDimensions(O,X))),this.register(this._coreBrowserService.onWindowChange((O=>{this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,O,((X,Z)=>this._setCanvasDevicePixelDimensions(X,Z)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,r.toDisposable)((()=>{var O;for(const X of this._renderLayers)X.dispose();(O=this._canvas.parentElement)==null||O.removeChild(this._canvas),(0,o.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var A;return(A=this._charAtlas)==null?void 0:A.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(A,M){var z,Y,N,I;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const G of this._renderLayers)G.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(z=this._rectangleRenderer.value)==null||z.setDimensions(this.dimensions),(Y=this._rectangleRenderer.value)==null||Y.handleResize(),(N=this._glyphRenderer.value)==null||N.setDimensions(this.dimensions),(I=this._glyphRenderer.value)==null||I.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var A;for(const M of this._renderLayers)M.handleBlur(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.pause(),this._requestRedrawViewport()}handleFocus(){var A;for(const M of this._renderLayers)M.handleFocus(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.resume(),this._requestRedrawViewport()}handleSelectionChanged(A,M,z){for(const Y of this._renderLayers)Y.handleSelectionChanged(this._terminal,A,M,z);this._model.selection.update(this._core,A,M,z),this._requestRedrawViewport()}handleCursorMove(){var A;for(const M of this._renderLayers)M.handleCursorMove(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new C.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new g.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var M;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const A=(0,o.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==A&&(this._onChangeTextureAtlas.fire(A.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,f.forwardEvent)(A.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,f.forwardEvent)(A.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=A,this._charAtlas.warmUp(),(M=this._glyphRenderer.value)==null||M.setAtlas(this._charAtlas)}_clearModel(A){var M;this._model.clear(),A&&((M=this._glyphRenderer.value)==null||M.clear())}clearTextureAtlas(){var A;(A=this._charAtlas)==null||A.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var A;this._clearModel(!0);for(const M of this._renderLayers)M.reset(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(A){return-1}deregisterCharacterJoiner(A){return!1}renderRows(A,M){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const z of this._renderLayers)z.handleGridChanged(this._terminal,A,M);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(A,M),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new m.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(A,M){const z=this._core;let Y,N,I,G,D,H,R,O,X,Z,he,ue,F,k,ne=this._workCell;A=L(A,z.rows-1,0),M=L(M,z.rows-1,0);const se=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,de=se-z.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,z.cols-1);let we=-1;const me=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Ne=!1;for(N=A;N<=M;N++)for(I=N+z.buffer.ydisp,G=z.buffer.lines.get(I),this._model.lineLengths[N]=0,D=this._characterJoinerService.getJoinedCharacters(I),F=0;F<z.cols;F++)if(Y=this._cellColorResolver.result.bg,G.loadCell(F,ne),F===0&&(Y=this._cellColorResolver.result.bg),H=!1,R=F,D.length>0&&F===D[0][0]&&(H=!0,O=D.shift(),ne=new E(ne,G.translateToString(!0,O[0],O[1]),O[1]-O[0]),R=O[1]-1),X=ne.getChars(),Z=ne.getCode(),ue=(N*z.cols+F)*S.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(ne,F,I,this.dimensions.device.cell.width),me&&I===se&&(F===fe&&(this._model.cursor={x:fe,y:de,width:ne.getWidth(),style:this._coreBrowserService.isFocused?z.options.cursorStyle||"block":z.options.cursorInactiveStyle,cursorWidth:z.options.cursorWidth,dpr:this._devicePixelRatio},we=fe+ne.getWidth()-1),F>=fe&&F<=we&&(this._coreBrowserService.isFocused&&(z.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&z.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),Z!==c.NULL_CELL_CODE&&(this._model.lineLengths[N]=F+1),(this._model.cells[ue]!==Z||this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Ne=!0,X.length>1&&(Z|=S.COMBINED_CHAR_BIT_MASK),this._model.cells[ue]=Z,this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,he=ne.getWidth(),this._glyphRenderer.value.updateCell(F,N,Z,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,X,he,Y),H))for(ne=this._workCell,F++;F<R;F++)k=(N*z.cols+F)*S.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(F,N,c.NULL_CELL_CODE,0,0,0,c.NULL_CELL_CHAR,0,0),this._model.cells[k]=c.NULL_CELL_CODE,this._model.cells[k+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[k+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[k+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Ne&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),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._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(A,M){this._canvas.width===A&&this._canvas.height===M||(this._canvas.width=A,this._canvas.height=M,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const A=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:A,end:A})}}n.WebglRenderer=p;class E extends h.AttributeData{constructor(A,M,z){super(),this.content=0,this.combinedData="",this.fg=A.fg,this.bg=A.bg,this.combinedData=M,this._width=z}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(A){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(T,A,M=0){return Math.max(Math.min(T,A),M)}n.JoinedCellData=E},381:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;const _=d(374);function v(o,m,y){const b=(0,_.throwIfFalsy)(o.createShader(m));if(o.shaderSource(b,y),o.compileShader(b),o.getShaderParameter(b,o.COMPILE_STATUS))return b;console.error(o.getShaderInfoLog(b)),o.deleteShader(b)}n.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),n.createProgram=function(o,m,y){const b=(0,_.throwIfFalsy)(o.createProgram());if(o.attachShader(b,(0,_.throwIfFalsy)(v(o,o.VERTEX_SHADER,m))),o.attachShader(b,(0,_.throwIfFalsy)(v(o,o.FRAGMENT_SHADER,y))),o.linkProgram(b),o.getProgramParameter(b,o.LINK_STATUS))return b;console.error(o.getProgramInfoLog(b)),o.deleteProgram(b)},n.createShader=v,n.expandFloat32Array=function(o,m){const y=Math.min(2*o.length,m),b=new Float32Array(y);for(let f=0;f<o.length;f++)b[f]=o[f];return b},n.GLTexture=class{constructor(o){this.texture=o,this.version=-1}}},592:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const _=d(627),v=d(237),o=d(374),m=d(859);class y extends m.Disposable{constructor(f,r,h,l,c,g,C,S){super(),this._container=r,this._alpha=c,this._coreBrowserService=g,this._optionsService=C,this._themeService=S,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${h}-layer`),this._canvas.style.zIndex=l.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((w=>{this._refreshCharAtlas(f,w),this.reset(f)}))),this.register((0,m.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,o.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(f){}handleFocus(f){}handleCursorMove(f){}handleGridChanged(f,r,h){}handleSelectionChanged(f,r,h,l=!1){}_setTransparency(f,r){if(r===this._alpha)return;const h=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(f,this._themeService.colors),this.handleGridChanged(f,0,f.rows-1)}_refreshCharAtlas(f,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,_.acquireTextureAtlas)(f,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(f,r){this._deviceCellWidth=r.device.cell.width,this._deviceCellHeight=r.device.cell.height,this._deviceCharWidth=r.device.char.width,this._deviceCharHeight=r.device.char.height,this._deviceCharLeft=r.device.char.left,this._deviceCharTop=r.device.char.top,this._canvas.width=r.device.canvas.width,this._canvas.height=r.device.canvas.height,this._canvas.style.width=`${r.css.canvas.width}px`,this._canvas.style.height=`${r.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(f,this._themeService.colors)}_fillBottomLineAtCells(f,r,h=1){this._ctx.fillRect(f*this._deviceCellWidth,(r+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,h*this._deviceCellWidth,this._coreBrowserService.dpr)}_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(f,r,h,l){this._alpha?this._ctx.clearRect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,l*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,l*this._deviceCellHeight))}_fillCharTrueColor(f,r,h,l){this._ctx.font=this._getFont(f,!1,!1),this._ctx.textBaseline=v.TEXT_BASELINE,this._clipCell(h,l,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,l*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(f,r,h){this._ctx.beginPath(),this._ctx.rect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(f,r,h){return`${h?"italic":""} ${r?f.options.fontWeightBold:f.options.fontWeight} ${f.options.fontSize*this._coreBrowserService.dpr}px ${f.options.fontFamily}`}}n.BaseRenderLayer=y},733:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const _=d(197),v=d(237),o=d(592);class m extends o.BaseRenderLayer{constructor(b,f,r,h,l,c,g){super(r,b,"link",f,!0,l,c,g),this.register(h.onShowLinkUnderline((C=>this._handleShowLinkUnderline(C)))),this.register(h.onHideLinkUnderline((C=>this._handleHideLinkUnderline(C))))}resize(b,f){super.resize(b,f),this._state=void 0}reset(b){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const b=this._state.y2-this._state.y1-1;b>0&&this._clearCells(0,this._state.y1+1,this._state.cols,b),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(b){if(b.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:b.fg!==void 0&&(0,_.is256Color)(b.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[b.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,b.y1===b.y2)this._fillBottomLineAtCells(b.x1,b.y1,b.x2-b.x1);else{this._fillBottomLineAtCells(b.x1,b.y1,b.cols-b.x1);for(let f=b.y1+1;f<b.y2;f++)this._fillBottomLineAtCells(0,f,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}n.LinkRenderLayer=m},820:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(d,_,v,o){d.addEventListener(_,v,o);let m=!1;return{dispose:()=>{m||(m=!0,d.removeEventListener(_,v,o))}}}},274:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const _=d(855),v=d(160),o=d(374);let m,y=0,b=0,f=!1,r=!1,h=!1,l=0;n.CellColorResolver=class{constructor(c,g,C,S,w,p){this._terminal=c,this._optionService=g,this._selectionRenderModel=C,this._decorationService=S,this._coreBrowserService=w,this._themeService=p,this.result={fg:0,bg:0,ext:0}}resolve(c,g,C,S){if(this.result.bg=c.bg,this.result.fg=c.fg,this.result.ext=268435456&c.bg?c.extended.ext:0,b=0,y=0,r=!1,f=!1,h=!1,m=this._themeService.colors,l=0,c.getCode()!==_.NULL_CELL_CODE&&c.extended.underlineStyle===4){const w=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));l=g*S%(2*Math.round(w))}if(this._decorationService.forEachDecorationAtCell(g,C,"bottom",(w=>{w.backgroundColorRGB&&(b=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba>>8&16777215,f=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,g,C),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}b=v.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,m.selectionForeground&&(y=m.selectionForeground.rgba>>8&16777215,f=!0),(0,o.treatGlyphAsBackgroundColor)(c.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)y=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}y=v.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}f=!0}}this._decorationService.forEachDecorationAtCell(g,C,"top",(w=>{w.backgroundColorRGB&&(b=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba>>8&16777215,f=!0)})),r&&(b=h?-16777216&c.bg&-134217729|b|50331648:-16777216&c.bg|b|50331648),f&&(y=-16777216&c.fg&-67108865|y|50331648),67108864&this.result.fg&&(r&&!f&&(y=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&m.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,f=!0),!r&&f&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&m.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),m=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=f?y:this.result.fg,this.result.ext&=536870911,this.result.ext|=l<<29&3758096384}}},627:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const _=d(509),v=d(197),o=[];n.acquireTextureAtlas=function(m,y,b,f,r,h,l,c){const g=(0,v.generateConfig)(f,r,h,l,y,b,c);for(let w=0;w<o.length;w++){const p=o[w],E=p.ownedBy.indexOf(m);if(E>=0){if((0,v.configEquals)(p.config,g))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),o.splice(w,1)):p.ownedBy.splice(E,1);break}}for(let w=0;w<o.length;w++){const p=o[w];if((0,v.configEquals)(p.config,g))return p.ownedBy.push(m),p.atlas}const C=m._core,S={atlas:new _.TextureAtlas(document,g,C.unicodeService),config:g,ownedBy:[m]};return o.push(S),S.atlas},n.removeTerminalFromCache=function(m){for(let y=0;y<o.length;y++){const b=o[y].ownedBy.indexOf(m);if(b!==-1){o[y].ownedBy.length===1?(o[y].atlas.dispose(),o.splice(y,1)):o[y].ownedBy.splice(b,1);break}}}},197:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const _=d(160);n.generateConfig=function(v,o,m,y,b,f,r){const h={foreground:f.foreground,background:f.background,cursor:_.NULL_COLOR,cursorAccent:_.NULL_COLOR,selectionForeground:_.NULL_COLOR,selectionBackgroundTransparent:_.NULL_COLOR,selectionBackgroundOpaque:_.NULL_COLOR,selectionInactiveBackgroundTransparent:_.NULL_COLOR,selectionInactiveBackgroundOpaque:_.NULL_COLOR,ansi:f.ansi.slice(),contrastCache:f.contrastCache,halfContrastCache:f.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:v,deviceCellHeight:o,deviceCharWidth:m,deviceCharHeight:y,fontFamily:b.fontFamily,fontSize:b.fontSize,fontWeight:b.fontWeight,fontWeightBold:b.fontWeightBold,allowTransparency:b.allowTransparency,drawBoldTextInBrightColors:b.drawBoldTextInBrightColors,minimumContrastRatio:b.minimumContrastRatio,colors:h}},n.configEquals=function(v,o){for(let m=0;m<v.colors.ansi.length;m++)if(v.colors.ansi[m].rgba!==o.colors.ansi[m].rgba)return!1;return v.devicePixelRatio===o.devicePixelRatio&&v.customGlyphs===o.customGlyphs&&v.lineHeight===o.lineHeight&&v.letterSpacing===o.letterSpacing&&v.fontFamily===o.fontFamily&&v.fontSize===o.fontSize&&v.fontWeight===o.fontWeight&&v.fontWeightBold===o.fontWeightBold&&v.allowTransparency===o.allowTransparency&&v.deviceCharWidth===o.deviceCharWidth&&v.deviceCharHeight===o.deviceCharHeight&&v.drawBoldTextInBrightColors===o.drawBoldTextInBrightColors&&v.minimumContrastRatio===o.minimumContrastRatio&&v.colors.foreground.rgba===o.colors.foreground.rgba&&v.colors.background.rgba===o.colors.background.rgba},n.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const _=d(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},457:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(d,_){this._renderCallback=d,this._coreBrowserService=_,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(d=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,_>0)return void this._restartInterval(_)}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 _=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(_)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),d)}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:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const _=d(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 v={"░":[[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:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╒":{1:(f,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(f,r)=>`M${.5-f},1 L${.5-f},.5 L1,.5 M${.5+f},.5 L${.5+f},1`},"╔":{1:(f,r)=>`M1,${.5-r} L${.5-f},${.5-r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1`},"╕":{1:(f,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(f,r)=>`M${.5+f},1 L${.5+f},.5 L0,.5 M${.5-f},.5 L${.5-f},1`},"╗":{1:(f,r)=>`M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M0,${.5-r} L${.5+f},${.5-r} L${.5+f},1`},"╘":{1:(f,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(f,r)=>`M1,.5 L${.5-f},.5 L${.5-f},0 M${.5+f},.5 L${.5+f},0`},"╚":{1:(f,r)=>`M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0 M1,${.5+r} L${.5-f},${.5+r} L${.5-f},0`},"╛":{1:(f,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(f,r)=>`M0,.5 L${.5+f},.5 L${.5+f},0 M${.5-f},.5 L${.5-f},0`},"╝":{1:(f,r)=>`M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M0,${.5+r} L${.5+f},${.5+r} L${.5+f},0`},"╞":{1:(f,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1 M${.5+f},.5 L1,.5`},"╠":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╡":{1:(f,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(f,r)=>`M0,.5 L${.5-f},.5 M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╣":{1:(f,r)=>`M${.5+f},0 L${.5+f},1 M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0`},"╤":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},.5 L${.5-f},1 M${.5+f},.5 L${.5+f},1`},"╦":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1`},"╧":{1:(f,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},.5 L${.5-f},0 M${.5+f},.5 L${.5+f},0`},"╩":{1:(f,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╪":{1:(f,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╬":{1:(f,r)=>`M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1 M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},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:(f,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(f,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(f,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(f,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.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(f,r,h,l,c,g,C,S){const w=n.blockElementDefinitions[r];if(w)return(function(T,A,M,z,Y,N){for(let I=0;I<A.length;I++){const G=A[I],D=Y/8,H=N/8;T.fillRect(M+G.x*D,z+G.y*H,G.w*D,G.h*H)}})(f,w,h,l,c,g),!0;const p=v[r];if(p)return(function(T,A,M,z,Y,N){let I=o.get(A);I||(I=new Map,o.set(A,I));const G=T.fillStyle;if(typeof G!="string")throw new Error(`Unexpected fillStyle type "${G}"`);let D=I.get(G);if(!D){const H=A[0].length,R=A.length,O=T.canvas.ownerDocument.createElement("canvas");O.width=H,O.height=R;const X=(0,_.throwIfFalsy)(O.getContext("2d")),Z=new ImageData(H,R);let he,ue,F,k;if(G.startsWith("#"))he=parseInt(G.slice(1,3),16),ue=parseInt(G.slice(3,5),16),F=parseInt(G.slice(5,7),16),k=G.length>7&&parseInt(G.slice(7,9),16)||1;else{if(!G.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${G}" when drawing pattern glyph`);[he,ue,F,k]=G.substring(5,G.length-1).split(",").map((ne=>parseFloat(ne)))}for(let ne=0;ne<R;ne++)for(let se=0;se<H;se++)Z.data[4*(ne*H+se)]=he,Z.data[4*(ne*H+se)+1]=ue,Z.data[4*(ne*H+se)+2]=F,Z.data[4*(ne*H+se)+3]=A[ne][se]*(255*k);X.putImageData(Z,0,0),D=(0,_.throwIfFalsy)(T.createPattern(O,null)),I.set(G,D)}T.fillStyle=D,T.fillRect(M,z,Y,N)})(f,p,h,l,c,g),!0;const E=n.boxDrawingDefinitions[r];if(E)return(function(T,A,M,z,Y,N,I){T.strokeStyle=T.fillStyle;for(const[G,D]of Object.entries(A)){let H;T.beginPath(),T.lineWidth=I*Number.parseInt(G),H=typeof D=="function"?D(.15,.15/N*Y):D;for(const R of H.split(" ")){const O=R[0],X=y[O];if(!X){console.error(`Could not find drawing instructions for "${O}"`);continue}const Z=R.substring(1).split(",");Z[0]&&Z[1]&&X(T,b(Z,Y,N,M,z,!0,I))}T.stroke(),T.closePath()}})(f,E,h,l,c,g,S),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(T,A,M,z,Y,N,I,G){const D=new Path2D;D.rect(M,z,Y,N),T.clip(D),T.beginPath();const H=I/12;T.lineWidth=G*H;for(const R of A.d.split(" ")){const O=R[0],X=y[O];if(!X){console.error(`Could not find drawing instructions for "${O}"`);continue}const Z=R.substring(1).split(",");Z[0]&&Z[1]&&X(T,b(Z,Y,N,M,z,!1,G,(A.leftPadding??0)*(H/2),(A.rightPadding??0)*(H/2)))}A.type===1?(T.strokeStyle=T.fillStyle,T.stroke()):T.fill(),T.closePath()})(f,L,h,l,c,g,C,S),!0)};const o=new Map;function m(f,r,h=0){return Math.max(Math.min(f,r),h)}const y={C:(f,r)=>f.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(f,r)=>f.lineTo(r[0],r[1]),M:(f,r)=>f.moveTo(r[0],r[1])};function b(f,r,h,l,c,g,C,S=0,w=0){const p=f.map((E=>parseFloat(E)||parseInt(E)));if(p.length<2)throw new Error("Too few arguments for instruction");for(let E=0;E<p.length;E+=2)p[E]*=r-S*C-w*C,g&&p[E]!==0&&(p[E]=m(Math.round(p[E]+.5)-.5,r,0)),p[E]+=l+S*C;for(let E=1;E<p.length;E+=2)p[E]*=h,g&&p[E]!==0&&(p[E]=m(Math.round(p[E]+.5)-.5,h,0)),p[E]+=c;return p}},56:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const _=d(859);n.observeDevicePixelDimensions=function(v,o,m){let y=new o.ResizeObserver((b=>{const f=b.find((l=>l.target===v));if(!f)return;if(!("devicePixelContentBoxSize"in f))return y==null||y.disconnect(),void(y=void 0);const r=f.devicePixelContentBoxSize[0].inlineSize,h=f.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&m(r,h)}));try{y.observe(v,{box:["device-pixel-content-box"]})}catch{y.disconnect(),y=void 0}return(0,_.toDisposable)((()=>y==null?void 0:y.disconnect()))}},374:(P,n)=>{function d(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=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(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=d,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=_,n.allowRescaling=function(v,o,m,y){return o===1&&m>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!_(v)&&!d(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return d(v)||(function(o){return 9472<=o&&o<=9631})(v)},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(v,o,m=0){return(v-(2*Math.round(o)-m))%(2*Math.round(o))}},296:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class d{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(v,o,m,y=!1){if(this.selectionStart=o,this.selectionEnd=m,!o||!m||o[0]===m[0]&&o[1]===m[1])return void this.clear();const b=v.buffers.active.ydisp,f=o[1]-b,r=m[1]-b,h=Math.max(f,0),l=Math.min(r,v.rows-1);h>=v.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=f,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=o[0],this.endCol=m[0])}isCellSelected(v,o,m){return!!this.hasSelection&&(m-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?o>=this.startCol&&m>=this.viewportCappedStartRow&&o<this.endCol&&m<=this.viewportCappedEndRow:o<this.startCol&&m>=this.viewportCappedStartRow&&o>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&o>=this.startCol&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&o>=this.startCol)}}n.createSelectionRenderModel=function(){return new d}},509:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const _=d(237),v=d(860),o=d(374),m=d(160),y=d(345),b=d(485),f=d(385),r=d(147),h=d(855),l={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 c;class g{get pages(){return this._pages}constructor(E,L,T){this._document=E,this._config=L,this._unicodeService=T,this._didWarmUp=!1,this._cacheMap=new b.FourKeyMap,this._cacheMapCombined=new b.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new y.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new y.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=w(E,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,o.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const E of this.pages)E.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const E=new f.IdleTaskQueue;for(let L=33;L<126;L++)E.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const T=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,T)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const E of this._pages)E.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(g.maxAtlasPages&&this._pages.length>=Math.max(4,g.maxAtlasPages)){const L=this._pages.filter((I=>2*I.canvas.width<=(g.maxTextureSize||4096))).sort(((I,G)=>G.canvas.width!==I.canvas.width?G.canvas.width-I.canvas.width:G.percentageUsed-I.percentageUsed));let T=-1,A=0;for(let I=0;I<L.length;I++)if(L[I].canvas.width!==A)T=I,A=L[I].canvas.width;else if(I-T==3)break;const M=L.slice(T,T+4),z=M.map((I=>I.glyphs[0].texturePage)).sort(((I,G)=>I>G?1:-1)),Y=this.pages.length-M.length,N=this._mergePages(M,Y);N.version++;for(let I=z.length-1;I>=0;I--)this._deletePage(z[I]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const E=new C(this._document,this._textureSize);return this._pages.push(E),this._activePages.push(E),this._onAddTextureAtlasCanvas.fire(E.canvas),E}_mergePages(E,L){const T=2*E[0].canvas.width,A=new C(this._document,T,E);for(const[M,z]of E.entries()){const Y=M*z.canvas.width%T,N=Math.floor(M/2)*z.canvas.height;A.ctx.drawImage(z.canvas,Y,N);for(const G of z.glyphs)G.texturePage=L,G.sizeClipSpace.x=G.size.x/T,G.sizeClipSpace.y=G.size.y/T,G.texturePosition.x+=Y,G.texturePosition.y+=N,G.texturePositionClipSpace.x=G.texturePosition.x/T,G.texturePositionClipSpace.y=G.texturePosition.y/T;this._onRemoveTextureAtlasCanvas.fire(z.canvas);const I=this._activePages.indexOf(z);I!==-1&&this._activePages.splice(I,1)}return A}_deletePage(E){this._pages.splice(E,1);for(let L=E;L<this._pages.length;L++){const T=this._pages[L];for(const A of T.glyphs)A.texturePage--;T.version++}}getRasterizedGlyphCombinedChar(E,L,T,A,M){return this._getFromCacheMap(this._cacheMapCombined,E,L,T,A,M)}getRasterizedGlyph(E,L,T,A,M){return this._getFromCacheMap(this._cacheMap,E,L,T,A,M)}_getFromCacheMap(E,L,T,A,M,z=!1){return c=E.get(L,T,A,M),c||(c=this._drawToCache(L,T,A,M,z),E.set(L,T,A,M,c)),c}_getColorFromAnsiIndex(E){if(E>=this._config.colors.ansi.length)throw new Error("No color found for idx "+E);return this._config.colors.ansi[E]}_getBackgroundColor(E,L,T,A){if(this._config.allowTransparency)return m.NULL_COLOR;let M;switch(E){case 16777216:case 33554432:M=this._getColorFromAnsiIndex(L);break;case 50331648:const z=r.AttributeData.toColorRGB(L);M=m.channels.toColor(z[0],z[1],z[2]);break;default:M=T?m.color.opaque(this._config.colors.foreground):this._config.colors.background}return M}_getForegroundColor(E,L,T,A,M,z,Y,N,I,G){const D=this._getMinimumContrastColor(E,L,T,A,M,z,Y,I,N,G);if(D)return D;let H;switch(M){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&I&&z<8&&(z+=8),H=this._getColorFromAnsiIndex(z);break;case 50331648:const R=r.AttributeData.toColorRGB(z);H=m.channels.toColor(R[0],R[1],R[2]);break;default:H=Y?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=m.color.opaque(H)),N&&(H=m.color.multiplyOpacity(H,_.DIM_OPACITY)),H}_resolveBackgroundRgba(E,L,T){switch(E){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return T?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(E,L,T,A){switch(E){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&A&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return T?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(E,L,T,A,M,z,Y,N,I,G){if(this._config.minimumContrastRatio===1||G)return;const D=this._getContrastCache(I),H=D.getColor(E,A);if(H!==void 0)return H||void 0;const R=this._resolveBackgroundRgba(L,T,Y),O=this._resolveForegroundRgba(M,z,Y,N),X=m.rgba.ensureContrastRatio(R,O,this._config.minimumContrastRatio/(I?2:1));if(!X)return void D.setColor(E,A,null);const Z=m.channels.toColor(X>>24&255,X>>16&255,X>>8&255);return D.setColor(E,A,Z),Z}_getContrastCache(E){return E?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(E,L,T,A,M=!1){const z=typeof E=="number"?String.fromCharCode(E):E,Y=Math.min(this._config.deviceCellWidth*Math.max(z.length,2)+4,this._textureSize);this._tmpCanvas.width<Y&&(this._tmpCanvas.width=Y);const N=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<N&&(this._tmpCanvas.height=N),this._tmpCtx.save(),this._workAttributeData.fg=T,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=A,this._workAttributeData.isInvisible())return l;const I=!!this._workAttributeData.isBold(),G=!!this._workAttributeData.isInverse(),D=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),R=!!this._workAttributeData.isUnderline(),O=!!this._workAttributeData.isStrikethrough(),X=!!this._workAttributeData.isOverline();let Z=this._workAttributeData.getFgColor(),he=this._workAttributeData.getFgColorMode(),ue=this._workAttributeData.getBgColor(),F=this._workAttributeData.getBgColorMode();if(G){const _e=Z;Z=ue,ue=_e;const Ce=he;he=F,F=Ce}const k=this._getBackgroundColor(F,ue,G,D);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=k.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ne=I?this._config.fontWeightBold:this._config.fontWeight,se=H?"italic":"";this._tmpCtx.font=`${se} ${ne} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=_.TEXT_BASELINE;const de=z.length===1&&(0,o.isPowerlineGlyph)(z.charCodeAt(0)),fe=z.length===1&&(0,o.isRestrictedPowerlineGlyph)(z.charCodeAt(0)),we=this._getForegroundColor(L,F,ue,T,he,Z,G,D,I,(0,o.treatGlyphAsBackgroundColor)(z.charCodeAt(0)));this._tmpCtx.fillStyle=we.css;const me=fe?0:4;let Ne=!1;this._config.customGlyphs!==!1&&(Ne=(0,v.tryDrawCustomChar)(this._tmpCtx,z,me,me,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Ke,ye=!de;if(Ke=typeof E=="number"?this._unicodeService.wcwidth(E):this._unicodeService.getStringCellWidth(E),R){this._tmpCtx.save();const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=_e%2==1?.5:0;if(this._tmpCtx.lineWidth=_e,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())ye=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{ye=!1;let Je=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Je<8&&(Je+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Je).css}this._tmpCtx.beginPath();const Qe=me,Pe=Math.ceil(me+this._config.deviceCharHeight)-Ce-(M?2*_e:0),Ut=Pe+_e,ot=Pe+2*_e;let bt=this._workAttributeData.getUnderlineVariantOffset();for(let Je=0;Je<Ke;Je++){this._tmpCtx.save();const qe=Qe+Je*this._config.deviceCellWidth,Re=Qe+(Je+1)*this._config.deviceCellWidth,Vt=qe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Re,Pe),this._tmpCtx.moveTo(qe,ot),this._tmpCtx.lineTo(Re,ot);break;case 3:const ht=_e<=1?ot:Math.ceil(me+this._config.deviceCharHeight-_e/2)-Ce,Mt=_e<=1?Pe:Math.ceil(me+this._config.deviceCharHeight+_e/2)-Ce,pt=new Path2D;pt.rect(qe,Pe,this._config.deviceCellWidth,ot-Pe),this._tmpCtx.clip(pt),this._tmpCtx.moveTo(qe-this._config.deviceCellWidth/2,Ut),this._tmpCtx.bezierCurveTo(qe-this._config.deviceCellWidth/2,Mt,qe,Mt,qe,Ut),this._tmpCtx.bezierCurveTo(qe,ht,Vt,ht,Vt,Ut),this._tmpCtx.bezierCurveTo(Vt,Mt,Re,Mt,Re,Ut),this._tmpCtx.bezierCurveTo(Re,ht,Re+this._config.deviceCellWidth/2,ht,Re+this._config.deviceCellWidth/2,Ut);break;case 4:const vs=bt===0?0:bt>=_e?2*_e-bt:_e-bt;bt>=_e||vs===0?(this._tmpCtx.setLineDash([Math.round(_e),Math.round(_e)]),this._tmpCtx.moveTo(qe+vs,Pe),this._tmpCtx.lineTo(Re,Pe)):(this._tmpCtx.setLineDash([Math.round(_e),Math.round(_e)]),this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(qe+vs,Pe),this._tmpCtx.moveTo(qe+vs+_e,Pe),this._tmpCtx.lineTo(Re,Pe)),bt=(0,o.computeNextVariantOffset)(Re-qe,_e,bt);break;case 5:const ua=.6,fa=.3,xi=Re-qe,Ki=Math.floor(ua*xi),Qi=Math.floor(fa*xi),ni=xi-Ki-Qi;this._tmpCtx.setLineDash([Ki,Qi,ni]),this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Re,Pe);break;default:this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Re,Pe)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Ne&&this._config.fontSize>=12&&!this._config.allowTransparency&&z!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Je=this._tmpCtx.measureText(z);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Je&&Je.actualBoundingBoxDescent>0){this._tmpCtx.save();const qe=new Path2D;qe.rect(Qe,Pe-Math.ceil(_e/2),this._config.deviceCellWidth*Ke,ot-Pe+Math.ceil(_e/2)),this._tmpCtx.clip(qe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=k.css,this._tmpCtx.strokeText(z,me,me+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(X){const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=_e%2==1?.5:0;this._tmpCtx.lineWidth=_e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(me,me+Ce),this._tmpCtx.lineTo(me+this._config.deviceCharWidth*Ke,me+Ce),this._tmpCtx.stroke()}if(Ne||this._tmpCtx.fillText(z,me,me+this._config.deviceCharHeight),z==="_"&&!this._config.allowTransparency){let _e=S(this._tmpCtx.getImageData(me,me,this._config.deviceCellWidth,this._config.deviceCellHeight),k,we,ye);if(_e)for(let Ce=1;Ce<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=k.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(z,me,me+this._config.deviceCharHeight-Ce),_e=S(this._tmpCtx.getImageData(me,me,this._config.deviceCellWidth,this._config.deviceCellHeight),k,we,ye),_e);Ce++);}if(O){const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Ce=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=_e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(me,me+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.lineTo(me+this._config.deviceCharWidth*Ke,me+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.stroke()}this._tmpCtx.restore();const Dt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Jt;if(Jt=this._config.allowTransparency?(function(_e){for(let Ce=0;Ce<_e.data.length;Ce+=4)if(_e.data[Ce+3]>0)return!1;return!0})(Dt):S(Dt,k,we,ye),Jt)return l;const Be=this._findGlyphBoundingBox(Dt,this._workBoundingBox,Y,fe,Ne,me);let Ae,De;for(;;){if(this._activePages.length===0){const _e=this._createNewPage();Ae=_e,De=_e.currentRow,De.height=Be.size.y;break}Ae=this._activePages[this._activePages.length-1],De=Ae.currentRow;for(const _e of this._activePages)Be.size.y<=_e.currentRow.height&&(Ae=_e,De=_e.currentRow);for(let _e=this._activePages.length-1;_e>=0;_e--)for(const Ce of this._activePages[_e].fixedRows)Ce.height<=De.height&&Be.size.y<=Ce.height&&(Ae=this._activePages[_e],De=Ce);if(De.y+Be.size.y>=Ae.canvas.height||De.height>Be.size.y+2){let _e=!1;if(Ae.currentRow.y+Ae.currentRow.height+Be.size.y>=Ae.canvas.height){let Ce;for(const Qe of this._activePages)if(Qe.currentRow.y+Qe.currentRow.height+Be.size.y<Qe.canvas.height){Ce=Qe;break}if(Ce)Ae=Ce;else if(g.maxAtlasPages&&this._pages.length>=g.maxAtlasPages&&De.y+Be.size.y<=Ae.canvas.height&&De.height>=Be.size.y&&De.x+Be.size.x<=Ae.canvas.width)_e=!0;else{const Qe=this._createNewPage();Ae=Qe,De=Qe.currentRow,De.height=Be.size.y,_e=!0}}_e||(Ae.currentRow.height>0&&Ae.fixedRows.push(Ae.currentRow),De={x:0,y:Ae.currentRow.y+Ae.currentRow.height,height:Be.size.y},Ae.fixedRows.push(De),Ae.currentRow={x:0,y:De.y+De.height,height:0})}if(De.x+Be.size.x<=Ae.canvas.width)break;De===Ae.currentRow?(De.x=0,De.y+=De.height,De.height=0):Ae.fixedRows.splice(Ae.fixedRows.indexOf(De),1)}return Be.texturePage=this._pages.indexOf(Ae),Be.texturePosition.x=De.x,Be.texturePosition.y=De.y,Be.texturePositionClipSpace.x=De.x/Ae.canvas.width,Be.texturePositionClipSpace.y=De.y/Ae.canvas.height,Be.sizeClipSpace.x/=Ae.canvas.width,Be.sizeClipSpace.y/=Ae.canvas.height,De.height=Math.max(De.height,Be.size.y),De.x+=Be.size.x,Ae.ctx.putImageData(Dt,Be.texturePosition.x-this._workBoundingBox.left,Be.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Be.size.x,Be.size.y),Ae.addGlyph(Be),Ae.version++,Be}_findGlyphBoundingBox(E,L,T,A,M,z){L.top=0;const Y=A?this._config.deviceCellHeight:this._tmpCanvas.height,N=A?this._config.deviceCellWidth:T;let I=!1;for(let G=0;G<Y;G++){for(let D=0;D<N;D++){const H=G*this._tmpCanvas.width*4+4*D+3;if(E.data[H]!==0){L.top=G,I=!0;break}}if(I)break}L.left=0,I=!1;for(let G=0;G<z+N;G++){for(let D=0;D<Y;D++){const H=D*this._tmpCanvas.width*4+4*G+3;if(E.data[H]!==0){L.left=G,I=!0;break}}if(I)break}L.right=N,I=!1;for(let G=z+N-1;G>=z;G--){for(let D=0;D<Y;D++){const H=D*this._tmpCanvas.width*4+4*G+3;if(E.data[H]!==0){L.right=G,I=!0;break}}if(I)break}L.bottom=Y,I=!1;for(let G=Y-1;G>=0;G--){for(let D=0;D<N;D++){const H=G*this._tmpCanvas.width*4+4*D+3;if(E.data[H]!==0){L.bottom=G,I=!0;break}}if(I)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+z+(A||M?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+z+(A||M?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=g;class C{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(E){this._glyphs.push(E),this._usedPixels+=E.size.x*E.size.y}constructor(E,L,T){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],T)for(const A of T)this._glyphs.push(...A.glyphs),this._usedPixels+=A._usedPixels;this.canvas=w(E,L,L),this.ctx=(0,o.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 S(p,E,L,T){const A=E.rgba>>>24,M=E.rgba>>>16&255,z=E.rgba>>>8&255,Y=L.rgba>>>24,N=L.rgba>>>16&255,I=L.rgba>>>8&255,G=Math.floor((Math.abs(A-Y)+Math.abs(M-N)+Math.abs(z-I))/12);let D=!0;for(let H=0;H<p.data.length;H+=4)p.data[H]===A&&p.data[H+1]===M&&p.data[H+2]===z||T&&Math.abs(p.data[H]-A)+Math.abs(p.data[H+1]-M)+Math.abs(p.data[H+2]-z)<G?p.data[H+3]=0:D=!1;return D}function w(p,E,L){const T=p.createElement("canvas");return T.width=E,T.height=L,T}},160:(P,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 d=0,_=0,v=0,o=0;var m,y,b,f,r;function h(c){const g=c.toString(16);return g.length<2?"0"+g:g}function l(c,g){return c<g?(g+.05)/(c+.05):(c+.05)/(g+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(g,C,S,w){return w!==void 0?`#${h(g)}${h(C)}${h(S)}${h(w)}`:`#${h(g)}${h(C)}${h(S)}`},c.toRgba=function(g,C,S,w=255){return(g<<24|C<<16|S<<8|w)>>>0},c.toColor=function(g,C,S,w){return{css:c.toCss(g,C,S,w),rgba:c.toRgba(g,C,S,w)}}})(m||(n.channels=m={})),(function(c){function g(C,S){return o=Math.round(255*S),[d,_,v]=r.toChannels(C.rgba),{css:m.toCss(d,_,v,o),rgba:m.toRgba(d,_,v,o)}}c.blend=function(C,S){if(o=(255&S.rgba)/255,o===1)return{css:S.css,rgba:S.rgba};const w=S.rgba>>24&255,p=S.rgba>>16&255,E=S.rgba>>8&255,L=C.rgba>>24&255,T=C.rgba>>16&255,A=C.rgba>>8&255;return d=L+Math.round((w-L)*o),_=T+Math.round((p-T)*o),v=A+Math.round((E-A)*o),{css:m.toCss(d,_,v),rgba:m.toRgba(d,_,v)}},c.isOpaque=function(C){return(255&C.rgba)==255},c.ensureContrastRatio=function(C,S,w){const p=r.ensureContrastRatio(C.rgba,S.rgba,w);if(p)return m.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(C){const S=(255|C.rgba)>>>0;return[d,_,v]=r.toChannels(S),{css:m.toCss(d,_,v),rgba:S}},c.opacity=g,c.multiplyOpacity=function(C,S){return o=255&C.rgba,g(C,o*S/255)},c.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(y||(n.color=y={})),(function(c){let g,C;try{const S=document.createElement("canvas");S.width=1,S.height=1;const w=S.getContext("2d",{willReadFrequently:!0});w&&(g=w,g.globalCompositeOperation="copy",C=g.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),m.toColor(d,_,v);case 5:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),o=parseInt(S.slice(4,5).repeat(2),16),m.toColor(d,_,v,o);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const w=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return d=parseInt(w[1]),_=parseInt(w[2]),v=parseInt(w[3]),o=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),m.toColor(d,_,v,o);if(!g||!C)throw new Error("css.toColor: Unsupported css format");if(g.fillStyle=C,g.fillStyle=S,typeof g.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(g.fillRect(0,0,1,1),[d,_,v,o]=g.getImageData(0,0,1,1).data,o!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(d,_,v,o),css:S}}})(b||(n.css=b={})),(function(c){function g(C,S,w){const p=C/255,E=S/255,L=w/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(C){return g(C>>16&255,C>>8&255,255&C)},c.relativeLuminance2=g})(f||(n.rgb=f={})),(function(c){function g(S,w,p){const E=S>>24&255,L=S>>16&255,T=S>>8&255;let A=w>>24&255,M=w>>16&255,z=w>>8&255,Y=l(f.relativeLuminance2(A,M,z),f.relativeLuminance2(E,L,T));for(;Y<p&&(A>0||M>0||z>0);)A-=Math.max(0,Math.ceil(.1*A)),M-=Math.max(0,Math.ceil(.1*M)),z-=Math.max(0,Math.ceil(.1*z)),Y=l(f.relativeLuminance2(A,M,z),f.relativeLuminance2(E,L,T));return(A<<24|M<<16|z<<8|255)>>>0}function C(S,w,p){const E=S>>24&255,L=S>>16&255,T=S>>8&255;let A=w>>24&255,M=w>>16&255,z=w>>8&255,Y=l(f.relativeLuminance2(A,M,z),f.relativeLuminance2(E,L,T));for(;Y<p&&(A<255||M<255||z<255);)A=Math.min(255,A+Math.ceil(.1*(255-A))),M=Math.min(255,M+Math.ceil(.1*(255-M))),z=Math.min(255,z+Math.ceil(.1*(255-z))),Y=l(f.relativeLuminance2(A,M,z),f.relativeLuminance2(E,L,T));return(A<<24|M<<16|z<<8|255)>>>0}c.blend=function(S,w){if(o=(255&w)/255,o===1)return w;const p=w>>24&255,E=w>>16&255,L=w>>8&255,T=S>>24&255,A=S>>16&255,M=S>>8&255;return d=T+Math.round((p-T)*o),_=A+Math.round((E-A)*o),v=M+Math.round((L-M)*o),m.toRgba(d,_,v)},c.ensureContrastRatio=function(S,w,p){const E=f.relativeLuminance(S>>8),L=f.relativeLuminance(w>>8);if(l(E,L)<p){if(L<E){const M=g(S,w,p),z=l(E,f.relativeLuminance(M>>8));if(z<p){const Y=C(S,w,p);return z>l(E,f.relativeLuminance(Y>>8))?M:Y}return M}const T=C(S,w,p),A=l(E,f.relativeLuminance(T>>8));if(A<p){const M=g(S,w,p);return A>l(E,f.relativeLuminance(M>>8))?T:M}return T}},c.reduceLuminance=g,c.increaseLuminance=C,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=l},345:(P,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=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===d)return void this._listeners.splice(_,1)}}})),this._event}fire(d,_){const v=[];for(let o=0;o<this._listeners.length;o++)v.push(this._listeners[o]);for(let o=0;o<v.length;o++)v[o].call(void 0,d,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(d,_){return d((v=>_.fire(v)))},n.runAndSubscribe=function(d,_){return _(void 0),d((v=>_(v)))}},859:(P,n)=>{function d(_){for(const v of _)v.dispose();_.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 _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},n.toDisposable=function(_){return{dispose:_}},n.disposeArray=d,n.getDisposeArrayDisposable=function(_){return{dispose:()=>d(_)}}},485:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(v,o,m){this._data[v]||(this._data[v]={}),this._data[v][o]=m}get(v,o){return this._data[v]?this._data[v][o]:void 0}clear(){this._data={}}}n.TwoKeyMap=d,n.FourKeyMap=class{constructor(){this._data=new d}set(_,v,o,m,y){this._data.get(_,v)||this._data.set(_,v,new d),this._data.get(_,v).set(o,m,y)}get(_,v,o,m){var y;return(y=this._data.get(_,v))==null?void 0:y.get(o,m)}clear(){this._data.clear()}}},399:(P,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 d=n.isNode?"node":navigator.userAgent,_=n.isNode?"node":navigator.platform;n.isFirefox=d.includes("Firefox"),n.isLegacyEdge=d.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(d),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=d.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),n.isIpad=_==="iPad",n.isIphone=_==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),n.isLinux=_.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(d)},385:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const _=d(399);class v{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),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(y){this._idleCallback=void 0;let b=0,f=0,r=y.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),f=Math.max(b,f),h=y.timeRemaining(),1.5*f>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class o extends v{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const b=Date.now()+y;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=o,n.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:o,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},147:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(o){return[o>>>16&255,o>>>8&255,255&o]}static fromColorRGB(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]}clone(){const o=new d;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o}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=d;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(o){this._ext=o}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(o){this._ext&=-469762049,this._ext|=o<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(o){this._ext&=-67108864,this._ext|=67108863&o}get urlId(){return this._urlId}set urlId(o){this._urlId=o}get underlineVariantOffset(){const o=(3758096384&this._ext)>>29;return o<0?4294967288^o:o}set underlineVariantOffset(o){this._ext&=536870911,this._ext|=o<<29&3758096384}constructor(o=0,m=0){this._ext=0,this._urlId=0,this._ext=o,this._urlId=m}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=_},782:(P,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const _=d(133),v=d(855),o=d(147);class m extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const f=new m;return f.setFromCharData(b),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(b){this.fg=b[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(b[v.CHAR_DATA_CHAR_INDEX].length===2){const r=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[v.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=b[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=m},855:(P,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:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},n.utf32ToString=function(d,_=0,v=d.length){let o="";for(let m=_;m<v;++m){let y=d[m];y>65535?(y-=65536,o+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):o+=String.fromCharCode(y)}return o},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,_){const v=d.length;if(!v)return 0;let o=0,m=0;if(this._interim){const y=d.charCodeAt(m++);56320<=y&&y<=57343?_[o++]=1024*(this._interim-55296)+y-56320+65536:(_[o++]=this._interim,_[o++]=y),this._interim=0}for(let y=m;y<v;++y){const b=d.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,o;const f=d.charCodeAt(y);56320<=f&&f<=57343?_[o++]=1024*(b-55296)+f-56320+65536:(_[o++]=b,_[o++]=f)}else b!==65279&&(_[o++]=b)}return o}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,_){const v=d.length;if(!v)return 0;let o,m,y,b,f=0,r=0,h=0;if(this.interim[0]){let g=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let S,w=0;for(;(S=63&this.interim[++w])&&w<4;)C<<=6,C|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=p-w;for(;h<E;){if(h>=v)return 0;if(S=d[h++],(192&S)!=128){h--,g=!0;break}this.interim[w++]=S,C<<=6,C|=63&S}g||(p===2?C<128?h--:_[f++]=C:p===3?C<2048||C>=55296&&C<=57343||C===65279||(_[f++]=C):C<65536||C>1114111||(_[f++]=C)),this.interim.fill(0)}const l=v-4;let c=h;for(;c<v;){for(;!(!(c<l)||128&(o=d[c])||128&(m=d[c+1])||128&(y=d[c+2])||128&(b=d[c+3]));)_[f++]=o,_[f++]=m,_[f++]=y,_[f++]=b,c+=4;if(o=d[c++],o<128)_[f++]=o;else if((224&o)==192){if(c>=v)return this.interim[0]=o,f;if(m=d[c++],(192&m)!=128){c--;continue}if(r=(31&o)<<6|63&m,r<128){c--;continue}_[f++]=r}else if((240&o)==224){if(c>=v)return this.interim[0]=o,f;if(m=d[c++],(192&m)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=m,f;if(y=d[c++],(192&y)!=128){c--;continue}if(r=(15&o)<<12|(63&m)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;_[f++]=r}else if((248&o)==240){if(c>=v)return this.interim[0]=o,f;if(m=d[c++],(192&m)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=m,f;if(y=d[c++],(192&y)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=m,this.interim[2]=y,f;if(b=d[c++],(192&b)!=128){c--;continue}if(r=(7&o)<<18|(63&m)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;_[f++]=r}}return f}}},776:function(P,n,d){var _=this&&this.__decorate||function(r,h,l,c){var g,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,l,c);else for(var w=r.length-1;w>=0;w--)(g=r[w])&&(S=(C<3?g(S):C>3?g(h,l,S):g(h,l))||S);return C>3&&S&&Object.defineProperty(h,l,S),S},v=this&&this.__param||function(r,h){return function(l,c){h(l,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const o=d(859),m=d(97),y={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let b,f=n.LogService=class extends o.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,l){this._evalLazyOptionalParams(l),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...l)}trace(r,...h){var l;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var l;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var l;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var l;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var l;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=f=_([v(0,m.IOptionsService)],f),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,l){if(typeof l.value!="function")throw new Error("not supported");const c=l.value;l.value=function(...g){if(b.logLevel!==m.LogLevelEnum.TRACE)return c.apply(this,g);b.trace(`GlyphRenderer#${c.name}(${g.map((S=>JSON.stringify(S))).join(", ")})`);const C=c.apply(this,g);return b.trace(`GlyphRenderer#${c.name} return`,C),C}}},726:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const d="di$target",_="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[_]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const o=function(m,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,r,h){r[d]===r?r[_].push({id:f,index:h}):(r[_]=[{id:f,index:h}],r[d]=r)})(o,m,b)};return o.toString=()=>v,n.serviceRegistry.set(v,o),o}},97:(P,n,d)=>{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(726);var v;n.IBufferService=(0,_.createDecorator)("BufferService"),n.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),n.ICoreService=(0,_.createDecorator)("CoreService"),n.ICharsetService=(0,_.createDecorator)("CharsetService"),n.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(o){o[o.TRACE=0]="TRACE",o[o.DEBUG=1]="DEBUG",o[o.INFO=2]="INFO",o[o.WARN=3]="WARN",o[o.ERROR=4]="ERROR",o[o.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,_.createDecorator)("LogService"),n.IOptionsService=(0,_.createDecorator)("OptionsService"),n.IOscLinkService=(0,_.createDecorator)("OscLinkService"),n.IUnicodeService=(0,_.createDecorator)("UnicodeService"),n.IDecorationService=(0,_.createDecorator)("DecorationService")}},j={};function te(P){var n=j[P];if(n!==void 0)return n.exports;var d=j[P]={exports:{}};return $[P].call(d.exports,d,d.exports,te),d.exports}var re={};return(()=>{var P=re;Object.defineProperty(P,"__esModule",{value:!0}),P.WebglAddon=void 0;const n=te(345),d=te(859),_=te(399),v=te(666),o=te(776);class m extends d.Disposable{constructor(b){if(_.isSafari&&(0,_.getSafariVersion)()<16){const f={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",f))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=b,this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new n.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new n.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(b){const f=b._core;if(!b.element)return void this.register(f.onWillOpen((()=>this.activate(b))));this._terminal=b;const r=f.coreService,h=f.optionsService,l=f,c=l._renderService,g=l._characterJoinerService,C=l._charSizeService,S=l._coreBrowserService,w=l._decorationService,p=l._logService,E=l._themeService;(0,o.setTraceLogger)(p),this._renderer=this.register(new v.WebglRenderer(b,g,C,S,r,w,h,E,this._preserveDrawingBuffer)),this.register((0,n.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,n.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),c.setRenderer(this._renderer),this.register((0,d.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(b.cols,b.rows)})))}get textureAtlas(){var b;return(b=this._renderer)==null?void 0:b.textureAtlas}clearTextureAtlas(){var b;(b=this._renderer)==null||b.clearTextureAtlas()}}P.WebglAddon=m})(),re})()))})(ko)),ko.exports}var Kv=Vv();/**
|
|
114
|
+
}`)),this.register((0,v.toDisposable)((()=>A.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(A.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=A.createVertexArray(),A.bindVertexArray(this._vertexArrayObject);const M=new Float32Array([0,0,1,0,0,1,1,1]),N=A.createBuffer();this.register((0,v.toDisposable)((()=>A.deleteBuffer(N)))),A.bindBuffer(A.ARRAY_BUFFER,N),A.bufferData(A.ARRAY_BUFFER,M,A.STATIC_DRAW),A.enableVertexAttribArray(3),A.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const X=new Uint8Array([0,1,2,3]),z=A.createBuffer();this.register((0,v.toDisposable)((()=>A.deleteBuffer(z)))),A.bindBuffer(A.ELEMENT_ARRAY_BUFFER,z),A.bufferData(A.ELEMENT_ARRAY_BUFFER,X,A.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(A.createBuffer()),this.register((0,v.toDisposable)((()=>A.deleteBuffer(this._attributesBuffer)))),A.bindBuffer(A.ARRAY_BUFFER,this._attributesBuffer),A.enableVertexAttribArray(0),A.vertexAttribPointer(0,2,A.FLOAT,!1,y,0),A.vertexAttribDivisor(0,1),A.enableVertexAttribArray(1),A.vertexAttribPointer(1,2,A.FLOAT,!1,y,2*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(1,1),A.enableVertexAttribArray(2),A.vertexAttribPointer(2,4,A.FLOAT,!1,y,4*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(2,1),this._updateCachedColors(T.colors),this.register(this._themeService.onChangeColors((I=>{this._updateCachedColors(I),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(p){const E=this._gl;E.useProgram(this._program),E.bindVertexArray(this._vertexArrayObject),E.uniformMatrix4fv(this._projectionLocation,!1,m.PROJECTION_MATRIX),E.bindBuffer(E.ARRAY_BUFFER,this._attributesBuffer),E.bufferData(E.ARRAY_BUFFER,p.attributes,E.DYNAMIC_DRAW),E.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,E.UNSIGNED_BYTE,0,p.count)}handleResize(){this._updateViewportRectangle()}setDimensions(p){this._dimensions=p}_updateCachedColors(p){this._bgFloat=this._colorToFloat32Array(p.background),this._cursorFloat=this._colorToFloat32Array(p.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(p){const E=this._terminal,L=this._vertices;let T,A,M,N,X,z,I,G,D,H,R,O=1;for(T=0;T<E.rows;T++){for(M=-1,N=0,X=0,z=!1,A=0;A<E.cols;A++)I=(T*E.cols+A)*l.RENDER_MODEL_INDICIES_PER_CELL,G=p.cells[I+l.RENDER_MODEL_BG_OFFSET],D=p.cells[I+l.RENDER_MODEL_FG_OFFSET],H=!!(67108864&D),(G!==N||D!==X&&(z||H))&&((N!==0||z&&X!==0)&&(R=8*O++,this._updateRectangle(L,R,X,N,M,A,T)),M=A,N=G,X=D,z=H);(N!==0||z&&X!==0)&&(R=8*O++,this._updateRectangle(L,R,X,N,M,E.cols,T))}L.count=O}updateCursor(p){const E=this._verticesCursor,L=p.cursor;if(!L||L.style==="block")return void(E.count=0);let T,A=0;L.style!=="bar"&&L.style!=="outline"||(T=8*A++,this._addRectangleFloat(E.attributes,T,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(T=8*A++,this._addRectangleFloat(E.attributes,T,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(T=8*A++,this._addRectangleFloat(E.attributes,T,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),T=8*A++,this._addRectangleFloat(E.attributes,T,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),E.count=A}_updateRectangle(p,E,L,T,A,M,N){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:f=(16777215&L)<<8;break;default:f=this._themeService.colors.foreground.rgba}else switch(50331648&T){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&T].rgba;break;case 50331648:f=(16777215&T)<<8;break;default:f=this._themeService.colors.background.rgba}p.attributes.length<E+4&&(p.attributes=(0,m.expandFloat32Array)(p.attributes,this._terminal.rows*this._terminal.cols*8)),r=A*this._dimensions.device.cell.width,h=N*this._dimensions.device.cell.height,o=(f>>24&255)/255,c=(f>>16&255)/255,g=(f>>8&255)/255,C=1,this._addRectangle(p.attributes,E,r,h,(M-A)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,o,c,g,C)}_addRectangle(p,E,L,T,A,M,N,X,z,I){p[E]=L/this._dimensions.device.canvas.width,p[E+1]=T/this._dimensions.device.canvas.height,p[E+2]=A/this._dimensions.device.canvas.width,p[E+3]=M/this._dimensions.device.canvas.height,p[E+4]=N,p[E+5]=X,p[E+6]=z,p[E+7]=I}_addRectangleFloat(p,E,L,T,A,M,N){p[E]=L/this._dimensions.device.canvas.width,p[E+1]=T/this._dimensions.device.canvas.height,p[E+2]=A/this._dimensions.device.canvas.width,p[E+3]=M/this._dimensions.device.canvas.height,p[E+4]=N[0],p[E+5]=N[1],p[E+6]=N[2],p[E+7]=N[3]}_colorToFloat32Array(p){return new Float32Array([(p.rgba>>24&255)/255,(p.rgba>>16&255)/255,(p.rgba>>8&255)/255,(255&p.rgba)/255])}}n.RectangleRenderer=S},310:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderModel=n.COMBINED_CHAR_BIT_MASK=n.RENDER_MODEL_EXT_OFFSET=n.RENDER_MODEL_FG_OFFSET=n.RENDER_MODEL_BG_OFFSET=n.RENDER_MODEL_INDICIES_PER_CELL=void 0;const _=d(296);n.RENDER_MODEL_INDICIES_PER_CELL=4,n.RENDER_MODEL_BG_OFFSET=1,n.RENDER_MODEL_FG_OFFSET=2,n.RENDER_MODEL_EXT_OFFSET=3,n.COMBINED_CHAR_BIT_MASK=2147483648,n.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,_.createSelectionRenderModel)()}resize(v,l){const m=v*l*n.RENDER_MODEL_INDICIES_PER_CELL;m!==this.cells.length&&(this.cells=new Uint32Array(m),this.lineLengths=new Uint32Array(l))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;const _=d(820),v=d(274),l=d(627),m=d(457),y=d(56),b=d(374),f=d(345),r=d(859),h=d(147),o=d(782),c=d(855),g=d(965),C=d(742),S=d(310),w=d(733);class p extends r.Disposable{constructor(A,M,N,X,z,I,G,D,H){super(),this._terminal=A,this._characterJoinerService=M,this._charSizeService=N,this._coreBrowserService=X,this._coreService=z,this._decorationService=I,this._optionsService=G,this._themeService=D,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new S.RenderModel,this._workCell=new o.CellData,this._workCell2=new o.CellData,this._rectangleRenderer=this.register(new r.MutableDisposable),this._glyphRenderer=this.register(new r.MutableDisposable),this._onChangeTextureAtlas=this.register(new f.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new f.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new f.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new f.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new f.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new v.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new w.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,G,this._themeService)],this.dimensions=(0,b.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(G.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const R={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",R),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextlost",(O=>{console.log("webglcontextlost event received"),O.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(O)}),3e3)}))),this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextrestored",(O=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,l.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((O,$)=>this._setCanvasDevicePixelDimensions(O,$))),this.register(this._coreBrowserService.onWindowChange((O=>{this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,O,(($,Q)=>this._setCanvasDevicePixelDimensions($,Q)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,r.toDisposable)((()=>{var O;for(const $ of this._renderLayers)$.dispose();(O=this._canvas.parentElement)==null||O.removeChild(this._canvas),(0,l.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var A;return(A=this._charAtlas)==null?void 0:A.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(A,M){var N,X,z,I;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const G of this._renderLayers)G.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(N=this._rectangleRenderer.value)==null||N.setDimensions(this.dimensions),(X=this._rectangleRenderer.value)==null||X.handleResize(),(z=this._glyphRenderer.value)==null||z.setDimensions(this.dimensions),(I=this._glyphRenderer.value)==null||I.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var A;for(const M of this._renderLayers)M.handleBlur(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.pause(),this._requestRedrawViewport()}handleFocus(){var A;for(const M of this._renderLayers)M.handleFocus(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.resume(),this._requestRedrawViewport()}handleSelectionChanged(A,M,N){for(const X of this._renderLayers)X.handleSelectionChanged(this._terminal,A,M,N);this._model.selection.update(this._core,A,M,N),this._requestRedrawViewport()}handleCursorMove(){var A;for(const M of this._renderLayers)M.handleCursorMove(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new C.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new g.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var M;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const A=(0,l.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==A&&(this._onChangeTextureAtlas.fire(A.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,f.forwardEvent)(A.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,f.forwardEvent)(A.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=A,this._charAtlas.warmUp(),(M=this._glyphRenderer.value)==null||M.setAtlas(this._charAtlas)}_clearModel(A){var M;this._model.clear(),A&&((M=this._glyphRenderer.value)==null||M.clear())}clearTextureAtlas(){var A;(A=this._charAtlas)==null||A.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var A;this._clearModel(!0);for(const M of this._renderLayers)M.reset(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(A){return-1}deregisterCharacterJoiner(A){return!1}renderRows(A,M){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const N of this._renderLayers)N.handleGridChanged(this._terminal,A,M);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(A,M),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new m.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(A,M){const N=this._core;let X,z,I,G,D,H,R,O,$,Q,he,ue,F,k,re=this._workCell;A=L(A,N.rows-1,0),M=L(M,N.rows-1,0);const se=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,de=se-N.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,N.cols-1);let we=-1;const me=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let ze=!1;for(z=A;z<=M;z++)for(I=z+N.buffer.ydisp,G=N.buffer.lines.get(I),this._model.lineLengths[z]=0,D=this._characterJoinerService.getJoinedCharacters(I),F=0;F<N.cols;F++)if(X=this._cellColorResolver.result.bg,G.loadCell(F,re),F===0&&(X=this._cellColorResolver.result.bg),H=!1,R=F,D.length>0&&F===D[0][0]&&(H=!0,O=D.shift(),re=new E(re,G.translateToString(!0,O[0],O[1]),O[1]-O[0]),R=O[1]-1),$=re.getChars(),Q=re.getCode(),ue=(z*N.cols+F)*S.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(re,F,I,this.dimensions.device.cell.width),me&&I===se&&(F===fe&&(this._model.cursor={x:fe,y:de,width:re.getWidth(),style:this._coreBrowserService.isFocused?N.options.cursorStyle||"block":N.options.cursorInactiveStyle,cursorWidth:N.options.cursorWidth,dpr:this._devicePixelRatio},we=fe+re.getWidth()-1),F>=fe&&F<=we&&(this._coreBrowserService.isFocused&&(N.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&N.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),Q!==c.NULL_CELL_CODE&&(this._model.lineLengths[z]=F+1),(this._model.cells[ue]!==Q||this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(ze=!0,$.length>1&&(Q|=S.COMBINED_CHAR_BIT_MASK),this._model.cells[ue]=Q,this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,he=re.getWidth(),this._glyphRenderer.value.updateCell(F,z,Q,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,$,he,X),H))for(re=this._workCell,F++;F<R;F++)k=(z*N.cols+F)*S.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(F,z,c.NULL_CELL_CODE,0,0,0,c.NULL_CELL_CHAR,0,0),this._model.cells[k]=c.NULL_CELL_CODE,this._model.cells[k+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[k+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[k+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;ze&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),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._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(A,M){this._canvas.width===A&&this._canvas.height===M||(this._canvas.width=A,this._canvas.height=M,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const A=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:A,end:A})}}n.WebglRenderer=p;class E extends h.AttributeData{constructor(A,M,N){super(),this.content=0,this.combinedData="",this.fg=A.fg,this.bg=A.bg,this.combinedData=M,this._width=N}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(A){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(T,A,M=0){return Math.max(Math.min(T,A),M)}n.JoinedCellData=E},381:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;const _=d(374);function v(l,m,y){const b=(0,_.throwIfFalsy)(l.createShader(m));if(l.shaderSource(b,y),l.compileShader(b),l.getShaderParameter(b,l.COMPILE_STATUS))return b;console.error(l.getShaderInfoLog(b)),l.deleteShader(b)}n.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),n.createProgram=function(l,m,y){const b=(0,_.throwIfFalsy)(l.createProgram());if(l.attachShader(b,(0,_.throwIfFalsy)(v(l,l.VERTEX_SHADER,m))),l.attachShader(b,(0,_.throwIfFalsy)(v(l,l.FRAGMENT_SHADER,y))),l.linkProgram(b),l.getProgramParameter(b,l.LINK_STATUS))return b;console.error(l.getProgramInfoLog(b)),l.deleteProgram(b)},n.createShader=v,n.expandFloat32Array=function(l,m){const y=Math.min(2*l.length,m),b=new Float32Array(y);for(let f=0;f<l.length;f++)b[f]=l[f];return b},n.GLTexture=class{constructor(l){this.texture=l,this.version=-1}}},592:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const _=d(627),v=d(237),l=d(374),m=d(859);class y extends m.Disposable{constructor(f,r,h,o,c,g,C,S){super(),this._container=r,this._alpha=c,this._coreBrowserService=g,this._optionsService=C,this._themeService=S,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${h}-layer`),this._canvas.style.zIndex=o.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((w=>{this._refreshCharAtlas(f,w),this.reset(f)}))),this.register((0,m.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,l.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(f){}handleFocus(f){}handleCursorMove(f){}handleGridChanged(f,r,h){}handleSelectionChanged(f,r,h,o=!1){}_setTransparency(f,r){if(r===this._alpha)return;const h=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(f,this._themeService.colors),this.handleGridChanged(f,0,f.rows-1)}_refreshCharAtlas(f,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,_.acquireTextureAtlas)(f,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(f,r){this._deviceCellWidth=r.device.cell.width,this._deviceCellHeight=r.device.cell.height,this._deviceCharWidth=r.device.char.width,this._deviceCharHeight=r.device.char.height,this._deviceCharLeft=r.device.char.left,this._deviceCharTop=r.device.char.top,this._canvas.width=r.device.canvas.width,this._canvas.height=r.device.canvas.height,this._canvas.style.width=`${r.css.canvas.width}px`,this._canvas.style.height=`${r.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(f,this._themeService.colors)}_fillBottomLineAtCells(f,r,h=1){this._ctx.fillRect(f*this._deviceCellWidth,(r+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,h*this._deviceCellWidth,this._coreBrowserService.dpr)}_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(f,r,h,o){this._alpha?this._ctx.clearRect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(f,r,h,o){this._ctx.font=this._getFont(f,!1,!1),this._ctx.textBaseline=v.TEXT_BASELINE,this._clipCell(h,o,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(f,r,h){this._ctx.beginPath(),this._ctx.rect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(f,r,h){return`${h?"italic":""} ${r?f.options.fontWeightBold:f.options.fontWeight} ${f.options.fontSize*this._coreBrowserService.dpr}px ${f.options.fontFamily}`}}n.BaseRenderLayer=y},733:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const _=d(197),v=d(237),l=d(592);class m extends l.BaseRenderLayer{constructor(b,f,r,h,o,c,g){super(r,b,"link",f,!0,o,c,g),this.register(h.onShowLinkUnderline((C=>this._handleShowLinkUnderline(C)))),this.register(h.onHideLinkUnderline((C=>this._handleHideLinkUnderline(C))))}resize(b,f){super.resize(b,f),this._state=void 0}reset(b){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const b=this._state.y2-this._state.y1-1;b>0&&this._clearCells(0,this._state.y1+1,this._state.cols,b),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(b){if(b.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:b.fg!==void 0&&(0,_.is256Color)(b.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[b.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,b.y1===b.y2)this._fillBottomLineAtCells(b.x1,b.y1,b.x2-b.x1);else{this._fillBottomLineAtCells(b.x1,b.y1,b.cols-b.x1);for(let f=b.y1+1;f<b.y2;f++)this._fillBottomLineAtCells(0,f,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}n.LinkRenderLayer=m},820:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(d,_,v,l){d.addEventListener(_,v,l);let m=!1;return{dispose:()=>{m||(m=!0,d.removeEventListener(_,v,l))}}}},274:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const _=d(855),v=d(160),l=d(374);let m,y=0,b=0,f=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(c,g,C,S,w,p){this._terminal=c,this._optionService=g,this._selectionRenderModel=C,this._decorationService=S,this._coreBrowserService=w,this._themeService=p,this.result={fg:0,bg:0,ext:0}}resolve(c,g,C,S){if(this.result.bg=c.bg,this.result.fg=c.fg,this.result.ext=268435456&c.bg?c.extended.ext:0,b=0,y=0,r=!1,f=!1,h=!1,m=this._themeService.colors,o=0,c.getCode()!==_.NULL_CELL_CODE&&c.extended.underlineStyle===4){const w=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=g*S%(2*Math.round(w))}if(this._decorationService.forEachDecorationAtCell(g,C,"bottom",(w=>{w.backgroundColorRGB&&(b=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba>>8&16777215,f=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,g,C),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}b=v.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,m.selectionForeground&&(y=m.selectionForeground.rgba>>8&16777215,f=!0),(0,l.treatGlyphAsBackgroundColor)(c.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)y=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}y=v.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}f=!0}}this._decorationService.forEachDecorationAtCell(g,C,"top",(w=>{w.backgroundColorRGB&&(b=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba>>8&16777215,f=!0)})),r&&(b=h?-16777216&c.bg&-134217729|b|50331648:-16777216&c.bg|b|50331648),f&&(y=-16777216&c.fg&-67108865|y|50331648),67108864&this.result.fg&&(r&&!f&&(y=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&m.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,f=!0),!r&&f&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&m.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),m=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=f?y:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const _=d(509),v=d(197),l=[];n.acquireTextureAtlas=function(m,y,b,f,r,h,o,c){const g=(0,v.generateConfig)(f,r,h,o,y,b,c);for(let w=0;w<l.length;w++){const p=l[w],E=p.ownedBy.indexOf(m);if(E>=0){if((0,v.configEquals)(p.config,g))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),l.splice(w,1)):p.ownedBy.splice(E,1);break}}for(let w=0;w<l.length;w++){const p=l[w];if((0,v.configEquals)(p.config,g))return p.ownedBy.push(m),p.atlas}const C=m._core,S={atlas:new _.TextureAtlas(document,g,C.unicodeService),config:g,ownedBy:[m]};return l.push(S),S.atlas},n.removeTerminalFromCache=function(m){for(let y=0;y<l.length;y++){const b=l[y].ownedBy.indexOf(m);if(b!==-1){l[y].ownedBy.length===1?(l[y].atlas.dispose(),l.splice(y,1)):l[y].ownedBy.splice(b,1);break}}}},197:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const _=d(160);n.generateConfig=function(v,l,m,y,b,f,r){const h={foreground:f.foreground,background:f.background,cursor:_.NULL_COLOR,cursorAccent:_.NULL_COLOR,selectionForeground:_.NULL_COLOR,selectionBackgroundTransparent:_.NULL_COLOR,selectionBackgroundOpaque:_.NULL_COLOR,selectionInactiveBackgroundTransparent:_.NULL_COLOR,selectionInactiveBackgroundOpaque:_.NULL_COLOR,ansi:f.ansi.slice(),contrastCache:f.contrastCache,halfContrastCache:f.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:v,deviceCellHeight:l,deviceCharWidth:m,deviceCharHeight:y,fontFamily:b.fontFamily,fontSize:b.fontSize,fontWeight:b.fontWeight,fontWeightBold:b.fontWeightBold,allowTransparency:b.allowTransparency,drawBoldTextInBrightColors:b.drawBoldTextInBrightColors,minimumContrastRatio:b.minimumContrastRatio,colors:h}},n.configEquals=function(v,l){for(let m=0;m<v.colors.ansi.length;m++)if(v.colors.ansi[m].rgba!==l.colors.ansi[m].rgba)return!1;return v.devicePixelRatio===l.devicePixelRatio&&v.customGlyphs===l.customGlyphs&&v.lineHeight===l.lineHeight&&v.letterSpacing===l.letterSpacing&&v.fontFamily===l.fontFamily&&v.fontSize===l.fontSize&&v.fontWeight===l.fontWeight&&v.fontWeightBold===l.fontWeightBold&&v.allowTransparency===l.allowTransparency&&v.deviceCharWidth===l.deviceCharWidth&&v.deviceCharHeight===l.deviceCharHeight&&v.drawBoldTextInBrightColors===l.drawBoldTextInBrightColors&&v.minimumContrastRatio===l.minimumContrastRatio&&v.colors.foreground.rgba===l.colors.foreground.rgba&&v.colors.background.rgba===l.colors.background.rgba},n.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const _=d(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},457:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(d,_){this._renderCallback=d,this._coreBrowserService=_,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(d=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,_>0)return void this._restartInterval(_)}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 _=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(_)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),d)}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:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const _=d(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 v={"░":[[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:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╒":{1:(f,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(f,r)=>`M${.5-f},1 L${.5-f},.5 L1,.5 M${.5+f},.5 L${.5+f},1`},"╔":{1:(f,r)=>`M1,${.5-r} L${.5-f},${.5-r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1`},"╕":{1:(f,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(f,r)=>`M${.5+f},1 L${.5+f},.5 L0,.5 M${.5-f},.5 L${.5-f},1`},"╗":{1:(f,r)=>`M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M0,${.5-r} L${.5+f},${.5-r} L${.5+f},1`},"╘":{1:(f,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(f,r)=>`M1,.5 L${.5-f},.5 L${.5-f},0 M${.5+f},.5 L${.5+f},0`},"╚":{1:(f,r)=>`M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0 M1,${.5+r} L${.5-f},${.5+r} L${.5-f},0`},"╛":{1:(f,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(f,r)=>`M0,.5 L${.5+f},.5 L${.5+f},0 M${.5-f},.5 L${.5-f},0`},"╝":{1:(f,r)=>`M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M0,${.5+r} L${.5+f},${.5+r} L${.5+f},0`},"╞":{1:(f,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1 M${.5+f},.5 L1,.5`},"╠":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╡":{1:(f,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(f,r)=>`M0,.5 L${.5-f},.5 M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╣":{1:(f,r)=>`M${.5+f},0 L${.5+f},1 M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0`},"╤":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},.5 L${.5-f},1 M${.5+f},.5 L${.5+f},1`},"╦":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1`},"╧":{1:(f,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},.5 L${.5-f},0 M${.5+f},.5 L${.5+f},0`},"╩":{1:(f,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╪":{1:(f,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╬":{1:(f,r)=>`M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1 M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},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:(f,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(f,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(f,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(f,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.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(f,r,h,o,c,g,C,S){const w=n.blockElementDefinitions[r];if(w)return(function(T,A,M,N,X,z){for(let I=0;I<A.length;I++){const G=A[I],D=X/8,H=z/8;T.fillRect(M+G.x*D,N+G.y*H,G.w*D,G.h*H)}})(f,w,h,o,c,g),!0;const p=v[r];if(p)return(function(T,A,M,N,X,z){let I=l.get(A);I||(I=new Map,l.set(A,I));const G=T.fillStyle;if(typeof G!="string")throw new Error(`Unexpected fillStyle type "${G}"`);let D=I.get(G);if(!D){const H=A[0].length,R=A.length,O=T.canvas.ownerDocument.createElement("canvas");O.width=H,O.height=R;const $=(0,_.throwIfFalsy)(O.getContext("2d")),Q=new ImageData(H,R);let he,ue,F,k;if(G.startsWith("#"))he=parseInt(G.slice(1,3),16),ue=parseInt(G.slice(3,5),16),F=parseInt(G.slice(5,7),16),k=G.length>7&&parseInt(G.slice(7,9),16)||1;else{if(!G.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${G}" when drawing pattern glyph`);[he,ue,F,k]=G.substring(5,G.length-1).split(",").map((re=>parseFloat(re)))}for(let re=0;re<R;re++)for(let se=0;se<H;se++)Q.data[4*(re*H+se)]=he,Q.data[4*(re*H+se)+1]=ue,Q.data[4*(re*H+se)+2]=F,Q.data[4*(re*H+se)+3]=A[re][se]*(255*k);$.putImageData(Q,0,0),D=(0,_.throwIfFalsy)(T.createPattern(O,null)),I.set(G,D)}T.fillStyle=D,T.fillRect(M,N,X,z)})(f,p,h,o,c,g),!0;const E=n.boxDrawingDefinitions[r];if(E)return(function(T,A,M,N,X,z,I){T.strokeStyle=T.fillStyle;for(const[G,D]of Object.entries(A)){let H;T.beginPath(),T.lineWidth=I*Number.parseInt(G),H=typeof D=="function"?D(.15,.15/z*X):D;for(const R of H.split(" ")){const O=R[0],$=y[O];if(!$){console.error(`Could not find drawing instructions for "${O}"`);continue}const Q=R.substring(1).split(",");Q[0]&&Q[1]&&$(T,b(Q,X,z,M,N,!0,I))}T.stroke(),T.closePath()}})(f,E,h,o,c,g,S),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(T,A,M,N,X,z,I,G){const D=new Path2D;D.rect(M,N,X,z),T.clip(D),T.beginPath();const H=I/12;T.lineWidth=G*H;for(const R of A.d.split(" ")){const O=R[0],$=y[O];if(!$){console.error(`Could not find drawing instructions for "${O}"`);continue}const Q=R.substring(1).split(",");Q[0]&&Q[1]&&$(T,b(Q,X,z,M,N,!1,G,(A.leftPadding??0)*(H/2),(A.rightPadding??0)*(H/2)))}A.type===1?(T.strokeStyle=T.fillStyle,T.stroke()):T.fill(),T.closePath()})(f,L,h,o,c,g,C,S),!0)};const l=new Map;function m(f,r,h=0){return Math.max(Math.min(f,r),h)}const y={C:(f,r)=>f.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(f,r)=>f.lineTo(r[0],r[1]),M:(f,r)=>f.moveTo(r[0],r[1])};function b(f,r,h,o,c,g,C,S=0,w=0){const p=f.map((E=>parseFloat(E)||parseInt(E)));if(p.length<2)throw new Error("Too few arguments for instruction");for(let E=0;E<p.length;E+=2)p[E]*=r-S*C-w*C,g&&p[E]!==0&&(p[E]=m(Math.round(p[E]+.5)-.5,r,0)),p[E]+=o+S*C;for(let E=1;E<p.length;E+=2)p[E]*=h,g&&p[E]!==0&&(p[E]=m(Math.round(p[E]+.5)-.5,h,0)),p[E]+=c;return p}},56:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const _=d(859);n.observeDevicePixelDimensions=function(v,l,m){let y=new l.ResizeObserver((b=>{const f=b.find((o=>o.target===v));if(!f)return;if(!("devicePixelContentBoxSize"in f))return y==null||y.disconnect(),void(y=void 0);const r=f.devicePixelContentBoxSize[0].inlineSize,h=f.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&m(r,h)}));try{y.observe(v,{box:["device-pixel-content-box"]})}catch{y.disconnect(),y=void 0}return(0,_.toDisposable)((()=>y==null?void 0:y.disconnect()))}},374:(q,n)=>{function d(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=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(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=d,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=_,n.allowRescaling=function(v,l,m,y){return l===1&&m>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!_(v)&&!d(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return d(v)||(function(l){return 9472<=l&&l<=9631})(v)},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(v,l,m=0){return(v-(2*Math.round(l)-m))%(2*Math.round(l))}},296:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class d{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(v,l,m,y=!1){if(this.selectionStart=l,this.selectionEnd=m,!l||!m||l[0]===m[0]&&l[1]===m[1])return void this.clear();const b=v.buffers.active.ydisp,f=l[1]-b,r=m[1]-b,h=Math.max(f,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=f,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=m[0])}isCellSelected(v,l,m){return!!this.hasSelection&&(m-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&m>=this.viewportCappedStartRow&&l<this.endCol&&m<=this.viewportCappedEndRow:l<this.startCol&&m>=this.viewportCappedStartRow&&l>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&l>=this.startCol)}}n.createSelectionRenderModel=function(){return new d}},509:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const _=d(237),v=d(860),l=d(374),m=d(160),y=d(345),b=d(485),f=d(385),r=d(147),h=d(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 c;class g{get pages(){return this._pages}constructor(E,L,T){this._document=E,this._config=L,this._unicodeService=T,this._didWarmUp=!1,this._cacheMap=new b.FourKeyMap,this._cacheMapCombined=new b.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new y.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new y.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=w(E,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 E of this.pages)E.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const E=new f.IdleTaskQueue;for(let L=33;L<126;L++)E.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const T=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,T)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const E of this._pages)E.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(g.maxAtlasPages&&this._pages.length>=Math.max(4,g.maxAtlasPages)){const L=this._pages.filter((I=>2*I.canvas.width<=(g.maxTextureSize||4096))).sort(((I,G)=>G.canvas.width!==I.canvas.width?G.canvas.width-I.canvas.width:G.percentageUsed-I.percentageUsed));let T=-1,A=0;for(let I=0;I<L.length;I++)if(L[I].canvas.width!==A)T=I,A=L[I].canvas.width;else if(I-T==3)break;const M=L.slice(T,T+4),N=M.map((I=>I.glyphs[0].texturePage)).sort(((I,G)=>I>G?1:-1)),X=this.pages.length-M.length,z=this._mergePages(M,X);z.version++;for(let I=N.length-1;I>=0;I--)this._deletePage(N[I]);this.pages.push(z),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(z.canvas)}const E=new C(this._document,this._textureSize);return this._pages.push(E),this._activePages.push(E),this._onAddTextureAtlasCanvas.fire(E.canvas),E}_mergePages(E,L){const T=2*E[0].canvas.width,A=new C(this._document,T,E);for(const[M,N]of E.entries()){const X=M*N.canvas.width%T,z=Math.floor(M/2)*N.canvas.height;A.ctx.drawImage(N.canvas,X,z);for(const G of N.glyphs)G.texturePage=L,G.sizeClipSpace.x=G.size.x/T,G.sizeClipSpace.y=G.size.y/T,G.texturePosition.x+=X,G.texturePosition.y+=z,G.texturePositionClipSpace.x=G.texturePosition.x/T,G.texturePositionClipSpace.y=G.texturePosition.y/T;this._onRemoveTextureAtlasCanvas.fire(N.canvas);const I=this._activePages.indexOf(N);I!==-1&&this._activePages.splice(I,1)}return A}_deletePage(E){this._pages.splice(E,1);for(let L=E;L<this._pages.length;L++){const T=this._pages[L];for(const A of T.glyphs)A.texturePage--;T.version++}}getRasterizedGlyphCombinedChar(E,L,T,A,M){return this._getFromCacheMap(this._cacheMapCombined,E,L,T,A,M)}getRasterizedGlyph(E,L,T,A,M){return this._getFromCacheMap(this._cacheMap,E,L,T,A,M)}_getFromCacheMap(E,L,T,A,M,N=!1){return c=E.get(L,T,A,M),c||(c=this._drawToCache(L,T,A,M,N),E.set(L,T,A,M,c)),c}_getColorFromAnsiIndex(E){if(E>=this._config.colors.ansi.length)throw new Error("No color found for idx "+E);return this._config.colors.ansi[E]}_getBackgroundColor(E,L,T,A){if(this._config.allowTransparency)return m.NULL_COLOR;let M;switch(E){case 16777216:case 33554432:M=this._getColorFromAnsiIndex(L);break;case 50331648:const N=r.AttributeData.toColorRGB(L);M=m.channels.toColor(N[0],N[1],N[2]);break;default:M=T?m.color.opaque(this._config.colors.foreground):this._config.colors.background}return M}_getForegroundColor(E,L,T,A,M,N,X,z,I,G){const D=this._getMinimumContrastColor(E,L,T,A,M,N,X,I,z,G);if(D)return D;let H;switch(M){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&I&&N<8&&(N+=8),H=this._getColorFromAnsiIndex(N);break;case 50331648:const R=r.AttributeData.toColorRGB(N);H=m.channels.toColor(R[0],R[1],R[2]);break;default:H=X?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=m.color.opaque(H)),z&&(H=m.color.multiplyOpacity(H,_.DIM_OPACITY)),H}_resolveBackgroundRgba(E,L,T){switch(E){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return T?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(E,L,T,A){switch(E){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&A&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return T?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(E,L,T,A,M,N,X,z,I,G){if(this._config.minimumContrastRatio===1||G)return;const D=this._getContrastCache(I),H=D.getColor(E,A);if(H!==void 0)return H||void 0;const R=this._resolveBackgroundRgba(L,T,X),O=this._resolveForegroundRgba(M,N,X,z),$=m.rgba.ensureContrastRatio(R,O,this._config.minimumContrastRatio/(I?2:1));if(!$)return void D.setColor(E,A,null);const Q=m.channels.toColor($>>24&255,$>>16&255,$>>8&255);return D.setColor(E,A,Q),Q}_getContrastCache(E){return E?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(E,L,T,A,M=!1){const N=typeof E=="number"?String.fromCharCode(E):E,X=Math.min(this._config.deviceCellWidth*Math.max(N.length,2)+4,this._textureSize);this._tmpCanvas.width<X&&(this._tmpCanvas.width=X);const z=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<z&&(this._tmpCanvas.height=z),this._tmpCtx.save(),this._workAttributeData.fg=T,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=A,this._workAttributeData.isInvisible())return o;const I=!!this._workAttributeData.isBold(),G=!!this._workAttributeData.isInverse(),D=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),R=!!this._workAttributeData.isUnderline(),O=!!this._workAttributeData.isStrikethrough(),$=!!this._workAttributeData.isOverline();let Q=this._workAttributeData.getFgColor(),he=this._workAttributeData.getFgColorMode(),ue=this._workAttributeData.getBgColor(),F=this._workAttributeData.getBgColorMode();if(G){const _e=Q;Q=ue,ue=_e;const be=he;he=F,F=be}const k=this._getBackgroundColor(F,ue,G,D);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=k.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const re=I?this._config.fontWeightBold:this._config.fontWeight,se=H?"italic":"";this._tmpCtx.font=`${se} ${re} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=_.TEXT_BASELINE;const de=N.length===1&&(0,l.isPowerlineGlyph)(N.charCodeAt(0)),fe=N.length===1&&(0,l.isRestrictedPowerlineGlyph)(N.charCodeAt(0)),we=this._getForegroundColor(L,F,ue,T,he,Q,G,D,I,(0,l.treatGlyphAsBackgroundColor)(N.charCodeAt(0)));this._tmpCtx.fillStyle=we.css;const me=fe?0:4;let ze=!1;this._config.customGlyphs!==!1&&(ze=(0,v.tryDrawCustomChar)(this._tmpCtx,N,me,me,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Ke,Se=!de;if(Ke=typeof E=="number"?this._unicodeService.wcwidth(E):this._unicodeService.getStringCellWidth(E),R){this._tmpCtx.save();const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),be=_e%2==1?.5:0;if(this._tmpCtx.lineWidth=_e,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Se=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Se=!1;let Je=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Je<8&&(Je+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Je).css}this._tmpCtx.beginPath();const Qe=me,Pe=Math.ceil(me+this._config.deviceCharHeight)-be-(M?2*_e:0),Ut=Pe+_e,ot=Pe+2*_e;let bt=this._workAttributeData.getUnderlineVariantOffset();for(let Je=0;Je<Ke;Je++){this._tmpCtx.save();const qe=Qe+Je*this._config.deviceCellWidth,Re=Qe+(Je+1)*this._config.deviceCellWidth,Vt=qe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Re,Pe),this._tmpCtx.moveTo(qe,ot),this._tmpCtx.lineTo(Re,ot);break;case 3:const ht=_e<=1?ot:Math.ceil(me+this._config.deviceCharHeight-_e/2)-be,Mt=_e<=1?Pe:Math.ceil(me+this._config.deviceCharHeight+_e/2)-be,pt=new Path2D;pt.rect(qe,Pe,this._config.deviceCellWidth,ot-Pe),this._tmpCtx.clip(pt),this._tmpCtx.moveTo(qe-this._config.deviceCellWidth/2,Ut),this._tmpCtx.bezierCurveTo(qe-this._config.deviceCellWidth/2,Mt,qe,Mt,qe,Ut),this._tmpCtx.bezierCurveTo(qe,ht,Vt,ht,Vt,Ut),this._tmpCtx.bezierCurveTo(Vt,Mt,Re,Mt,Re,Ut),this._tmpCtx.bezierCurveTo(Re,ht,Re+this._config.deviceCellWidth/2,ht,Re+this._config.deviceCellWidth/2,Ut);break;case 4:const vs=bt===0?0:bt>=_e?2*_e-bt:_e-bt;bt>=_e||vs===0?(this._tmpCtx.setLineDash([Math.round(_e),Math.round(_e)]),this._tmpCtx.moveTo(qe+vs,Pe),this._tmpCtx.lineTo(Re,Pe)):(this._tmpCtx.setLineDash([Math.round(_e),Math.round(_e)]),this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(qe+vs,Pe),this._tmpCtx.moveTo(qe+vs+_e,Pe),this._tmpCtx.lineTo(Re,Pe)),bt=(0,l.computeNextVariantOffset)(Re-qe,_e,bt);break;case 5:const ua=.6,fa=.3,wi=Re-qe,Yi=Math.floor(ua*wi),Vi=Math.floor(fa*wi),ri=wi-Yi-Vi;this._tmpCtx.setLineDash([Yi,Vi,ri]),this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Re,Pe);break;default:this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Re,Pe)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ze&&this._config.fontSize>=12&&!this._config.allowTransparency&&N!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Je=this._tmpCtx.measureText(N);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Je&&Je.actualBoundingBoxDescent>0){this._tmpCtx.save();const qe=new Path2D;qe.rect(Qe,Pe-Math.ceil(_e/2),this._config.deviceCellWidth*Ke,ot-Pe+Math.ceil(_e/2)),this._tmpCtx.clip(qe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=k.css,this._tmpCtx.strokeText(N,me,me+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if($){const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),be=_e%2==1?.5:0;this._tmpCtx.lineWidth=_e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(me,me+be),this._tmpCtx.lineTo(me+this._config.deviceCharWidth*Ke,me+be),this._tmpCtx.stroke()}if(ze||this._tmpCtx.fillText(N,me,me+this._config.deviceCharHeight),N==="_"&&!this._config.allowTransparency){let _e=S(this._tmpCtx.getImageData(me,me,this._config.deviceCellWidth,this._config.deviceCellHeight),k,we,Se);if(_e)for(let be=1;be<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=k.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(N,me,me+this._config.deviceCharHeight-be),_e=S(this._tmpCtx.getImageData(me,me,this._config.deviceCellWidth,this._config.deviceCellHeight),k,we,Se),_e);be++);}if(O){const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),be=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=_e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(me,me+Math.floor(this._config.deviceCharHeight/2)-be),this._tmpCtx.lineTo(me+this._config.deviceCharWidth*Ke,me+Math.floor(this._config.deviceCharHeight/2)-be),this._tmpCtx.stroke()}this._tmpCtx.restore();const Dt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Jt;if(Jt=this._config.allowTransparency?(function(_e){for(let be=0;be<_e.data.length;be+=4)if(_e.data[be+3]>0)return!1;return!0})(Dt):S(Dt,k,we,Se),Jt)return o;const Be=this._findGlyphBoundingBox(Dt,this._workBoundingBox,X,fe,ze,me);let Ae,De;for(;;){if(this._activePages.length===0){const _e=this._createNewPage();Ae=_e,De=_e.currentRow,De.height=Be.size.y;break}Ae=this._activePages[this._activePages.length-1],De=Ae.currentRow;for(const _e of this._activePages)Be.size.y<=_e.currentRow.height&&(Ae=_e,De=_e.currentRow);for(let _e=this._activePages.length-1;_e>=0;_e--)for(const be of this._activePages[_e].fixedRows)be.height<=De.height&&Be.size.y<=be.height&&(Ae=this._activePages[_e],De=be);if(De.y+Be.size.y>=Ae.canvas.height||De.height>Be.size.y+2){let _e=!1;if(Ae.currentRow.y+Ae.currentRow.height+Be.size.y>=Ae.canvas.height){let be;for(const Qe of this._activePages)if(Qe.currentRow.y+Qe.currentRow.height+Be.size.y<Qe.canvas.height){be=Qe;break}if(be)Ae=be;else if(g.maxAtlasPages&&this._pages.length>=g.maxAtlasPages&&De.y+Be.size.y<=Ae.canvas.height&&De.height>=Be.size.y&&De.x+Be.size.x<=Ae.canvas.width)_e=!0;else{const Qe=this._createNewPage();Ae=Qe,De=Qe.currentRow,De.height=Be.size.y,_e=!0}}_e||(Ae.currentRow.height>0&&Ae.fixedRows.push(Ae.currentRow),De={x:0,y:Ae.currentRow.y+Ae.currentRow.height,height:Be.size.y},Ae.fixedRows.push(De),Ae.currentRow={x:0,y:De.y+De.height,height:0})}if(De.x+Be.size.x<=Ae.canvas.width)break;De===Ae.currentRow?(De.x=0,De.y+=De.height,De.height=0):Ae.fixedRows.splice(Ae.fixedRows.indexOf(De),1)}return Be.texturePage=this._pages.indexOf(Ae),Be.texturePosition.x=De.x,Be.texturePosition.y=De.y,Be.texturePositionClipSpace.x=De.x/Ae.canvas.width,Be.texturePositionClipSpace.y=De.y/Ae.canvas.height,Be.sizeClipSpace.x/=Ae.canvas.width,Be.sizeClipSpace.y/=Ae.canvas.height,De.height=Math.max(De.height,Be.size.y),De.x+=Be.size.x,Ae.ctx.putImageData(Dt,Be.texturePosition.x-this._workBoundingBox.left,Be.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Be.size.x,Be.size.y),Ae.addGlyph(Be),Ae.version++,Be}_findGlyphBoundingBox(E,L,T,A,M,N){L.top=0;const X=A?this._config.deviceCellHeight:this._tmpCanvas.height,z=A?this._config.deviceCellWidth:T;let I=!1;for(let G=0;G<X;G++){for(let D=0;D<z;D++){const H=G*this._tmpCanvas.width*4+4*D+3;if(E.data[H]!==0){L.top=G,I=!0;break}}if(I)break}L.left=0,I=!1;for(let G=0;G<N+z;G++){for(let D=0;D<X;D++){const H=D*this._tmpCanvas.width*4+4*G+3;if(E.data[H]!==0){L.left=G,I=!0;break}}if(I)break}L.right=z,I=!1;for(let G=N+z-1;G>=N;G--){for(let D=0;D<X;D++){const H=D*this._tmpCanvas.width*4+4*G+3;if(E.data[H]!==0){L.right=G,I=!0;break}}if(I)break}L.bottom=X,I=!1;for(let G=X-1;G>=0;G--){for(let D=0;D<z;D++){const H=G*this._tmpCanvas.width*4+4*D+3;if(E.data[H]!==0){L.bottom=G,I=!0;break}}if(I)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+N+(A||M?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+N+(A||M?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=g;class C{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(E){this._glyphs.push(E),this._usedPixels+=E.size.x*E.size.y}constructor(E,L,T){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],T)for(const A of T)this._glyphs.push(...A.glyphs),this._usedPixels+=A._usedPixels;this.canvas=w(E,L,L),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 S(p,E,L,T){const A=E.rgba>>>24,M=E.rgba>>>16&255,N=E.rgba>>>8&255,X=L.rgba>>>24,z=L.rgba>>>16&255,I=L.rgba>>>8&255,G=Math.floor((Math.abs(A-X)+Math.abs(M-z)+Math.abs(N-I))/12);let D=!0;for(let H=0;H<p.data.length;H+=4)p.data[H]===A&&p.data[H+1]===M&&p.data[H+2]===N||T&&Math.abs(p.data[H]-A)+Math.abs(p.data[H+1]-M)+Math.abs(p.data[H+2]-N)<G?p.data[H+3]=0:D=!1;return D}function w(p,E,L){const T=p.createElement("canvas");return T.width=E,T.height=L,T}},160:(q,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 d=0,_=0,v=0,l=0;var m,y,b,f,r;function h(c){const g=c.toString(16);return g.length<2?"0"+g:g}function o(c,g){return c<g?(g+.05)/(c+.05):(c+.05)/(g+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(g,C,S,w){return w!==void 0?`#${h(g)}${h(C)}${h(S)}${h(w)}`:`#${h(g)}${h(C)}${h(S)}`},c.toRgba=function(g,C,S,w=255){return(g<<24|C<<16|S<<8|w)>>>0},c.toColor=function(g,C,S,w){return{css:c.toCss(g,C,S,w),rgba:c.toRgba(g,C,S,w)}}})(m||(n.channels=m={})),(function(c){function g(C,S){return l=Math.round(255*S),[d,_,v]=r.toChannels(C.rgba),{css:m.toCss(d,_,v,l),rgba:m.toRgba(d,_,v,l)}}c.blend=function(C,S){if(l=(255&S.rgba)/255,l===1)return{css:S.css,rgba:S.rgba};const w=S.rgba>>24&255,p=S.rgba>>16&255,E=S.rgba>>8&255,L=C.rgba>>24&255,T=C.rgba>>16&255,A=C.rgba>>8&255;return d=L+Math.round((w-L)*l),_=T+Math.round((p-T)*l),v=A+Math.round((E-A)*l),{css:m.toCss(d,_,v),rgba:m.toRgba(d,_,v)}},c.isOpaque=function(C){return(255&C.rgba)==255},c.ensureContrastRatio=function(C,S,w){const p=r.ensureContrastRatio(C.rgba,S.rgba,w);if(p)return m.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(C){const S=(255|C.rgba)>>>0;return[d,_,v]=r.toChannels(S),{css:m.toCss(d,_,v),rgba:S}},c.opacity=g,c.multiplyOpacity=function(C,S){return l=255&C.rgba,g(C,l*S/255)},c.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(y||(n.color=y={})),(function(c){let g,C;try{const S=document.createElement("canvas");S.width=1,S.height=1;const w=S.getContext("2d",{willReadFrequently:!0});w&&(g=w,g.globalCompositeOperation="copy",C=g.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),m.toColor(d,_,v);case 5:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),l=parseInt(S.slice(4,5).repeat(2),16),m.toColor(d,_,v,l);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const w=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return d=parseInt(w[1]),_=parseInt(w[2]),v=parseInt(w[3]),l=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),m.toColor(d,_,v,l);if(!g||!C)throw new Error("css.toColor: Unsupported css format");if(g.fillStyle=C,g.fillStyle=S,typeof g.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(g.fillRect(0,0,1,1),[d,_,v,l]=g.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(d,_,v,l),css:S}}})(b||(n.css=b={})),(function(c){function g(C,S,w){const p=C/255,E=S/255,L=w/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(C){return g(C>>16&255,C>>8&255,255&C)},c.relativeLuminance2=g})(f||(n.rgb=f={})),(function(c){function g(S,w,p){const E=S>>24&255,L=S>>16&255,T=S>>8&255;let A=w>>24&255,M=w>>16&255,N=w>>8&255,X=o(f.relativeLuminance2(A,M,N),f.relativeLuminance2(E,L,T));for(;X<p&&(A>0||M>0||N>0);)A-=Math.max(0,Math.ceil(.1*A)),M-=Math.max(0,Math.ceil(.1*M)),N-=Math.max(0,Math.ceil(.1*N)),X=o(f.relativeLuminance2(A,M,N),f.relativeLuminance2(E,L,T));return(A<<24|M<<16|N<<8|255)>>>0}function C(S,w,p){const E=S>>24&255,L=S>>16&255,T=S>>8&255;let A=w>>24&255,M=w>>16&255,N=w>>8&255,X=o(f.relativeLuminance2(A,M,N),f.relativeLuminance2(E,L,T));for(;X<p&&(A<255||M<255||N<255);)A=Math.min(255,A+Math.ceil(.1*(255-A))),M=Math.min(255,M+Math.ceil(.1*(255-M))),N=Math.min(255,N+Math.ceil(.1*(255-N))),X=o(f.relativeLuminance2(A,M,N),f.relativeLuminance2(E,L,T));return(A<<24|M<<16|N<<8|255)>>>0}c.blend=function(S,w){if(l=(255&w)/255,l===1)return w;const p=w>>24&255,E=w>>16&255,L=w>>8&255,T=S>>24&255,A=S>>16&255,M=S>>8&255;return d=T+Math.round((p-T)*l),_=A+Math.round((E-A)*l),v=M+Math.round((L-M)*l),m.toRgba(d,_,v)},c.ensureContrastRatio=function(S,w,p){const E=f.relativeLuminance(S>>8),L=f.relativeLuminance(w>>8);if(o(E,L)<p){if(L<E){const M=g(S,w,p),N=o(E,f.relativeLuminance(M>>8));if(N<p){const X=C(S,w,p);return N>o(E,f.relativeLuminance(X>>8))?M:X}return M}const T=C(S,w,p),A=o(E,f.relativeLuminance(T>>8));if(A<p){const M=g(S,w,p);return A>o(E,f.relativeLuminance(M>>8))?T:M}return T}},c.reduceLuminance=g,c.increaseLuminance=C,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:(q,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=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===d)return void this._listeners.splice(_,1)}}})),this._event}fire(d,_){const v=[];for(let l=0;l<this._listeners.length;l++)v.push(this._listeners[l]);for(let l=0;l<v.length;l++)v[l].call(void 0,d,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(d,_){return d((v=>_.fire(v)))},n.runAndSubscribe=function(d,_){return _(void 0),d((v=>_(v)))}},859:(q,n)=>{function d(_){for(const v of _)v.dispose();_.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 _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},n.toDisposable=function(_){return{dispose:_}},n.disposeArray=d,n.getDisposeArrayDisposable=function(_){return{dispose:()=>d(_)}}},485:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(v,l,m){this._data[v]||(this._data[v]={}),this._data[v][l]=m}get(v,l){return this._data[v]?this._data[v][l]:void 0}clear(){this._data={}}}n.TwoKeyMap=d,n.FourKeyMap=class{constructor(){this._data=new d}set(_,v,l,m,y){this._data.get(_,v)||this._data.set(_,v,new d),this._data.get(_,v).set(l,m,y)}get(_,v,l,m){var y;return(y=this._data.get(_,v))==null?void 0:y.get(l,m)}clear(){this._data.clear()}}},399:(q,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 d=n.isNode?"node":navigator.userAgent,_=n.isNode?"node":navigator.platform;n.isFirefox=d.includes("Firefox"),n.isLegacyEdge=d.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(d),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=d.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),n.isIpad=_==="iPad",n.isIphone=_==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),n.isLinux=_.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(d)},385:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const _=d(399);class v{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),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(y){this._idleCallback=void 0;let b=0,f=0,r=y.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),f=Math.max(b,f),h=y.timeRemaining(),1.5*f>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class l extends v{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const b=Date.now()+y;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=l,n.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:l,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},147:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new _}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 d;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=d;class _{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,m=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=m}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=_},782:(q,n,d)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const _=d(133),v=d(855),l=d(147);class m extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const f=new m;return f.setFromCharData(b),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(b){this.fg=b[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(b[v.CHAR_DATA_CHAR_INDEX].length===2){const r=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[v.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=b[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=m},855:(q,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:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},n.utf32ToString=function(d,_=0,v=d.length){let l="";for(let m=_;m<v;++m){let y=d[m];y>65535?(y-=65536,l+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):l+=String.fromCharCode(y)}return l},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,_){const v=d.length;if(!v)return 0;let l=0,m=0;if(this._interim){const y=d.charCodeAt(m++);56320<=y&&y<=57343?_[l++]=1024*(this._interim-55296)+y-56320+65536:(_[l++]=this._interim,_[l++]=y),this._interim=0}for(let y=m;y<v;++y){const b=d.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,l;const f=d.charCodeAt(y);56320<=f&&f<=57343?_[l++]=1024*(b-55296)+f-56320+65536:(_[l++]=b,_[l++]=f)}else b!==65279&&(_[l++]=b)}return l}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,_){const v=d.length;if(!v)return 0;let l,m,y,b,f=0,r=0,h=0;if(this.interim[0]){let g=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let S,w=0;for(;(S=63&this.interim[++w])&&w<4;)C<<=6,C|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=p-w;for(;h<E;){if(h>=v)return 0;if(S=d[h++],(192&S)!=128){h--,g=!0;break}this.interim[w++]=S,C<<=6,C|=63&S}g||(p===2?C<128?h--:_[f++]=C:p===3?C<2048||C>=55296&&C<=57343||C===65279||(_[f++]=C):C<65536||C>1114111||(_[f++]=C)),this.interim.fill(0)}const o=v-4;let c=h;for(;c<v;){for(;!(!(c<o)||128&(l=d[c])||128&(m=d[c+1])||128&(y=d[c+2])||128&(b=d[c+3]));)_[f++]=l,_[f++]=m,_[f++]=y,_[f++]=b,c+=4;if(l=d[c++],l<128)_[f++]=l;else if((224&l)==192){if(c>=v)return this.interim[0]=l,f;if(m=d[c++],(192&m)!=128){c--;continue}if(r=(31&l)<<6|63&m,r<128){c--;continue}_[f++]=r}else if((240&l)==224){if(c>=v)return this.interim[0]=l,f;if(m=d[c++],(192&m)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=m,f;if(y=d[c++],(192&y)!=128){c--;continue}if(r=(15&l)<<12|(63&m)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;_[f++]=r}else if((248&l)==240){if(c>=v)return this.interim[0]=l,f;if(m=d[c++],(192&m)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=m,f;if(y=d[c++],(192&y)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=m,this.interim[2]=y,f;if(b=d[c++],(192&b)!=128){c--;continue}if(r=(7&l)<<18|(63&m)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;_[f++]=r}}return f}}},776:function(q,n,d){var _=this&&this.__decorate||function(r,h,o,c){var g,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,o,c);else for(var w=r.length-1;w>=0;w--)(g=r[w])&&(S=(C<3?g(S):C>3?g(h,o,S):g(h,o))||S);return C>3&&S&&Object.defineProperty(h,o,S),S},v=this&&this.__param||function(r,h){return function(o,c){h(o,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const l=d(859),m=d(97),y={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let b,f=n.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=f=_([v(0,m.IOptionsService)],f),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const c=o.value;o.value=function(...g){if(b.logLevel!==m.LogLevelEnum.TRACE)return c.apply(this,g);b.trace(`GlyphRenderer#${c.name}(${g.map((S=>JSON.stringify(S))).join(", ")})`);const C=c.apply(this,g);return b.trace(`GlyphRenderer#${c.name} return`,C),C}}},726:(q,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const d="di$target",_="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[_]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const l=function(m,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,r,h){r[d]===r?r[_].push({id:f,index:h}):(r[_]=[{id:f,index:h}],r[d]=r)})(l,m,b)};return l.toString=()=>v,n.serviceRegistry.set(v,l),l}},97:(q,n,d)=>{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(726);var v;n.IBufferService=(0,_.createDecorator)("BufferService"),n.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),n.ICoreService=(0,_.createDecorator)("CoreService"),n.ICharsetService=(0,_.createDecorator)("CharsetService"),n.IInstantiationService=(0,_.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"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,_.createDecorator)("LogService"),n.IOptionsService=(0,_.createDecorator)("OptionsService"),n.IOscLinkService=(0,_.createDecorator)("OscLinkService"),n.IUnicodeService=(0,_.createDecorator)("UnicodeService"),n.IDecorationService=(0,_.createDecorator)("DecorationService")}},j={};function ie(q){var n=j[q];if(n!==void 0)return n.exports;var d=j[q]={exports:{}};return Y[q].call(d.exports,d,d.exports,ie),d.exports}var ae={};return(()=>{var q=ae;Object.defineProperty(q,"__esModule",{value:!0}),q.WebglAddon=void 0;const n=ie(345),d=ie(859),_=ie(399),v=ie(666),l=ie(776);class m extends d.Disposable{constructor(b){if(_.isSafari&&(0,_.getSafariVersion)()<16){const f={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",f))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=b,this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new n.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new n.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(b){const f=b._core;if(!b.element)return void this.register(f.onWillOpen((()=>this.activate(b))));this._terminal=b;const r=f.coreService,h=f.optionsService,o=f,c=o._renderService,g=o._characterJoinerService,C=o._charSizeService,S=o._coreBrowserService,w=o._decorationService,p=o._logService,E=o._themeService;(0,l.setTraceLogger)(p),this._renderer=this.register(new v.WebglRenderer(b,g,C,S,r,w,h,E,this._preserveDrawingBuffer)),this.register((0,n.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,n.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),c.setRenderer(this._renderer),this.register((0,d.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(b.cols,b.rows)})))}get textureAtlas(){var b;return(b=this._renderer)==null?void 0:b.textureAtlas}clearTextureAtlas(){var b;(b=this._renderer)==null||b.clearTextureAtlas()}}q.WebglAddon=m})(),ae})()))})(ko)),ko.exports}var Xv=$v();/**
|
|
115
115
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
116
116
|
* @license MIT
|
|
117
117
|
*
|
|
@@ -122,11 +122,10 @@ void main() {
|
|
|
122
122
|
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
123
123
|
* http://bellard.org/jslinux/
|
|
124
124
|
* Copyright (c) 2011 Fabrice Bellard
|
|
125
|
-
*/var
|
|
125
|
+
*/var Yv=class{constructor(U,V,Y,j={}){this._terminal=U,this._regex=V,this._handler=Y,this._options=j}provideLinks(U,V){let Y=Kv.computeLink(U,this._regex,this._terminal,this._handler);V(this._addCallbacks(Y))}_addCallbacks(U){return U.map(V=>(V.leave=this._options.leave,V.hover=(Y,j)=>{if(this._options.hover){let{range:ie}=V;this._options.hover(Y,j,ie)}},V))}};function Vv(U){try{let V=new URL(U),Y=V.password&&V.username?`${V.protocol}//${V.username}:${V.password}@${V.host}`:V.username?`${V.protocol}//${V.username}@${V.host}`:`${V.protocol}//${V.host}`;return U.toLocaleLowerCase().startsWith(Y.toLocaleLowerCase())}catch{return!1}}var Kv=class ca{static computeLink(V,Y,j,ie){let ae=new RegExp(Y.source,(Y.flags||"")+"g"),[q,n]=ca._getWindowedLineStrings(V-1,j),d=q.join(""),_,v=[];for(;_=ae.exec(d);){let l=_[0];if(!Vv(l))continue;let[m,y]=ca._mapStrIdx(j,n,0,_.index),[b,f]=ca._mapStrIdx(j,m,y,l.length);if(m===-1||y===-1||b===-1||f===-1)continue;let r={start:{x:y+1,y:m+1},end:{x:f,y:b+1}};v.push({range:r,text:l,activate:ie})}return v}static _getWindowedLineStrings(V,Y){let j,ie=V,ae=V,q=0,n="",d=[];if(j=Y.buffer.active.getLine(V)){let _=j.translateToString(!0);if(j.isWrapped&&_[0]!==" "){for(q=0;(j=Y.buffer.active.getLine(--ie))&&q<2048&&(n=j.translateToString(!0),q+=n.length,d.push(n),!(!j.isWrapped||n.indexOf(" ")!==-1)););d.reverse()}for(d.push(_),q=0;(j=Y.buffer.active.getLine(++ae))&&j.isWrapped&&q<2048&&(n=j.translateToString(!0),q+=n.length,d.push(n),n.indexOf(" ")===-1););}return[d,ie]}static _mapStrIdx(V,Y,j,ie){let ae=V.buffer.active,q=ae.getNullCell(),n=j;for(;ie;){let d=ae.getLine(Y);if(!d)return[-1,-1];for(let _=n;_<d.length;++_){d.getCell(_,q);let v=q.getChars();if(q.getWidth()&&(ie-=v.length||1,_===d.length-1&&v==="")){let l=ae.getLine(Y+1);l&&l.isWrapped&&(l.getCell(0,q),q.getWidth()===2&&(ie+=1))}if(ie<0)return[Y,_]}Y++,n=0}return[Y,n]}},Qv=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function Zv(U,V){let Y=window.open();if(Y){try{Y.opener=null}catch{}Y.location.href=V}else console.warn("Opening link blocked as opener could not be cleared")}var Jv=class{constructor(U=Zv,V={}){this._handler=U,this._options=V}activate(U){this._terminal=U;let V=this._options,Y=V.urlRegex||Qv;this._linkProvider=this._terminal.registerLinkProvider(new Yv(this._terminal,Y,this._handler,V))}dispose(){var U;(U=this._linkProvider)==null||U.dispose()}};function eg(U){const V=U.match(/^(.+?):(\d+)(?::(\d+))?$/);if(V)return{path:V[1],line:parseInt(V[2],10),column:V[3]?parseInt(V[3],10):void 0};const Y=U.match(/^(.+?)\((\d+),(\d+)\)$/);return Y?{path:Y[1],line:parseInt(Y[2],10),column:parseInt(Y[3],10)}:{path:U}}function tg(U){return!(!/\.[a-zA-Z]{1,10}(?::\d+(?::\d+)?|\(\d+,\d+\))?$/.test(U)||/^https?:\/\//i.test(U)||/^[a-z0-9-]+\.(com|org|net|io|dev|app|co)$/i.test(U))}const ig=0,td=1;function sg({wsPath:U,onFileOpen:V}){const Y=Ce.useRef(null),j=Ce.useRef(null),ie=Ce.useRef(null),ae=Ce.useRef(null);return Ce.useEffect(()=>{if(!Y.current)return;const q=new qv.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0});j.current=q;const n=new Wv.FitAddon;ae.current=n,q.loadAddon(n),q.open(Y.current);try{const c=new Xv.WebglAddon;c.onContextLoss(()=>{c.dispose()}),q.loadAddon(c)}catch{}if(V){const c=new Jv((g,C)=>{if(g.preventDefault(),tg(C)){const S=eg(C);V(S.path,S.line,S.column)}else window.open(C,"_blank")},{urlRegex:void 0});q.loadAddon(c)}n.fit();const d=setTimeout(()=>n.fit(),100),v=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${U}`,l=new WebSocket(v);l.binaryType="arraybuffer",ie.current=l;let m="",y=!0,b=null;const f=c=>(c=c.replace(/\x1b\[[\?>][\d;]*c/g,""),c=c.replace(/\[[\?>][\d;]*c/g,""),c),r=()=>{if(y=!1,b=null,m){const c=f(m);c&&q.write(c),m=""}};l.onopen=()=>{Kf(l,"resize",{cols:q.cols,rows:q.rows})},l.onmessage=c=>{const g=new Uint8Array(c.data);if(g.length===0)return;const C=g[0],S=g.subarray(1);if(C===td){const w=new TextDecoder().decode(S);if(y)m+=w,b||(b=setTimeout(r,500));else{const p=f(w);p&&q.write(p)}}},l.onclose=()=>{q.write(`\r
|
|
126
126
|
\x1B[90m[Terminal disconnected]\x1B[0m\r
|
|
127
|
-
`)},
|
|
127
|
+
`)},l.onerror=()=>{q.write(`\r
|
|
128
128
|
\x1B[31m[WebSocket error]\x1B[0m\r
|
|
129
|
-
`)},
|
|
130
|
-
`);for(const j of $){const te=j.match(/^\s*-?\s*(\w+):\s*(.*)$/);if(!te)continue;const[,re,P]=te;let n=P.trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),re==="files"){V.files={};continue}if(re==="spec"||re==="plan"||re==="review"){V.files||(V.files={}),V.files[re]=n==="null"?null:n;continue}if(re==="timestamps"){V.timestamps={};continue}if(["conceived_at","specified_at","planned_at","implementing_at","implemented_at","committed_at","integrated_at"].includes(re)){V.timestamps||(V.timestamps={}),V.timestamps[re]=n==="null"?null:n;continue}if(re==="dependencies"||re==="tags"||re==="ticks"){if(n.startsWith("[")&&n.endsWith("]")){const _=n.slice(1,-1).trim();V[re]=_===""?[]:_.split(",").map(v=>v.trim().replace(/^["']|["']$/g,""))}else V[re]=[];continue}n!=="null"&&(V[re]=n)}return V}const ug=new Set(["conceived","specified","planned","implementing","implemented","committed","integrated","abandoned","on-hold"]);function fg(U){return!(!U.id||U.id==="NNNN"||!/^\d{4}$/.test(U.id)||!U.status||!ug.has(U.status)||!U.title||U.tags&&U.tags.includes("example"))}function dg(U){const V=[],$=/```yaml\n([\s\S]*?)```/g;let j;for(;(j=$.exec(U))!==null;){const re=j[1].split(/\n(?=\s*- id:)/);for(const P of re){if(!P.trim()||!P.includes("id:"))continue;const n=hg(P);n&&fg(n)&&V.push(n)}}return V}const zo=["conceived","specified","planned","implementing","implemented","committed","integrated"],_g=["CONC'D","SPEC'D","PLANNED","IMPL'ING","IMPL'D","CMTD","INTGR'D"],vg=new Set(["conceived","specified","planned","implementing","implemented","committed"]),nd=new Set(["abandoned","on-hold"]);function Uo(U){var j;if(U.status!=="integrated")return!1;const V=(j=U.timestamps)==null?void 0:j.integrated_at;if(!V)return!1;const $=new Date(V);return isNaN($.getTime())?!1:(Date.now()-$.getTime())/(1e3*60*60)<=72}function ca(U){const V=zo.indexOf(U);return V>=0?V:-1}function Zf(U,V){var $,j,te;switch(V){case"specified":return($=U.files)!=null&&$.spec?{label:"Spec",link:U.files.spec}:{label:"",link:null};case"planned":return(j=U.files)!=null&&j.plan?{label:"Plan",link:U.files.plan}:{label:"",link:null};case"implemented":return(te=U.files)!=null&&te.review?{label:"Revw",link:U.files.review}:{label:"",link:null};case"committed":{if(U.notes){const re=U.notes.match(/PR\s*#?(\d+)/i);if(re)return{label:"PR",link:`https://github.com/cluesmith/codev/pull/${re[1]}`,external:!0}}return{label:"",link:null}}default:return{label:"",link:null}}}function gg({project:U,stage:V}){const $=ca(U.status),j=ca(V);if(j<$){const te=Zf(U,V);return K.jsxs("td",{className:"project-stage",children:[K.jsx("span",{className:"checkmark",children:"✓"}),te.label&&te.link&&(te.external?K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:te.link,target:"_blank",rel:"noreferrer",children:te.label})]}):K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:"#",onClick:re=>{re.preventDefault(),er(te.link)},children:te.label})]}))]})}if(j===$){if(V==="integrated"&&Uo(U))return K.jsx("td",{className:"project-stage",children:K.jsx("span",{className:"celebration",children:"🎉"})});const te=Zf(U,V);return K.jsxs("td",{className:"project-stage",children:[K.jsx("span",{className:"current-indicator"}),te.label&&te.link&&(te.external?K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:te.link,target:"_blank",rel:"noreferrer",children:te.label})]}):K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:"#",onClick:re=>{re.preventDefault(),er(te.link)},children:te.label})]}))]})}return K.jsx("td",{className:"project-stage"})}async function er(U){try{const V=ha();await fetch(`${V}api/tabs/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:U})})}catch{}}function mg({project:U}){const V=nd.has(U.status);return K.jsxs("tr",{className:`project-row status-${U.status}`,children:[K.jsxs("td",{className:"project-cell",children:[K.jsx("span",{className:"project-id",children:U.id}),K.jsxs("span",{className:"project-title",children:[U.title,V&&K.jsxs("span",{className:"project-terminal-status",children:[" (",U.status,")"]})]})]}),V?zo.map($=>K.jsx("td",{className:"project-stage"},$)):zo.map($=>K.jsx(gg,{project:U,stage:$},$))]})}function No({projects:U}){return U.length===0?K.jsx("p",{style:{color:"var(--text-muted)",textAlign:"center",padding:20},children:"No projects"}):K.jsxs("table",{className:"project-table",children:[K.jsx("thead",{children:K.jsxs("tr",{children:[K.jsx("th",{style:{textAlign:"left"},children:"Project"}),_g.map(V=>K.jsx("th",{className:"stage-header",children:V},V))]})}),K.jsx("tbody",{children:U.map(V=>K.jsx(mg,{project:V},V.id))})]})}function pg({projects:U}){const V=U.filter(te=>vg.has(te.status)||Uo(te));V.sort((te,re)=>{const P=ca(te.status),n=ca(re.status);return n!==P?n-P:te.id.localeCompare(re.id)});const $=U.filter(te=>te.status==="integrated"&&!Uo(te)),j=U.filter(te=>nd.has(te.status));return K.jsxs(K.Fragment,{children:[(V.length>0||$.length===0)&&K.jsxs("details",{className:"project-section",open:!0,children:[K.jsxs("summary",{children:["Active ",K.jsxs("span",{className:"section-count",children:["(",V.length,")"]})]}),K.jsx(No,{projects:V})]}),$.length>0&&K.jsxs("details",{className:"project-section",children:[K.jsxs("summary",{children:["Completed ",K.jsxs("span",{className:"section-count",children:["(",$.length,")"]})]}),K.jsx(No,{projects:$})]}),j.length>0&&K.jsxs("details",{className:"project-section",children:[K.jsxs("summary",{children:["Terminal ",K.jsxs("span",{className:"section-count",children:["(",j.length,")"]})]}),K.jsx(No,{projects:j})]})]})}function Sg({state:U,onRefresh:V,onSelectTab:$}){const[j,te]=pe.useState([]),[re,P]=pe.useState(null);if(pe.useEffect(()=>{let o="";const m=()=>{const b=ha();fetch(`${b}file?path=codev/projectlist.md`).then(async f=>{if(!f.ok){if(f.status===404){te([]);return}throw new Error(`HTTP ${f.status}`)}const r=await f.text(),h=r.length+":"+r.slice(0,100);h!==o&&(o=h,te(dg(r)),P(null))}).catch(f=>P(f.message))};m();const y=setInterval(m,5e3);return()=>clearInterval(y)},[]),!U)return K.jsx("div",{className:"dashboard-container",children:K.jsx("p",{style:{color:"var(--text-muted)",padding:16},children:"Loading..."})});const n=async()=>{try{await Bv(),V()}catch(o){console.error("Failed to create shell:",o)}},d=U.builders??[],_=(U.utils??[]).filter(o=>o.terminalId||o.pid&&o.pid!==0),v=U.annotations??[];return K.jsxs("div",{className:"dashboard-container",children:[K.jsxs("div",{className:"projects-info",children:[K.jsx("h1",{style:{fontSize:20,marginBottom:12,color:"var(--text-primary)"},children:"Agent Farm Dashboard"}),K.jsxs("p",{children:["Coordinate AI builders working on your codebase. The left panel shows the Architect terminal – tell it what you want to build. ",K.jsx("strong",{children:"Tabs"})," shows open terminals (Architect, Builders, utility shells)."," ",K.jsx("strong",{children:"Files"})," lets you browse and open project files. ",K.jsx("strong",{children:"Projects"})," tracks work as it moves from conception to integration."]}),K.jsxs("p",{children:["Docs:"," ",K.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),er("codev/resources/cheatsheet.md")},children:"Cheatsheet"})," ·"," ",K.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),er("codev/resources/lifecycle.md")},children:"Lifecycle"})," ·"," ",K.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),er("codev/resources/commands/overview.md")},children:"CLI Reference"})," ·"," ",K.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),er("codev/protocols/spider/protocol.md")},children:"SPIDER Protocol"})," ·"," ",K.jsx("a",{href:"https://github.com/cluesmith/codev#readme",target:"_blank",rel:"noreferrer",children:"README"})," ·"," ",K.jsx("a",{href:"https://discord.gg/mJ92DhDa6n",target:"_blank",rel:"noreferrer",children:"Discord"})]})]}),K.jsxs("div",{className:"dashboard-header",children:[K.jsx(Ho,{title:"Tabs",className:"section-tabs",actions:K.jsx("button",{onClick:n,children:"+ Shell"}),children:K.jsxs("div",{className:"dashboard-tabs-list",children:[U.architect&&K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>$==null?void 0:$("architect"),children:[K.jsx("span",{className:"tab-icon",children:"🏗️"}),K.jsx("span",{className:"tab-name",children:"Architect"})]}),d.map(o=>K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>$==null?void 0:$(`builder-${o.id}`),children:[K.jsx("span",{className:"tab-icon",children:"🔨"}),K.jsx("span",{className:"tab-name",children:o.name}),K.jsx("span",{className:`status-dot status-${o.status}`})]},o.id)),_.map(o=>K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>$==null?void 0:$(`shell-${o.id}`),children:[K.jsx("span",{className:"tab-icon",children:"💻"}),K.jsx("span",{className:"tab-name",children:o.name})]},o.id)),v.map(o=>K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>$==null?void 0:$(`file-${o.id}`),children:[K.jsx("span",{className:"tab-icon",children:"📄"}),K.jsx("span",{className:"tab-name",children:o.file.split("/").pop()})]},o.id)),!U.architect&&d.length===0&&_.length===0&&v.length===0&&K.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic",fontSize:12,padding:"4px 8px"},children:"No tabs open"})]})}),K.jsx(Ho,{title:"Files",className:"section-files",children:K.jsx(cg,{onRefresh:V})})]}),K.jsx(Ho,{title:"Projects",className:"section-projects",children:re?K.jsxs("div",{className:"projects-error",children:[K.jsx("span",{children:re}),K.jsx("button",{onClick:()=>window.location.reload(),children:"Retry"})]}):j.length===0?K.jsx("div",{className:"projects-welcome",children:K.jsx("p",{children:"No projects yet. Ask the Architect to create your first project."})}):K.jsx(pg,{projects:j})})]})}function yg({tabs:U,activeTabId:V,onSelectTab:$,onRefresh:j,children:te}){return K.jsxs("div",{className:"mobile-layout",children:[K.jsx(ed,{tabs:U,activeTabId:V,onSelectTab:$,onRefresh:j}),K.jsx("div",{className:"mobile-content",children:te})]})}function bg({tabId:U,initialLine:V}){const[$,j]=pe.useState(null),[te,re]=pe.useState(null),[P,n]=pe.useState(!0),[d,_]=pe.useState(""),[v,o]=pe.useState(!1),[m,y]=pe.useState(!1);pe.useEffect(()=>{n(!0),re(null),Ov(U).then(h=>{j(h),_(h.content||""),o(!1)}).catch(h=>re(h.message)).finally(()=>n(!1))},[U]),pe.useEffect(()=>{if($&&V&&!$.isImage&&!$.isVideo){const h=document.querySelector(`[data-line="${V}"]`);h&&(h.scrollIntoView({behavior:"smooth",block:"center"}),h.classList.add("highlighted-line"))}},[$,V]);const b=pe.useCallback(async()=>{if(!(!$||m)){y(!0);try{await kv(U,d),o(!1)}catch(h){re(h.message)}finally{y(!1)}}},[U,d,$,m]);pe.useEffect(()=>{const h=l=>{(l.metaKey||l.ctrlKey)&&l.key==="s"&&(l.preventDefault(),v&&b())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[v,b]);const f=h=>{_(h.target.value),o(!0)};if(P)return K.jsx("div",{className:"file-viewer file-loading",children:"Loading..."});if(te)return K.jsxs("div",{className:"file-viewer file-error",children:["Error: ",te]});if(!$)return K.jsx("div",{className:"file-viewer file-error",children:"No file data"});if($.isImage)return K.jsxs("div",{className:"file-viewer file-image-viewer",children:[K.jsx("div",{className:"file-header",children:K.jsx("span",{className:"file-path",children:$.path})}),K.jsx("div",{className:"file-image-container",children:K.jsx("img",{src:Xf(U),alt:$.name,className:"file-image"})})]});if($.isVideo)return K.jsxs("div",{className:"file-viewer file-video-viewer",children:[K.jsx("div",{className:"file-header",children:K.jsx("span",{className:"file-path",children:$.path})}),K.jsx("div",{className:"file-video-container",children:K.jsx("video",{src:Xf(U),controls:!0,className:"file-video"})})]});const r=d.split(`
|
|
131
|
-
|
|
132
|
-
//# sourceMappingURL=index-xOaDIZ0l.js.map
|
|
129
|
+
`)},q.onData(c=>{l.readyState===WebSocket.OPEN&&rg(l,c)}),q.onResize(({cols:c,rows:g})=>{l.readyState===WebSocket.OPEN&&Kf(l,"resize",{cols:c,rows:g})});const h=()=>n.fit(),o=new ResizeObserver(h);return o.observe(Y.current),()=>{clearTimeout(d),b&&clearTimeout(b),o.disconnect(),l.close(),q.dispose(),j.current=null,ie.current=null,ae.current=null}},[U]),Z.jsx("div",{ref:Y,className:"terminal-container",style:{width:"100%",height:"100%",backgroundColor:"#1a1a1a"}})}function rg(U,V){const Y=new TextEncoder().encode(V),j=new Uint8Array(1+Y.length);j[0]=td,j.set(Y,1),U.send(j.buffer)}function Kf(U,V,Y){const j=JSON.stringify({type:V,payload:Y}),ie=new TextEncoder().encode(j),ae=new Uint8Array(1+ie.length);ae[0]=ig,ae.set(ie,1),U.send(ae.buffer)}function ng(U,V){const Y=U.replace(/^\//,"");return V.staged.some(j=>Y.endsWith(j)||j.endsWith(Y))?{indicator:"A",className:"git-staged"}:V.modified.some(j=>Y.endsWith(j)||j.endsWith(Y))?{indicator:"M",className:"git-modified"}:V.untracked.some(j=>Y.endsWith(j)||j.endsWith(Y))?{indicator:"?",className:"git-untracked"}:null}function id({entry:U,expanded:V,gitStatus:Y,onToggle:j,onOpen:ie,depth:ae=0}){var _;const q=U.type==="directory",n=V.has(U.path),d=q?null:ng(U.path,Y);return Z.jsxs(Z.Fragment,{children:[Z.jsxs("div",{className:`file-node ${q?"directory":"file"}`,style:{paddingLeft:`${ae*16+8}px`},onClick:()=>q?j(U.path):ie(U.path),role:"treeitem","aria-expanded":q?n:void 0,tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),q?j(U.path):ie(U.path))},children:[Z.jsx("span",{className:"file-icon",children:q?n?"📂":"📁":"📄"}),Z.jsx("span",{className:"file-name",children:U.name}),d&&Z.jsx("span",{className:`git-indicator ${d.className}`,children:d.indicator})]}),q&&n&&((_=U.children)==null?void 0:_.map(v=>Z.jsx(id,{entry:v,expanded:V,gitStatus:Y,onToggle:j,onOpen:ie,depth:ae+1},v.path)))]})}function sd(U,V=[]){for(const Y of U)Y.type==="file"&&V.push(Y),Y.children&&sd(Y.children,V);return V}function ag({onRefresh:U}){const[V,Y]=Ce.useState([]),[j,ie]=Ce.useState(new Set),[ae,q]=Ce.useState(null),[n,d]=Ce.useState(!1),[_,v]=Ce.useState({modified:[],staged:[],untracked:[]}),[l,m]=Ce.useState([]),[y,b]=Ce.useState(""),[f,r]=Ce.useState(!1),h=Ce.useRef(null),o=Ce.useCallback(async()=>{try{const A=await Ov();Y(A),q(null),d(!0)}catch(A){q(A.message)}},[]),c=Ce.useCallback(async()=>{try{const A=await Hv();v(A)}catch(A){console.error("Failed to load git status:",A)}},[]),g=Ce.useCallback(async()=>{try{const A=await zv();m(A)}catch(A){console.error("Failed to load recent files:",A)}},[]);Ce.useEffect(()=>{n||(o(),c(),g())},[n,o,c,g]),Ce.useEffect(()=>{const A=setInterval(()=>{c()},3e4);return()=>clearInterval(A)},[c]);const C=A=>{ie(M=>{const N=new Set(M);return N.has(A)?N.delete(A):N.add(A),N})},S=async A=>{try{await Zf(A),U(),g()}catch(M){console.error("Failed to open file:",M)}},w=Ce.useMemo(()=>sd(V),[V]),p=Ce.useMemo(()=>{if(!y.trim())return[];const A=y.toLowerCase();return w.filter(M=>M.name.toLowerCase().includes(A)||M.path.toLowerCase().includes(A)).slice(0,10)},[w,y]),E=A=>{b(A.target.value),r(!0)},L=A=>{A.key==="Escape"?(r(!1),b("")):A.key==="Enter"&&p.length>0&&(S(p[0].path),b(""),r(!1))},T=A=>{S(A),b(""),r(!1)};return ae?Z.jsxs("div",{className:"file-tree-error",children:["Error: ",ae]}):n?Z.jsxs("div",{className:"file-tree-container",children:[Z.jsxs("div",{className:"file-search",children:[Z.jsx("input",{ref:h,type:"text",className:"file-search-input",placeholder:"Search files...",value:y,onChange:E,onKeyDown:L,onFocus:()=>r(!0),onBlur:()=>setTimeout(()=>r(!1),200)}),f&&p.length>0&&Z.jsx("div",{className:"file-search-suggestions",children:p.map(A=>Z.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>T(A.path),children:[Z.jsx("span",{className:"suggestion-name",children:A.name}),Z.jsx("span",{className:"suggestion-path",children:A.path})]},A.path))})]}),l.length>0&&Z.jsxs("div",{className:"file-tree-section",children:[Z.jsx("div",{className:"file-tree-section-header",children:"Recent"}),l.map(A=>Z.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>S(A.path),role:"treeitem",tabIndex:0,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),S(A.path))},children:[Z.jsx("span",{className:"file-icon",children:"🕐"}),Z.jsx("span",{className:"file-name",children:A.name}),Z.jsx("span",{className:"file-path-hint",children:A.relativePath})]},A.id))]}),Z.jsxs("div",{className:"file-tree-section",children:[Z.jsx("div",{className:"file-tree-section-header",children:"Files"}),Z.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:V.map(A=>Z.jsx(id,{entry:A,expanded:j,gitStatus:_,onToggle:C,onOpen:S},A.path))})]})]}):Z.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function Ho({title:U,className:V,defaultOpen:Y=!0,actions:j,children:ie}){const[ae,q]=Ce.useState(Y);return Z.jsxs("div",{className:`dashboard-section${ae?"":" collapsed"}${V?" "+V:""}`,children:[Z.jsxs("div",{className:"dashboard-section-header",onClick:()=>q(!ae),children:[Z.jsxs("h3",{children:[Z.jsx("span",{className:"collapse-icon",children:"▼"})," ",U]}),j&&Z.jsx("div",{className:"header-actions",onClick:n=>n.stopPropagation(),children:j})]}),ae&&Z.jsx("div",{className:"dashboard-section-content",children:ie})]})}function lg(U){const V={},Y=U.split(`
|
|
130
|
+
`);for(const j of Y){const ie=j.match(/^\s*-?\s*(\w+):\s*(.*)$/);if(!ie)continue;const[,ae,q]=ie;let n=q.trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),ae==="files"){V.files={};continue}if(ae==="spec"||ae==="plan"||ae==="review"){V.files||(V.files={}),V.files[ae]=n==="null"?null:n;continue}if(ae==="timestamps"){V.timestamps={};continue}if(["conceived_at","specified_at","planned_at","implementing_at","implemented_at","committed_at","integrated_at"].includes(ae)){V.timestamps||(V.timestamps={}),V.timestamps[ae]=n==="null"?null:n;continue}if(ae==="dependencies"||ae==="tags"||ae==="ticks"){if(n.startsWith("[")&&n.endsWith("]")){const _=n.slice(1,-1).trim();V[ae]=_===""?[]:_.split(",").map(v=>v.trim().replace(/^["']|["']$/g,""))}else V[ae]=[];continue}n!=="null"&&(V[ae]=n)}return V}const og=new Set(["conceived","specified","planned","implementing","implemented","committed","integrated","abandoned","on-hold"]);function cg(U){return!(!U.id||U.id==="NNNN"||!/^\d{4}$/.test(U.id)||!U.status||!og.has(U.status)||!U.title||U.tags&&U.tags.includes("example"))}function hg(U){const V=[],Y=/```yaml\n([\s\S]*?)```/g;let j;for(;(j=Y.exec(U))!==null;){const ae=j[1].split(/\n(?=\s*- id:)/);for(const q of ae){if(!q.trim()||!q.includes("id:"))continue;const n=lg(q);n&&cg(n)&&V.push(n)}}return V}const No=["conceived","specified","planned","implementing","implemented","committed","integrated"],ug=["CONC'D","SPEC'D","PLANNED","IMPL'ING","IMPL'D","CMTD","INTGR'D"],fg=new Set(["conceived","specified","planned","implementing","implemented","committed"]),rd=new Set(["abandoned","on-hold"]);function Uo(U){var j;if(U.status!=="integrated")return!1;const V=(j=U.timestamps)==null?void 0:j.integrated_at;if(!V)return!1;const Y=new Date(V);return isNaN(Y.getTime())?!1:(Date.now()-Y.getTime())/(1e3*60*60)<=72}function ha(U){const V=No.indexOf(U);return V>=0?V:-1}function Qf(U,V){var Y,j,ie;switch(V){case"specified":return(Y=U.files)!=null&&Y.spec?{label:"Spec",link:U.files.spec}:{label:"",link:null};case"planned":return(j=U.files)!=null&&j.plan?{label:"Plan",link:U.files.plan}:{label:"",link:null};case"implemented":return(ie=U.files)!=null&&ie.review?{label:"Revw",link:U.files.review}:{label:"",link:null};case"committed":{if(U.notes){const ae=U.notes.match(/PR\s*#?(\d+)/i);if(ae)return{label:"PR",link:`https://github.com/cluesmith/codev/pull/${ae[1]}`,external:!0}}return{label:"",link:null}}default:return{label:"",link:null}}}function dg({project:U,stage:V}){const Y=ha(U.status),j=ha(V);if(j<Y){const ie=Qf(U,V);return Z.jsxs("td",{className:"project-stage",children:[Z.jsx("span",{className:"checkmark",children:"✓"}),ie.label&&ie.link&&(ie.external?Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:ie.link,target:"_blank",rel:"noreferrer",children:ie.label})]}):Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:"#",onClick:ae=>{ae.preventDefault(),er(ie.link)},children:ie.label})]}))]})}if(j===Y){if(V==="integrated"&&Uo(U))return Z.jsx("td",{className:"project-stage",children:Z.jsx("span",{className:"celebration",children:"🎉"})});const ie=Qf(U,V);return Z.jsxs("td",{className:"project-stage",children:[Z.jsx("span",{className:"current-indicator"}),ie.label&&ie.link&&(ie.external?Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:ie.link,target:"_blank",rel:"noreferrer",children:ie.label})]}):Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:"#",onClick:ae=>{ae.preventDefault(),er(ie.link)},children:ie.label})]}))]})}return Z.jsx("td",{className:"project-stage"})}async function er(U){try{const V=Yr();await fetch(`${V}api/tabs/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:U})})}catch{}}function _g({project:U}){const V=rd.has(U.status);return Z.jsxs("tr",{className:`project-row status-${U.status}`,children:[Z.jsxs("td",{className:"project-cell",children:[Z.jsx("span",{className:"project-id",children:U.id}),Z.jsxs("span",{className:"project-title",children:[U.title,V&&Z.jsxs("span",{className:"project-terminal-status",children:[" (",U.status,")"]})]})]}),V?No.map(Y=>Z.jsx("td",{className:"project-stage"},Y)):No.map(Y=>Z.jsx(dg,{project:U,stage:Y},Y))]})}function zo({projects:U}){return U.length===0?Z.jsx("p",{style:{color:"var(--text-muted)",textAlign:"center",padding:20},children:"No projects"}):Z.jsxs("table",{className:"project-table",children:[Z.jsx("thead",{children:Z.jsxs("tr",{children:[Z.jsx("th",{style:{textAlign:"left"},children:"Project"}),ug.map(V=>Z.jsx("th",{className:"stage-header",children:V},V))]})}),Z.jsx("tbody",{children:U.map(V=>Z.jsx(_g,{project:V},V.id))})]})}function vg({projects:U}){const V=U.filter(ie=>fg.has(ie.status)||Uo(ie));V.sort((ie,ae)=>{const q=ha(ie.status),n=ha(ae.status);return n!==q?n-q:ie.id.localeCompare(ae.id)});const Y=U.filter(ie=>ie.status==="integrated"&&!Uo(ie)),j=U.filter(ie=>rd.has(ie.status));return Z.jsxs(Z.Fragment,{children:[(V.length>0||Y.length===0)&&Z.jsxs("details",{className:"project-section",open:!0,children:[Z.jsxs("summary",{children:["Active ",Z.jsxs("span",{className:"section-count",children:["(",V.length,")"]})]}),Z.jsx(zo,{projects:V})]}),Y.length>0&&Z.jsxs("details",{className:"project-section",children:[Z.jsxs("summary",{children:["Completed ",Z.jsxs("span",{className:"section-count",children:["(",Y.length,")"]})]}),Z.jsx(zo,{projects:Y})]}),j.length>0&&Z.jsxs("details",{className:"project-section",children:[Z.jsxs("summary",{children:["Terminal ",Z.jsxs("span",{className:"section-count",children:["(",j.length,")"]})]}),Z.jsx(zo,{projects:j})]})]})}function gg({state:U,onRefresh:V,onSelectTab:Y}){const[j,ie]=Ce.useState([]),[ae,q]=Ce.useState(null);if(Ce.useEffect(()=>{let l="";const m=()=>{const b=Yr();fetch(`${b}file?path=codev/projectlist.md`).then(async f=>{if(!f.ok){if(f.status===404){ie([]);return}throw new Error(`HTTP ${f.status}`)}const r=await f.text(),h=r.length+":"+r.slice(0,100);h!==l&&(l=h,ie(hg(r)),q(null))}).catch(f=>q(f.message))};m();const y=setInterval(m,5e3);return()=>clearInterval(y)},[]),!U)return Z.jsx("div",{className:"dashboard-container",children:Z.jsx("p",{style:{color:"var(--text-muted)",padding:16},children:"Loading..."})});const n=async()=>{try{await Tv(),V()}catch(l){console.error("Failed to create shell:",l)}},d=U.builders??[],_=(U.utils??[]).filter(l=>l.terminalId||l.pid&&l.pid!==0),v=U.annotations??[];return Z.jsxs("div",{className:"dashboard-container",children:[Z.jsxs("div",{className:"projects-info",children:[Z.jsx("h1",{style:{fontSize:20,marginBottom:12,color:"var(--text-primary)"},children:"Agent Farm Dashboard"}),Z.jsxs("p",{children:["Coordinate AI builders working on your codebase. The left panel shows the Architect terminal – tell it what you want to build. ",Z.jsx("strong",{children:"Tabs"})," shows open terminals (Architect, Builders, utility shells)."," ",Z.jsx("strong",{children:"Files"})," lets you browse and open project files. ",Z.jsx("strong",{children:"Projects"})," tracks work as it moves from conception to integration."]}),Z.jsxs("p",{children:["Docs:"," ",Z.jsx("a",{href:"#",onClick:l=>{l.preventDefault(),er("codev/resources/cheatsheet.md")},children:"Cheatsheet"})," ·"," ",Z.jsx("a",{href:"#",onClick:l=>{l.preventDefault(),er("codev/resources/lifecycle.md")},children:"Lifecycle"})," ·"," ",Z.jsx("a",{href:"#",onClick:l=>{l.preventDefault(),er("codev/resources/commands/overview.md")},children:"CLI Reference"})," ·"," ",Z.jsx("a",{href:"#",onClick:l=>{l.preventDefault(),er("codev/protocols/spider/protocol.md")},children:"SPIDER Protocol"})," ·"," ",Z.jsx("a",{href:"https://github.com/cluesmith/codev#readme",target:"_blank",rel:"noreferrer",children:"README"})," ·"," ",Z.jsx("a",{href:"https://discord.gg/mJ92DhDa6n",target:"_blank",rel:"noreferrer",children:"Discord"})]})]}),Z.jsxs("div",{className:"dashboard-header",children:[Z.jsx(Ho,{title:"Tabs",className:"section-tabs",actions:Z.jsx("button",{onClick:n,children:"+ Shell"}),children:Z.jsxs("div",{className:"dashboard-tabs-list",children:[U.architect&&Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y("architect"),children:[Z.jsx("span",{className:"tab-icon",children:"🏗️"}),Z.jsx("span",{className:"tab-name",children:"Architect"})]}),d.map(l=>Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y(l.id),children:[Z.jsx("span",{className:"tab-icon",children:"🔨"}),Z.jsx("span",{className:"tab-name",children:l.name}),Z.jsx("span",{className:`status-dot status-${l.status}`})]},l.id)),_.map(l=>Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y(l.id),children:[Z.jsx("span",{className:"tab-icon",children:"💻"}),Z.jsx("span",{className:"tab-name",children:l.name})]},l.id)),v.map(l=>Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y(l.id),children:[Z.jsx("span",{className:"tab-icon",children:"📄"}),Z.jsx("span",{className:"tab-name",children:l.file.split("/").pop()})]},l.id)),!U.architect&&d.length===0&&_.length===0&&v.length===0&&Z.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic",fontSize:12,padding:"4px 8px"},children:"No tabs open"})]})}),Z.jsx(Ho,{title:"Files",className:"section-files",children:Z.jsx(ag,{onRefresh:V})})]}),Z.jsx(Ho,{title:"Projects",className:"section-projects",children:ae?Z.jsxs("div",{className:"projects-error",children:[Z.jsx("span",{children:ae}),Z.jsx("button",{onClick:()=>window.location.reload(),children:"Retry"})]}):j.length===0?Z.jsx("div",{className:"projects-welcome",children:Z.jsx("p",{children:"No projects yet. Ask the Architect to create your first project."})}):Z.jsx(vg,{projects:j})})]})}function mg({tabs:U,activeTabId:V,onSelectTab:Y,onRefresh:j,children:ie}){return Z.jsxs("div",{className:"mobile-layout",children:[Z.jsx(Jf,{tabs:U,activeTabId:V,onSelectTab:Y,onRefresh:j}),Z.jsx("div",{className:"mobile-content",children:ie})]})}function pg({tabId:U,initialLine:V}){let j=`${Yr()}api/annotate/${U}/`;return V&&(j+=`?line=${V}`),Z.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:Z.jsx("iframe",{src:j,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function Sg(){var r,h,o,c;const{state:U,refresh:V}=Nv(),{tabs:Y,activeTab:j,activeTabId:ie,selectTab:ae}=jv(U),q=Iv(`(max-width: ${Rv}px)`),n=Ce.useRef(new Map),d=Ce.useCallback(async(g,C,S)=>{try{const w=await Zf(g,C);C&&C>0&&n.current.set(w.id,C),V()}catch(w){console.error("Failed to open file:",w)}},[V]);Ce.useEffect(()=>{U!=null&&U.projectName?document.title=`${U.projectName} Agent Farm`:document.title="Agent Farm"},[U==null?void 0:U.projectName]);const[_,v]=Ce.useState(!1);Ce.useEffect(()=>{const g=new URLSearchParams(window.location.search);v(g.get("fullscreen")==="1")},[]);const l=g=>{const C=kv(g);return C?Z.jsx(sg,{wsPath:C,onFileOpen:d}):Z.jsx("div",{className:"no-terminal",children:"No terminal session"})},m=g=>{if(!g.annotationId||!U)return Z.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!U.annotations.find(w=>w.id===g.annotationId))return Z.jsx("div",{className:"no-terminal",children:"Annotation not found"});const S=n.current.get(g.annotationId);return S!==void 0&&n.current.delete(g.annotationId),Z.jsx(pg,{tabId:g.annotationId,initialLine:S??g.initialLine})},y=()=>{if(!j)return null;switch(j.type){case"dashboard":return Z.jsx(gg,{state:U,onRefresh:V,onSelectTab:ae});case"architect":case"builder":case"shell":return l(j);case"file":return m(j);default:return Z.jsx("div",{children:"Unknown tab type"})}};if(_&&j&&(j.type==="architect"||j.type==="builder"||j.type==="shell"))return Z.jsx("div",{className:"fullscreen-terminal",children:l(j)});if(q)return Z.jsx(mg,{tabs:Y,activeTabId:ie,onSelectTab:ae,onRefresh:V,children:y()});const b=Y.find(g=>g.type==="architect"),f=b?l(b):Z.jsx("div",{className:"no-architect",children:"No architect terminal"});return Z.jsxs("div",{className:"app",children:[Z.jsxs("header",{className:"app-header",children:[Z.jsx("h1",{className:"app-title",children:"Agent Farm"}),Z.jsx("div",{className:"header-meta",children:Z.jsxs("span",{className:"builder-count",children:[((r=U==null?void 0:U.builders)==null?void 0:r.length)??0," builder(s)"]})})]}),Z.jsx("div",{className:"app-body",children:Z.jsx(Fv,{left:f,right:Z.jsxs("div",{className:"right-panel",children:[Z.jsx(Jf,{tabs:Y.filter(g=>g.type!=="architect"),activeTabId:ie,onSelectTab:ae,onRefresh:V}),Z.jsx("div",{className:"tab-content",role:"tabpanel",children:y()})]})})}),Z.jsxs("footer",{className:"status-bar",children:[Z.jsxs("span",{children:[((h=U==null?void 0:U.builders)==null?void 0:h.length)??0," builders"]}),Z.jsxs("span",{children:[((o=U==null?void 0:U.utils)==null?void 0:o.length)??0," shells"]}),Z.jsxs("span",{children:[((c=U==null?void 0:U.annotations)==null?void 0:c.length)??0," files"]})]})]})}Av.createRoot(document.getElementById("root")).render(Z.jsx(Ce.StrictMode,{children:Z.jsx(Sg,{})}));
|
|
131
|
+
//# sourceMappingURL=index-bhDjF0Oa.js.map
|