@cluesmith/codev 2.0.0-rc.58 → 2.0.0-rc.59

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.
Files changed (46) hide show
  1. package/dashboard/dist/assets/index-CXloFYpB.css +32 -0
  2. package/dashboard/dist/assets/{index-BEs2fHhy.js → index-Ca2fjOJf.js} +24 -24
  3. package/dashboard/dist/assets/{index-BEs2fHhy.js.map → index-Ca2fjOJf.js.map} +1 -1
  4. package/dashboard/dist/index.html +2 -2
  5. package/dist/agent-farm/commands/spawn.js +1 -1
  6. package/dist/agent-farm/commands/spawn.js.map +1 -1
  7. package/dist/agent-farm/servers/tower-server.js +56 -9
  8. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  9. package/dist/cli.d.ts.map +1 -1
  10. package/dist/cli.js +2 -0
  11. package/dist/cli.js.map +1 -1
  12. package/dist/commands/consult/index.d.ts +1 -0
  13. package/dist/commands/consult/index.d.ts.map +1 -1
  14. package/dist/commands/consult/index.js +23 -4
  15. package/dist/commands/consult/index.js.map +1 -1
  16. package/dist/commands/porch/checks.d.ts +3 -2
  17. package/dist/commands/porch/checks.d.ts.map +1 -1
  18. package/dist/commands/porch/checks.js +8 -2
  19. package/dist/commands/porch/checks.js.map +1 -1
  20. package/dist/commands/porch/index.d.ts.map +1 -1
  21. package/dist/commands/porch/index.js +21 -23
  22. package/dist/commands/porch/index.js.map +1 -1
  23. package/dist/commands/porch/next.d.ts +22 -0
  24. package/dist/commands/porch/next.d.ts.map +1 -0
  25. package/dist/commands/porch/next.js +475 -0
  26. package/dist/commands/porch/next.js.map +1 -0
  27. package/dist/commands/porch/protocol.d.ts +3 -3
  28. package/dist/commands/porch/protocol.d.ts.map +1 -1
  29. package/dist/commands/porch/protocol.js +14 -5
  30. package/dist/commands/porch/protocol.js.map +1 -1
  31. package/dist/commands/porch/types.d.ts +36 -1
  32. package/dist/commands/porch/types.d.ts.map +1 -1
  33. package/dist/commands/porch/verdict.d.ts +31 -0
  34. package/dist/commands/porch/verdict.d.ts.map +1 -0
  35. package/dist/commands/porch/verdict.js +59 -0
  36. package/dist/commands/porch/verdict.js.map +1 -0
  37. package/package.json +3 -3
  38. package/dashboard/dist/assets/index-BV7KQvFU.css +0 -32
  39. package/dist/commands/porch/claude.d.ts +0 -27
  40. package/dist/commands/porch/claude.d.ts.map +0 -1
  41. package/dist/commands/porch/claude.js +0 -107
  42. package/dist/commands/porch/claude.js.map +0 -1
  43. package/dist/commands/porch/run.d.ts +0 -40
  44. package/dist/commands/porch/run.d.ts.map +0 -1
  45. package/dist/commands/porch/run.js +0 -893
  46. package/dist/commands/porch/run.js.map +0 -1
@@ -1,4 +1,4 @@
1
- (function(){const K=document.createElement("link").relList;if(K&&K.supports&&K.supports("modulepreload"))return;for(const te of document.querySelectorAll('link[rel="modulepreload"]'))P(te);new MutationObserver(te=>{for(const ne of te)if(ne.type==="childList")for(const F of ne.addedNodes)F.tagName==="LINK"&&F.rel==="modulepreload"&&P(F)}).observe(document,{childList:!0,subtree:!0});function Y(te){const ne={};return te.integrity&&(ne.integrity=te.integrity),te.referrerPolicy&&(ne.referrerPolicy=te.referrerPolicy),te.crossOrigin==="use-credentials"?ne.credentials="include":te.crossOrigin==="anonymous"?ne.credentials="omit":ne.credentials="same-origin",ne}function P(te){if(te.ep)return;te.ep=!0;const ne=Y(te);fetch(te.href,ne)}})();var Eo={exports:{}},Vr={};/**
1
+ (function(){const K=document.createElement("link").relList;if(K&&K.supports&&K.supports("modulepreload"))return;for(const ee of document.querySelectorAll('link[rel="modulepreload"]'))P(ee);new MutationObserver(ee=>{for(const ne of ee)if(ne.type==="childList")for(const F of ne.addedNodes)F.tagName==="LINK"&&F.rel==="modulepreload"&&P(F)}).observe(document,{childList:!0,subtree:!0});function Y(ee){const ne={};return ee.integrity&&(ne.integrity=ee.integrity),ee.referrerPolicy&&(ne.referrerPolicy=ee.referrerPolicy),ee.crossOrigin==="use-credentials"?ne.credentials="include":ee.crossOrigin==="anonymous"?ne.credentials="omit":ne.credentials="same-origin",ne}function P(ee){if(ee.ep)return;ee.ep=!0;const ne=Y(ee);fetch(ee.href,ne)}})();var Lo={exports:{}},Vr={};/**
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 Nd;function yv(){if(Nd)return Vr;Nd=1;var j=Symbol.for("react.transitional.element"),K=Symbol.for("react.fragment");function Y(P,te,ne){var F=null;if(ne!==void 0&&(F=""+ne),te.key!==void 0&&(F=""+te.key),"key"in te){ne={};for(var n in te)n!=="key"&&(ne[n]=te[n])}else ne=te;return te=ne.ref,{$$typeof:j,type:P,key:F,ref:te!==void 0?te:null,props:ne}}return Vr.Fragment=K,Vr.jsx=Y,Vr.jsxs=Y,Vr}var Ud;function bv(){return Ud||(Ud=1,Eo.exports=yv()),Eo.exports}var Z=bv(),Mo={exports:{}},De={};/**
9
+ */var Nd;function wv(){if(Nd)return Vr;Nd=1;var j=Symbol.for("react.transitional.element"),K=Symbol.for("react.fragment");function Y(P,ee,ne){var F=null;if(ne!==void 0&&(F=""+ne),ee.key!==void 0&&(F=""+ee.key),"key"in ee){ne={};for(var n in ee)n!=="key"&&(ne[n]=ee[n])}else ne=ee;return ee=ne.ref,{$$typeof:j,type:P,key:F,ref:ee!==void 0?ee:null,props:ne}}return Vr.Fragment=K,Vr.jsx=Y,Vr.jsxs=Y,Vr}var Ud;function xv(){return Ud||(Ud=1,Lo.exports=wv()),Lo.exports}var Z=xv(),Mo={exports:{}},De={};/**
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 Id;function wv(){if(Id)return De;Id=1;var j=Symbol.for("react.transitional.element"),K=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),ne=Symbol.for("react.consumer"),F=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),a=Symbol.for("react.activity"),p=Symbol.iterator;function y(T){return T===null||typeof T!="object"?null:(T=p&&T[p]||T["@@iterator"],typeof T=="function"?T:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},c=Object.assign,r={};function h(T,H,G){this.props=T,this.context=H,this.refs=r,this.updater=G||b}h.prototype.isReactComponent={},h.prototype.setState=function(T,H){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,H,"setState")},h.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function o(){}o.prototype=h.prototype;function l(T,H,G){this.props=T,this.context=H,this.refs=r,this.updater=G||b}var m=l.prototype=new o;m.constructor=l,c(m,h.prototype),m.isPureReactComponent=!0;var x=Array.isArray;function _(){}var w={H:null,A:null,T:null,S:null},S=Object.prototype.hasOwnProperty;function C(T,H,G){var V=G.ref;return{$$typeof:j,type:T,key:H,ref:V!==void 0?V:null,props:G}}function L(T,H){return C(T.type,H,T.props)}function A(T){return typeof T=="object"&&T!==null&&T.$$typeof===j}function E(T){var H={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(G){return H[G]})}var D=/\/+/g;function O(T,H){return typeof T=="object"&&T!==null&&T.key!=null?E(""+T.key):H.toString(36)}function $(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(_,_):(T.status="pending",T.then(function(H){T.status==="pending"&&(T.status="fulfilled",T.value=H)},function(H){T.status==="pending"&&(T.status="rejected",T.reason=H)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function N(T,H,G,V,ue){var de=typeof T;(de==="undefined"||de==="boolean")&&(T=null);var q=!1;if(T===null)q=!0;else switch(de){case"bigint":case"string":case"number":q=!0;break;case"object":switch(T.$$typeof){case j:case K:q=!0;break;case v:return q=T._init,N(q(T._payload),H,G,V,ue)}}if(q)return ue=ue(T),q=V===""?"."+O(T,0):V,x(ue)?(G="",q!=null&&(G=q.replace(D,"$&/")+"/"),N(ue,H,G,"",function(ie){return ie})):ue!=null&&(A(ue)&&(ue=L(ue,G+(ue.key==null||T&&T.key===ue.key?"":(""+ue.key).replace(D,"$&/")+"/")+q)),H.push(ue)),1;q=0;var z=V===""?".":V+":";if(x(T))for(var se=0;se<T.length;se++)V=T[se],de=z+O(V,se),q+=N(V,H,G,de,ue);else if(se=y(T),typeof se=="function")for(T=se.call(T),se=0;!(V=T.next()).done;)V=V.value,de=z+O(V,se++),q+=N(V,H,G,de,ue);else if(de==="object"){if(typeof T.then=="function")return N($(T),H,G,V,ue);throw H=String(T),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return q}function U(T,H,G){if(T==null)return T;var V=[],ue=0;return N(T,V,"","",function(de){return H.call(G,de,ue++)}),V}function I(T){if(T._status===-1){var H=T._result;H=H(),H.then(function(G){(T._status===0||T._status===-1)&&(T._status=1,T._result=G)},function(G){(T._status===0||T._status===-1)&&(T._status=2,T._result=G)}),T._status===-1&&(T._status=0,T._result=H)}if(T._status===1)return T._result.default;throw T._result}var R=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},B={map:U,forEach:function(T,H,G){U(T,function(){H.apply(this,arguments)},G)},count:function(T){var H=0;return U(T,function(){H++}),H},toArray:function(T){return U(T,function(H){return H})||[]},only:function(T){if(!A(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return De.Activity=a,De.Children=B,De.Component=h,De.Fragment=Y,De.Profiler=te,De.PureComponent=l,De.StrictMode=P,De.Suspense=u,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,De.__COMPILER_RUNTIME={__proto__:null,c:function(T){return w.H.useMemoCache(T)}},De.cache=function(T){return function(){return T.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(T,H,G){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var V=c({},T.props),ue=T.key;if(H!=null)for(de in H.key!==void 0&&(ue=""+H.key),H)!S.call(H,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&H.ref===void 0||(V[de]=H[de]);var de=arguments.length-2;if(de===1)V.children=G;else if(1<de){for(var q=Array(de),z=0;z<de;z++)q[z]=arguments[z+2];V.children=q}return C(T.type,ue,V)},De.createContext=function(T){return T={$$typeof:F,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:ne,_context:T},T},De.createElement=function(T,H,G){var V,ue={},de=null;if(H!=null)for(V in H.key!==void 0&&(de=""+H.key),H)S.call(H,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(ue[V]=H[V]);var q=arguments.length-2;if(q===1)ue.children=G;else if(1<q){for(var z=Array(q),se=0;se<q;se++)z[se]=arguments[se+2];ue.children=z}if(T&&T.defaultProps)for(V in q=T.defaultProps,q)ue[V]===void 0&&(ue[V]=q[V]);return C(T,de,ue)},De.createRef=function(){return{current:null}},De.forwardRef=function(T){return{$$typeof:n,render:T}},De.isValidElement=A,De.lazy=function(T){return{$$typeof:v,_payload:{_status:-1,_result:T},_init:I}},De.memo=function(T,H){return{$$typeof:f,type:T,compare:H===void 0?null:H}},De.startTransition=function(T){var H=w.T,G={};w.T=G;try{var V=T(),ue=w.S;ue!==null&&ue(G,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(_,R)}catch(de){R(de)}finally{H!==null&&G.types!==null&&(H.types=G.types),w.T=H}},De.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},De.use=function(T){return w.H.use(T)},De.useActionState=function(T,H,G){return w.H.useActionState(T,H,G)},De.useCallback=function(T,H){return w.H.useCallback(T,H)},De.useContext=function(T){return w.H.useContext(T)},De.useDebugValue=function(){},De.useDeferredValue=function(T,H){return w.H.useDeferredValue(T,H)},De.useEffect=function(T,H){return w.H.useEffect(T,H)},De.useEffectEvent=function(T){return w.H.useEffectEvent(T)},De.useId=function(){return w.H.useId()},De.useImperativeHandle=function(T,H,G){return w.H.useImperativeHandle(T,H,G)},De.useInsertionEffect=function(T,H){return w.H.useInsertionEffect(T,H)},De.useLayoutEffect=function(T,H){return w.H.useLayoutEffect(T,H)},De.useMemo=function(T,H){return w.H.useMemo(T,H)},De.useOptimistic=function(T,H){return w.H.useOptimistic(T,H)},De.useReducer=function(T,H,G){return w.H.useReducer(T,H,G)},De.useRef=function(T){return w.H.useRef(T)},De.useState=function(T){return w.H.useState(T)},De.useSyncExternalStore=function(T,H,G){return w.H.useSyncExternalStore(T,H,G)},De.useTransition=function(){return w.H.useTransition()},De.version="19.2.4",De}var Pd;function Po(){return Pd||(Pd=1,Mo.exports=wv()),Mo.exports}var Re=Po(),Ao={exports:{}},Yr={},Ro={exports:{}},Do={};/**
17
+ */var Id;function Ev(){if(Id)return De;Id=1;var j=Symbol.for("react.transitional.element"),K=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),ne=Symbol.for("react.consumer"),F=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),a=Symbol.for("react.activity"),p=Symbol.iterator;function w(T){return T===null||typeof T!="object"?null:(T=p&&T[p]||T["@@iterator"],typeof T=="function"?T:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},c=Object.assign,r={};function h(T,H,G){this.props=T,this.context=H,this.refs=r,this.updater=G||b}h.prototype.isReactComponent={},h.prototype.setState=function(T,H){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,H,"setState")},h.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function o(){}o.prototype=h.prototype;function l(T,H,G){this.props=T,this.context=H,this.refs=r,this.updater=G||b}var S=l.prototype=new o;S.constructor=l,c(S,h.prototype),S.isPureReactComponent=!0;var x=Array.isArray;function _(){}var C={H:null,A:null,T:null,S:null},m=Object.prototype.hasOwnProperty;function y(T,H,G){var V=G.ref;return{$$typeof:j,type:T,key:H,ref:V!==void 0?V:null,props:G}}function E(T,H){return y(T.type,H,T.props)}function A(T){return typeof T=="object"&&T!==null&&T.$$typeof===j}function L(T){var H={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(G){return H[G]})}var D=/\/+/g;function O(T,H){return typeof T=="object"&&T!==null&&T.key!=null?L(""+T.key):H.toString(36)}function $(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(_,_):(T.status="pending",T.then(function(H){T.status==="pending"&&(T.status="fulfilled",T.value=H)},function(H){T.status==="pending"&&(T.status="rejected",T.reason=H)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function N(T,H,G,V,ue){var de=typeof T;(de==="undefined"||de==="boolean")&&(T=null);var q=!1;if(T===null)q=!0;else switch(de){case"bigint":case"string":case"number":q=!0;break;case"object":switch(T.$$typeof){case j:case K:q=!0;break;case v:return q=T._init,N(q(T._payload),H,G,V,ue)}}if(q)return ue=ue(T),q=V===""?"."+O(T,0):V,x(ue)?(G="",q!=null&&(G=q.replace(D,"$&/")+"/"),N(ue,H,G,"",function(ie){return ie})):ue!=null&&(A(ue)&&(ue=E(ue,G+(ue.key==null||T&&T.key===ue.key?"":(""+ue.key).replace(D,"$&/")+"/")+q)),H.push(ue)),1;q=0;var z=V===""?".":V+":";if(x(T))for(var se=0;se<T.length;se++)V=T[se],de=z+O(V,se),q+=N(V,H,G,de,ue);else if(se=w(T),typeof se=="function")for(T=se.call(T),se=0;!(V=T.next()).done;)V=V.value,de=z+O(V,se++),q+=N(V,H,G,de,ue);else if(de==="object"){if(typeof T.then=="function")return N($(T),H,G,V,ue);throw H=String(T),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return q}function U(T,H,G){if(T==null)return T;var V=[],ue=0;return N(T,V,"","",function(de){return H.call(G,de,ue++)}),V}function I(T){if(T._status===-1){var H=T._result;H=H(),H.then(function(G){(T._status===0||T._status===-1)&&(T._status=1,T._result=G)},function(G){(T._status===0||T._status===-1)&&(T._status=2,T._result=G)}),T._status===-1&&(T._status=0,T._result=H)}if(T._status===1)return T._result.default;throw T._result}var R=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},B={map:U,forEach:function(T,H,G){U(T,function(){H.apply(this,arguments)},G)},count:function(T){var H=0;return U(T,function(){H++}),H},toArray:function(T){return U(T,function(H){return H})||[]},only:function(T){if(!A(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return De.Activity=a,De.Children=B,De.Component=h,De.Fragment=Y,De.Profiler=ee,De.PureComponent=l,De.StrictMode=P,De.Suspense=u,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,De.__COMPILER_RUNTIME={__proto__:null,c:function(T){return C.H.useMemoCache(T)}},De.cache=function(T){return function(){return T.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(T,H,G){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var V=c({},T.props),ue=T.key;if(H!=null)for(de in H.key!==void 0&&(ue=""+H.key),H)!m.call(H,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&H.ref===void 0||(V[de]=H[de]);var de=arguments.length-2;if(de===1)V.children=G;else if(1<de){for(var q=Array(de),z=0;z<de;z++)q[z]=arguments[z+2];V.children=q}return y(T.type,ue,V)},De.createContext=function(T){return T={$$typeof:F,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:ne,_context:T},T},De.createElement=function(T,H,G){var V,ue={},de=null;if(H!=null)for(V in H.key!==void 0&&(de=""+H.key),H)m.call(H,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(ue[V]=H[V]);var q=arguments.length-2;if(q===1)ue.children=G;else if(1<q){for(var z=Array(q),se=0;se<q;se++)z[se]=arguments[se+2];ue.children=z}if(T&&T.defaultProps)for(V in q=T.defaultProps,q)ue[V]===void 0&&(ue[V]=q[V]);return y(T,de,ue)},De.createRef=function(){return{current:null}},De.forwardRef=function(T){return{$$typeof:n,render:T}},De.isValidElement=A,De.lazy=function(T){return{$$typeof:v,_payload:{_status:-1,_result:T},_init:I}},De.memo=function(T,H){return{$$typeof:f,type:T,compare:H===void 0?null:H}},De.startTransition=function(T){var H=C.T,G={};C.T=G;try{var V=T(),ue=C.S;ue!==null&&ue(G,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(_,R)}catch(de){R(de)}finally{H!==null&&G.types!==null&&(H.types=G.types),C.T=H}},De.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},De.use=function(T){return C.H.use(T)},De.useActionState=function(T,H,G){return C.H.useActionState(T,H,G)},De.useCallback=function(T,H){return C.H.useCallback(T,H)},De.useContext=function(T){return C.H.useContext(T)},De.useDebugValue=function(){},De.useDeferredValue=function(T,H){return C.H.useDeferredValue(T,H)},De.useEffect=function(T,H){return C.H.useEffect(T,H)},De.useEffectEvent=function(T){return C.H.useEffectEvent(T)},De.useId=function(){return C.H.useId()},De.useImperativeHandle=function(T,H,G){return C.H.useImperativeHandle(T,H,G)},De.useInsertionEffect=function(T,H){return C.H.useInsertionEffect(T,H)},De.useLayoutEffect=function(T,H){return C.H.useLayoutEffect(T,H)},De.useMemo=function(T,H){return C.H.useMemo(T,H)},De.useOptimistic=function(T,H){return C.H.useOptimistic(T,H)},De.useReducer=function(T,H,G){return C.H.useReducer(T,H,G)},De.useRef=function(T){return C.H.useRef(T)},De.useState=function(T){return C.H.useState(T)},De.useSyncExternalStore=function(T,H,G){return C.H.useSyncExternalStore(T,H,G)},De.useTransition=function(){return C.H.useTransition()},De.version="19.2.4",De}var Pd;function Po(){return Pd||(Pd=1,Mo.exports=Ev()),Mo.exports}var Ae=Po(),Ao={exports:{}},Yr={},Ro={exports:{}},Do={};/**
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 Fd;function xv(){return Fd||(Fd=1,(function(j){function K(N,U){var I=N.length;N.push(U);e:for(;0<I;){var R=I-1>>>1,B=N[R];if(0<te(B,U))N[R]=U,N[I]=B,I=R;else break e}}function Y(N){return N.length===0?null:N[0]}function P(N){if(N.length===0)return null;var U=N[0],I=N.pop();if(I!==U){N[0]=I;e:for(var R=0,B=N.length,T=B>>>1;R<T;){var H=2*(R+1)-1,G=N[H],V=H+1,ue=N[V];if(0>te(G,I))V<B&&0>te(ue,G)?(N[R]=ue,N[V]=I,R=V):(N[R]=G,N[H]=I,R=H);else if(V<B&&0>te(ue,I))N[R]=ue,N[V]=I,R=V;else break e}}return U}function te(N,U){var I=N.sortIndex-U.sortIndex;return I!==0?I:N.id-U.id}if(j.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ne=performance;j.unstable_now=function(){return ne.now()}}else{var F=Date,n=F.now();j.unstable_now=function(){return F.now()-n}}var u=[],f=[],v=1,a=null,p=3,y=!1,b=!1,c=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function m(N){for(var U=Y(f);U!==null;){if(U.callback===null)P(f);else if(U.startTime<=N)P(f),U.sortIndex=U.expirationTime,K(u,U);else break;U=Y(f)}}function x(N){if(c=!1,m(N),!b)if(Y(u)!==null)b=!0,_||(_=!0,E());else{var U=Y(f);U!==null&&$(x,U.startTime-N)}}var _=!1,w=-1,S=5,C=-1;function L(){return r?!0:!(j.unstable_now()-C<S)}function A(){if(r=!1,_){var N=j.unstable_now();C=N;var U=!0;try{e:{b=!1,c&&(c=!1,o(w),w=-1),y=!0;var I=p;try{t:{for(m(N),a=Y(u);a!==null&&!(a.expirationTime>N&&L());){var R=a.callback;if(typeof R=="function"){a.callback=null,p=a.priorityLevel;var B=R(a.expirationTime<=N);if(N=j.unstable_now(),typeof B=="function"){a.callback=B,m(N),U=!0;break t}a===Y(u)&&P(u),m(N)}else P(u);a=Y(u)}if(a!==null)U=!0;else{var T=Y(f);T!==null&&$(x,T.startTime-N),U=!1}}break e}finally{a=null,p=I,y=!1}U=void 0}}finally{U?E():_=!1}}}var E;if(typeof l=="function")E=function(){l(A)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,O=D.port2;D.port1.onmessage=A,E=function(){O.postMessage(null)}}else E=function(){h(A,0)};function $(N,U){w=h(function(){N(j.unstable_now())},U)}j.unstable_IdlePriority=5,j.unstable_ImmediatePriority=1,j.unstable_LowPriority=4,j.unstable_NormalPriority=3,j.unstable_Profiling=null,j.unstable_UserBlockingPriority=2,j.unstable_cancelCallback=function(N){N.callback=null},j.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<N?Math.floor(1e3/N):5},j.unstable_getCurrentPriorityLevel=function(){return p},j.unstable_next=function(N){switch(p){case 1:case 2:case 3:var U=3;break;default:U=p}var I=p;p=U;try{return N()}finally{p=I}},j.unstable_requestPaint=function(){r=!0},j.unstable_runWithPriority=function(N,U){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var I=p;p=N;try{return U()}finally{p=I}},j.unstable_scheduleCallback=function(N,U,I){var R=j.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?R+I:R):I=R,N){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=I+B,N={id:v++,callback:U,priorityLevel:N,startTime:I,expirationTime:B,sortIndex:-1},I>R?(N.sortIndex=I,K(f,N),Y(u)===null&&N===Y(f)&&(c?(o(w),w=-1):c=!0,$(x,I-R))):(N.sortIndex=B,K(u,N),b||y||(b=!0,_||(_=!0,E()))),N},j.unstable_shouldYield=L,j.unstable_wrapCallback=function(N){var U=p;return function(){var I=p;p=U;try{return N.apply(this,arguments)}finally{p=I}}}})(Do)),Do}var jd;function Lv(){return jd||(jd=1,Ro.exports=xv()),Ro.exports}var To={exports:{}},wt={};/**
25
+ */var Fd;function Lv(){return Fd||(Fd=1,(function(j){function K(N,U){var I=N.length;N.push(U);e:for(;0<I;){var R=I-1>>>1,B=N[R];if(0<ee(B,U))N[R]=U,N[I]=B,I=R;else break e}}function Y(N){return N.length===0?null:N[0]}function P(N){if(N.length===0)return null;var U=N[0],I=N.pop();if(I!==U){N[0]=I;e:for(var R=0,B=N.length,T=B>>>1;R<T;){var H=2*(R+1)-1,G=N[H],V=H+1,ue=N[V];if(0>ee(G,I))V<B&&0>ee(ue,G)?(N[R]=ue,N[V]=I,R=V):(N[R]=G,N[H]=I,R=H);else if(V<B&&0>ee(ue,I))N[R]=ue,N[V]=I,R=V;else break e}}return U}function ee(N,U){var I=N.sortIndex-U.sortIndex;return I!==0?I:N.id-U.id}if(j.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ne=performance;j.unstable_now=function(){return ne.now()}}else{var F=Date,n=F.now();j.unstable_now=function(){return F.now()-n}}var u=[],f=[],v=1,a=null,p=3,w=!1,b=!1,c=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function S(N){for(var U=Y(f);U!==null;){if(U.callback===null)P(f);else if(U.startTime<=N)P(f),U.sortIndex=U.expirationTime,K(u,U);else break;U=Y(f)}}function x(N){if(c=!1,S(N),!b)if(Y(u)!==null)b=!0,_||(_=!0,L());else{var U=Y(f);U!==null&&$(x,U.startTime-N)}}var _=!1,C=-1,m=5,y=-1;function E(){return r?!0:!(j.unstable_now()-y<m)}function A(){if(r=!1,_){var N=j.unstable_now();y=N;var U=!0;try{e:{b=!1,c&&(c=!1,o(C),C=-1),w=!0;var I=p;try{t:{for(S(N),a=Y(u);a!==null&&!(a.expirationTime>N&&E());){var R=a.callback;if(typeof R=="function"){a.callback=null,p=a.priorityLevel;var B=R(a.expirationTime<=N);if(N=j.unstable_now(),typeof B=="function"){a.callback=B,S(N),U=!0;break t}a===Y(u)&&P(u),S(N)}else P(u);a=Y(u)}if(a!==null)U=!0;else{var T=Y(f);T!==null&&$(x,T.startTime-N),U=!1}}break e}finally{a=null,p=I,w=!1}U=void 0}}finally{U?L():_=!1}}}var L;if(typeof l=="function")L=function(){l(A)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,O=D.port2;D.port1.onmessage=A,L=function(){O.postMessage(null)}}else L=function(){h(A,0)};function $(N,U){C=h(function(){N(j.unstable_now())},U)}j.unstable_IdlePriority=5,j.unstable_ImmediatePriority=1,j.unstable_LowPriority=4,j.unstable_NormalPriority=3,j.unstable_Profiling=null,j.unstable_UserBlockingPriority=2,j.unstable_cancelCallback=function(N){N.callback=null},j.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):m=0<N?Math.floor(1e3/N):5},j.unstable_getCurrentPriorityLevel=function(){return p},j.unstable_next=function(N){switch(p){case 1:case 2:case 3:var U=3;break;default:U=p}var I=p;p=U;try{return N()}finally{p=I}},j.unstable_requestPaint=function(){r=!0},j.unstable_runWithPriority=function(N,U){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var I=p;p=N;try{return U()}finally{p=I}},j.unstable_scheduleCallback=function(N,U,I){var R=j.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?R+I:R):I=R,N){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=I+B,N={id:v++,callback:U,priorityLevel:N,startTime:I,expirationTime:B,sortIndex:-1},I>R?(N.sortIndex=I,K(f,N),Y(u)===null&&N===Y(f)&&(c?(o(C),C=-1):c=!0,$(x,I-R))):(N.sortIndex=B,K(u,N),b||w||(b=!0,_||(_=!0,L()))),N},j.unstable_shouldYield=E,j.unstable_wrapCallback=function(N){var U=p;return function(){var I=p;p=U;try{return N.apply(this,arguments)}finally{p=I}}}})(Do)),Do}var jd;function Mv(){return jd||(jd=1,Ro.exports=Lv()),Ro.exports}var To={exports:{}},wt={};/**
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 $d;function Ev(){if($d)return wt;$d=1;var j=Po();function K(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)f+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Y(){}var P={d:{f:Y,r:function(){throw Error(K(522))},D:Y,C:Y,L:Y,m:Y,X:Y,S:Y,M:Y},p:0,findDOMNode:null},te=Symbol.for("react.portal");function ne(u,f,v){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:te,key:a==null?null:""+a,children:u,containerInfo:f,implementation:v}}var F=j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function n(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,wt.createPortal=function(u,f){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(K(299));return ne(u,f,null,v)},wt.flushSync=function(u){var f=F.T,v=P.p;try{if(F.T=null,P.p=2,u)return u()}finally{F.T=f,P.p=v,P.d.f()}},wt.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,P.d.C(u,f))},wt.prefetchDNS=function(u){typeof u=="string"&&P.d.D(u)},wt.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var v=f.as,a=n(v,f.crossOrigin),p=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;v==="style"?P.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:a,integrity:p,fetchPriority:y}):v==="script"&&P.d.X(u,{crossOrigin:a,integrity:p,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},wt.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var v=n(f.as,f.crossOrigin);P.d.M(u,{crossOrigin:v,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&P.d.M(u)},wt.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var v=f.as,a=n(v,f.crossOrigin);P.d.L(u,v,{crossOrigin:a,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},wt.preloadModule=function(u,f){if(typeof u=="string")if(f){var v=n(f.as,f.crossOrigin);P.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:v,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else P.d.m(u)},wt.requestFormReset=function(u){P.d.r(u)},wt.unstable_batchedUpdates=function(u,f){return u(f)},wt.useFormState=function(u,f,v){return F.H.useFormState(u,f,v)},wt.useFormStatus=function(){return F.H.useHostTransitionStatus()},wt.version="19.2.4",wt}var qd;function Mv(){if(qd)return To.exports;qd=1;function j(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(K){console.error(K)}}return j(),To.exports=Ev(),To.exports}/**
33
+ */var $d;function Av(){if($d)return wt;$d=1;var j=Po();function K(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)f+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Y(){}var P={d:{f:Y,r:function(){throw Error(K(522))},D:Y,C:Y,L:Y,m:Y,X:Y,S:Y,M:Y},p:0,findDOMNode:null},ee=Symbol.for("react.portal");function ne(u,f,v){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ee,key:a==null?null:""+a,children:u,containerInfo:f,implementation:v}}var F=j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function n(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,wt.createPortal=function(u,f){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(K(299));return ne(u,f,null,v)},wt.flushSync=function(u){var f=F.T,v=P.p;try{if(F.T=null,P.p=2,u)return u()}finally{F.T=f,P.p=v,P.d.f()}},wt.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,P.d.C(u,f))},wt.prefetchDNS=function(u){typeof u=="string"&&P.d.D(u)},wt.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var v=f.as,a=n(v,f.crossOrigin),p=typeof f.integrity=="string"?f.integrity:void 0,w=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;v==="style"?P.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:a,integrity:p,fetchPriority:w}):v==="script"&&P.d.X(u,{crossOrigin:a,integrity:p,fetchPriority:w,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},wt.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var v=n(f.as,f.crossOrigin);P.d.M(u,{crossOrigin:v,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&P.d.M(u)},wt.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var v=f.as,a=n(v,f.crossOrigin);P.d.L(u,v,{crossOrigin:a,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},wt.preloadModule=function(u,f){if(typeof u=="string")if(f){var v=n(f.as,f.crossOrigin);P.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:v,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else P.d.m(u)},wt.requestFormReset=function(u){P.d.r(u)},wt.unstable_batchedUpdates=function(u,f){return u(f)},wt.useFormState=function(u,f,v){return F.H.useFormState(u,f,v)},wt.useFormStatus=function(){return F.H.useHostTransitionStatus()},wt.version="19.2.4",wt}var qd;function Rv(){if(qd)return To.exports;qd=1;function j(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(K){console.error(K)}}return j(),To.exports=Av(),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 Wd;function Av(){if(Wd)return Yr;Wd=1;var j=Lv(),K=Po(),Y=Mv();function P(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 te(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ne(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function F(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function 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 u(e){if(ne(e)!==e)throw Error(P(188))}function f(e){var t=e.alternate;if(!t){if(t=ne(e),t===null)throw Error(P(188));return t!==e?null:e}for(var i=e,s=t;;){var d=i.return;if(d===null)break;var g=d.alternate;if(g===null){if(s=d.return,s!==null){i=s;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===i)return u(d),e;if(g===s)return u(d),t;g=g.sibling}throw Error(P(188))}if(i.return!==s.return)i=d,s=g;else{for(var M=!1,k=d.child;k;){if(k===i){M=!0,i=d,s=g;break}if(k===s){M=!0,s=d,i=g;break}k=k.sibling}if(!M){for(k=g.child;k;){if(k===i){M=!0,i=g,s=d;break}if(k===s){M=!0,s=g,i=d;break}k=k.sibling}if(!M)throw Error(P(189))}}if(i.alternate!==s)throw Error(P(190))}if(i.tag!==3)throw Error(P(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 a=Object.assign,p=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),A=Symbol.iterator;function E(e){return e===null||typeof e!="object"?null:(e=A&&e[A]||e["@@iterator"],typeof e=="function"?e:null)}var D=Symbol.for("react.client.reference");function O(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===D?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case h:return"Profiler";case r:return"StrictMode";case x:return"Suspense";case _:return"SuspenseList";case C:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case l:return e.displayName||"Context";case o:return(e._context.displayName||"Context")+".Consumer";case m: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:O(e.type)||"Memo";case S:t=e._payload,e=e._init;try{return O(e(t))}catch{}}return null}var $=Array.isArray,N=K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Y.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},R=[],B=-1;function T(e){return{current:e}}function H(e){0>B||(e.current=R[B],R[B]=null,B--)}function G(e,t){B++,R[B]=e.current,e.current=t}var V=T(null),ue=T(null),de=T(null),q=T(null);function z(e,t){switch(G(de,t),G(ue,e),G(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ad(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ad(t),e=ld(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(V),G(V,e)}function se(){H(V),H(ue),H(de)}function ie(e){e.memoizedState!==null&&G(q,e);var t=V.current,i=ld(t,e.type);t!==i&&(G(ue,e),G(V,i))}function ve(e){ue.current===e&&(H(V),H(ue)),q.current===e&&(H(q),qr._currentValue=I)}var fe,Ee;function _e(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Ee=-1<i.stack.indexOf(`
41
+ */var Wd;function Dv(){if(Wd)return Yr;Wd=1;var j=Mv(),K=Po(),Y=Rv();function P(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 ee(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ne(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function F(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function 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 u(e){if(ne(e)!==e)throw Error(P(188))}function f(e){var t=e.alternate;if(!t){if(t=ne(e),t===null)throw Error(P(188));return t!==e?null:e}for(var i=e,s=t;;){var d=i.return;if(d===null)break;var g=d.alternate;if(g===null){if(s=d.return,s!==null){i=s;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===i)return u(d),e;if(g===s)return u(d),t;g=g.sibling}throw Error(P(188))}if(i.return!==s.return)i=d,s=g;else{for(var M=!1,k=d.child;k;){if(k===i){M=!0,i=d,s=g;break}if(k===s){M=!0,s=d,i=g;break}k=k.sibling}if(!M){for(k=g.child;k;){if(k===i){M=!0,i=g,s=d;break}if(k===s){M=!0,s=g,i=d;break}k=k.sibling}if(!M)throw Error(P(189))}}if(i.alternate!==s)throw Error(P(190))}if(i.tag!==3)throw Error(P(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 a=Object.assign,p=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),E=Symbol.for("react.memo_cache_sentinel"),A=Symbol.iterator;function L(e){return e===null||typeof e!="object"?null:(e=A&&e[A]||e["@@iterator"],typeof e=="function"?e:null)}var D=Symbol.for("react.client.reference");function O(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===D?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case h:return"Profiler";case r:return"StrictMode";case x:return"Suspense";case _:return"SuspenseList";case y:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case l:return e.displayName||"Context";case o:return(e._context.displayName||"Context")+".Consumer";case S:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case C:return t=e.displayName||null,t!==null?t:O(e.type)||"Memo";case m:t=e._payload,e=e._init;try{return O(e(t))}catch{}}return null}var $=Array.isArray,N=K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Y.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},R=[],B=-1;function T(e){return{current:e}}function H(e){0>B||(e.current=R[B],R[B]=null,B--)}function G(e,t){B++,R[B]=e.current,e.current=t}var V=T(null),ue=T(null),de=T(null),q=T(null);function z(e,t){switch(G(de,t),G(ue,e),G(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ad(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ad(t),e=ld(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(V),G(V,e)}function se(){H(V),H(ue),H(de)}function ie(e){e.memoizedState!==null&&G(q,e);var t=V.current,i=ld(t,e.type);t!==i&&(G(ue,e),G(V,i))}function ve(e){ue.current===e&&(H(V),H(ue)),q.current===e&&(H(q),qr._currentValue=I)}var fe,Le;function _e(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Le=-1<i.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+fe+e+Ee}var Oe=!1;function qe(e,t){if(!e||Oe)return"";Oe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ae){var re=ae}Reflect.construct(e,[],he)}else{try{he.call()}catch(ae){re=ae}e.call(he.prototype)}}else{try{throw Error()}catch(ae){re=ae}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ae){if(ae&&re&&typeof ae.stack=="string")return[ae.stack,re.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),M=g[0],k=g[1];if(M&&k){var W=M.split(`
44
- `),ee=k.split(`
45
- `);for(d=s=0;s<W.length&&!W[s].includes("DetermineComponentFrameRoot");)s++;for(;d<ee.length&&!ee[d].includes("DetermineComponentFrameRoot");)d++;if(s===W.length||d===ee.length)for(s=W.length-1,d=ee.length-1;1<=s&&0<=d&&W[s]!==ee[d];)d--;for(;1<=s&&0<=d;s--,d--)if(W[s]!==ee[d]){if(s!==1||d!==1)do if(s--,d--,0>d||W[s]!==ee[d]){var le=`
43
+ `+fe+e+Le}var Oe=!1;function qe(e,t){if(!e||Oe)return"";Oe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ae){var re=ae}Reflect.construct(e,[],he)}else{try{he.call()}catch(ae){re=ae}e.call(he.prototype)}}else{try{throw Error()}catch(ae){re=ae}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ae){if(ae&&re&&typeof ae.stack=="string")return[ae.stack,re.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),M=g[0],k=g[1];if(M&&k){var W=M.split(`
44
+ `),te=k.split(`
45
+ `);for(d=s=0;s<W.length&&!W[s].includes("DetermineComponentFrameRoot");)s++;for(;d<te.length&&!te[d].includes("DetermineComponentFrameRoot");)d++;if(s===W.length||d===te.length)for(s=W.length-1,d=te.length-1;1<=s&&0<=d&&W[s]!==te[d];)d--;for(;1<=s&&0<=d;s--,d--)if(W[s]!==te[d]){if(s!==1||d!==1)do if(s--,d--,0>d||W[s]!==te[d]){var le=`
46
46
  `+W[s].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=s&&0<=d);break}}}finally{Oe=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?_e(i):""}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return e.child!==t&&t!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return qe(e.type,!1);case 11:return qe(e.type.render,!1);case 1:return qe(e.type,!0);case 31:return _e("Activity");default:return""}}function ft(e){try{var t="",i=null;do t+=be(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 Ot=Object.prototype.hasOwnProperty,Se=j.unstable_scheduleCallback,pe=j.unstable_cancelCallback,me=j.unstable_shouldYield,ce=j.unstable_requestPaint,ge=j.unstable_now,ze=j.unstable_getCurrentPriorityLevel,Ae=j.unstable_ImmediatePriority,_t=j.unstable_UserBlockingPriority,Qe=j.unstable_NormalPriority,it=j.unstable_LowPriority,Ie=j.unstable_IdlePriority,Me=j.log,xe=j.unstable_setDisableYieldValue,xt=null,tt=null;function vt(e){if(typeof Me=="function"&&xe(e),tt&&typeof tt.setStrictMode=="function")try{tt.setStrictMode(xt,e)}catch{}}var ut=Math.clz32?Math.clz32:ir,Zt=Math.log,tr=Math.LN2;function ir(e){return e>>>=0,e===0?32:31-(Zt(e)/tr|0)|0}var Ft=256,si=262144,ri=4194304;function Jt(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 Qr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var d=0,g=e.suspendedLanes,M=e.pingedLanes;e=e.warmLanes;var k=s&134217727;return k!==0?(s=k&~g,s!==0?d=Jt(s):(M&=k,M!==0?d=Jt(M):i||(i=k&~e,i!==0&&(d=Jt(i))))):(k=s&~g,k!==0?d=Jt(k):M!==0?d=Jt(M):i||(i=s&~e,i!==0&&(d=Jt(i)))),d===0?0:t!==0&&t!==d&&(t&g)===0&&(g=d&-d,i=t&-t,g>=i||g===32&&(i&4194048)!==0)?t:d}function sr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function of(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 Fo(){var e=ri;return ri<<=1,(ri&62914560)===0&&(ri=4194304),e}function fa(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function rr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function cf(e,t,i,s,d,g){var M=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 k=e.entanglements,W=e.expirationTimes,ee=e.hiddenUpdates;for(i=M&~i;0<i;){var le=31-ut(i),he=1<<le;k[le]=0,W[le]=-1;var re=ee[le];if(re!==null)for(ee[le]=null,le=0;le<re.length;le++){var ae=re[le];ae!==null&&(ae.lane&=-536870913)}i&=~he}s!==0&&jo(e,s,0),g!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=g&~(M&~t))}function jo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-ut(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function $o(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-ut(i),d=1<<s;d&t|e[s]&t&&(e[s]|=t),i&=~d}}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 Wo(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:Dd(e.type))}function Go(e,t){var i=U.p;try{return U.p=e,t()}finally{U.p=i}}var Mi=Math.random().toString(36).slice(2),mt="__reactFiber$"+Mi,Et="__reactProps$"+Mi,gs="__reactContainer$"+Mi,ga="__reactEvents$"+Mi,hf="__reactListeners$"+Mi,uf="__reactHandles$"+Mi,Xo="__reactResources$"+Mi,nr="__reactMarker$"+Mi;function pa(e){delete e[mt],delete e[Et],delete e[ga],delete e[hf],delete e[uf]}function ps(e){var t=e[mt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[gs]||i[mt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=_d(e);e!==null;){if(i=e[mt])return i;e=_d(e)}return t}e=i,i=e.parentNode}return null}function ms(e){if(e=e[mt]||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 ar(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(P(33))}function Ss(e){var t=e[Xo];return t||(t=e[Xo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[nr]=!0}var Vo=new Set,Yo={};function Qi(e,t){Cs(e,t),Cs(e+"Capture",t)}function Cs(e,t){for(Yo[e]=t,e=0;e<t.length;e++)Vo.add(t[e])}var df=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]*$"),Ko={},Qo={};function ff(e){return Ot.call(Qo,e)?!0:Ot.call(Ko,e)?!1:df.test(e)?Qo[e]=!0:(Ko[e]=!0,!1)}function Zr(e,t,i){if(ff(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 Jr(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 ci(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 Zo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _f(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 d=s.get,g=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(M){i=""+M,g.call(this,M)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(M){i=""+M},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ma(e){if(!e._valueTracker){var t=Zo(e)?"checked":"value";e._valueTracker=_f(e,t,""+e[t])}}function Jo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Zo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function en(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 vf=/[\n"\\]/g;function $t(e){return e.replace(vf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Sa(e,t,i,s,d,g,M,k){e.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.type=M:e.removeAttribute("type"),t!=null?M==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):M!=="submit"&&M!=="reset"||e.removeAttribute("value"),t!=null?Ca(e,M,jt(t)):i!=null?Ca(e,M,jt(i)):s!=null&&e.removeAttribute("value"),d==null&&g!=null&&(e.defaultChecked=!!g),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+jt(k):e.removeAttribute("name")}function ec(e,t,i,s,d,g,M,k){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.type=g),t!=null||i!=null){if(!(g!=="submit"&&g!=="reset"||t!=null)){ma(e);return}i=i!=null?""+jt(i):"",t=t!=null?""+jt(t):i,k||t===e.value||(e.value=t),e.defaultValue=t}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=k?e.checked:!!s,e.defaultChecked=!!s,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(e.name=M),ma(e)}function Ca(e,t,i){t==="number"&&en(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ys(e,t,i,s){if(e=e.options,t){t={};for(var d=0;d<i.length;d++)t["$"+i[d]]=!0;for(i=0;i<e.length;i++)d=t.hasOwnProperty("$"+e[i].value),e[i].selected!==d&&(e[i].selected=d),d&&s&&(e[i].defaultSelected=!0)}else{for(i=""+jt(i),t=null,d=0;d<e.length;d++){if(e[d].value===i){e[d].selected=!0,s&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function tc(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 ic(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(P(92));if($(s)){if(1<s.length)throw Error(P(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),ma(e)}function bs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var gf=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 sc(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||gf.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function rc(e,t,i){if(t!=null&&typeof t!="object")throw Error(P(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 d in t)s=t[d],t.hasOwnProperty(d)&&i[d]!==s&&sc(e,d,s)}else for(var g in t)t.hasOwnProperty(g)&&sc(e,g,t[g])}function ya(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 pf=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"]]),mf=/^[\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 tn(e){return mf.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function hi(){}var ba=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,xs=null;function nc(e){var t=ms(e);if(t&&(e=t.stateNode)){var i=e[Et]||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="'+$t(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var d=s[Et]||null;if(!d)throw Error(P(90));Sa(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Jo(s)}break e;case"textarea":tc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ys(e,!!i.multiple,t,!1)}}}var xa=!1;function ac(e,t,i){if(xa)return e(t,i);xa=!0;try{var s=e(t);return s}finally{if(xa=!1,(ws!==null||xs!==null)&&($n(),ws&&(t=ws,e=xs,xs=ws=null,nc(t),e)))for(t=0;t<e.length;t++)nc(e[t])}}function lr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Et]||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(P(231,t,typeof i));return i}var ui=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),La=!1;if(ui)try{var or={};Object.defineProperty(or,"passive",{get:function(){La=!0}}),window.addEventListener("test",or,or),window.removeEventListener("test",or,or)}catch{La=!1}var Ai=null,Ea=null,sn=null;function lc(){if(sn)return sn;var e,t=Ea,i=t.length,s,d="value"in Ai?Ai.value:Ai.textContent,g=d.length;for(e=0;e<i&&t[e]===d[e];e++);var M=i-e;for(s=1;s<=M&&t[i-s]===d[g-s];s++);return sn=d.slice(e,1<s?1-s:void 0)}function rn(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 nn(){return!0}function oc(){return!1}function Mt(e){function t(i,s,d,g,M){this._reactName=i,this._targetInst=d,this.type=s,this.nativeEvent=g,this.target=M,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(i=e[k],this[k]=i?i(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?nn:oc,this.isPropagationStopped=oc,this}return a(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=nn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=Mt(Zi),cr=a({},Zi,{view:0,detail:0}),Sf=Mt(cr),Ma,Aa,hr,ln=a({},cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Da,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!==hr&&(hr&&e.type==="mousemove"?(Ma=e.screenX-hr.screenX,Aa=e.screenY-hr.screenY):Aa=Ma=0,hr=e),Ma)},movementY:function(e){return"movementY"in e?e.movementY:Aa}}),cc=Mt(ln),Cf=a({},ln,{dataTransfer:0}),yf=Mt(Cf),bf=a({},cr,{relatedTarget:0}),Ra=Mt(bf),wf=a({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),xf=Mt(wf),Lf=a({},Zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ef=Mt(Lf),Mf=a({},Zi,{data:0}),hc=Mt(Mf),Af={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rf={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"},Df={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Df[e])?!!t[e]:!1}function Da(){return Tf}var Bf=a({},cr,{key:function(e){if(e.key){var t=Af[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Rf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Da,charCode:function(e){return e.type==="keypress"?rn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Of=Mt(Bf),kf=a({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uc=Mt(kf),Hf=a({},cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Da}),zf=Mt(Hf),Nf=a({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Uf=Mt(Nf),If=a({},ln,{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}),Pf=Mt(If),Ff=a({},Zi,{newState:0,oldState:0}),jf=Mt(Ff),$f=[9,13,27,32],Ta=ui&&"CompositionEvent"in window,ur=null;ui&&"documentMode"in document&&(ur=document.documentMode);var qf=ui&&"TextEvent"in window&&!ur,dc=ui&&(!Ta||ur&&8<ur&&11>=ur),fc=" ",_c=!1;function vc(e,t){switch(e){case"keyup":return $f.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function Wf(e,t){switch(e){case"compositionend":return gc(t);case"keypress":return t.which!==32?null:(_c=!0,fc);case"textInput":return e=t.data,e===fc&&_c?null:e;default:return null}}function Gf(e,t){if(Ls)return e==="compositionend"||!Ta&&vc(e,t)?(e=lc(),sn=Ea=Ai=null,Ls=!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 dc&&t.locale!=="ko"?null:t.data;default:return null}}var Xf={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 pc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Xf[e.type]:t==="textarea"}function mc(e,t,i,s){ws?xs?xs.push(s):xs=[s]:ws=s,t=Kn(t,"onChange"),0<t.length&&(i=new an("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var dr=null,fr=null;function Vf(e){ed(e,0)}function on(e){var t=ar(e);if(Jo(t))return e}function Sc(e,t){if(e==="change")return t}var Cc=!1;if(ui){var Ba;if(ui){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;Cc=Ba&&(!document.documentMode||9<document.documentMode)}function bc(){dr&&(dr.detachEvent("onpropertychange",wc),fr=dr=null)}function wc(e){if(e.propertyName==="value"&&on(fr)){var t=[];mc(t,fr,e,wa(e)),ac(Vf,t)}}function Yf(e,t,i){e==="focusin"?(bc(),dr=t,fr=i,dr.attachEvent("onpropertychange",wc)):e==="focusout"&&bc()}function Kf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return on(fr)}function Qf(e,t){if(e==="click")return on(t)}function Zf(e,t){if(e==="input"||e==="change")return on(t)}function Jf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:Jf;function _r(e,t){if(kt(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 d=i[s];if(!Ot.call(t,d)||!kt(e[d],t[d]))return!1}return!0}function xc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lc(e,t){var i=xc(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=xc(i)}}function Ec(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ec(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=en(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=en(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 e_=ui&&"documentMode"in document&&11>=document.documentMode,Es=null,Ha=null,vr=null,za=!1;function Ac(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;za||Es==null||Es!==en(s)||(s=Es,"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}),vr&&_r(vr,s)||(vr=s,s=Kn(Ha,"onSelect"),0<s.length&&(t=new an("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function Ji(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ms={animationend:Ji("Animation","AnimationEnd"),animationiteration:Ji("Animation","AnimationIteration"),animationstart:Ji("Animation","AnimationStart"),transitionrun:Ji("Transition","TransitionRun"),transitionstart:Ji("Transition","TransitionStart"),transitioncancel:Ji("Transition","TransitionCancel"),transitionend:Ji("Transition","TransitionEnd")},Na={},Rc={};ui&&(Rc=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function es(e){if(Na[e])return Na[e];if(!Ms[e])return e;var t=Ms[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Rc)return Na[e]=t[i];return e}var Dc=es("animationend"),Tc=es("animationiteration"),Bc=es("animationstart"),t_=es("transitionrun"),i_=es("transitionstart"),s_=es("transitioncancel"),Oc=es("transitionend"),kc=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 ei(e,t){kc.set(e,t),Qi(t,[e])}var cn=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)},qt=[],As=0,Ia=0;function hn(){for(var e=As,t=Ia=As=0;t<e;){var i=qt[t];qt[t++]=null;var s=qt[t];qt[t++]=null;var d=qt[t];qt[t++]=null;var g=qt[t];if(qt[t++]=null,s!==null&&d!==null){var M=s.pending;M===null?d.next=d:(d.next=M.next,M.next=d),s.pending=d}g!==0&&Hc(i,d,g)}}function un(e,t,i,s){qt[As++]=e,qt[As++]=t,qt[As++]=i,qt[As++]=s,Ia|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Pa(e,t,i,s){return un(e,t,i,s),dn(e)}function ts(e,t){return un(e,null,null,t),dn(e)}function Hc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var d=!1,g=e.return;g!==null;)g.childLanes|=i,s=g.alternate,s!==null&&(s.childLanes|=i),g.tag===22&&(e=g.stateNode,e===null||e._visibility&1||(d=!0)),e=g,g=g.return;return e.tag===3?(g=e.stateNode,d&&t!==null&&(d=31-ut(i),e=g.hiddenUpdates,s=e[d],s===null?e[d]=[t]:s.push(t),t.lane=i|536870912),g):null}function dn(e){if(50<Nr)throw Nr=0,Yl=null,Error(P(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rs={};function r_(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 Ht(e,t,i,s){return new r_(e,t,i,s)}function Fa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var i=e.alternate;return i===null?(i=Ht(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 zc(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 fn(e,t,i,s,d,g){var M=0;if(s=e,typeof e=="function")Fa(e)&&(M=1);else if(typeof e=="string")M=cv(e,i,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case C:return e=Ht(31,i,t,d),e.elementType=C,e.lanes=g,e;case c:return is(i.children,d,g,t);case r:M=8,d|=24;break;case h:return e=Ht(12,i,t,d|2),e.elementType=h,e.lanes=g,e;case x:return e=Ht(13,i,t,d),e.elementType=x,e.lanes=g,e;case _:return e=Ht(19,i,t,d),e.elementType=_,e.lanes=g,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:M=10;break e;case o:M=9;break e;case m:M=11;break e;case w:M=14;break e;case S:M=16,s=null;break e}M=29,i=Error(P(130,e===null?"null":typeof e,"")),s=null}return t=Ht(M,i,t,d),t.elementType=e,t.type=s,t.lanes=g,t}function is(e,t,i,s){return e=Ht(7,e,s,t),e.lanes=i,e}function ja(e,t,i){return e=Ht(6,e,null,t),e.lanes=i,e}function Nc(e){var t=Ht(18,null,null,0);return t.stateNode=e,t}function $a(e,t,i){return t=Ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Uc=new WeakMap;function Wt(e,t){if(typeof e=="object"&&e!==null){var i=Uc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ft(t)},Uc.set(e,t),t)}return{value:e,source:t,stack:ft(t)}}var Ds=[],Ts=0,_n=null,gr=0,Gt=[],Xt=0,Ri=null,ni=1,ai="";function fi(e,t){Ds[Ts++]=gr,Ds[Ts++]=_n,_n=e,gr=t}function Ic(e,t,i){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Ri,Ri=e;var s=ni;e=ai;var d=32-ut(s)-1;s&=~(1<<d),i+=1;var g=32-ut(t)+d;if(30<g){var M=d-d%5;g=(s&(1<<M)-1).toString(32),s>>=M,d-=M,ni=1<<32-ut(t)+d|i<<d|s,ai=g+e}else ni=1<<g|i<<d|s,ai=e}function qa(e){e.return!==null&&(fi(e,1),Ic(e,1,0))}function Wa(e){for(;e===_n;)_n=Ds[--Ts],Ds[Ts]=null,gr=Ds[--Ts],Ds[Ts]=null;for(;e===Ri;)Ri=Gt[--Xt],Gt[Xt]=null,ai=Gt[--Xt],Gt[Xt]=null,ni=Gt[--Xt],Gt[Xt]=null}function Pc(e,t){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Ri,ni=t.id,ai=t.overflow,Ri=e}var St=null,Ze=null,Pe=!1,Di=null,Vt=!1,Ga=Error(P(519));function Ti(e){var t=Error(P(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pr(Wt(t,e)),Ga}function Fc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[mt]=e,t[Et]=s,i){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(i=0;i<Ir.length;i++)He(Ir[i],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),ec(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),ic(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||rd(t.textContent,i)?(s.popover!=null&&(He("beforetoggle",t),He("toggle",t)),s.onScroll!=null&&He("scroll",t),s.onScrollEnd!=null&&He("scrollend",t),s.onClick!=null&&(t.onclick=hi),t=!0):t=!1,t||Ti(e,!0)}function jc(e){for(St=e.return;St;)switch(St.tag){case 5:case 31:case 13:Vt=!1;return;case 27:case 3:Vt=!0;return;default:St=St.return}}function Bs(e){if(e!==St)return!1;if(!Pe)return jc(e),Pe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||ho(e.type,e.memoizedProps)),i=!i),i&&Ze&&Ti(e),jc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));Ze=fd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));Ze=fd(e)}else t===27?(t=Ze,Wi(e.type)?(e=go,go=null,Ze=e):Ze=t):Ze=St?Kt(e.stateNode.nextSibling):null;return!0}function ss(){Ze=St=null,Pe=!1}function Xa(){var e=Di;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Di=null),e}function pr(e){Di===null?Di=[e]:Di.push(e)}var Va=T(null),rs=null,_i=null;function Bi(e,t,i){G(Va,t._currentValue),t._currentValue=i}function vi(e){e._currentValue=Va.current,H(Va)}function Ya(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 d=e.child;for(d!==null&&(d.return=e);d!==null;){var g=d.dependencies;if(g!==null){var M=d.child;g=g.firstContext;e:for(;g!==null;){var k=g;g=d;for(var W=0;W<t.length;W++)if(k.context===t[W]){g.lanes|=i,k=g.alternate,k!==null&&(k.lanes|=i),Ya(g.return,i,e),s||(M=null);break e}g=k.next}}else if(d.tag===18){if(M=d.return,M===null)throw Error(P(341));M.lanes|=i,g=M.alternate,g!==null&&(g.lanes|=i),Ya(M,i,e),M=null}else M=d.child;if(M!==null)M.return=d;else for(M=d;M!==null;){if(M===e){M=null;break}if(d=M.sibling,d!==null){d.return=M.return,M=d;break}M=M.return}d=M}}function Os(e,t,i,s){e=null;for(var d=t,g=!1;d!==null;){if(!g){if((d.flags&524288)!==0)g=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var M=d.alternate;if(M===null)throw Error(P(387));if(M=M.memoizedProps,M!==null){var k=d.type;kt(d.pendingProps.value,M.value)||(e!==null?e.push(k):e=[k])}}else if(d===q.current){if(M=d.alternate,M===null)throw Error(P(387));M.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(qr):e=[qr])}d=d.return}e!==null&&Ka(t,e,i,s),t.flags|=262144}function vn(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ns(e){rs=e,_i=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return $c(rs,e)}function gn(e,t){return rs===null&&ns(e),$c(e,t)}function $c(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},_i===null){if(e===null)throw Error(P(308));_i=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _i=_i.next=t;return i}var n_=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()})}},a_=j.unstable_scheduleCallback,l_=j.unstable_NormalPriority,lt={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qa(){return{controller:new n_,data:new Map,refCount:0}}function mr(e){e.refCount--,e.refCount===0&&a_(l_,function(){e.controller.abort()})}var Sr=null,Za=0,ks=0,Hs=null;function o_(e,t){if(Sr===null){var i=Sr=[];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&&Sr!==null){Hs!==null&&(Hs.status="fulfilled");var e=Sr;Sr=null,ks=0,Hs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function c_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var d=0;d<i.length;d++)(0,i[d])(t)},function(d){for(s.status="rejected",s.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),s}var Wc=N.S;N.S=function(e,t){Au=ge(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&o_(e,t),Wc!==null&&Wc(e,t)};var as=T(null);function Ja(){var e=as.current;return e!==null?e:Ke.pooledCache}function pn(e,t){t===null?G(as,as.current):G(as,t.pool)}function Gc(){var e=Ja();return e===null?null:{parent:lt._currentValue,pool:e}}var zs=Error(P(460)),el=Error(P(474)),mn=Error(P(542)),Sn={then:function(){}};function Xc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(hi,hi),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kc(e),e;default:if(typeof t.status=="string")t.then(hi,hi);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(P(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=s}},function(s){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kc(e),e}throw os=t,zs}}function ls(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(os=i,zs):i}}var os=null;function Yc(){if(os===null)throw Error(P(459));var e=os;return os=null,e}function Kc(e){if(e===zs||e===mn)throw Error(P(483))}var Ns=null,Cr=0;function Cn(e){var t=Cr;return Cr+=1,Ns===null&&(Ns=[]),Vc(Ns,e,t)}function yr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yn(e,t){throw t.$$typeof===p?Error(P(525)):(e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qc(e){function t(Q,X){if(e){var J=Q.deletions;J===null?(Q.deletions=[X],Q.flags|=16):J.push(X)}}function i(Q,X){if(!e)return null;for(;X!==null;)t(Q,X),X=X.sibling;return null}function s(Q){for(var X=new Map;Q!==null;)Q.key!==null?X.set(Q.key,Q):X.set(Q.index,Q),Q=Q.sibling;return X}function d(Q,X){return Q=di(Q,X),Q.index=0,Q.sibling=null,Q}function g(Q,X,J){return Q.index=J,e?(J=Q.alternate,J!==null?(J=J.index,J<X?(Q.flags|=67108866,X):J):(Q.flags|=67108866,X)):(Q.flags|=1048576,X)}function M(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function k(Q,X,J,oe){return X===null||X.tag!==6?(X=ja(J,Q.mode,oe),X.return=Q,X):(X=d(X,J),X.return=Q,X)}function W(Q,X,J,oe){var we=J.type;return we===c?le(Q,X,J.props.children,oe,J.key):X!==null&&(X.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===S&&ls(we)===X.type)?(X=d(X,J.props),yr(X,J),X.return=Q,X):(X=fn(J.type,J.key,J.props,null,Q.mode,oe),yr(X,J),X.return=Q,X)}function ee(Q,X,J,oe){return X===null||X.tag!==4||X.stateNode.containerInfo!==J.containerInfo||X.stateNode.implementation!==J.implementation?(X=$a(J,Q.mode,oe),X.return=Q,X):(X=d(X,J.children||[]),X.return=Q,X)}function le(Q,X,J,oe,we){return X===null||X.tag!==7?(X=is(J,Q.mode,oe,we),X.return=Q,X):(X=d(X,J),X.return=Q,X)}function he(Q,X,J){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=ja(""+X,Q.mode,J),X.return=Q,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case y:return J=fn(X.type,X.key,X.props,null,Q.mode,J),yr(J,X),J.return=Q,J;case b:return X=$a(X,Q.mode,J),X.return=Q,X;case S:return X=ls(X),he(Q,X,J)}if($(X)||E(X))return X=is(X,Q.mode,J,null),X.return=Q,X;if(typeof X.then=="function")return he(Q,Cn(X),J);if(X.$$typeof===l)return he(Q,gn(Q,X),J);yn(Q,X)}return null}function re(Q,X,J,oe){var we=X!==null?X.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return we!==null?null:k(Q,X,""+J,oe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case y:return J.key===we?W(Q,X,J,oe):null;case b:return J.key===we?ee(Q,X,J,oe):null;case S:return J=ls(J),re(Q,X,J,oe)}if($(J)||E(J))return we!==null?null:le(Q,X,J,oe,null);if(typeof J.then=="function")return re(Q,X,Cn(J),oe);if(J.$$typeof===l)return re(Q,X,gn(Q,J),oe);yn(Q,J)}return null}function ae(Q,X,J,oe,we){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Q=Q.get(J)||null,k(X,Q,""+oe,we);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case y:return Q=Q.get(oe.key===null?J:oe.key)||null,W(X,Q,oe,we);case b:return Q=Q.get(oe.key===null?J:oe.key)||null,ee(X,Q,oe,we);case S:return oe=ls(oe),ae(Q,X,J,oe,we)}if($(oe)||E(oe))return Q=Q.get(J)||null,le(X,Q,oe,we,null);if(typeof oe.then=="function")return ae(Q,X,J,Cn(oe),we);if(oe.$$typeof===l)return ae(Q,X,J,gn(X,oe),we);yn(X,oe)}return null}function Ce(Q,X,J,oe){for(var we=null,Fe=null,ye=X,Be=X=0,Ue=null;ye!==null&&Be<J.length;Be++){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var je=re(Q,ye,J[Be],oe);if(je===null){ye===null&&(ye=Ue);break}e&&ye&&je.alternate===null&&t(Q,ye),X=g(je,X,Be),Fe===null?we=je:Fe.sibling=je,Fe=je,ye=Ue}if(Be===J.length)return i(Q,ye),Pe&&fi(Q,Be),we;if(ye===null){for(;Be<J.length;Be++)ye=he(Q,J[Be],oe),ye!==null&&(X=g(ye,X,Be),Fe===null?we=ye:Fe.sibling=ye,Fe=ye);return Pe&&fi(Q,Be),we}for(ye=s(ye);Be<J.length;Be++)Ue=ae(ye,Q,Be,J[Be],oe),Ue!==null&&(e&&Ue.alternate!==null&&ye.delete(Ue.key===null?Be:Ue.key),X=g(Ue,X,Be),Fe===null?we=Ue:Fe.sibling=Ue,Fe=Ue);return e&&ye.forEach(function(Ki){return t(Q,Ki)}),Pe&&fi(Q,Be),we}function Le(Q,X,J,oe){if(J==null)throw Error(P(151));for(var we=null,Fe=null,ye=X,Be=X=0,Ue=null,je=J.next();ye!==null&&!je.done;Be++,je=J.next()){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var Ki=re(Q,ye,je.value,oe);if(Ki===null){ye===null&&(ye=Ue);break}e&&ye&&Ki.alternate===null&&t(Q,ye),X=g(Ki,X,Be),Fe===null?we=Ki:Fe.sibling=Ki,Fe=Ki,ye=Ue}if(je.done)return i(Q,ye),Pe&&fi(Q,Be),we;if(ye===null){for(;!je.done;Be++,je=J.next())je=he(Q,je.value,oe),je!==null&&(X=g(je,X,Be),Fe===null?we=je:Fe.sibling=je,Fe=je);return Pe&&fi(Q,Be),we}for(ye=s(ye);!je.done;Be++,je=J.next())je=ae(ye,Q,Be,je.value,oe),je!==null&&(e&&je.alternate!==null&&ye.delete(je.key===null?Be:je.key),X=g(je,X,Be),Fe===null?we=je:Fe.sibling=je,Fe=je);return e&&ye.forEach(function(Cv){return t(Q,Cv)}),Pe&&fi(Q,Be),we}function Ye(Q,X,J,oe){if(typeof J=="object"&&J!==null&&J.type===c&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case y:e:{for(var we=J.key;X!==null;){if(X.key===we){if(we=J.type,we===c){if(X.tag===7){i(Q,X.sibling),oe=d(X,J.props.children),oe.return=Q,Q=oe;break e}}else if(X.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===S&&ls(we)===X.type){i(Q,X.sibling),oe=d(X,J.props),yr(oe,J),oe.return=Q,Q=oe;break e}i(Q,X);break}else t(Q,X);X=X.sibling}J.type===c?(oe=is(J.props.children,Q.mode,oe,J.key),oe.return=Q,Q=oe):(oe=fn(J.type,J.key,J.props,null,Q.mode,oe),yr(oe,J),oe.return=Q,Q=oe)}return M(Q);case b:e:{for(we=J.key;X!==null;){if(X.key===we)if(X.tag===4&&X.stateNode.containerInfo===J.containerInfo&&X.stateNode.implementation===J.implementation){i(Q,X.sibling),oe=d(X,J.children||[]),oe.return=Q,Q=oe;break e}else{i(Q,X);break}else t(Q,X);X=X.sibling}oe=$a(J,Q.mode,oe),oe.return=Q,Q=oe}return M(Q);case S:return J=ls(J),Ye(Q,X,J,oe)}if($(J))return Ce(Q,X,J,oe);if(E(J)){if(we=E(J),typeof we!="function")throw Error(P(150));return J=we.call(J),Le(Q,X,J,oe)}if(typeof J.then=="function")return Ye(Q,X,Cn(J),oe);if(J.$$typeof===l)return Ye(Q,X,gn(Q,J),oe);yn(Q,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,X!==null&&X.tag===6?(i(Q,X.sibling),oe=d(X,J),oe.return=Q,Q=oe):(i(Q,X),oe=ja(J,Q.mode,oe),oe.return=Q,Q=oe),M(Q)):i(Q,X)}return function(Q,X,J,oe){try{Cr=0;var we=Ye(Q,X,J,oe);return Ns=null,we}catch(ye){if(ye===zs||ye===mn)throw ye;var Fe=Ht(29,ye,null,Q.mode);return Fe.lanes=oe,Fe.return=Q,Fe}finally{}}}var cs=Qc(!0),Zc=Qc(!1),Oi=!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 ki(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Hi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,($e&2)!==0){var d=s.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),s.pending=t,t=dn(e),Hc(e,null,i),t}return un(e,s,t,i),dn(e)}function br(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,$o(e,i)}}function sl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var d=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var M={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};g===null?d=g=M:g=g.next=M,i=i.next}while(i!==null);g===null?d=g=t:g=g.next=t}else d=g=t;i={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:g,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 wr(){if(rl){var e=Hs;if(e!==null)throw e}}function xr(e,t,i,s){rl=!1;var d=e.updateQueue;Oi=!1;var g=d.firstBaseUpdate,M=d.lastBaseUpdate,k=d.shared.pending;if(k!==null){d.shared.pending=null;var W=k,ee=W.next;W.next=null,M===null?g=ee:M.next=ee,M=W;var le=e.alternate;le!==null&&(le=le.updateQueue,k=le.lastBaseUpdate,k!==M&&(k===null?le.firstBaseUpdate=ee:k.next=ee,le.lastBaseUpdate=W))}if(g!==null){var he=d.baseState;M=0,le=ee=W=null,k=g;do{var re=k.lane&-536870913,ae=re!==k.lane;if(ae?(Ne&re)===re:(s&re)===re){re!==0&&re===ks&&(rl=!0),le!==null&&(le=le.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ce=e,Le=k;re=t;var Ye=i;switch(Le.tag){case 1:if(Ce=Le.payload,typeof Ce=="function"){he=Ce.call(Ye,he,re);break e}he=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Le.payload,re=typeof Ce=="function"?Ce.call(Ye,he,re):Ce,re==null)break e;he=a({},he,re);break e;case 2:Oi=!0}}re=k.callback,re!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=d.callbacks,ae===null?d.callbacks=[re]:ae.push(re))}else ae={lane:re,tag:k.tag,payload:k.payload,callback:k.callback,next:null},le===null?(ee=le=ae,W=he):le=le.next=ae,M|=re;if(k=k.next,k===null){if(k=d.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,d.lastBaseUpdate=ae,d.shared.pending=null}}while(!0);le===null&&(W=he),d.baseState=W,d.firstBaseUpdate=ee,d.lastBaseUpdate=le,g===null&&(d.shared.lanes=0),Pi|=M,e.lanes=M,e.memoizedState=he}}function Jc(e,t){if(typeof e!="function")throw Error(P(191,e));e.call(t)}function eh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Jc(i[e],t)}var Us=T(null),bn=T(0);function th(e,t){e=xi,G(bn,e),G(Us,t),xi=e|t.baseLanes}function nl(){G(bn,xi),G(Us,Us.current)}function al(){xi=bn.current,H(Us),H(bn)}var zt=T(null),Yt=null;function zi(e){var t=e.alternate;G(nt,nt.current&1),G(zt,e),Yt===null&&(t===null||Us.current!==null||t.memoizedState!==null)&&(Yt=e)}function ll(e){G(nt,nt.current),G(zt,e),Yt===null&&(Yt=e)}function ih(e){e.tag===22?(G(nt,nt.current),G(zt,e),Yt===null&&(Yt=e)):Ni()}function Ni(){G(nt,nt.current),G(zt,zt.current)}function Nt(e){H(zt),Yt===e&&(Yt=null),H(nt)}var nt=T(0);function wn(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 gi=0,Te=null,Xe=null,ot=null,xn=!1,Is=!1,hs=!1,Ln=0,Lr=0,Ps=null,h_=0;function st(){throw Error(P(321))}function ol(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}function cl(e,t,i,s,d,g){return gi=g,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Ih:xl,hs=!1,g=i(s,d),hs=!1,Is&&(g=rh(t,i,s,d)),sh(e),g}function sh(e){N.H=Ar;var t=Xe!==null&&Xe.next!==null;if(gi=0,ot=Xe=Te=null,xn=!1,Lr=0,Ps=null,t)throw Error(P(300));e===null||ct||(e=e.dependencies,e!==null&&vn(e)&&(ct=!0))}function rh(e,t,i,s){Te=e;var d=0;do{if(Is&&(Ps=null),Lr=0,Is=!1,25<=d)throw Error(P(301));if(d+=1,ot=Xe=null,e.updateQueue!=null){var g=e.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}N.H=Ph,g=t(i,s)}while(Is);return g}function u_(){var e=N.H,t=e.useState()[0];return t=typeof t.then=="function"?Er(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Te.flags|=1024),t}function hl(){var e=Ln!==0;return Ln=0,e}function ul(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function dl(e){if(xn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xn=!1}gi=0,ot=Xe=Te=null,Is=!1,Lr=Ln=0,Ps=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Te.memoizedState=ot=e:ot=ot.next=e,ot}function at(){if(Xe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?Te.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw Te.alternate===null?Error(P(467)):Error(P(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?Te.memoizedState=ot=e:ot=ot.next=e}return ot}function En(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Er(e){var t=Lr;return Lr+=1,Ps===null&&(Ps=[]),e=Vc(Ps,e,t),t=Te,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Ih:xl),e}function Mn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Er(e);if(e.$$typeof===l)return Ct(e)}throw Error(P(438,String(e)))}function fl(e){var t=null,i=Te.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Te.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=En(),Te.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 pi(e,t){return typeof t=="function"?t(e):t}function An(e){var t=at();return _l(t,Xe,e)}function _l(e,t,i){var s=e.queue;if(s===null)throw Error(P(311));s.lastRenderedReducer=i;var d=e.baseQueue,g=s.pending;if(g!==null){if(d!==null){var M=d.next;d.next=g.next,g.next=M}t.baseQueue=d=g,s.pending=null}if(g=e.baseState,d===null)e.memoizedState=g;else{t=d.next;var k=M=null,W=null,ee=t,le=!1;do{var he=ee.lane&-536870913;if(he!==ee.lane?(Ne&he)===he:(gi&he)===he){var re=ee.revertLane;if(re===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),he===ks&&(le=!0);else if((gi&re)===re){ee=ee.next,re===ks&&(le=!0);continue}else he={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},W===null?(k=W=he,M=g):W=W.next=he,Te.lanes|=re,Pi|=re;he=ee.action,hs&&i(g,he),g=ee.hasEagerState?ee.eagerState:i(g,he)}else re={lane:he,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},W===null?(k=W=re,M=g):W=W.next=re,Te.lanes|=he,Pi|=he;ee=ee.next}while(ee!==null&&ee!==t);if(W===null?M=g:W.next=k,!kt(g,e.memoizedState)&&(ct=!0,le&&(i=Hs,i!==null)))throw i;e.memoizedState=g,e.baseState=M,e.baseQueue=W,s.lastRenderedState=g}return d===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function vl(e){var t=at(),i=t.queue;if(i===null)throw Error(P(311));i.lastRenderedReducer=e;var s=i.dispatch,d=i.pending,g=t.memoizedState;if(d!==null){i.pending=null;var M=d=d.next;do g=e(g,M.action),M=M.next;while(M!==d);kt(g,t.memoizedState)||(ct=!0),t.memoizedState=g,t.baseQueue===null&&(t.baseState=g),i.lastRenderedState=g}return[g,s]}function nh(e,t,i){var s=Te,d=at(),g=Pe;if(g){if(i===void 0)throw Error(P(407));i=i()}else i=t();var M=!kt((Xe||d).memoizedState,i);if(M&&(d.memoizedState=i,ct=!0),d=d.queue,ml(oh.bind(null,s,d,e),[e]),d.getSnapshot!==t||M||ot!==null&&ot.memoizedState.tag&1){if(s.flags|=2048,Fs(9,{destroy:void 0},lh.bind(null,s,d,i,t),null),Ke===null)throw Error(P(349));g||(gi&127)!==0||ah(s,t,i)}return i}function ah(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=En(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function lh(e,t,i,s){t.value=i,t.getSnapshot=s,ch(t)&&hh(e)}function oh(e,t,i){return i(function(){ch(t)&&hh(e)})}function ch(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function hh(e){var t=ts(e,2);t!==null&&Bt(t,e,2)}function gl(e){var t=Lt();if(typeof e=="function"){var i=e;if(e=i(),hs){vt(!0);try{i()}finally{vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:e},t}function uh(e,t,i,s){return e.baseState=i,_l(e,Xe,typeof s=="function"?s:pi)}function d_(e,t,i,s,d){if(Tn(e))throw Error(P(485));if(e=t.action,e!==null){var g={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){g.listeners.push(M)}};N.T!==null?i(!0):g.isTransition=!1,s(g),i=t.pending,i===null?(g.next=t.pending=g,dh(t,g)):(g.next=i.next,t.pending=i.next=g)}}function dh(e,t){var i=t.action,s=t.payload,d=e.state;if(t.isTransition){var g=N.T,M={};N.T=M;try{var k=i(d,s),W=N.S;W!==null&&W(M,k),fh(e,t,k)}catch(ee){pl(e,t,ee)}finally{g!==null&&M.types!==null&&(g.types=M.types),N.T=g}}else try{g=i(d,s),fh(e,t,g)}catch(ee){pl(e,t,ee)}}function fh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){_h(e,t,s)},function(s){return pl(e,t,s)}):_h(e,t,i)}function _h(e,t,i){t.status="fulfilled",t.value=i,vh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,dh(e,i)))}function pl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,vh(t),t=t.next;while(t!==s)}e.action=null}function vh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gh(e,t){return t}function ph(e,t){if(Pe){var i=Ke.formState;if(i!==null){e:{var s=Te;if(Pe){if(Ze){t:{for(var d=Ze,g=Vt;d.nodeType!==8;){if(!g){d=null;break t}if(d=Kt(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){Ze=Kt(d.nextSibling),s=d.data==="F!";break e}}Ti(s)}s=!1}s&&(t=i[0])}}return i=Lt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gh,lastRenderedState:t},i.queue=s,i=zh.bind(null,Te,s),s.dispatch=i,s=gl(!1),g=wl.bind(null,Te,!1,s.queue),s=Lt(),d={state:t,dispatch:null,action:e,pending:null},s.queue=d,i=d_.bind(null,Te,d,g,i),d.dispatch=i,s.memoizedState=e,[t,i,!1]}function mh(e){var t=at();return Sh(t,Xe,e)}function Sh(e,t,i){if(t=_l(e,t,gh)[0],e=An(pi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Er(t)}catch(M){throw M===zs?mn:M}else s=t;t=at();var d=t.queue,g=d.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,Fs(9,{destroy:void 0},f_.bind(null,d,i),null)),[s,g,e]}function f_(e,t){e.action=t}function Ch(e){var t=at(),i=Xe;if(i!==null)return Sh(t,i,e);at(),t=t.memoizedState,i=at();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=Te.updateQueue,t===null&&(t=En(),Te.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 at().memoizedState}function Rn(e,t,i,s){var d=Lt();Te.flags|=e,d.memoizedState=Fs(1|t,{destroy:void 0},i,s===void 0?null:s)}function Dn(e,t,i,s){var d=at();s=s===void 0?null:s;var g=d.memoizedState.inst;Xe!==null&&s!==null&&ol(s,Xe.memoizedState.deps)?d.memoizedState=Fs(t,g,i,s):(Te.flags|=e,d.memoizedState=Fs(1|t,g,i,s))}function bh(e,t){Rn(8390656,8,e,t)}function ml(e,t){Dn(2048,8,e,t)}function __(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=En(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function wh(e){var t=at().memoizedState;return __({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(P(440));return t.impl.apply(void 0,arguments)}}function xh(e,t){return Dn(4,2,e,t)}function Lh(e,t){return Dn(4,4,e,t)}function Eh(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 Mh(e,t,i){i=i!=null?i.concat([e]):null,Dn(4,4,Eh.bind(null,t,e),i)}function Sl(){}function Ah(e,t){var i=at();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=at();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ol(t,s[1]))return s[0];if(s=e(),hs){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s}function Cl(e,t,i){return i===void 0||(gi&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Du(),Te.lanes|=e,Pi|=e,i)}function Dh(e,t,i,s){return kt(i,t)?i:Us.current!==null?(e=Cl(e,i,s),kt(e,t)||(ct=!0),e):(gi&42)===0||(gi&1073741824)!==0&&(Ne&261930)===0?(ct=!0,e.memoizedState=i):(e=Du(),Te.lanes|=e,Pi|=e,t)}function Th(e,t,i,s,d){var g=U.p;U.p=g!==0&&8>g?g:8;var M=N.T,k={};N.T=k,wl(e,!1,t,i);try{var W=d(),ee=N.S;if(ee!==null&&ee(k,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var le=c_(W,s);Mr(e,t,le,Pt(e))}else Mr(e,t,s,Pt(e))}catch(he){Mr(e,t,{then:function(){},status:"rejected",reason:he},Pt())}finally{U.p=g,M!==null&&k.types!==null&&(M.types=k.types),N.T=M}}function v_(){}function yl(e,t,i,s){if(e.tag!==5)throw Error(P(476));var d=Bh(e).queue;Th(e,d,t,I,i===null?v_:function(){return Oh(e),i(s)})}function Bh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:I},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Oh(e){var t=Bh(e);t.next===null&&(t=e.alternate.memoizedState),Mr(e,t.next.queue,{},Pt())}function bl(){return Ct(qr)}function kh(){return at().memoizedState}function Hh(){return at().memoizedState}function g_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Pt();e=ki(i);var s=Hi(t,e,i);s!==null&&(Bt(s,t,i),br(s,t,i)),t={cache:Qa()},e.payload=t;return}t=t.return}}function p_(e,t,i){var s=Pt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tn(e)?Nh(t,i):(i=Pa(e,t,i,s),i!==null&&(Bt(i,e,s),Uh(i,t,s)))}function zh(e,t,i){var s=Pt();Mr(e,t,i,s)}function Mr(e,t,i,s){var d={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tn(e))Nh(t,d);else{var g=e.alternate;if(e.lanes===0&&(g===null||g.lanes===0)&&(g=t.lastRenderedReducer,g!==null))try{var M=t.lastRenderedState,k=g(M,i);if(d.hasEagerState=!0,d.eagerState=k,kt(k,M))return un(e,t,d,0),Ke===null&&hn(),!1}catch{}finally{}if(i=Pa(e,t,d,s),i!==null)return Bt(i,e,s),Uh(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},Tn(e)){if(t)throw Error(P(479))}else t=Pa(e,i,s,2),t!==null&&Bt(t,e,2)}function Tn(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Nh(e,t){Is=xn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Uh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,$o(e,i)}}var Ar={readContext:Ct,use:Mn,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};Ar.useEffectEvent=st;var Ih={readContext:Ct,use:Mn,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:bh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Rn(4194308,4,Eh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Rn(4194308,4,e,t)},useInsertionEffect:function(e,t){Rn(4,2,e,t)},useMemo:function(e,t){var i=Lt();t=t===void 0?null:t;var s=e();if(hs){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Lt();if(i!==void 0){var d=i(t);if(hs){vt(!0);try{i(t)}finally{vt(!1)}}}else d=t;return s.memoizedState=s.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},s.queue=e,e=e.dispatch=p_.bind(null,Te,e),[s.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=gl(e);var t=e.queue,i=zh.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Sl,useDeferredValue:function(e,t){var i=Lt();return Cl(i,e,t)},useTransition:function(){var e=gl(!1);return e=Th.bind(null,Te,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Te,d=Lt();if(Pe){if(i===void 0)throw Error(P(407));i=i()}else{if(i=t(),Ke===null)throw Error(P(349));(Ne&127)!==0||ah(s,t,i)}d.memoizedState=i;var g={value:i,getSnapshot:t};return d.queue=g,bh(oh.bind(null,s,g,e),[e]),s.flags|=2048,Fs(9,{destroy:void 0},lh.bind(null,s,g,i,t),null),i},useId:function(){var e=Lt(),t=Ke.identifierPrefix;if(Pe){var i=ai,s=ni;i=(s&~(1<<32-ut(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Ln++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=h_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bl,useFormState:ph,useActionState:ph,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=wl.bind(null,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:fl,useCacheRefresh:function(){return Lt().memoizedState=g_.bind(null,Te)},useEffectEvent:function(e){var t=Lt(),i={impl:e};return t.memoizedState=i,function(){if(($e&2)!==0)throw Error(P(440));return i.impl.apply(void 0,arguments)}}},xl={readContext:Ct,use:Mn,useCallback:Ah,useContext:Ct,useEffect:ml,useImperativeHandle:Mh,useInsertionEffect:xh,useLayoutEffect:Lh,useMemo:Rh,useReducer:An,useRef:yh,useState:function(){return An(pi)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=at();return Dh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=An(pi)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:nh,useId:kh,useHostTransitionStatus:bl,useFormState:mh,useActionState:mh,useOptimistic:function(e,t){var i=at();return uh(i,Xe,e,t)},useMemoCache:fl,useCacheRefresh:Hh};xl.useEffectEvent=wh;var Ph={readContext:Ct,use:Mn,useCallback:Ah,useContext:Ct,useEffect:ml,useImperativeHandle:Mh,useInsertionEffect:xh,useLayoutEffect:Lh,useMemo:Rh,useReducer:vl,useRef:yh,useState:function(){return vl(pi)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=at();return Xe===null?Cl(i,e,t):Dh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=vl(pi)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:nh,useId:kh,useHostTransitionStatus:bl,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var i=at();return Xe!==null?uh(i,Xe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:fl,useCacheRefresh:Hh};Ph.useEffectEvent=wh;function Ll(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:a({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var El={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Pt(),d=ki(s);d.payload=t,i!=null&&(d.callback=i),t=Hi(e,d,s),t!==null&&(Bt(t,e,s),br(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Pt(),d=ki(s);d.tag=1,d.payload=t,i!=null&&(d.callback=i),t=Hi(e,d,s),t!==null&&(Bt(t,e,s),br(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Pt(),s=ki(i);s.tag=2,t!=null&&(s.callback=t),t=Hi(e,s,i),t!==null&&(Bt(t,e,i),br(t,e,i))}};function Fh(e,t,i,s,d,g,M){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,g,M):t.prototype&&t.prototype.isPureReactComponent?!_r(i,s)||!_r(d,g):!0}function jh(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&&El.enqueueReplaceState(t,t.state,null)}function us(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=a({},i));for(var d in e)i[d]===void 0&&(i[d]=e[d])}return i}function $h(e){cn(e)}function qh(e){console.error(e)}function Wh(e){cn(e)}function Bn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Gh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Ml(e,t,i){return i=ki(i),i.tag=3,i.payload={element:null},i.callback=function(){Bn(e,t)},i}function Xh(e){return e=ki(e),e.tag=3,e}function Vh(e,t,i,s){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;e.payload=function(){return d(g)},e.callback=function(){Gh(t,i,s)}}var M=i.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(e.callback=function(){Gh(t,i,s),typeof d!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})})}function m_(e,t,i,s,d){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Os(t,i,d,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Yt===null?qn():i.alternate===null&&rt===0&&(rt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,s===Sn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Zl(e,s,d)),!1;case 22:return i.flags|=65536,s===Sn?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,d)),!1}throw Error(P(435,i.tag))}return Zl(e,s,d),qn(),!1}if(Pe)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,s!==Ga&&(e=Error(P(422),{cause:s}),pr(Wt(e,i)))):(s!==Ga&&(t=Error(P(423),{cause:s}),pr(Wt(t,i))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,s=Wt(s,i),d=Ml(e.stateNode,s,d),sl(e,d),rt!==4&&(rt=2)),!1;var g=Error(P(520),{cause:s});if(g=Wt(g,i),zr===null?zr=[g]:zr.push(g),rt!==4&&(rt=2),t===null)return!0;s=Wt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=d&-d,i.lanes|=e,e=Ml(i.stateNode,s,e),sl(i,e),!1;case 1:if(t=i.type,g=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Fi===null||!Fi.has(g))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Xh(d),Vh(d,e,i,s),sl(i,d),!1}i=i.return}while(i!==null);return!1}var Al=Error(P(461)),ct=!1;function yt(e,t,i,s){t.child=e===null?Zc(t,null,i,s):cs(t,e.child,i,s)}function Yh(e,t,i,s,d){i=i.render;var g=t.ref;if("ref"in s){var M={};for(var k in s)k!=="ref"&&(M[k]=s[k])}else M=s;return ns(t),s=cl(e,t,i,M,g,d),k=hl(),e!==null&&!ct?(ul(e,t,d),mi(e,t,d)):(Pe&&k&&qa(t),t.flags|=1,yt(e,t,s,d),t.child)}function Kh(e,t,i,s,d){if(e===null){var g=i.type;return typeof g=="function"&&!Fa(g)&&g.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=g,Qh(e,t,g,s,d)):(e=fn(i.type,null,s,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(g=e.child,!zl(e,d)){var M=g.memoizedProps;if(i=i.compare,i=i!==null?i:_r,i(M,s)&&e.ref===t.ref)return mi(e,t,d)}return t.flags|=1,e=di(g,s),e.ref=t.ref,e.return=t,t.child=e}function Qh(e,t,i,s,d){if(e!==null){var g=e.memoizedProps;if(_r(g,s)&&e.ref===t.ref)if(ct=!1,t.pendingProps=s=g,zl(e,d))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,mi(e,t,d)}return Rl(e,t,i,s,d)}function Zh(e,t,i,s){var d=s.children,g=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(g=g!==null?g.baseLanes|i:i,e!==null){for(s=t.child=e.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~g}else s=0,t.child=null;return Jh(e,t,g,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pn(t,g!==null?g.cachePool:null),g!==null?th(t,g):nl(),ih(t);else return s=t.lanes=536870912,Jh(e,t,g!==null?g.baseLanes|i:i,i,s)}else g!==null?(pn(t,g.cachePool),th(t,g),Ni(),t.memoizedState=null):(e!==null&&pn(t,null),nl(),Ni());return yt(e,t,d,i),t.child}function Rr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Jh(e,t,i,s,d){var g=Ja();return g=g===null?null:{parent:lt._currentValue,pool:g},t.memoizedState={baseLanes:i,cachePool:g},e!==null&&pn(t,null),nl(),ih(t),e!==null&&Os(e,t,s,!0),t.childLanes=d,null}function On(e,t){return t=Hn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function eu(e,t,i){return cs(t,e.child,null,i),e=On(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function S_(e,t,i){var s=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(s.mode==="hidden")return e=On(t,s),t.lanes=536870912,Rr(null,e);if(ll(t),(e=Ze)?(e=dd(e,Vt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Nc(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Ti(t);return t.lanes=536870912,null}return On(t,s)}var g=e.memoizedState;if(g!==null){var M=g.dehydrated;if(ll(t),d)if(t.flags&256)t.flags&=-257,t=eu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(P(558));else if(ct||Os(e,t,i,!1),d=(i&e.childLanes)!==0,ct||d){if(s=Ke,s!==null&&(M=qo(s,i),M!==0&&M!==g.retryLane))throw g.retryLane=M,ts(e,M),Bt(s,e,M),Al;qn(),t=eu(e,t,i)}else e=g.treeContext,Ze=Kt(M.nextSibling),St=t,Pe=!0,Di=null,Vt=!1,e!==null&&Pc(t,e),t=On(t,s),t.flags|=4096;return t}return e=di(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kn(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(P(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Rl(e,t,i,s,d){return ns(t),i=cl(e,t,i,s,void 0,d),s=hl(),e!==null&&!ct?(ul(e,t,d),mi(e,t,d)):(Pe&&s&&qa(t),t.flags|=1,yt(e,t,i,d),t.child)}function tu(e,t,i,s,d,g){return ns(t),t.updateQueue=null,i=rh(t,s,i,d),sh(e),s=hl(),e!==null&&!ct?(ul(e,t,g),mi(e,t,g)):(Pe&&s&&qa(t),t.flags|=1,yt(e,t,i,g),t.child)}function iu(e,t,i,s,d){if(ns(t),t.stateNode===null){var g=Rs,M=i.contextType;typeof M=="object"&&M!==null&&(g=Ct(M)),g=new i(s,g),t.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=El,t.stateNode=g,g._reactInternals=t,g=t.stateNode,g.props=s,g.state=t.memoizedState,g.refs={},tl(t),M=i.contextType,g.context=typeof M=="object"&&M!==null?Ct(M):Rs,g.state=t.memoizedState,M=i.getDerivedStateFromProps,typeof M=="function"&&(Ll(t,i,M,s),g.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(M=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),M!==g.state&&El.enqueueReplaceState(g,g.state,null),xr(t,s,g,d),wr(),g.state=t.memoizedState),typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){g=t.stateNode;var k=t.memoizedProps,W=us(i,k);g.props=W;var ee=g.context,le=i.contextType;M=Rs,typeof le=="object"&&le!==null&&(M=Ct(le));var he=i.getDerivedStateFromProps;le=typeof he=="function"||typeof g.getSnapshotBeforeUpdate=="function",k=t.pendingProps!==k,le||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k||ee!==M)&&jh(t,g,s,M),Oi=!1;var re=t.memoizedState;g.state=re,xr(t,s,g,d),wr(),ee=t.memoizedState,k||re!==ee||Oi?(typeof he=="function"&&(Ll(t,i,he,s),ee=t.memoizedState),(W=Oi||Fh(t,i,W,s,re,ee,M))?(le||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(t.flags|=4194308)):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=ee),g.props=s,g.state=ee,g.context=M,s=W):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{g=t.stateNode,il(e,t),M=t.memoizedProps,le=us(i,M),g.props=le,he=t.pendingProps,re=g.context,ee=i.contextType,W=Rs,typeof ee=="object"&&ee!==null&&(W=Ct(ee)),k=i.getDerivedStateFromProps,(ee=typeof k=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(M!==he||re!==W)&&jh(t,g,s,W),Oi=!1,re=t.memoizedState,g.state=re,xr(t,s,g,d),wr();var ae=t.memoizedState;M!==he||re!==ae||Oi||e!==null&&e.dependencies!==null&&vn(e.dependencies)?(typeof k=="function"&&(Ll(t,i,k,s),ae=t.memoizedState),(le=Oi||Fh(t,i,le,s,re,ae,W)||e!==null&&e.dependencies!==null&&vn(e.dependencies))?(ee||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,ae,W),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,ae,W)),typeof g.componentDidUpdate=="function"&&(t.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof g.componentDidUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ae),g.props=s,g.state=ae,g.context=W,s=le):(typeof g.componentDidUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),s=!1)}return g=s,kn(e,t),s=(t.flags&128)!==0,g||s?(g=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:g.render(),t.flags|=1,e!==null&&s?(t.child=cs(t,e.child,null,d),t.child=cs(t,null,i,d)):yt(e,t,i,d),t.memoizedState=g.state,e=t.child):e=mi(e,t,d),e}function su(e,t,i,s){return ss(),t.flags|=256,yt(e,t,i,s),t.child}var Dl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tl(e){return{baseLanes:e,cachePool:Gc()}}function Bl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=It),e}function ru(e,t,i){var s=t.pendingProps,d=!1,g=(t.flags&128)!==0,M;if((M=g)||(M=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),M&&(d=!0,t.flags&=-129),M=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(d?zi(t):Ni(),(e=Ze)?(e=dd(e,Vt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Nc(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Ti(t);return vo(e)?t.lanes=32:t.lanes=536870912,null}var k=s.children;return s=s.fallback,d?(Ni(),d=t.mode,k=Hn({mode:"hidden",children:k},d),s=is(s,d,i,null),k.return=t,s.return=t,k.sibling=s,t.child=k,s=t.child,s.memoizedState=Tl(i),s.childLanes=Bl(e,M,i),t.memoizedState=Dl,Rr(null,s)):(zi(t),Ol(t,k))}var W=e.memoizedState;if(W!==null&&(k=W.dehydrated,k!==null)){if(g)t.flags&256?(zi(t),t.flags&=-257,t=kl(e,t,i)):t.memoizedState!==null?(Ni(),t.child=e.child,t.flags|=128,t=null):(Ni(),k=s.fallback,d=t.mode,s=Hn({mode:"visible",children:s.children},d),k=is(k,d,i,null),k.flags|=2,s.return=t,k.return=t,s.sibling=k,t.child=s,cs(t,e.child,null,i),s=t.child,s.memoizedState=Tl(i),s.childLanes=Bl(e,M,i),t.memoizedState=Dl,t=Rr(null,s));else if(zi(t),vo(k)){if(M=k.nextSibling&&k.nextSibling.dataset,M)var ee=M.dgst;M=ee,s=Error(P(419)),s.stack="",s.digest=M,pr({value:s,source:null,stack:null}),t=kl(e,t,i)}else if(ct||Os(e,t,i,!1),M=(i&e.childLanes)!==0,ct||M){if(M=Ke,M!==null&&(s=qo(M,i),s!==0&&s!==W.retryLane))throw W.retryLane=s,ts(e,s),Bt(M,e,s),Al;_o(k)||qn(),t=kl(e,t,i)}else _o(k)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,Ze=Kt(k.nextSibling),St=t,Pe=!0,Di=null,Vt=!1,e!==null&&Pc(t,e),t=Ol(t,s.children),t.flags|=4096);return t}return d?(Ni(),k=s.fallback,d=t.mode,W=e.child,ee=W.sibling,s=di(W,{mode:"hidden",children:s.children}),s.subtreeFlags=W.subtreeFlags&65011712,ee!==null?k=di(ee,k):(k=is(k,d,i,null),k.flags|=2),k.return=t,s.return=t,s.sibling=k,t.child=s,Rr(null,s),s=t.child,k=e.child.memoizedState,k===null?k=Tl(i):(d=k.cachePool,d!==null?(W=lt._currentValue,d=d.parent!==W?{parent:W,pool:W}:d):d=Gc(),k={baseLanes:k.baseLanes|i,cachePool:d}),s.memoizedState=k,s.childLanes=Bl(e,M,i),t.memoizedState=Dl,Rr(e.child,s)):(zi(t),i=e.child,e=i.sibling,i=di(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(M=t.deletions,M===null?(t.deletions=[e],t.flags|=16):M.push(e)),t.child=i,t.memoizedState=null,i)}function Ol(e,t){return t=Hn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hn(e,t){return e=Ht(22,e,null,t),e.lanes=0,e}function kl(e,t,i){return cs(t,e.child,null,i),e=Ol(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ya(e.return,t,i)}function Hl(e,t,i,s,d,g){var M=e.memoizedState;M===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:d,treeForkCount:g}:(M.isBackwards=t,M.rendering=null,M.renderingStartTime=0,M.last=s,M.tail=i,M.tailMode=d,M.treeForkCount=g)}function au(e,t,i){var s=t.pendingProps,d=s.revealOrder,g=s.tail;s=s.children;var M=nt.current,k=(M&2)!==0;if(k?(M=M&1|2,t.flags|=128):M&=1,G(nt,M),yt(e,t,s,i),s=Pe?gr:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nu(e,i,t);else if(e.tag===19)nu(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(d){case"forwards":for(i=t.child,d=null;i!==null;)e=i.alternate,e!==null&&wn(e)===null&&(d=i),i=i.sibling;i=d,i===null?(d=t.child,t.child=null):(d=i.sibling,i.sibling=null),Hl(t,!1,d,i,g,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&wn(e)===null){t.child=d;break}e=d.sibling,d.sibling=i,i=d,d=e}Hl(t,!0,i,null,g,s);break;case"together":Hl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function mi(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Pi|=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(P(153));if(t.child!==null){for(e=t.child,i=di(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=di(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&&vn(e)))}function C_(e,t,i){switch(t.tag){case 3:z(t,t.stateNode.containerInfo),Bi(t,lt,e.memoizedState.cache),ss();break;case 27:case 5:ie(t);break;case 4:z(t,t.stateNode.containerInfo);break;case 10:Bi(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?(zi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ru(e,t,i):(zi(t),e=mi(e,t,i),e!==null?e.sibling:null);zi(t);break;case 19:var d=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Os(e,t,i,!1),s=(i&t.childLanes)!==0),d){if(s)return au(e,t,i);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),G(nt,nt.current),s)break;return null;case 22:return t.lanes=0,Zh(e,t,i,t.pendingProps);case 24:Bi(t,lt,e.memoizedState.cache)}return mi(e,t,i)}function lu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!zl(e,i)&&(t.flags&128)===0)return ct=!1,C_(e,t,i);ct=(e.flags&131072)!==0}else ct=!1,Pe&&(t.flags&1048576)!==0&&Ic(t,gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ls(t.elementType),t.type=e,typeof e=="function")Fa(e)?(s=us(e,s),t.tag=1,t=iu(null,t,e,s,i)):(t.tag=0,t=Rl(null,t,e,s,i));else{if(e!=null){var d=e.$$typeof;if(d===m){t.tag=11,t=Yh(null,t,e,s,i);break e}else if(d===w){t.tag=14,t=Kh(null,t,e,s,i);break e}}throw t=O(e)||e,Error(P(306,t,""))}}return t;case 0:return Rl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,d=us(s,t.pendingProps),iu(e,t,s,d,i);case 3:e:{if(z(t,t.stateNode.containerInfo),e===null)throw Error(P(387));s=t.pendingProps;var g=t.memoizedState;d=g.element,il(e,t),xr(t,s,null,i);var M=t.memoizedState;if(s=M.cache,Bi(t,lt,s),s!==g.cache&&Ka(t,[lt],i,!0),wr(),s=M.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:M.cache},t.updateQueue.baseState=g,t.memoizedState=g,t.flags&256){t=su(e,t,s,i);break e}else if(s!==d){d=Wt(Error(P(424)),t),pr(d),t=su(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(Ze=Kt(e.firstChild),St=t,Pe=!0,Di=null,Vt=!0,i=Zc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ss(),s===d){t=mi(e,t,i);break e}yt(e,t,s,i)}t=t.child}return t;case 26:return kn(e,t),e===null?(i=md(t.type,null,t.pendingProps,null))?t.memoizedState=i:Pe||(i=t.type,e=t.pendingProps,s=Qn(de.current).createElement(i),s[mt]=t,s[Et]=e,bt(s,i,e),gt(s),t.stateNode=s):t.memoizedState=md(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Pe&&(s=t.stateNode=vd(t.type,t.pendingProps,de.current),St=t,Vt=!0,d=Ze,Wi(t.type)?(go=d,Ze=Kt(s.firstChild)):Ze=d),yt(e,t,t.pendingProps.children,i),kn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((d=s=Ze)&&(s=K_(s,t.type,t.pendingProps,Vt),s!==null?(t.stateNode=s,St=t,Ze=Kt(s.firstChild),Vt=!1,d=!0):d=!1),d||Ti(t)),ie(t),d=t.type,g=t.pendingProps,M=e!==null?e.memoizedProps:null,s=g.children,ho(d,g)?s=null:M!==null&&ho(d,M)&&(t.flags|=32),t.memoizedState!==null&&(d=cl(e,t,u_,null,null,i),qr._currentValue=d),kn(e,t),yt(e,t,s,i),t.child;case 6:return e===null&&Pe&&((e=i=Ze)&&(i=Q_(i,t.pendingProps,Vt),i!==null?(t.stateNode=i,St=t,Ze=null,e=!0):e=!1),e||Ti(t)),null;case 13:return ru(e,t,i);case 4:return z(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=cs(t,null,s,i):yt(e,t,s,i),t.child;case 11:return Yh(e,t,t.type,t.pendingProps,i);case 7:return yt(e,t,t.pendingProps,i),t.child;case 8:return yt(e,t,t.pendingProps.children,i),t.child;case 12:return yt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Bi(t,t.type,s.value),yt(e,t,s.children,i),t.child;case 9:return d=t.type._context,s=t.pendingProps.children,ns(t),d=Ct(d),s=s(d),t.flags|=1,yt(e,t,s,i),t.child;case 14:return Kh(e,t,t.type,t.pendingProps,i);case 15:return Qh(e,t,t.type,t.pendingProps,i);case 19:return au(e,t,i);case 31:return S_(e,t,i);case 22:return Zh(e,t,i,t.pendingProps);case 24:return ns(t),s=Ct(lt),e===null?(d=Ja(),d===null&&(d=Ke,g=Qa(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=i),d=g),t.memoizedState={parent:s,cache:d},tl(t),Bi(t,lt,d)):((e.lanes&i)!==0&&(il(e,t),xr(t,null,null,i),wr()),d=e.memoizedState,g=t.memoizedState,d.parent!==s?(d={parent:s,cache:s},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Bi(t,lt,s)):(s=g.cache,Bi(t,lt,s),s!==d.cache&&Ka(t,[lt],i,!0))),yt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(P(156,t.tag))}function Si(e){e.flags|=4}function Nl(e,t,i,s,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(ku())e.flags|=8192;else throw os=Sn,el}else e.flags&=-16777217}function ou(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wd(t))if(ku())e.flags|=8192;else throw os=Sn,el}function zn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Fo():536870912,e.lanes|=t,Ws|=t)}function Dr(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function y_(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 Je(t),null;case 1:return Je(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),vi(lt),se(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?Si(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xa())),Je(t),null;case 26:var d=t.type,g=t.memoizedState;return e===null?(Si(t),g!==null?(Je(t),ou(t,g)):(Je(t),Nl(t,d,null,s,i))):g?g!==e.memoizedState?(Si(t),Je(t),ou(t,g)):(Je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Si(t),Je(t),Nl(t,d,e,s,i)),null;case 27:if(ve(t),i=de.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Si(t);else{if(!s){if(t.stateNode===null)throw Error(P(166));return Je(t),null}e=V.current,Bs(t)?Fc(t):(e=vd(d,s,i),t.stateNode=e,Si(t))}return Je(t),null;case 5:if(ve(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Si(t);else{if(!s){if(t.stateNode===null)throw Error(P(166));return Je(t),null}if(g=V.current,Bs(t))Fc(t);else{var M=Qn(de.current);switch(g){case 1:g=M.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:g=M.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":g=M.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":g=M.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":g=M.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?M.createElement("select",{is:s.is}):M.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?M.createElement(d,{is:s.is}):M.createElement(d)}}g[mt]=t,g[Et]=s;e:for(M=t.child;M!==null;){if(M.tag===5||M.tag===6)g.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===t)break e;for(;M.sibling===null;){if(M.return===null||M.return===t)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}t.stateNode=g;e:switch(bt(g,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Si(t)}}return Je(t),Nl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Si(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(P(166));if(e=de.current,Bs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,d=St,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}e[mt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||rd(e.nodeValue,i)),e||Ti(t,!0)}else e=Qn(e).createTextNode(s),e[mt]=t,t.stateNode=e}return Je(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(P(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(557));e[mt]=t}else ss(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),e=!1}else i=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(P(558))}return Je(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!d)throw Error(P(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(P(317));d[mt]=t}else ss(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),d=!1}else d=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==d&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),zn(t,t.updateQueue),Je(t),null);case 4:return se(),e===null&&no(t.stateNode.containerInfo),Je(t),null;case 10:return vi(t.type),Je(t),null;case 19:if(H(nt),s=t.memoizedState,s===null)return Je(t),null;if(d=(t.flags&128)!==0,g=s.rendering,g===null)if(d)Dr(s,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(g=wn(e),g!==null){for(t.flags|=128,Dr(s,!1),e=g.updateQueue,t.updateQueue=e,zn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)zc(i,e),i=i.sibling;return G(nt,nt.current&1|2),Pe&&fi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ge()>Fn&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304)}else{if(!d)if(e=wn(g),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,zn(t,e),Dr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!g.alternate&&!Pe)return Je(t),null}else 2*ge()-s.renderingStartTime>Fn&&i!==536870912&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304);s.isBackwards?(g.sibling=t.child,t.child=g):(e=s.last,e!==null?e.sibling=g:t.child=g,s.last=g)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ge(),e.sibling=null,i=nt.current,G(nt,d?i&1|2:i&1),Pe&&fi(t,s.treeForkCount),e):(Je(t),null);case 22:case 23:return Nt(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&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),i=t.updateQueue,i!==null&&zn(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&&H(as),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),vi(lt),Je(t),null;case 25:return null;case 30:return null}throw Error(P(156,t.tag))}function b_(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 vi(lt),se(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(P(340));ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(nt),null;case 4:return se(),null;case 10:return vi(t.type),null;case 22:case 23:return Nt(t),al(),e!==null&&H(as),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return vi(lt),null;case 25:return null;default:return null}}function cu(e,t){switch(Wa(t),t.tag){case 3:vi(lt),se();break;case 26:case 27:case 5:ve(t);break;case 4:se();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:H(nt);break;case 10:vi(t.type);break;case 22:case 23:Nt(t),al(),e!==null&&H(as);break;case 24:vi(lt)}}function Tr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var d=s.next;i=d;do{if((i.tag&e)===e){s=void 0;var g=i.create,M=i.inst;s=g(),M.destroy=s}i=i.next}while(i!==d)}}catch(k){Ge(t,t.return,k)}}function Ui(e,t,i){try{var s=t.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var g=d.next;s=g;do{if((s.tag&e)===e){var M=s.inst,k=M.destroy;if(k!==void 0){M.destroy=void 0,d=t;var W=i,ee=k;try{ee()}catch(le){Ge(d,W,le)}}}s=s.next}while(s!==g)}}catch(le){Ge(t,t.return,le)}}function hu(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{eh(t,i)}catch(s){Ge(e,e.return,s)}}}function uu(e,t,i){i.props=us(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Ge(e,t,s)}}function Br(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(d){Ge(e,t,d)}}function li(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(d){Ge(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Ge(e,t,d)}else i.current=null}function du(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(d){Ge(e,e.return,d)}}function Ul(e,t,i){try{var s=e.stateNode;q_(s,e.type,i,t),s[Et]=t}catch(d){Ge(e,e.return,d)}}function fu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wi(e.type)||e.tag===4}function Il(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&&Wi(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 Pl(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=hi));else if(s!==4&&(s===27&&Wi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Pl(e,t,i),e=e.sibling;e!==null;)Pl(e,t,i),e=e.sibling}function Nn(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&&Wi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Nn(e,t,i),e=e.sibling;e!==null;)Nn(e,t,i),e=e.sibling}function _u(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);bt(t,s,i),t[mt]=e,t[Et]=i}catch(g){Ge(e,e.return,g)}}var Ci=!1,ht=!1,Fl=!1,vu=typeof WeakSet=="function"?WeakSet:Set,pt=null;function w_(e,t){if(e=e.containerInfo,oo=ra,e=Mc(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 d=s.anchorOffset,g=s.focusNode;s=s.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var M=0,k=-1,W=-1,ee=0,le=0,he=e,re=null;t:for(;;){for(var ae;he!==i||d!==0&&he.nodeType!==3||(k=M+d),he!==g||s!==0&&he.nodeType!==3||(W=M+s),he.nodeType===3&&(M+=he.nodeValue.length),(ae=he.firstChild)!==null;)re=he,he=ae;for(;;){if(he===e)break t;if(re===i&&++ee===d&&(k=M),re===g&&++le===s&&(W=M),(ae=he.nextSibling)!==null)break;he=re,re=he.parentNode}he=ae}i=k===-1||W===-1?null:{start:k,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(co={focusedElem:e,selectionRange:i},ra=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,g=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++)d=e[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&g!==null){e=void 0,i=t,d=g.memoizedProps,g=g.memoizedState,s=i.stateNode;try{var Ce=us(i.type,d);e=s.getSnapshotBeforeUpdate(Ce,g),s.__reactInternalSnapshotBeforeUpdate=e}catch(Le){Ge(i,i.return,Le)}}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(P(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function gu(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:bi(e,i),s&4&&Tr(5,i);break;case 1:if(bi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(M){Ge(i,i.return,M)}else{var d=us(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(M){Ge(i,i.return,M)}}s&64&&hu(i),s&512&&Br(i,i.return);break;case 3:if(bi(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{eh(e,t)}catch(M){Ge(i,i.return,M)}}break;case 27:t===null&&s&4&&_u(i);case 26:case 5:bi(e,i),t===null&&s&4&&du(i),s&512&&Br(i,i.return);break;case 12:bi(e,i);break;case 31:bi(e,i),s&4&&Su(e,i);break;case 13:bi(e,i),s&4&&Cu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=B_.bind(null,i),Z_(e,i))));break;case 22:if(s=i.memoizedState!==null||Ci,!s){t=t!==null&&t.memoizedState!==null||ht,d=Ci;var g=ht;Ci=s,(ht=t)&&!g?wi(e,i,(i.subtreeFlags&8772)!==0):bi(e,i),Ci=d,ht=g}break;case 30:break;default:bi(e,i)}}function pu(e){var t=e.alternate;t!==null&&(e.alternate=null,pu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pa(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 et=null,At=!1;function yi(e,t,i){for(i=i.child;i!==null;)mu(e,t,i),i=i.sibling}function mu(e,t,i){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(xt,i)}catch{}switch(i.tag){case 26:ht||li(i,t),yi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ht||li(i,t);var s=et,d=At;Wi(i.type)&&(et=i.stateNode,At=!1),yi(e,t,i),Fr(i.stateNode),et=s,At=d;break;case 5:ht||li(i,t);case 6:if(s=et,d=At,et=null,yi(e,t,i),et=s,At=d,et!==null)if(At)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(i.stateNode)}catch(g){Ge(i,t,g)}else try{et.removeChild(i.stateNode)}catch(g){Ge(i,t,g)}break;case 18:et!==null&&(At?(e=et,hd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Js(e)):hd(et,i.stateNode));break;case 4:s=et,d=At,et=i.stateNode.containerInfo,At=!0,yi(e,t,i),et=s,At=d;break;case 0:case 11:case 14:case 15:Ui(2,i,t),ht||Ui(4,i,t),yi(e,t,i);break;case 1:ht||(li(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&uu(i,t,s)),yi(e,t,i);break;case 21:yi(e,t,i);break;case 22:ht=(s=ht)||i.memoizedState!==null,yi(e,t,i),ht=s;break;default:yi(e,t,i)}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Js(e)}catch(i){Ge(t,t.return,i)}}}function Cu(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){Ge(t,t.return,i)}}function x_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vu),t;default:throw Error(P(435,e.tag))}}function Un(e,t){var i=x_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var d=O_.bind(null,e,s);s.then(d,d)}})}function Rt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var d=i[s],g=e,M=t,k=M;e:for(;k!==null;){switch(k.tag){case 27:if(Wi(k.type)){et=k.stateNode,At=!1;break e}break;case 5:et=k.stateNode,At=!1;break e;case 3:case 4:et=k.stateNode.containerInfo,At=!0;break e}k=k.return}if(et===null)throw Error(P(160));mu(g,M,d),et=null,At=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yu(t,e),t=t.sibling}var ti=null;function yu(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rt(t,e),Dt(e),s&4&&(Ui(3,e,e.return),Tr(3,e),Ui(5,e,e.return));break;case 1:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&64&&Ci&&(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 d=ti;if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&4){var g=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,d=d.ownerDocument||d;t:switch(s){case"title":g=d.getElementsByTagName("title")[0],(!g||g[nr]||g[mt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(s),d.head.insertBefore(g,d.querySelector("head > title"))),bt(g,s,i),g[mt]=e,gt(g),s=g;break e;case"link":var M=yd("link","href",d).get(s+(i.href||""));if(M){for(var k=0;k<M.length;k++)if(g=M[k],g.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&g.getAttribute("rel")===(i.rel==null?null:i.rel)&&g.getAttribute("title")===(i.title==null?null:i.title)&&g.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){M.splice(k,1);break t}}g=d.createElement(s),bt(g,s,i),d.head.appendChild(g);break;case"meta":if(M=yd("meta","content",d).get(s+(i.content||""))){for(k=0;k<M.length;k++)if(g=M[k],g.getAttribute("content")===(i.content==null?null:""+i.content)&&g.getAttribute("name")===(i.name==null?null:i.name)&&g.getAttribute("property")===(i.property==null?null:i.property)&&g.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&g.getAttribute("charset")===(i.charSet==null?null:i.charSet)){M.splice(k,1);break t}}g=d.createElement(s),bt(g,s,i),d.head.appendChild(g);break;default:throw Error(P(468,s))}g[mt]=e,gt(g),s=g}e.stateNode=s}else bd(d,e.type,e.stateNode);else e.stateNode=Cd(d,s,e.memoizedProps);else g!==s?(g===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):g.count--,s===null?bd(d,e.type,e.stateNode):Cd(d,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ul(e,e.memoizedProps,i.memoizedProps)}break;case 27:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),i!==null&&s&4&&Ul(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),e.flags&32){d=e.stateNode;try{bs(d,"")}catch(Ce){Ge(e,e.return,Ce)}}s&4&&e.stateNode!=null&&(d=e.memoizedProps,Ul(e,d,i!==null?i.memoizedProps:d)),s&1024&&(Fl=!0);break;case 6:if(Rt(t,e),Dt(e),s&4){if(e.stateNode===null)throw Error(P(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(Ce){Ge(e,e.return,Ce)}}break;case 3:if(ea=null,d=ti,ti=Zn(t.containerInfo),Rt(t,e),ti=d,Dt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(Ce){Ge(e,e.return,Ce)}Fl&&(Fl=!1,bu(e));break;case 4:s=ti,ti=Zn(e.stateNode.containerInfo),Rt(t,e),Dt(e),ti=s;break;case 12:Rt(t,e),Dt(e);break;case 31:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 13:Rt(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Pn=ge()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 22:d=e.memoizedState!==null;var W=i!==null&&i.memoizedState!==null,ee=Ci,le=ht;if(Ci=ee||d,ht=le||W,Rt(t,e),ht=le,Ci=ee,Dt(e),s&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(i===null||W||Ci||ht||ds(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){W=i=t;try{if(g=W.stateNode,d)M=g.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{k=W.stateNode;var he=W.memoizedProps.style,re=he!=null&&he.hasOwnProperty("display")?he.display:null;k.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=d?"":W.memoizedProps}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===18){if(i===null){W=t;try{var ae=W.stateNode;d?ud(ae,!0):ud(W.stateNode,!1)}catch(Ce){Ge(W,W.return,Ce)}}}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,Un(e,i))));break;case 19:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 30:break;case 21:break;default:Rt(t,e),Dt(e)}}function Dt(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(P(160));switch(i.tag){case 27:var d=i.stateNode,g=Il(e);Nn(e,g,d);break;case 5:var M=i.stateNode;i.flags&32&&(bs(M,""),i.flags&=-33);var k=Il(e);Nn(e,k,M);break;case 3:case 4:var W=i.stateNode.containerInfo,ee=Il(e);Pl(e,ee,W);break;default:throw Error(P(161))}}catch(le){Ge(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 bi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gu(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:Ui(4,t,t.return),ds(t);break;case 1:li(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&uu(t,t.return,i),ds(t);break;case 27:Fr(t.stateNode);case 26:case 5:li(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 wi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,d=e,g=t,M=g.flags;switch(g.tag){case 0:case 11:case 15:wi(d,g,i),Tr(4,g);break;case 1:if(wi(d,g,i),s=g,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(ee){Ge(s,s.return,ee)}if(s=g,d=s.updateQueue,d!==null){var k=s.stateNode;try{var W=d.shared.hiddenCallbacks;if(W!==null)for(d.shared.hiddenCallbacks=null,d=0;d<W.length;d++)Jc(W[d],k)}catch(ee){Ge(s,s.return,ee)}}i&&M&64&&hu(g),Br(g,g.return);break;case 27:_u(g);case 26:case 5:wi(d,g,i),i&&s===null&&M&4&&du(g),Br(g,g.return);break;case 12:wi(d,g,i);break;case 31:wi(d,g,i),i&&M&4&&Su(d,g);break;case 13:wi(d,g,i),i&&M&4&&Cu(d,g);break;case 22:g.memoizedState===null&&wi(d,g,i),Br(g,g.return);break;case 30:break;default:wi(d,g,i)}t=t.sibling}}function jl(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&&mr(i))}function $l(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e))}function ii(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wu(e,t,i,s),t=t.sibling}function wu(e,t,i,s){var d=t.flags;switch(t.tag){case 0:case 11:case 15:ii(e,t,i,s),d&2048&&Tr(9,t);break;case 1:ii(e,t,i,s);break;case 3:ii(e,t,i,s),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e)));break;case 12:if(d&2048){ii(e,t,i,s),e=t.stateNode;try{var g=t.memoizedProps,M=g.id,k=g.onPostCommit;typeof k=="function"&&k(M,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Ge(t,t.return,W)}}else ii(e,t,i,s);break;case 31:ii(e,t,i,s);break;case 13:ii(e,t,i,s);break;case 23:break;case 22:g=t.stateNode,M=t.alternate,t.memoizedState!==null?g._visibility&2?ii(e,t,i,s):Or(e,t):g._visibility&2?ii(e,t,i,s):(g._visibility|=2,js(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),d&2048&&jl(M,t);break;case 24:ii(e,t,i,s),d&2048&&$l(t.alternate,t);break;default:ii(e,t,i,s)}}function js(e,t,i,s,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var g=e,M=t,k=i,W=s,ee=M.flags;switch(M.tag){case 0:case 11:case 15:js(g,M,k,W,d),Tr(8,M);break;case 23:break;case 22:var le=M.stateNode;M.memoizedState!==null?le._visibility&2?js(g,M,k,W,d):Or(g,M):(le._visibility|=2,js(g,M,k,W,d)),d&&ee&2048&&jl(M.alternate,M);break;case 24:js(g,M,k,W,d),d&&ee&2048&&$l(M.alternate,M);break;default:js(g,M,k,W,d)}t=t.sibling}}function Or(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,d=s.flags;switch(s.tag){case 22:Or(i,s),d&2048&&jl(s.alternate,s);break;case 24:Or(i,s),d&2048&&$l(s.alternate,s);break;default:Or(i,s)}t=t.sibling}}var kr=8192;function $s(e,t,i){if(e.subtreeFlags&kr)for(e=e.child;e!==null;)xu(e,t,i),e=e.sibling}function xu(e,t,i){switch(e.tag){case 26:$s(e,t,i),e.flags&kr&&e.memoizedState!==null&&hv(i,ti,e.memoizedState,e.memoizedProps);break;case 5:$s(e,t,i);break;case 3:case 4:var s=ti;ti=Zn(e.stateNode.containerInfo),$s(e,t,i),ti=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=kr,kr=16777216,$s(e,t,i),kr=s):$s(e,t,i));break;default:$s(e,t,i)}}function Lu(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 Hr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];pt=s,Mu(s,e)}Lu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Eu(e),e=e.sibling}function Eu(e){switch(e.tag){case 0:case 11:case 15:Hr(e),e.flags&2048&&Ui(9,e,e.return);break;case 3:Hr(e);break;case 12:Hr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,In(e)):Hr(e);break;default:Hr(e)}}function In(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];pt=s,Mu(s,e)}Lu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ui(8,t,t.return),In(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,In(t));break;default:In(t)}e=e.sibling}}function Mu(e,t){for(;pt!==null;){var i=pt;switch(i.tag){case 0:case 11:case 15:Ui(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:mr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,pt=s;else e:for(i=e;pt!==null;){s=pt;var d=s.sibling,g=s.return;if(pu(s),s===i){pt=null;break e}if(d!==null){d.return=g,pt=d;break e}pt=g}}}var L_={getCacheForType:function(e){var t=Ct(lt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ct(lt).controller.signal}},E_=typeof WeakMap=="function"?WeakMap:Map,$e=0,Ke=null,ke=null,Ne=0,We=0,Ut=null,Ii=!1,qs=!1,ql=!1,xi=0,rt=0,Pi=0,fs=0,Wl=0,It=0,Ws=0,zr=null,Tt=null,Gl=!1,Pn=0,Au=0,Fn=1/0,jn=null,Fi=null,dt=0,ji=null,Gs=null,Li=0,Xl=0,Vl=null,Ru=null,Nr=0,Yl=null;function Pt(){return($e&2)!==0&&Ne!==0?Ne&-Ne:N.T!==null?to():Wo()}function Du(){if(It===0)if((Ne&536870912)===0||Pe){var e=si;si<<=1,(si&3932160)===0&&(si=262144),It=e}else It=536870912;return e=zt.current,e!==null&&(e.flags|=32),It}function Bt(e,t,i){(e===Ke&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Xs(e,0),$i(e,Ne,It,!1)),rr(e,i),(($e&2)===0||e!==Ke)&&(e===Ke&&(($e&2)===0&&(fs|=i),rt===4&&$i(e,Ne,It,!1)),oi(e))}function Tu(e,t,i){if(($e&6)!==0)throw Error(P(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||sr(e,t),d=s?R_(e,t):Ql(e,t,!0),g=s;do{if(d===0){qs&&!s&&$i(e,t,0,!1);break}else{if(i=e.current.alternate,g&&!M_(i)){d=Ql(e,t,!1),g=!1;continue}if(d===2){if(g=t,e.errorRecoveryDisabledLanes&g)var M=0;else M=e.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){t=M;e:{var k=e;d=zr;var W=k.current.memoizedState.isDehydrated;if(W&&(Xs(k,M).flags|=256),M=Ql(k,M,!1),M!==2){if(ql&&!W){k.errorRecoveryDisabledLanes|=g,fs|=g,d=4;break e}g=Tt,Tt=d,g!==null&&(Tt===null?Tt=g:Tt.push.apply(Tt,g))}d=M}if(g=!1,d!==2)continue}}if(d===1){Xs(e,0),$i(e,t,0,!0);break}e:{switch(s=e,g=d,g){case 0:case 1:throw Error(P(345));case 4:if((t&4194048)!==t)break;case 6:$i(s,t,It,!Ii);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(P(329))}if((t&62914560)===t&&(d=Pn+300-ge(),10<d)){if($i(s,t,It,!Ii),Qr(s,0,!0)!==0)break e;Li=t,s.timeoutHandle=od(Bu.bind(null,s,i,Tt,jn,Gl,t,It,fs,Ws,Ii,g,"Throttled",-0,0),d);break e}Bu(s,i,Tt,jn,Gl,t,It,fs,Ws,Ii,g,null,-0,0)}}break}while(!0);oi(e)}function Bu(e,t,i,s,d,g,M,k,W,ee,le,he,re,ae){if(e.timeoutHandle=-1,he=t.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:hi},xu(t,g,he);var Ce=(g&62914560)===g?Pn-ge():(g&4194048)===g?Au-ge():0;if(Ce=uv(he,Ce),Ce!==null){Li=g,e.cancelPendingCommit=Ce(Pu.bind(null,e,t,g,i,s,d,M,k,W,le,he,null,re,ae)),$i(e,g,M,!ee);return}}Pu(e,t,g,i,s,d,M,k,W)}function M_(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 d=i[s],g=d.getSnapshot;d=d.value;try{if(!kt(g(),d))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 $i(e,t,i,s){t&=~Wl,t&=~fs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var d=t;0<d;){var g=31-ut(d),M=1<<g;s[g]=-1,d&=~M}i!==0&&jo(e,i,t)}function $n(){return($e&6)===0?(Ur(0),!1):!0}function Kl(){if(ke!==null){if(We===0)var e=ke.return;else e=ke,_i=rs=null,dl(e),Ns=null,Cr=0,e=ke;for(;e!==null;)cu(e.alternate,e),e=e.return;ke=null}}function Xs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,X_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Li=0,Kl(),Ke=e,ke=i=di(e.current,null),Ne=t,We=0,Ut=null,Ii=!1,qs=sr(e,t),ql=!1,Ws=It=Wl=fs=Pi=rt=0,Tt=zr=null,Gl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var d=31-ut(s),g=1<<d;t|=e[d],s&=~g}return xi=t,hn(),i}function Ou(e,t){Te=null,N.H=Ar,t===zs||t===mn?(t=Yc(),We=3):t===el?(t=Yc(),We=4):We=t===Al?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,ke===null&&(rt=1,Bn(e,Wt(t,e.current)))}function ku(){var e=zt.current;return e===null?!0:(Ne&4194048)===Ne?Yt===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===Yt:!1}function Hu(){var e=N.H;return N.H=Ar,e===null?Ar:e}function zu(){var e=N.A;return N.A=L_,e}function qn(){rt=4,Ii||(Ne&4194048)!==Ne&&zt.current!==null||(qs=!0),(Pi&134217727)===0&&(fs&134217727)===0||Ke===null||$i(Ke,Ne,It,!1)}function Ql(e,t,i){var s=$e;$e|=2;var d=Hu(),g=zu();(Ke!==e||Ne!==t)&&(jn=null,Xs(e,t)),t=!1;var M=rt;e:do try{if(We!==0&&ke!==null){var k=ke,W=Ut;switch(We){case 8:Kl(),M=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var ee=We;if(We=0,Ut=null,Vs(e,k,W,ee),i&&qs){M=0;break e}break;default:ee=We,We=0,Ut=null,Vs(e,k,W,ee)}}A_(),M=rt;break}catch(le){Ou(e,le)}while(!0);return t&&e.shellSuspendCounter++,_i=rs=null,$e=s,N.H=d,N.A=g,ke===null&&(Ke=null,Ne=0,hn()),M}function A_(){for(;ke!==null;)Nu(ke)}function R_(e,t){var i=$e;$e|=2;var s=Hu(),d=zu();Ke!==e||Ne!==t?(jn=null,Fn=ge()+500,Xs(e,t)):qs=sr(e,t);e:do try{if(We!==0&&ke!==null){t=ke;var g=Ut;t:switch(We){case 1:We=0,Ut=null,Vs(e,t,g,1);break;case 2:case 9:if(Xc(g)){We=0,Ut=null,Uu(t);break}t=function(){We!==2&&We!==9||Ke!==e||(We=7),oi(e)},g.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Xc(g)?(We=0,Ut=null,Uu(t)):(We=0,Ut=null,Vs(e,t,g,7));break;case 5:var M=null;switch(ke.tag){case 26:M=ke.memoizedState;case 5:case 27:var k=ke;if(M?wd(M):k.stateNode.complete){We=0,Ut=null;var W=k.sibling;if(W!==null)ke=W;else{var ee=k.return;ee!==null?(ke=ee,Wn(ee)):ke=null}break t}}We=0,Ut=null,Vs(e,t,g,5);break;case 6:We=0,Ut=null,Vs(e,t,g,6);break;case 8:Kl(),rt=6;break e;default:throw Error(P(462))}}D_();break}catch(le){Ou(e,le)}while(!0);return _i=rs=null,N.H=s,N.A=d,$e=i,ke!==null?0:(Ke=null,Ne=0,hn(),rt)}function D_(){for(;ke!==null&&!me();)Nu(ke)}function Nu(e){var t=lu(e.alternate,e,xi);e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function Uu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=tu(i,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=tu(i,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:dl(t);default:cu(i,t),t=ke=zc(t,xi),t=lu(i,t,xi)}e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function Vs(e,t,i,s){_i=rs=null,dl(t),Ns=null,Cr=0;var d=t.return;try{if(m_(e,d,t,i,Ne)){rt=1,Bn(e,Wt(i,e.current)),ke=null;return}}catch(g){if(d!==null)throw ke=d,g;rt=1,Bn(e,Wt(i,e.current)),ke=null;return}t.flags&32768?(Pe||s===1?e=!0:qs||(Ne&536870912)!==0?e=!1:(Ii=e=!0,(s===2||s===9||s===3||s===6)&&(s=zt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Iu(t,e)):Wn(t)}function Wn(e){var t=e;do{if((t.flags&32768)!==0){Iu(t,Ii);return}e=t.return;var i=y_(t.alternate,t,xi);if(i!==null){ke=i;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);rt===0&&(rt=5)}function Iu(e,t){do{var i=b_(e.alternate,e);if(i!==null){i.flags&=32767,ke=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=i}while(e!==null);rt=6,ke=null}function Pu(e,t,i,s,d,g,M,k,W){e.cancelPendingCommit=null;do Gn();while(dt!==0);if(($e&6)!==0)throw Error(P(327));if(t!==null){if(t===e.current)throw Error(P(177));if(g=t.lanes|t.childLanes,g|=Ia,cf(e,i,g,M,k,W),e===Ke&&(ke=Ke=null,Ne=0),Gs=t,ji=e,Li=i,Xl=g,Vl=d,Ru=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,k_(Qe,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=N.T,N.T=null,d=U.p,U.p=2,M=$e,$e|=4;try{w_(e,t,i)}finally{$e=M,U.p=d,N.T=s}}dt=1,Fu(),ju(),$u()}}function Fu(){if(dt===1){dt=0;var e=ji,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=N.T,N.T=null;var s=U.p;U.p=2;var d=$e;$e|=4;try{yu(t,e);var g=co,M=Mc(e.containerInfo),k=g.focusedElem,W=g.selectionRange;if(M!==k&&k&&k.ownerDocument&&Ec(k.ownerDocument.documentElement,k)){if(W!==null&&ka(k)){var ee=W.start,le=W.end;if(le===void 0&&(le=ee),"selectionStart"in k)k.selectionStart=ee,k.selectionEnd=Math.min(le,k.value.length);else{var he=k.ownerDocument||document,re=he&&he.defaultView||window;if(re.getSelection){var ae=re.getSelection(),Ce=k.textContent.length,Le=Math.min(W.start,Ce),Ye=W.end===void 0?Le:Math.min(W.end,Ce);!ae.extend&&Le>Ye&&(M=Ye,Ye=Le,Le=M);var Q=Lc(k,Le),X=Lc(k,Ye);if(Q&&X&&(ae.rangeCount!==1||ae.anchorNode!==Q.node||ae.anchorOffset!==Q.offset||ae.focusNode!==X.node||ae.focusOffset!==X.offset)){var J=he.createRange();J.setStart(Q.node,Q.offset),ae.removeAllRanges(),Le>Ye?(ae.addRange(J),ae.extend(X.node,X.offset)):(J.setEnd(X.node,X.offset),ae.addRange(J))}}}}for(he=[],ae=k;ae=ae.parentNode;)ae.nodeType===1&&he.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<he.length;k++){var oe=he[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ra=!!oo,co=oo=null}finally{$e=d,U.p=s,N.T=i}}e.current=t,dt=2}}function ju(){if(dt===2){dt=0;var e=ji,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=N.T,N.T=null;var s=U.p;U.p=2;var d=$e;$e|=4;try{gu(e,t.alternate,t)}finally{$e=d,U.p=s,N.T=i}}dt=3}}function $u(){if(dt===4||dt===3){dt=0,ce();var e=ji,t=Gs,i=Li,s=Ru;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Gs=ji=null,qu(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Fi=null),va(i),t=t.stateNode,tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(xt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=N.T,d=U.p,U.p=2,N.T=null;try{for(var g=e.onRecoverableError,M=0;M<s.length;M++){var k=s[M];g(k.value,{componentStack:k.stack})}}finally{N.T=t,U.p=d}}(Li&3)!==0&&Gn(),oi(e),d=e.pendingLanes,(i&261930)!==0&&(d&42)!==0?e===Yl?Nr++:(Nr=0,Yl=e):Nr=0,Ur(0)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,mr(t)))}function Gn(){return Fu(),ju(),$u(),Wu()}function Wu(){if(dt!==5)return!1;var e=ji,t=Xl;Xl=0;var i=va(Li),s=N.T,d=U.p;try{U.p=32>i?32:i,N.T=null,i=Vl,Vl=null;var g=ji,M=Li;if(dt=0,Gs=ji=null,Li=0,($e&6)!==0)throw Error(P(331));var k=$e;if($e|=4,Eu(g.current),wu(g,g.current,M,i),$e=k,Ur(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(xt,g)}catch{}return!0}finally{U.p=d,N.T=s,qu(e,t)}}function Gu(e,t,i){t=Wt(i,t),t=Ml(e.stateNode,t,2),e=Hi(e,t,2),e!==null&&(rr(e,2),oi(e))}function Ge(e,t,i){if(e.tag===3)Gu(e,e,i);else for(;t!==null;){if(t.tag===3){Gu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Fi===null||!Fi.has(s))){e=Wt(i,e),i=Xh(2),s=Hi(t,i,2),s!==null&&(Vh(i,s,t,e),rr(s,2),oi(s));break}}t=t.return}}function Zl(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new E_;var d=new Set;s.set(t,d)}else d=s.get(t),d===void 0&&(d=new Set,s.set(t,d));d.has(i)||(ql=!0,d.add(i),e=T_.bind(null,e,t,i),t.then(e,e))}function T_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ke===e&&(Ne&i)===i&&(rt===4||rt===3&&(Ne&62914560)===Ne&&300>ge()-Pn?($e&2)===0&&Xs(e,0):Wl|=i,Ws===Ne&&(Ws=0)),oi(e)}function Xu(e,t){t===0&&(t=Fo()),e=ts(e,t),e!==null&&(rr(e,t),oi(e))}function B_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Xu(e,i)}function O_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,d=e.memoizedState;d!==null&&(i=d.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(P(314))}s!==null&&s.delete(t),Xu(e,i)}function k_(e,t){return Se(e,t)}var Xn=null,Ys=null,Jl=!1,Vn=!1,eo=!1,qi=0;function oi(e){e!==Ys&&e.next===null&&(Ys===null?Xn=Ys=e:Ys=Ys.next=e),Vn=!0,Jl||(Jl=!0,z_())}function Ur(e,t){if(!eo&&Vn){eo=!0;do for(var i=!1,s=Xn;s!==null;){if(e!==0){var d=s.pendingLanes;if(d===0)var g=0;else{var M=s.suspendedLanes,k=s.pingedLanes;g=(1<<31-ut(42|e)+1)-1,g&=d&~(M&~k),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(i=!0,Qu(s,g))}else g=Ne,g=Qr(s,s===Ke?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||sr(s,g)||(i=!0,Qu(s,g));s=s.next}while(i);eo=!1}}function H_(){Vu()}function Vu(){Vn=Jl=!1;var e=0;qi!==0&&G_()&&(e=qi);for(var t=ge(),i=null,s=Xn;s!==null;){var d=s.next,g=Yu(s,t);g===0?(s.next=null,i===null?Xn=d:i.next=d,d===null&&(Ys=i)):(i=s,(e!==0||(g&3)!==0)&&(Vn=!0)),s=d}dt!==0&&dt!==5||Ur(e),qi!==0&&(qi=0)}function Yu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,d=e.expirationTimes,g=e.pendingLanes&-62914561;0<g;){var M=31-ut(g),k=1<<M,W=d[M];W===-1?((k&i)===0||(k&s)!==0)&&(d[M]=of(k,t)):W<=t&&(e.expiredLanes|=k),g&=~k}if(t=Ke,i=Ne,i=Qr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pe(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||sr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&pe(s),va(i)){case 2:case 8:i=_t;break;case 32:i=Qe;break;case 268435456:i=Ie;break;default:i=Qe}return s=Ku.bind(null,e),i=Se(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&pe(s),e.callbackPriority=2,e.callbackNode=null,2}function Ku(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gn()&&e.callbackNode!==i)return null;var s=Ne;return s=Qr(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Tu(e,s,t),Yu(e,ge()),e.callbackNode!=null&&e.callbackNode===i?Ku.bind(null,e):null)}function Qu(e,t){if(Gn())return null;Tu(e,t,!0)}function z_(){V_(function(){($e&6)!==0?Se(Ae,H_):Vu()})}function to(){if(qi===0){var e=ks;e===0&&(e=Ft,Ft<<=1,(Ft&261888)===0&&(Ft=256)),qi=e}return qi}function Zu(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:tn(""+e)}function Ju(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 N_(e,t,i,s,d){if(t==="submit"&&i&&i.stateNode===d){var g=Zu((d[Et]||null).action),M=s.submitter;M&&(t=(t=M[Et]||null)?Zu(t.formAction):M.getAttribute("formAction"),t!==null&&(g=t,M=null));var k=new an("action","action",null,s,d);e.push({event:k,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(qi!==0){var W=M?Ju(d,M):new FormData(d);yl(i,{pending:!0,data:W,method:d.method,action:g},null,W)}}else typeof g=="function"&&(k.preventDefault(),W=M?Ju(d,M):new FormData(d),yl(i,{pending:!0,data:W,method:d.method,action:g},g,W))},currentTarget:d}]})}}for(var io=0;io<Ua.length;io++){var so=Ua[io],U_=so.toLowerCase(),I_=so[0].toUpperCase()+so.slice(1);ei(U_,"on"+I_)}ei(Dc,"onAnimationEnd"),ei(Tc,"onAnimationIteration"),ei(Bc,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(t_,"onTransitionRun"),ei(i_,"onTransitionStart"),ei(s_,"onTransitionCancel"),ei(Oc,"onTransitionEnd"),Cs("onMouseEnter",["mouseout","mouseover"]),Cs("onMouseLeave",["mouseout","mouseover"]),Cs("onPointerEnter",["pointerout","pointerover"]),Cs("onPointerLeave",["pointerout","pointerover"]),Qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="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(" "),P_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ir));function ed(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],d=s.event;s=s.listeners;e:{var g=void 0;if(t)for(var M=s.length-1;0<=M;M--){var k=s[M],W=k.instance,ee=k.currentTarget;if(k=k.listener,W!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=ee;try{g(d)}catch(le){cn(le)}d.currentTarget=null,g=W}else for(M=0;M<s.length;M++){if(k=s[M],W=k.instance,ee=k.currentTarget,k=k.listener,W!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=ee;try{g(d)}catch(le){cn(le)}d.currentTarget=null,g=W}}}}function He(e,t){var i=t[ga];i===void 0&&(i=t[ga]=new Set);var s=e+"__bubble";i.has(s)||(td(t,e,2,!1),i.add(s))}function ro(e,t,i){var s=0;t&&(s|=4),td(i,e,s,t)}var Yn="_reactListening"+Math.random().toString(36).slice(2);function no(e){if(!e[Yn]){e[Yn]=!0,Vo.forEach(function(i){i!=="selectionchange"&&(P_.has(i)||ro(i,!1,e),ro(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yn]||(t[Yn]=!0,ro("selectionchange",!1,t))}}function td(e,t,i,s){switch(Dd(t)){case 2:var d=_v;break;case 8:d=vv;break;default:d=yo}i=d.bind(null,t,i,e),d=void 0,!La||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),s?d!==void 0?e.addEventListener(t,i,{capture:!0,passive:d}):e.addEventListener(t,i,!0):d!==void 0?e.addEventListener(t,i,{passive:d}):e.addEventListener(t,i,!1)}function ao(e,t,i,s,d){var g=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var M=s.tag;if(M===3||M===4){var k=s.stateNode.containerInfo;if(k===d)break;if(M===4)for(M=s.return;M!==null;){var W=M.tag;if((W===3||W===4)&&M.stateNode.containerInfo===d)return;M=M.return}for(;k!==null;){if(M=ps(k),M===null)return;if(W=M.tag,W===5||W===6||W===26||W===27){s=g=M;continue e}k=k.parentNode}}s=s.return}ac(function(){var ee=g,le=wa(i),he=[];e:{var re=kc.get(e);if(re!==void 0){var ae=an,Ce=e;switch(e){case"keypress":if(rn(i)===0)break e;case"keydown":case"keyup":ae=Of;break;case"focusin":Ce="focus",ae=Ra;break;case"focusout":Ce="blur",ae=Ra;break;case"beforeblur":case"afterblur":ae=Ra;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=cc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=yf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=zf;break;case Dc:case Tc:case Bc:ae=xf;break;case Oc:ae=Uf;break;case"scroll":case"scrollend":ae=Sf;break;case"wheel":ae=Pf;break;case"copy":case"cut":case"paste":ae=Ef;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=uc;break;case"toggle":case"beforetoggle":ae=jf}var Le=(t&4)!==0,Ye=!Le&&(e==="scroll"||e==="scrollend"),Q=Le?re!==null?re+"Capture":null:re;Le=[];for(var X=ee,J;X!==null;){var oe=X;if(J=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||J===null||Q===null||(oe=lr(X,Q),oe!=null&&Le.push(Pr(X,oe,J))),Ye)break;X=X.return}0<Le.length&&(re=new ae(re,Ce,null,i,le),he.push({event:re,listeners:Le}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",re&&i!==ba&&(Ce=i.relatedTarget||i.fromElement)&&(ps(Ce)||Ce[gs]))break e;if((ae||re)&&(re=le.window===le?le:(re=le.ownerDocument)?re.defaultView||re.parentWindow:window,ae?(Ce=i.relatedTarget||i.toElement,ae=ee,Ce=Ce?ps(Ce):null,Ce!==null&&(Ye=ne(Ce),Le=Ce.tag,Ce!==Ye||Le!==5&&Le!==27&&Le!==6)&&(Ce=null)):(ae=null,Ce=ee),ae!==Ce)){if(Le=cc,oe="onMouseLeave",Q="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(Le=uc,oe="onPointerLeave",Q="onPointerEnter",X="pointer"),Ye=ae==null?re:ar(ae),J=Ce==null?re:ar(Ce),re=new Le(oe,X+"leave",ae,i,le),re.target=Ye,re.relatedTarget=J,oe=null,ps(le)===ee&&(Le=new Le(Q,X+"enter",Ce,i,le),Le.target=J,Le.relatedTarget=Ye,oe=Le),Ye=oe,ae&&Ce)t:{for(Le=F_,Q=ae,X=Ce,J=0,oe=Q;oe;oe=Le(oe))J++;oe=0;for(var we=X;we;we=Le(we))oe++;for(;0<J-oe;)Q=Le(Q),J--;for(;0<oe-J;)X=Le(X),oe--;for(;J--;){if(Q===X||X!==null&&Q===X.alternate){Le=Q;break t}Q=Le(Q),X=Le(X)}Le=null}else Le=null;ae!==null&&id(he,re,ae,Le,!1),Ce!==null&&Ye!==null&&id(he,Ye,Ce,Le,!0)}}e:{if(re=ee?ar(ee):window,ae=re.nodeName&&re.nodeName.toLowerCase(),ae==="select"||ae==="input"&&re.type==="file")var Fe=Sc;else if(pc(re))if(Cc)Fe=Zf;else{Fe=Kf;var ye=Yf}else ae=re.nodeName,!ae||ae.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?ee&&ya(ee.elementType)&&(Fe=Sc):Fe=Qf;if(Fe&&(Fe=Fe(e,ee))){mc(he,Fe,i,le);break e}ye&&ye(e,re,ee),e==="focusout"&&ee&&re.type==="number"&&ee.memoizedProps.value!=null&&Ca(re,"number",re.value)}switch(ye=ee?ar(ee):window,e){case"focusin":(pc(ye)||ye.contentEditable==="true")&&(Es=ye,Ha=ee,vr=null);break;case"focusout":vr=Ha=Es=null;break;case"mousedown":za=!0;break;case"contextmenu":case"mouseup":case"dragend":za=!1,Ac(he,i,le);break;case"selectionchange":if(e_)break;case"keydown":case"keyup":Ac(he,i,le)}var Be;if(Ta)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Ls?vc(e,i)&&(Ue="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ue="onCompositionStart");Ue&&(dc&&i.locale!=="ko"&&(Ls||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Ls&&(Be=lc()):(Ai=le,Ea="value"in Ai?Ai.value:Ai.textContent,Ls=!0)),ye=Kn(ee,Ue),0<ye.length&&(Ue=new hc(Ue,e,null,i,le),he.push({event:Ue,listeners:ye}),Be?Ue.data=Be:(Be=gc(i),Be!==null&&(Ue.data=Be)))),(Be=qf?Wf(e,i):Gf(e,i))&&(Ue=Kn(ee,"onBeforeInput"),0<Ue.length&&(ye=new hc("onBeforeInput","beforeinput",null,i,le),he.push({event:ye,listeners:Ue}),ye.data=Be)),N_(he,e,ee,i,le)}ed(he,t)})}function Pr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Kn(e,t){for(var i=t+"Capture",s=[];e!==null;){var d=e,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=lr(e,i),d!=null&&s.unshift(Pr(e,d,g)),d=lr(e,t),d!=null&&s.push(Pr(e,d,g))),e.tag===3)return s;e=e.return}return[]}function F_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function id(e,t,i,s,d){for(var g=t._reactName,M=[];i!==null&&i!==s;){var k=i,W=k.alternate,ee=k.stateNode;if(k=k.tag,W!==null&&W===s)break;k!==5&&k!==26&&k!==27||ee===null||(W=ee,d?(ee=lr(i,g),ee!=null&&M.unshift(Pr(i,ee,W))):d||(ee=lr(i,g),ee!=null&&M.push(Pr(i,ee,W)))),i=i.return}M.length!==0&&e.push({event:t,listeners:M})}var j_=/\r\n?/g,$_=/\u0000|\uFFFD/g;function sd(e){return(typeof e=="string"?e:""+e).replace(j_,`
49
- `).replace($_,"")}function rd(e,t){return t=sd(t),sd(e)===t}function Ve(e,t,i,s,d,g){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||bs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&bs(e,""+s);break;case"className":Jr(e,"class",s);break;case"tabIndex":Jr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Jr(e,i,s);break;case"style":rc(e,s,g);break;case"data":if(t!=="object"){Jr(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=tn(""+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 g=="function"&&(i==="formAction"?(t!=="input"&&Ve(e,t,"name",d.name,d,null),Ve(e,t,"formEncType",d.formEncType,d,null),Ve(e,t,"formMethod",d.formMethod,d,null),Ve(e,t,"formTarget",d.formTarget,d,null)):(Ve(e,t,"encType",d.encType,d,null),Ve(e,t,"method",d.method,d,null),Ve(e,t,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=tn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=hi);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(P(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(P(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=tn(""+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":He("beforetoggle",e),He("toggle",e),Zr(e,"popover",s);break;case"xlinkActuate":ci(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ci(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ci(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ci(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ci(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ci(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ci(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ci(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ci(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Zr(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=pf.get(i)||i,Zr(e,i,s))}}function lo(e,t,i,s,d,g){switch(i){case"style":rc(e,s,g);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(P(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(P(60));e.innerHTML=i}}break;case"children":typeof s=="string"?bs(e,s):(typeof s=="number"||typeof s=="bigint")&&bs(e,""+s);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"onClick":s!=null&&(e.onclick=hi);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"&&(d=i.endsWith("Capture"),t=i.slice(2,d?i.length-7:void 0),g=e[Et]||null,g=g!=null?g[i]:null,typeof g=="function"&&e.removeEventListener(t,g,d),typeof s=="function")){typeof g!="function"&&g!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,d);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Zr(e,i,s)}}}function bt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var s=!1,d=!1,g;for(g in i)if(i.hasOwnProperty(g)){var M=i[g];if(M!=null)switch(g){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Ve(e,t,g,M,i,null)}}d&&Ve(e,t,"srcSet",i.srcSet,i,null),s&&Ve(e,t,"src",i.src,i,null);return;case"input":He("invalid",e);var k=g=M=d=null,W=null,ee=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":d=le;break;case"type":M=le;break;case"checked":W=le;break;case"defaultChecked":ee=le;break;case"value":g=le;break;case"defaultValue":k=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(P(137,t));break;default:Ve(e,t,s,le,i,null)}}ec(e,g,k,W,ee,M,d,!1);return;case"select":He("invalid",e),s=M=g=null;for(d in i)if(i.hasOwnProperty(d)&&(k=i[d],k!=null))switch(d){case"value":g=k;break;case"defaultValue":M=k;break;case"multiple":s=k;default:Ve(e,t,d,k,i,null)}t=g,i=M,e.multiple=!!s,t!=null?ys(e,!!s,t,!1):i!=null&&ys(e,!!s,i,!0);return;case"textarea":He("invalid",e),g=d=s=null;for(M in i)if(i.hasOwnProperty(M)&&(k=i[M],k!=null))switch(M){case"value":s=k;break;case"defaultValue":d=k;break;case"children":g=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(P(91));break;default:Ve(e,t,M,k,i,null)}ic(e,s,d,g);return;case"option":for(W in i)if(i.hasOwnProperty(W)&&(s=i[W],s!=null))switch(W){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ve(e,t,W,s,i,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(s=0;s<Ir.length;s++)He(Ir[s],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in i)if(i.hasOwnProperty(ee)&&(s=i[ee],s!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Ve(e,t,ee,s,i,null)}return;default:if(ya(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&lo(e,t,le,s,i,void 0));return}}for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null&&Ve(e,t,k,s,i,null))}function q_(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 d=null,g=null,M=null,k=null,W=null,ee=null,le=null;for(ae in i){var he=i[ae];if(i.hasOwnProperty(ae)&&he!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":W=he;default:s.hasOwnProperty(ae)||Ve(e,t,ae,null,s,he)}}for(var re in s){var ae=s[re];if(he=i[re],s.hasOwnProperty(re)&&(ae!=null||he!=null))switch(re){case"type":g=ae;break;case"name":d=ae;break;case"checked":ee=ae;break;case"defaultChecked":le=ae;break;case"value":M=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(P(137,t));break;default:ae!==he&&Ve(e,t,re,ae,s,he)}}Sa(e,M,k,W,ee,le,g,d);return;case"select":ae=M=k=re=null;for(g in i)if(W=i[g],i.hasOwnProperty(g)&&W!=null)switch(g){case"value":break;case"multiple":ae=W;default:s.hasOwnProperty(g)||Ve(e,t,g,null,s,W)}for(d in s)if(g=s[d],W=i[d],s.hasOwnProperty(d)&&(g!=null||W!=null))switch(d){case"value":re=g;break;case"defaultValue":k=g;break;case"multiple":M=g;default:g!==W&&Ve(e,t,d,g,s,W)}t=k,i=M,s=ae,re!=null?ys(e,!!i,re,!1):!!s!=!!i&&(t!=null?ys(e,!!i,t,!0):ys(e,!!i,i?[]:"",!1));return;case"textarea":ae=re=null;for(k in i)if(d=i[k],i.hasOwnProperty(k)&&d!=null&&!s.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ve(e,t,k,null,s,d)}for(M in s)if(d=s[M],g=i[M],s.hasOwnProperty(M)&&(d!=null||g!=null))switch(M){case"value":re=d;break;case"defaultValue":ae=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(P(91));break;default:d!==g&&Ve(e,t,M,d,s,g)}tc(e,re,ae);return;case"option":for(var Ce in i)if(re=i[Ce],i.hasOwnProperty(Ce)&&re!=null&&!s.hasOwnProperty(Ce))switch(Ce){case"selected":e.selected=!1;break;default:Ve(e,t,Ce,null,s,re)}for(W in s)if(re=s[W],ae=i[W],s.hasOwnProperty(W)&&re!==ae&&(re!=null||ae!=null))switch(W){case"selected":e.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:Ve(e,t,W,re,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 Le in i)re=i[Le],i.hasOwnProperty(Le)&&re!=null&&!s.hasOwnProperty(Le)&&Ve(e,t,Le,null,s,re);for(ee in s)if(re=s[ee],ae=i[ee],s.hasOwnProperty(ee)&&re!==ae&&(re!=null||ae!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(P(137,t));break;default:Ve(e,t,ee,re,s,ae)}return;default:if(ya(t)){for(var Ye in i)re=i[Ye],i.hasOwnProperty(Ye)&&re!==void 0&&!s.hasOwnProperty(Ye)&&lo(e,t,Ye,void 0,s,re);for(le in s)re=s[le],ae=i[le],!s.hasOwnProperty(le)||re===ae||re===void 0&&ae===void 0||lo(e,t,le,re,s,ae);return}}for(var Q in i)re=i[Q],i.hasOwnProperty(Q)&&re!=null&&!s.hasOwnProperty(Q)&&Ve(e,t,Q,null,s,re);for(he in s)re=s[he],ae=i[he],!s.hasOwnProperty(he)||re===ae||re==null&&ae==null||Ve(e,t,he,re,s,ae)}function nd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function W_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var d=i[s],g=d.transferSize,M=d.initiatorType,k=d.duration;if(g&&k&&nd(M)){for(M=0,k=d.responseEnd,s+=1;s<i.length;s++){var W=i[s],ee=W.startTime;if(ee>k)break;var le=W.transferSize,he=W.initiatorType;le&&nd(he)&&(W=W.responseEnd,M+=le*(W<k?1:(k-ee)/(W-ee)))}if(--s,t+=8*(g+M)/(d.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 Qn(e){return e.nodeType===9?e:e.ownerDocument}function ad(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 ld(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 od=typeof setTimeout=="function"?setTimeout:void 0,X_=typeof clearTimeout=="function"?clearTimeout:void 0,cd=typeof Promise=="function"?Promise:void 0,V_=typeof queueMicrotask=="function"?queueMicrotask:typeof cd<"u"?function(e){return cd.resolve(null).then(e).catch(Y_)}:od;function Y_(e){setTimeout(function(){throw e})}function Wi(e){return e==="head"}function hd(e,t){var i=t,s=0;do{var d=i.nextSibling;if(e.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(d),Js(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Fr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Fr(i);for(var g=i.firstChild;g;){var M=g.nextSibling,k=g.nodeName;g[nr]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&g.rel.toLowerCase()==="stylesheet"||i.removeChild(g),g=M}}else i==="body"&&Fr(e.ownerDocument.body);i=d}while(i);Js(t)}function ud(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),pa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function K_(e,t,i,s){for(;e.nodeType===1;){var d=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[nr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(g=e.getAttribute("rel"),g==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(g!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(g=e.getAttribute("src"),(g!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===g)return e}else return e;if(e=Kt(e.nextSibling),e===null)break}return null}function Q_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Kt(e.nextSibling),e===null))return null;return e}function dd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Kt(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 Z_(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 Kt(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 fd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Kt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function _d(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 vd(e,t,i){switch(t=Qn(i),e){case"html":if(e=t.documentElement,!e)throw Error(P(452));return e;case"head":if(e=t.head,!e)throw Error(P(453));return e;case"body":if(e=t.body,!e)throw Error(P(454));return e;default:throw Error(P(451))}}function Fr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pa(e)}var Qt=new Map,gd=new Set;function Zn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ei=U.d;U.d={f:J_,r:ev,D:tv,C:iv,L:sv,m:rv,X:av,S:nv,M:lv};function J_(){var e=Ei.f(),t=$n();return e||t}function ev(e){var t=ms(e);t!==null&&t.tag===5&&t.type==="form"?Oh(t):Ei.r(e)}var Ks=typeof document>"u"?null:document;function pd(e,t,i){var s=Ks;if(s&&typeof t=="string"&&t){var d=$t(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),gd.has(d)||(gd.add(d),e={rel:e,crossOrigin:i,href:t},s.querySelector(d)===null&&(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function tv(e){Ei.D(e),pd("dns-prefetch",e,null)}function iv(e,t){Ei.C(e,t),pd("preconnect",e,t)}function sv(e,t,i){Ei.L(e,t,i);var s=Ks;if(s&&e&&t){var d='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+$t(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+$t(i.imageSizes)+'"]')):d+='[href="'+$t(e)+'"]';var g=d;switch(t){case"style":g=Qs(e);break;case"script":g=Zs(e)}Qt.has(g)||(e=a({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Qt.set(g,e),s.querySelector(d)!==null||t==="style"&&s.querySelector(jr(g))||t==="script"&&s.querySelector($r(g))||(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function rv(e,t){Ei.m(e,t);var i=Ks;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+$t(s)+'"][href="'+$t(e)+'"]',g=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Zs(e)}if(!Qt.has(g)&&(e=a({rel:"modulepreload",href:e},t),Qt.set(g,e),i.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector($r(g)))return}s=i.createElement("link"),bt(s,"link",e),gt(s),i.head.appendChild(s)}}}function nv(e,t,i){Ei.S(e,t,i);var s=Ks;if(s&&e){var d=Ss(s).hoistableStyles,g=Qs(e);t=t||"default";var M=d.get(g);if(!M){var k={loading:0,preload:null};if(M=s.querySelector(jr(g)))k.loading=5;else{e=a({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qt.get(g))&&po(e,i);var W=M=s.createElement("link");gt(W),bt(W,"link",e),W._p=new Promise(function(ee,le){W.onload=ee,W.onerror=le}),W.addEventListener("load",function(){k.loading|=1}),W.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Jn(M,t,s)}M={type:"stylesheet",instance:M,count:1,state:k},d.set(g,M)}}}function av(e,t){Ei.X(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),g=s.get(d);g||(g=i.querySelector($r(d)),g||(e=a({src:e,async:!0},t),(t=Qt.get(d))&&mo(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function lv(e,t){Ei.M(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),g=s.get(d);g||(g=i.querySelector($r(d)),g||(e=a({src:e,async:!0,type:"module"},t),(t=Qt.get(d))&&mo(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function md(e,t,i,s){var d=(d=de.current)?Zn(d):null;if(!d)throw Error(P(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(d).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 g=Ss(d).hoistableStyles,M=g.get(e);if(M||(d=d.ownerDocument||d,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(e,M),(g=d.querySelector(jr(e)))&&!g._p&&(M.instance=g,M.state.loading=5),Qt.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},Qt.set(e,i),g||ov(d,e,i,M.state))),t&&s===null)throw Error(P(528,""));return M}if(t&&s!==null)throw Error(P(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(d).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(P(444,e))}}function Qs(e){return'href="'+$t(e)+'"'}function jr(e){return'link[rel="stylesheet"]['+e+"]"}function Sd(e){return a({},e,{"data-precedence":e.precedence,precedence:null})}function ov(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}),bt(t,"link",i),gt(t),e.head.appendChild(t))}function Zs(e){return'[src="'+$t(e)+'"]'}function $r(e){return"script[async]"+e}function Cd(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+$t(i.href)+'"]');if(s)return t.instance=s,gt(s),s;var d=a({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),gt(s),bt(s,"style",d),Jn(s,i.precedence,e),t.instance=s;case"stylesheet":d=Qs(i.href);var g=e.querySelector(jr(d));if(g)return t.state.loading|=4,t.instance=g,gt(g),g;s=Sd(i),(d=Qt.get(d))&&po(s,d),g=(e.ownerDocument||e).createElement("link"),gt(g);var M=g;return M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),bt(g,"link",s),t.state.loading|=4,Jn(g,i.precedence,e),t.instance=g;case"script":return g=Zs(i.src),(d=e.querySelector($r(g)))?(t.instance=d,gt(d),d):(s=i,(d=Qt.get(g))&&(s=a({},i),mo(s,d)),e=e.ownerDocument||e,d=e.createElement("script"),gt(d),bt(d,"link",s),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(P(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Jn(s,i.precedence,e));return t.instance}function Jn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,g=d,M=0;M<s.length;M++){var k=s[M];if(k.dataset.precedence===t)g=k;else if(g!==d)break}g?g.parentNode.insertBefore(e,g.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function po(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function mo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ea=null;function yd(e,t,i){if(ea===null){var s=new Map,d=ea=new Map;d.set(i,s)}else d=ea,s=d.get(i),s||(s=new Map,d.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),d=0;d<i.length;d++){var g=i[d];if(!(g[nr]||g[mt]||e==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var M=g.getAttribute(t)||"";M=e+M;var k=s.get(M);k?k.push(g):s.set(M,[g])}}return s}function bd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function cv(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 wd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function hv(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 d=Qs(s.href),g=t.querySelector(jr(d));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ta.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=g,gt(g);return}g=t.ownerDocument||t,s=Sd(s),(d=Qt.get(d))&&po(s,d),g=g.createElement("link"),gt(g);var M=g;M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),bt(g,"link",s),i.instance=g}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ta.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var So=0;function uv(e,t){return e.stylesheets&&e.count===0&&sa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend){var g=e.unsuspend;e.unsuspend=null,g()}},6e4+t);0<e.imgBytes&&So===0&&(So=62500*W_());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend)){var g=e.unsuspend;e.unsuspend=null,g()}},(e.imgBytes>So?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function ta(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ia=null;function sa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ia=new Map,t.forEach(dv,e),ia=null,ta.call(e))}function dv(e,t){if(!(t.state.loading&4)){var i=ia.get(e);if(i)var s=i.get(null);else{i=new Map,ia.set(e,i);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var M=d[g];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(i.set(M.dataset.precedence,M),s=M)}s&&i.set(null,s)}d=t.instance,M=d.getAttribute("data-precedence"),g=i.get(M)||s,g===s&&i.set(null,d),i.set(M,d),this.count++,s=ta.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),g?g.parentNode.insertBefore(d,g.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var qr={$$typeof:l,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function fv(e,t,i,s,d,g,M,k,W){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.hiddenUpdates=fa(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function xd(e,t,i,s,d,g,M,k,W,ee,le,he){return e=new fv(e,t,i,M,W,ee,le,he,k),t=1,g===!0&&(t|=24),g=Ht(3,null,null,t),e.current=g,g.stateNode=e,t=Qa(),t.refCount++,e.pooledCache=t,t.refCount++,g.memoizedState={element:s,isDehydrated:i,cache:t},tl(g),e}function Ld(e){return e?(e=Rs,e):Rs}function Ed(e,t,i,s,d,g){d=Ld(d),s.context===null?s.context=d:s.pendingContext=d,s=ki(t),s.payload={element:i},g=g===void 0?null:g,g!==null&&(s.callback=g),i=Hi(e,s,t),i!==null&&(Bt(i,e,t),br(i,e,t))}function Md(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Co(e,t){Md(e,t),(e=e.alternate)&&Md(e,t)}function Ad(e){if(e.tag===13||e.tag===31){var t=ts(e,67108864);t!==null&&Bt(t,e,67108864),Co(e,67108864)}}function Rd(e){if(e.tag===13||e.tag===31){var t=Pt();t=_a(t);var i=ts(e,t);i!==null&&Bt(i,e,t),Co(e,t)}}var ra=!0;function _v(e,t,i,s){var d=N.T;N.T=null;var g=U.p;try{U.p=2,yo(e,t,i,s)}finally{U.p=g,N.T=d}}function vv(e,t,i,s){var d=N.T;N.T=null;var g=U.p;try{U.p=8,yo(e,t,i,s)}finally{U.p=g,N.T=d}}function yo(e,t,i,s){if(ra){var d=bo(s);if(d===null)ao(e,t,s,na,i),Td(e,s);else if(pv(d,e,t,i,s))s.stopPropagation();else if(Td(e,s),t&4&&-1<gv.indexOf(e)){for(;d!==null;){var g=ms(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var M=Jt(g.pendingLanes);if(M!==0){var k=g;for(k.pendingLanes|=2,k.entangledLanes|=2;M;){var W=1<<31-ut(M);k.entanglements[1]|=W,M&=~W}oi(g),($e&6)===0&&(Fn=ge()+500,Ur(0))}}break;case 31:case 13:k=ts(g,2),k!==null&&Bt(k,g,2),$n(),Co(g,2)}if(g=bo(s),g===null&&ao(e,t,s,na,i),g===d)break;d=g}d!==null&&s.stopPropagation()}else ao(e,t,s,null,i)}}function bo(e){return e=wa(e),wo(e)}var na=null;function wo(e){if(na=null,e=ps(e),e!==null){var t=ne(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=F(t),e!==null)return e;e=null}else if(i===31){if(e=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 na=e,null}function Dd(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(ze()){case Ae:return 2;case _t:return 8;case Qe:case it:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var xo=!1,Gi=null,Xi=null,Vi=null,Wr=new Map,Gr=new Map,Yi=[],gv="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 Td(e,t){switch(e){case"focusin":case"focusout":Gi=null;break;case"dragenter":case"dragleave":Xi=null;break;case"mouseover":case"mouseout":Vi=null;break;case"pointerover":case"pointerout":Wr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gr.delete(t.pointerId)}}function Xr(e,t,i,s,d,g){return e===null||e.nativeEvent!==g?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:g,targetContainers:[d]},t!==null&&(t=ms(t),t!==null&&Ad(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function pv(e,t,i,s,d){switch(t){case"focusin":return Gi=Xr(Gi,e,t,i,s,d),!0;case"dragenter":return Xi=Xr(Xi,e,t,i,s,d),!0;case"mouseover":return Vi=Xr(Vi,e,t,i,s,d),!0;case"pointerover":var g=d.pointerId;return Wr.set(g,Xr(Wr.get(g)||null,e,t,i,s,d)),!0;case"gotpointercapture":return g=d.pointerId,Gr.set(g,Xr(Gr.get(g)||null,e,t,i,s,d)),!0}return!1}function Bd(e){var t=ps(e.target);if(t!==null){var i=ne(t);if(i!==null){if(t=i.tag,t===13){if(t=F(i),t!==null){e.blockedOn=t,Go(e.priority,function(){Rd(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,Go(e.priority,function(){Rd(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 aa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=bo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ba=s,i.target.dispatchEvent(s),ba=null}else return t=ms(i),t!==null&&Ad(t),e.blockedOn=i,!1;t.shift()}return!0}function Od(e,t,i){aa(e)&&i.delete(t)}function mv(){xo=!1,Gi!==null&&aa(Gi)&&(Gi=null),Xi!==null&&aa(Xi)&&(Xi=null),Vi!==null&&aa(Vi)&&(Vi=null),Wr.forEach(Od),Gr.forEach(Od)}function la(e,t){e.blockedOn===t&&(e.blockedOn=null,xo||(xo=!0,j.unstable_scheduleCallback(j.unstable_NormalPriority,mv)))}var oa=null;function kd(e){oa!==e&&(oa=e,j.unstable_scheduleCallback(j.unstable_NormalPriority,function(){oa===e&&(oa=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],d=e[t+2];if(typeof s!="function"){if(wo(s||i)===null)continue;break}var g=ms(i);g!==null&&(e.splice(t,3),t-=3,yl(g,{pending:!0,data:d,method:i.method,action:s},s,d))}}))}function Js(e){function t(W){return la(W,e)}Gi!==null&&la(Gi,e),Xi!==null&&la(Xi,e),Vi!==null&&la(Vi,e),Wr.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);)Bd(i),i.blockedOn===null&&Yi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var d=i[s],g=i[s+1],M=d[Et]||null;if(typeof g=="function")M||kd(i);else if(M){var k=null;if(g&&g.hasAttribute("formAction")){if(d=g,M=g[Et]||null)k=M.formAction;else if(wo(d)!==null)continue}else k=M.action;typeof k=="function"?i[s+1]=k:(i.splice(s,3),s-=3),kd(i)}}}function Hd(){function e(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(M){return d=M})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,d=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),d!==null&&(d(),d=null)}}}function Lo(e){this._internalRoot=e}ca.prototype.render=Lo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));var i=t.current,s=Pt();Ed(i,s,e,t,null,null)},ca.prototype.unmount=Lo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ed(e.current,2,null,e,null,null),$n(),t[gs]=null}};function ca(e){this._internalRoot=e}ca.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wo();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&&Bd(e)}};var zd=K.version;if(zd!=="19.2.4")throw Error(P(527,zd,"19.2.4"));U.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=f(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Sv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ha=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ha.isDisabled&&ha.supportsFiber)try{xt=ha.inject(Sv),tt=ha}catch{}}return Yr.createRoot=function(e,t){if(!te(e))throw Error(P(299));var i=!1,s="",d=$h,g=qh,M=Wh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(g=t.onCaughtError),t.onRecoverableError!==void 0&&(M=t.onRecoverableError)),t=xd(e,1,!1,null,null,i,s,null,d,g,M,Hd),e[gs]=t.current,no(e),new Lo(t)},Yr.hydrateRoot=function(e,t,i){if(!te(e))throw Error(P(299));var s=!1,d="",g=$h,M=qh,k=Wh,W=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(M=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=xd(e,1,!0,t,i??null,s,d,W,g,M,k,Hd),t.context=Ld(null),i=t.current,s=Pt(),s=_a(s),d=ki(s),d.callback=null,Hi(i,d,s),i=s,t.current.lanes=i,rr(t,i),oi(t),e[gs]=t.current,no(e),new ca(t)},Yr.version="19.2.4",Yr}var Gd;function Rv(){if(Gd)return Ao.exports;Gd=1;function j(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(K){console.error(K)}}return j(),Ao.exports=Av(),Ao.exports}var Dv=Rv();const Tv=768,Bv=1e3;function Kr(){const K=window.location.pathname.match(/^(\/project\/[^/]+\/)/);return K?K[1]:"/"}function _s(j){const K=Kr(),Y=j.startsWith("/")?j.slice(1):j;return K+Y}function vs(){const j=localStorage.getItem("codev-web-key");return j?{Authorization:`Bearer ${j}`}:{}}async function Ov(){const j=await fetch(_s("api/state"),{headers:vs()});if(!j.ok)throw new Error(`Failed to fetch state: ${j.status}`);return j.json()}async function kv(){const j=await fetch(_s("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...vs()}});if(!j.ok)throw new Error(await j.text());return j.json()}async function Jd(j,K){const Y=await fetch(_s("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...vs()},body:JSON.stringify({path:j,line:K})});if(!Y.ok)throw new Error(await Y.text());return Y.json()}async function Hv(j){const K=await fetch(_s(`api/tabs/${j}`),{method:"DELETE",headers:vs()});if(!K.ok)throw new Error(await K.text())}async function zv(){const j=await fetch(_s("api/files"),{headers:vs()});if(!j.ok)throw new Error(`Failed to fetch files: ${j.status}`);return j.json()}function Nv(j){return j.terminalId?`${Kr()}ws/terminal/${j.terminalId}`:null}async function Uv(){const j=await fetch(_s("api/git/status"),{headers:vs()});if(!j.ok)throw new Error(`Failed to fetch git status: ${j.status}`);return j.json()}async function Iv(){const j=await fetch(_s("api/files/recent"),{headers:vs()});if(!j.ok)throw new Error(`Failed to fetch recent files: ${j.status}`);return j.json()}function Pv(){const[j,K]=Re.useState(null),[Y,P]=Re.useState(null),te=Re.useCallback(async()=>{try{const ne=await Ov();K(ne),P(null)}catch(ne){P(ne.message)}},[]);return Re.useEffect(()=>{te();const ne=setInterval(te,Bv);return()=>clearInterval(ne)},[te]),{state:j,error:Y,refresh:te}}function Fv(j){const K=[{id:"dashboard",type:"dashboard",label:"Dashboard",closable:!1}];j!=null&&j.architect&&K.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:j.architect.terminalId});for(const Y of(j==null?void 0:j.builders)??[])K.push({id:Y.id,type:"builder",label:Y.name||`Builder ${Y.id}`,closable:!0,projectId:Y.id,terminalId:Y.terminalId});for(const Y of(j==null?void 0:j.utils)??[])!Y.terminalId&&(!Y.pid||Y.pid===0)||K.push({id:Y.id,type:"shell",label:Y.name||`Shell ${Y.id}`,closable:!0,utilId:Y.id,terminalId:Y.terminalId});for(const Y of(j==null?void 0:j.annotations)??[]){const P=Y.file.split("/").pop()??Y.file;K.push({id:Y.id,type:"file",label:P,closable:!0,annotationId:Y.id,filePath:Y.file})}return K}function jv(j){const[K,Y]=Re.useState("dashboard"),P=Re.useRef(null),te=Re.useRef(!1),ne=Fv(j);Re.useEffect(()=>{if(te.current||j===null)return;const f=new URLSearchParams(window.location.search).get("tab");if(f){const v=ne.find(a=>a.id===f||a.type===f);if(v){Y(v.id),te.current=!0;const a=new URL(window.location.href);a.searchParams.delete("tab"),window.history.replaceState({},"",a.toString())}}else te.current=!0},[ne,j]),Re.useEffect(()=>{const u=new Set(ne.map(f=>f.id));if(P.current===null){j!==null&&(P.current=u);return}for(const f of ne)!P.current.has(f.id)&&f.type!=="architect"&&Y(f.id);P.current=u},[ne.map(u=>u.id).join(","),j!==null]);const F=Re.useCallback(u=>{Y(u)},[]),n=ne.find(u=>u.id===K)??ne[0];return{tabs:ne,activeTab:n,activeTabId:K,selectTab:F}}function $v(j){const[K,Y]=Re.useState(()=>typeof window<"u"?window.matchMedia(j).matches:!1);return Re.useEffect(()=>{const P=window.matchMedia(j),te=ne=>Y(ne.matches);return P.addEventListener("change",te),Y(P.matches),()=>P.removeEventListener("change",te)},[j]),K}function qv({left:j,right:K,defaultSplit:Y=50}){const[P,te]=Re.useState(Y),ne=Re.useRef(null),F=Re.useRef(!1),n=Re.useCallback(u=>{u.preventDefault(),F.current=!0;const f=a=>{if(!F.current||!ne.current)return;const p=ne.current.getBoundingClientRect(),y=(a.clientX-p.left)/p.width*100;te(Math.max(20,Math.min(80,y)))},v=()=>{F.current=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",v)},[]);return Z.jsxs("div",{ref:ne,className:"split-pane",children:[Z.jsx("div",{className:"split-left",style:{width:`${P}%`},children:j}),Z.jsx("div",{className:"split-handle",onMouseDown:n,role:"separator","aria-label":"Resize panels"}),Z.jsx("div",{className:"split-right",style:{width:`${100-P}%`},children:K})]})}function ef({tabs:j,activeTabId:K,onSelectTab:Y,onRefresh:P}){const te=async(ne,F)=>{ne.stopPropagation();try{await Hv(F.id),P()}catch(n){console.error("Failed to close tab:",n)}};return Z.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:j.map(ne=>Z.jsxs("button",{role:"tab","aria-selected":ne.id===K,className:`tab ${ne.id===K?"tab-active":""}`,onClick:()=>Y(ne.id),title:ne.label,children:[Z.jsx("span",{className:"tab-label",children:ne.label}),ne.closable&&Z.jsx("span",{className:"tab-close",onClick:F=>te(F,ne),role:"button","aria-label":`Close ${ne.label}`,tabIndex:0,onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),te(F,ne))},children:"×"})]},ne.id))})}var Bo={exports:{}},Xd;function Wv(){return Xd||(Xd=1,(function(j,K){(function(Y,P){j.exports=P()})(globalThis,(()=>(()=>{var Y={4567:function(F,n,u){var f=this&&this.__decorate||function(o,l,m,x){var _,w=arguments.length,S=w<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,m):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(o,l,m,x);else for(var C=o.length-1;C>=0;C--)(_=o[C])&&(S=(w<3?_(S):w>3?_(l,m,S):_(l,m))||S);return w>3&&S&&Object.defineProperty(l,m,S),S},v=this&&this.__param||function(o,l){return function(m,x){l(m,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const a=u(9042),p=u(9924),y=u(844),b=u(4725),c=u(2585),r=u(3656);let h=n.AccessibilityManager=class extends y.Disposable{constructor(o,l,m,x){super(),this._terminal=o,this._coreBrowserService=m,this._renderService=x,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 _=0;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);if(this._topBoundaryFocusListener=_=>this._handleBoundaryFocus(_,0),this._bottomBoundaryFocusListener=_=>this._handleBoundaryFocus(_,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 p.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((_=>this._handleResize(_.rows)))),this.register(this._terminal.onRender((_=>this._refreshRows(_.start,_.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((_=>this._handleChar(_)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
50
- `)))),this.register(this._terminal.onA11yTab((_=>this._handleTab(_)))),this.register(this._terminal.onKey((_=>this._handleKey(_.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 l=0;l<o;l++)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+=a.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,l){this._liveRegionDebouncer.refresh(o,l,this._terminal.rows)}_renderRows(o,l){const m=this._terminal.buffer,x=m.lines.length.toString();for(let _=o;_<=l;_++){const w=m.lines.get(m.ydisp+_),S=[],C=(w==null?void 0:w.translateToString(!0,void 0,void 0,S))||"",L=(m.ydisp+_+1).toString(),A=this._rowElements[_];A&&(C.length===0?(A.innerText=" ",this._rowColumns.set(A,[0,1])):(A.textContent=C,this._rowColumns.set(A,S)),A.setAttribute("aria-posinset",L),A.setAttribute("aria-setsize",x))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,l){const m=o.target,x=this._rowElements[l===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==x)return;let _,w;if(l===0?(_=m,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(_=this._rowElements.shift(),w=m,this._rowContainer.removeChild(_)),_.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else{const S=this._createAccessibilityTreeNode();this._rowElements.push(S),this._rowContainer.appendChild(S)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var C;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 l={node:o.anchorNode,offset:o.anchorOffset},m={node:o.focusNode,offset:o.focusOffset};if((l.node.compareDocumentPosition(m.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===m.node&&l.offset>m.offset)&&([l,m]=[m,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const x=this._rowElements.slice(-1)[0];if(m.node.compareDocumentPosition(x)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(m={node:x,offset:((C=x.textContent)==null?void 0:C.length)??0}),!this._rowContainer.contains(m.node))return;const _=({node:L,offset:A})=>{const E=L instanceof Text?L.parentNode:L;let D=parseInt(E==null?void 0:E.getAttribute("aria-posinset"),10)-1;if(isNaN(D))return console.warn("row is invalid. Race condition?"),null;const O=this._rowColumns.get(E);if(!O)return console.warn("columns is null. Race condition?"),null;let $=A<O.length?O[A]:O.slice(-1)[0]+1;return $>=this._terminal.cols&&(++D,$=0),{row:D,column:$}},w=_(l),S=_(m);if(w&&S){if(w.row>S.row||w.row===S.row&&w.column>=S.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(S.row-w.row)*this._terminal.cols-w.column+S.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);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=f([v(1,c.IInstantiationService),v(2,b.ICoreBrowserService),v(3,b.IRenderService)],h)},3614:(F,n)=>{function u(p){return p.replace(/\r?\n/g,"\r")}function f(p,y){return y?"\x1B[200~"+p+"\x1B[201~":p}function v(p,y,b,c){p=f(p=u(p),b.decPrivateModes.bracketedPasteMode&&c.rawOptions.ignoreBracketedPasteMode!==!0),b.triggerDataEvent(p,!0),y.value=""}function a(p,y,b){const c=b.getBoundingClientRect(),r=p.clientX-c.left-10,h=p.clientY-c.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=u,n.bracketTextForPaste=f,n.copyHandler=function(p,y){p.clipboardData&&p.clipboardData.setData("text/plain",y.selectionText),p.preventDefault()},n.handlePasteEvent=function(p,y,b,c){p.stopPropagation(),p.clipboardData&&v(p.clipboardData.getData("text/plain"),y,b,c)},n.paste=v,n.moveTextAreaUnderMouseCursor=a,n.rightClickHandler=function(p,y,b,c,r){a(p,y,b),r&&c.rightClickSelect(p),y.value=c.selectionText,y.select()}},7239:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const f=u(1505);n.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(v,a,p){this._css.set(v,a,p)}getCss(v,a){return this._css.get(v,a)}setColor(v,a,p){this._color.set(v,a,p)}getColor(v,a){return this._color.get(v,a)}clear(){this._color.clear(),this._css.clear()}}},3656:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,v,a){u.addEventListener(f,v,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,v,a))}}}},3551:function(F,n,u){var f=this&&this.__decorate||function(h,o,l,m){var x,_=arguments.length,w=_<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,l):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,l,m);else for(var S=h.length-1;S>=0;S--)(x=h[S])&&(w=(_<3?x(w):_>3?x(o,l,w):x(o,l))||w);return _>3&&w&&Object.defineProperty(o,l,w),w},v=this&&this.__param||function(h,o){return function(l,m){o(l,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const a=u(3656),p=u(8460),y=u(844),b=u(2585),c=u(4725);let r=n.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(h,o,l,m,x){super(),this._element=h,this._mouseService=o,this._renderService=l,this._bufferService=m,this._linkProviderService=x,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var _;this._lastMouseEvent=void 0,(_=this._activeProviderReplies)==null||_.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,a.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,a.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,a.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 l=h.composedPath();for(let m=0;m<l.length;m++){const x=l[m];if(x.classList.contains("xterm"))break;if(x.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 m,x;this._activeProviderReplies&&o||((m=this._activeProviderReplies)==null||m.forEach((_=>{_==null||_.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let l=!1;for(const[_,w]of this._linkProviderService.linkProviders.entries())o?(x=this._activeProviderReplies)!=null&&x.get(_)&&(l=this._checkLinkProviderResult(_,h,l)):w.provideLinks(h.y,(S=>{var L,A;if(this._isMouseOut)return;const C=S==null?void 0:S.map((E=>({link:E})));(L=this._activeProviderReplies)==null||L.set(_,C),l=this._checkLinkProviderResult(_,h,l),((A=this._activeProviderReplies)==null?void 0:A.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,o){const l=new Set;for(let m=0;m<o.size;m++){const x=o.get(m);if(x)for(let _=0;_<x.length;_++){const w=x[_],S=w.link.range.start.y<h?0:w.link.range.start.x,C=w.link.range.end.y>h?this._bufferService.cols:w.link.range.end.x;for(let L=S;L<=C;L++){if(l.has(L)){x.splice(_--,1);break}l.add(L)}}}}_checkLinkProviderResult(h,o,l){var _;if(!this._activeProviderReplies)return l;const m=this._activeProviderReplies.get(h);let x=!1;for(let w=0;w<h;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(x=!0);if(!x&&m){const w=m.find((S=>this._linkAtPosition(S.link,o)));w&&(l=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let w=0;w<this._activeProviderReplies.size;w++){const S=(_=this._activeProviderReplies.get(w))==null?void 0:_.find((C=>this._linkAtPosition(C.link,o)));if(S){l=!0,this._handleNewLink(S);break}}return l}_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 l,m;return(m=(l=this._currentLink)==null?void 0:l.state)==null?void 0:m.decorations.pointerCursor},set:l=>{var m;(m=this._currentLink)!=null&&m.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,m;return(m=(l=this._currentLink)==null?void 0:l.state)==null?void 0:m.decorations.underline},set:l=>{var m,x,_;(m=this._currentLink)!=null&&m.state&&((_=(x=this._currentLink)==null?void 0:x.state)==null?void 0:_.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const m=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,x=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=x&&(this._clearCurrentLink(m,x),this._lastMouseEvent)){const _=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);_&&this._askForLink(_,!1)}}))))}_linkHover(h,o,l){var m;(m=this._currentLink)!=null&&m.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(l,o.text)}_fireUnderlineEvent(h,o){const l=h.range,m=this._bufferService.buffer.ydisp,x=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-m-1,l.end.x,l.end.y-m-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(x)}_linkLeave(h,o,l){var m;(m=this._currentLink)!=null&&m.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(l,o.text)}_linkAtPosition(h,o){const l=h.range.start.y*this._bufferService.cols+h.range.start.x,m=h.range.end.y*this._bufferService.cols+h.range.end.x,x=o.y*this._bufferService.cols+o.x;return l<=x&&x<=m}_positionFromMouseEvent(h,o,l){const m=l.getCoords(h,o,this._bufferService.cols,this._bufferService.rows);if(m)return{x:m[0],y:m[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,o,l,m,x){return{x1:h,y1:o,x2:l,y2:m,cols:this._bufferService.cols,fg:x}}};n.Linkifier=r=f([v(1,c.IMouseService),v(2,c.IRenderService),v(3,b.IBufferService),v(4,c.ILinkProviderService)],r)},9042:(F,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(F,n,u){var f=this&&this.__decorate||function(c,r,h,o){var l,m=arguments.length,x=m<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var _=c.length-1;_>=0;_--)(l=c[_])&&(x=(m<3?l(x):m>3?l(r,h,x):l(r,h))||x);return m>3&&x&&Object.defineProperty(r,h,x),x},v=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const a=u(511),p=u(2585);let y=n.OscLinkProvider=class{constructor(c,r,h){this._bufferService=c,this._optionsService=r,this._oscLinkService=h}provideLinks(c,r){var C;const h=this._bufferService.buffer.lines.get(c-1);if(!h)return void r(void 0);const o=[],l=this._optionsService.rawOptions.linkHandler,m=new a.CellData,x=h.getTrimmedLength();let _=-1,w=-1,S=!1;for(let L=0;L<x;L++)if(w!==-1||h.hasContent(L)){if(h.loadCell(L,m),m.hasExtendedAttrs()&&m.extended.urlId){if(w===-1){w=L,_=m.extended.urlId;continue}S=m.extended.urlId!==_}else w!==-1&&(S=!0);if(S||w!==-1&&L===x-1){const A=(C=this._oscLinkService.getLinkData(_))==null?void 0:C.uri;if(A){const E={start:{x:w+1,y:c},end:{x:L+(S||L!==x-1?0:1),y:c}};let D=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const O=new URL(A);["http:","https:"].includes(O.protocol)||(D=!0)}catch{D=!0}D||o.push({text:A,range:E,activate:(O,$)=>l?l.activate(O,$,E):b(0,$),hover:(O,$)=>{var N;return(N=l==null?void 0:l.hover)==null?void 0:N.call(l,O,$,E)},leave:(O,$)=>{var N;return(N=l==null?void 0:l.leave)==null?void 0:N.call(l,O,$,E)}})}S=!1,m.hasExtendedAttrs()&&m.extended.urlId?(w=L,_=m.extended.urlId):(w=-1,_=-1)}}r(o)}};function b(c,r){if(confirm(`Do you want to navigate to ${r}?
48
+ `+s.stack}}var Ot=Object.prototype.hasOwnProperty,Se=j.unstable_scheduleCallback,pe=j.unstable_cancelCallback,me=j.unstable_shouldYield,ce=j.unstable_requestPaint,ge=j.unstable_now,ze=j.unstable_getCurrentPriorityLevel,Re=j.unstable_ImmediatePriority,_t=j.unstable_UserBlockingPriority,Qe=j.unstable_NormalPriority,it=j.unstable_LowPriority,Ie=j.unstable_IdlePriority,Me=j.log,xe=j.unstable_setDisableYieldValue,xt=null,tt=null;function vt(e){if(typeof Me=="function"&&xe(e),tt&&typeof tt.setStrictMode=="function")try{tt.setStrictMode(xt,e)}catch{}}var ut=Math.clz32?Math.clz32:ir,Zt=Math.log,tr=Math.LN2;function ir(e){return e>>>=0,e===0?32:31-(Zt(e)/tr|0)|0}var Ft=256,si=262144,ri=4194304;function Jt(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 Qr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var d=0,g=e.suspendedLanes,M=e.pingedLanes;e=e.warmLanes;var k=s&134217727;return k!==0?(s=k&~g,s!==0?d=Jt(s):(M&=k,M!==0?d=Jt(M):i||(i=k&~e,i!==0&&(d=Jt(i))))):(k=s&~g,k!==0?d=Jt(k):M!==0?d=Jt(M):i||(i=s&~e,i!==0&&(d=Jt(i)))),d===0?0:t!==0&&t!==d&&(t&g)===0&&(g=d&-d,i=t&-t,g>=i||g===32&&(i&4194048)!==0)?t:d}function sr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function hf(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 Fo(){var e=ri;return ri<<=1,(ri&62914560)===0&&(ri=4194304),e}function fa(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function rr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function uf(e,t,i,s,d,g){var M=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 k=e.entanglements,W=e.expirationTimes,te=e.hiddenUpdates;for(i=M&~i;0<i;){var le=31-ut(i),he=1<<le;k[le]=0,W[le]=-1;var re=te[le];if(re!==null)for(te[le]=null,le=0;le<re.length;le++){var ae=re[le];ae!==null&&(ae.lane&=-536870913)}i&=~he}s!==0&&jo(e,s,0),g!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=g&~(M&~t))}function jo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-ut(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function $o(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-ut(i),d=1<<s;d&t|e[s]&t&&(e[s]|=t),i&=~d}}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 Wo(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:Dd(e.type))}function Go(e,t){var i=U.p;try{return U.p=e,t()}finally{U.p=i}}var Mi=Math.random().toString(36).slice(2),mt="__reactFiber$"+Mi,Lt="__reactProps$"+Mi,gs="__reactContainer$"+Mi,ga="__reactEvents$"+Mi,df="__reactListeners$"+Mi,ff="__reactHandles$"+Mi,Xo="__reactResources$"+Mi,nr="__reactMarker$"+Mi;function pa(e){delete e[mt],delete e[Lt],delete e[ga],delete e[df],delete e[ff]}function ps(e){var t=e[mt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[gs]||i[mt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=_d(e);e!==null;){if(i=e[mt])return i;e=_d(e)}return t}e=i,i=e.parentNode}return null}function ms(e){if(e=e[mt]||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 ar(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(P(33))}function Ss(e){var t=e[Xo];return t||(t=e[Xo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[nr]=!0}var Vo=new Set,Yo={};function Qi(e,t){Cs(e,t),Cs(e+"Capture",t)}function Cs(e,t){for(Yo[e]=t,e=0;e<t.length;e++)Vo.add(t[e])}var _f=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]*$"),Ko={},Qo={};function vf(e){return Ot.call(Qo,e)?!0:Ot.call(Ko,e)?!1:_f.test(e)?Qo[e]=!0:(Ko[e]=!0,!1)}function Zr(e,t,i){if(vf(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 Jr(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 ci(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 Zo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gf(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 d=s.get,g=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(M){i=""+M,g.call(this,M)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(M){i=""+M},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ma(e){if(!e._valueTracker){var t=Zo(e)?"checked":"value";e._valueTracker=gf(e,t,""+e[t])}}function Jo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Zo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function en(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 pf=/[\n"\\]/g;function $t(e){return e.replace(pf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Sa(e,t,i,s,d,g,M,k){e.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.type=M:e.removeAttribute("type"),t!=null?M==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):M!=="submit"&&M!=="reset"||e.removeAttribute("value"),t!=null?Ca(e,M,jt(t)):i!=null?Ca(e,M,jt(i)):s!=null&&e.removeAttribute("value"),d==null&&g!=null&&(e.defaultChecked=!!g),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+jt(k):e.removeAttribute("name")}function ec(e,t,i,s,d,g,M,k){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.type=g),t!=null||i!=null){if(!(g!=="submit"&&g!=="reset"||t!=null)){ma(e);return}i=i!=null?""+jt(i):"",t=t!=null?""+jt(t):i,k||t===e.value||(e.value=t),e.defaultValue=t}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=k?e.checked:!!s,e.defaultChecked=!!s,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(e.name=M),ma(e)}function Ca(e,t,i){t==="number"&&en(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ys(e,t,i,s){if(e=e.options,t){t={};for(var d=0;d<i.length;d++)t["$"+i[d]]=!0;for(i=0;i<e.length;i++)d=t.hasOwnProperty("$"+e[i].value),e[i].selected!==d&&(e[i].selected=d),d&&s&&(e[i].defaultSelected=!0)}else{for(i=""+jt(i),t=null,d=0;d<e.length;d++){if(e[d].value===i){e[d].selected=!0,s&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function tc(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 ic(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(P(92));if($(s)){if(1<s.length)throw Error(P(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),ma(e)}function bs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var mf=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 sc(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||mf.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function rc(e,t,i){if(t!=null&&typeof t!="object")throw Error(P(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 d in t)s=t[d],t.hasOwnProperty(d)&&i[d]!==s&&sc(e,d,s)}else for(var g in t)t.hasOwnProperty(g)&&sc(e,g,t[g])}function ya(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 Sf=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"]]),Cf=/^[\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 tn(e){return Cf.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function hi(){}var ba=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,xs=null;function nc(e){var t=ms(e);if(t&&(e=t.stateNode)){var i=e[Lt]||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="'+$t(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var d=s[Lt]||null;if(!d)throw Error(P(90));Sa(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Jo(s)}break e;case"textarea":tc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ys(e,!!i.multiple,t,!1)}}}var xa=!1;function ac(e,t,i){if(xa)return e(t,i);xa=!0;try{var s=e(t);return s}finally{if(xa=!1,(ws!==null||xs!==null)&&($n(),ws&&(t=ws,e=xs,xs=ws=null,nc(t),e)))for(t=0;t<e.length;t++)nc(e[t])}}function lr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Lt]||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(P(231,t,typeof i));return i}var ui=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ea=!1;if(ui)try{var or={};Object.defineProperty(or,"passive",{get:function(){Ea=!0}}),window.addEventListener("test",or,or),window.removeEventListener("test",or,or)}catch{Ea=!1}var Ai=null,La=null,sn=null;function lc(){if(sn)return sn;var e,t=La,i=t.length,s,d="value"in Ai?Ai.value:Ai.textContent,g=d.length;for(e=0;e<i&&t[e]===d[e];e++);var M=i-e;for(s=1;s<=M&&t[i-s]===d[g-s];s++);return sn=d.slice(e,1<s?1-s:void 0)}function rn(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 nn(){return!0}function oc(){return!1}function Mt(e){function t(i,s,d,g,M){this._reactName=i,this._targetInst=d,this.type=s,this.nativeEvent=g,this.target=M,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(i=e[k],this[k]=i?i(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?nn:oc,this.isPropagationStopped=oc,this}return a(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=nn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=Mt(Zi),cr=a({},Zi,{view:0,detail:0}),yf=Mt(cr),Ma,Aa,hr,ln=a({},cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Da,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!==hr&&(hr&&e.type==="mousemove"?(Ma=e.screenX-hr.screenX,Aa=e.screenY-hr.screenY):Aa=Ma=0,hr=e),Ma)},movementY:function(e){return"movementY"in e?e.movementY:Aa}}),cc=Mt(ln),bf=a({},ln,{dataTransfer:0}),wf=Mt(bf),xf=a({},cr,{relatedTarget:0}),Ra=Mt(xf),Ef=a({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),Lf=Mt(Ef),Mf=a({},Zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Af=Mt(Mf),Rf=a({},Zi,{data:0}),hc=Mt(Rf),Df={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tf={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"},Bf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Of(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bf[e])?!!t[e]:!1}function Da(){return Of}var kf=a({},cr,{key:function(e){if(e.key){var t=Df[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Da,charCode:function(e){return e.type==="keypress"?rn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hf=Mt(kf),zf=a({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uc=Mt(zf),Nf=a({},cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Da}),Uf=Mt(Nf),If=a({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pf=Mt(If),Ff=a({},ln,{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}),jf=Mt(Ff),$f=a({},Zi,{newState:0,oldState:0}),qf=Mt($f),Wf=[9,13,27,32],Ta=ui&&"CompositionEvent"in window,ur=null;ui&&"documentMode"in document&&(ur=document.documentMode);var Gf=ui&&"TextEvent"in window&&!ur,dc=ui&&(!Ta||ur&&8<ur&&11>=ur),fc=" ",_c=!1;function vc(e,t){switch(e){case"keyup":return Wf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Es=!1;function Xf(e,t){switch(e){case"compositionend":return gc(t);case"keypress":return t.which!==32?null:(_c=!0,fc);case"textInput":return e=t.data,e===fc&&_c?null:e;default:return null}}function Vf(e,t){if(Es)return e==="compositionend"||!Ta&&vc(e,t)?(e=lc(),sn=La=Ai=null,Es=!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 dc&&t.locale!=="ko"?null:t.data;default:return null}}var Yf={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 pc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yf[e.type]:t==="textarea"}function mc(e,t,i,s){ws?xs?xs.push(s):xs=[s]:ws=s,t=Kn(t,"onChange"),0<t.length&&(i=new an("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var dr=null,fr=null;function Kf(e){ed(e,0)}function on(e){var t=ar(e);if(Jo(t))return e}function Sc(e,t){if(e==="change")return t}var Cc=!1;if(ui){var Ba;if(ui){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;Cc=Ba&&(!document.documentMode||9<document.documentMode)}function bc(){dr&&(dr.detachEvent("onpropertychange",wc),fr=dr=null)}function wc(e){if(e.propertyName==="value"&&on(fr)){var t=[];mc(t,fr,e,wa(e)),ac(Kf,t)}}function Qf(e,t,i){e==="focusin"?(bc(),dr=t,fr=i,dr.attachEvent("onpropertychange",wc)):e==="focusout"&&bc()}function Zf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return on(fr)}function Jf(e,t){if(e==="click")return on(t)}function e_(e,t){if(e==="input"||e==="change")return on(t)}function t_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:t_;function _r(e,t){if(kt(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 d=i[s];if(!Ot.call(t,d)||!kt(e[d],t[d]))return!1}return!0}function xc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ec(e,t){var i=xc(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=xc(i)}}function Lc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=en(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=en(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 i_=ui&&"documentMode"in document&&11>=document.documentMode,Ls=null,Ha=null,vr=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!==en(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}),vr&&_r(vr,s)||(vr=s,s=Kn(Ha,"onSelect"),0<s.length&&(t=new an("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Ls)))}function Ji(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ms={animationend:Ji("Animation","AnimationEnd"),animationiteration:Ji("Animation","AnimationIteration"),animationstart:Ji("Animation","AnimationStart"),transitionrun:Ji("Transition","TransitionRun"),transitionstart:Ji("Transition","TransitionStart"),transitioncancel:Ji("Transition","TransitionCancel"),transitionend:Ji("Transition","TransitionEnd")},Na={},Rc={};ui&&(Rc=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function es(e){if(Na[e])return Na[e];if(!Ms[e])return e;var t=Ms[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Rc)return Na[e]=t[i];return e}var Dc=es("animationend"),Tc=es("animationiteration"),Bc=es("animationstart"),s_=es("transitionrun"),r_=es("transitionstart"),n_=es("transitioncancel"),Oc=es("transitionend"),kc=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 ei(e,t){kc.set(e,t),Qi(t,[e])}var cn=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)},qt=[],As=0,Ia=0;function hn(){for(var e=As,t=Ia=As=0;t<e;){var i=qt[t];qt[t++]=null;var s=qt[t];qt[t++]=null;var d=qt[t];qt[t++]=null;var g=qt[t];if(qt[t++]=null,s!==null&&d!==null){var M=s.pending;M===null?d.next=d:(d.next=M.next,M.next=d),s.pending=d}g!==0&&Hc(i,d,g)}}function un(e,t,i,s){qt[As++]=e,qt[As++]=t,qt[As++]=i,qt[As++]=s,Ia|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Pa(e,t,i,s){return un(e,t,i,s),dn(e)}function ts(e,t){return un(e,null,null,t),dn(e)}function Hc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var d=!1,g=e.return;g!==null;)g.childLanes|=i,s=g.alternate,s!==null&&(s.childLanes|=i),g.tag===22&&(e=g.stateNode,e===null||e._visibility&1||(d=!0)),e=g,g=g.return;return e.tag===3?(g=e.stateNode,d&&t!==null&&(d=31-ut(i),e=g.hiddenUpdates,s=e[d],s===null?e[d]=[t]:s.push(t),t.lane=i|536870912),g):null}function dn(e){if(50<Nr)throw Nr=0,Yl=null,Error(P(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rs={};function a_(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 Ht(e,t,i,s){return new a_(e,t,i,s)}function Fa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var i=e.alternate;return i===null?(i=Ht(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 zc(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 fn(e,t,i,s,d,g){var M=0;if(s=e,typeof e=="function")Fa(e)&&(M=1);else if(typeof e=="string")M=uv(e,i,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case y:return e=Ht(31,i,t,d),e.elementType=y,e.lanes=g,e;case c:return is(i.children,d,g,t);case r:M=8,d|=24;break;case h:return e=Ht(12,i,t,d|2),e.elementType=h,e.lanes=g,e;case x:return e=Ht(13,i,t,d),e.elementType=x,e.lanes=g,e;case _:return e=Ht(19,i,t,d),e.elementType=_,e.lanes=g,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:M=10;break e;case o:M=9;break e;case S:M=11;break e;case C:M=14;break e;case m:M=16,s=null;break e}M=29,i=Error(P(130,e===null?"null":typeof e,"")),s=null}return t=Ht(M,i,t,d),t.elementType=e,t.type=s,t.lanes=g,t}function is(e,t,i,s){return e=Ht(7,e,s,t),e.lanes=i,e}function ja(e,t,i){return e=Ht(6,e,null,t),e.lanes=i,e}function Nc(e){var t=Ht(18,null,null,0);return t.stateNode=e,t}function $a(e,t,i){return t=Ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Uc=new WeakMap;function Wt(e,t){if(typeof e=="object"&&e!==null){var i=Uc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ft(t)},Uc.set(e,t),t)}return{value:e,source:t,stack:ft(t)}}var Ds=[],Ts=0,_n=null,gr=0,Gt=[],Xt=0,Ri=null,ni=1,ai="";function fi(e,t){Ds[Ts++]=gr,Ds[Ts++]=_n,_n=e,gr=t}function Ic(e,t,i){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Ri,Ri=e;var s=ni;e=ai;var d=32-ut(s)-1;s&=~(1<<d),i+=1;var g=32-ut(t)+d;if(30<g){var M=d-d%5;g=(s&(1<<M)-1).toString(32),s>>=M,d-=M,ni=1<<32-ut(t)+d|i<<d|s,ai=g+e}else ni=1<<g|i<<d|s,ai=e}function qa(e){e.return!==null&&(fi(e,1),Ic(e,1,0))}function Wa(e){for(;e===_n;)_n=Ds[--Ts],Ds[Ts]=null,gr=Ds[--Ts],Ds[Ts]=null;for(;e===Ri;)Ri=Gt[--Xt],Gt[Xt]=null,ai=Gt[--Xt],Gt[Xt]=null,ni=Gt[--Xt],Gt[Xt]=null}function Pc(e,t){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Ri,ni=t.id,ai=t.overflow,Ri=e}var St=null,Ze=null,Pe=!1,Di=null,Vt=!1,Ga=Error(P(519));function Ti(e){var t=Error(P(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pr(Wt(t,e)),Ga}function Fc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[mt]=e,t[Lt]=s,i){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(i=0;i<Ir.length;i++)He(Ir[i],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),ec(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),ic(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||rd(t.textContent,i)?(s.popover!=null&&(He("beforetoggle",t),He("toggle",t)),s.onScroll!=null&&He("scroll",t),s.onScrollEnd!=null&&He("scrollend",t),s.onClick!=null&&(t.onclick=hi),t=!0):t=!1,t||Ti(e,!0)}function jc(e){for(St=e.return;St;)switch(St.tag){case 5:case 31:case 13:Vt=!1;return;case 27:case 3:Vt=!0;return;default:St=St.return}}function Bs(e){if(e!==St)return!1;if(!Pe)return jc(e),Pe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||ho(e.type,e.memoizedProps)),i=!i),i&&Ze&&Ti(e),jc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));Ze=fd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));Ze=fd(e)}else t===27?(t=Ze,Wi(e.type)?(e=go,go=null,Ze=e):Ze=t):Ze=St?Kt(e.stateNode.nextSibling):null;return!0}function ss(){Ze=St=null,Pe=!1}function Xa(){var e=Di;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Di=null),e}function pr(e){Di===null?Di=[e]:Di.push(e)}var Va=T(null),rs=null,_i=null;function Bi(e,t,i){G(Va,t._currentValue),t._currentValue=i}function vi(e){e._currentValue=Va.current,H(Va)}function Ya(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 d=e.child;for(d!==null&&(d.return=e);d!==null;){var g=d.dependencies;if(g!==null){var M=d.child;g=g.firstContext;e:for(;g!==null;){var k=g;g=d;for(var W=0;W<t.length;W++)if(k.context===t[W]){g.lanes|=i,k=g.alternate,k!==null&&(k.lanes|=i),Ya(g.return,i,e),s||(M=null);break e}g=k.next}}else if(d.tag===18){if(M=d.return,M===null)throw Error(P(341));M.lanes|=i,g=M.alternate,g!==null&&(g.lanes|=i),Ya(M,i,e),M=null}else M=d.child;if(M!==null)M.return=d;else for(M=d;M!==null;){if(M===e){M=null;break}if(d=M.sibling,d!==null){d.return=M.return,M=d;break}M=M.return}d=M}}function Os(e,t,i,s){e=null;for(var d=t,g=!1;d!==null;){if(!g){if((d.flags&524288)!==0)g=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var M=d.alternate;if(M===null)throw Error(P(387));if(M=M.memoizedProps,M!==null){var k=d.type;kt(d.pendingProps.value,M.value)||(e!==null?e.push(k):e=[k])}}else if(d===q.current){if(M=d.alternate,M===null)throw Error(P(387));M.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(qr):e=[qr])}d=d.return}e!==null&&Ka(t,e,i,s),t.flags|=262144}function vn(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ns(e){rs=e,_i=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return $c(rs,e)}function gn(e,t){return rs===null&&ns(e),$c(e,t)}function $c(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},_i===null){if(e===null)throw Error(P(308));_i=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _i=_i.next=t;return i}var l_=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()})}},o_=j.unstable_scheduleCallback,c_=j.unstable_NormalPriority,lt={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qa(){return{controller:new l_,data:new Map,refCount:0}}function mr(e){e.refCount--,e.refCount===0&&o_(c_,function(){e.controller.abort()})}var Sr=null,Za=0,ks=0,Hs=null;function h_(e,t){if(Sr===null){var i=Sr=[];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&&Sr!==null){Hs!==null&&(Hs.status="fulfilled");var e=Sr;Sr=null,ks=0,Hs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function u_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var d=0;d<i.length;d++)(0,i[d])(t)},function(d){for(s.status="rejected",s.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),s}var Wc=N.S;N.S=function(e,t){Au=ge(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&h_(e,t),Wc!==null&&Wc(e,t)};var as=T(null);function Ja(){var e=as.current;return e!==null?e:Ke.pooledCache}function pn(e,t){t===null?G(as,as.current):G(as,t.pool)}function Gc(){var e=Ja();return e===null?null:{parent:lt._currentValue,pool:e}}var zs=Error(P(460)),el=Error(P(474)),mn=Error(P(542)),Sn={then:function(){}};function Xc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(hi,hi),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kc(e),e;default:if(typeof t.status=="string")t.then(hi,hi);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(P(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=s}},function(s){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kc(e),e}throw os=t,zs}}function ls(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(os=i,zs):i}}var os=null;function Yc(){if(os===null)throw Error(P(459));var e=os;return os=null,e}function Kc(e){if(e===zs||e===mn)throw Error(P(483))}var Ns=null,Cr=0;function Cn(e){var t=Cr;return Cr+=1,Ns===null&&(Ns=[]),Vc(Ns,e,t)}function yr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yn(e,t){throw t.$$typeof===p?Error(P(525)):(e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qc(e){function t(Q,X){if(e){var J=Q.deletions;J===null?(Q.deletions=[X],Q.flags|=16):J.push(X)}}function i(Q,X){if(!e)return null;for(;X!==null;)t(Q,X),X=X.sibling;return null}function s(Q){for(var X=new Map;Q!==null;)Q.key!==null?X.set(Q.key,Q):X.set(Q.index,Q),Q=Q.sibling;return X}function d(Q,X){return Q=di(Q,X),Q.index=0,Q.sibling=null,Q}function g(Q,X,J){return Q.index=J,e?(J=Q.alternate,J!==null?(J=J.index,J<X?(Q.flags|=67108866,X):J):(Q.flags|=67108866,X)):(Q.flags|=1048576,X)}function M(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function k(Q,X,J,oe){return X===null||X.tag!==6?(X=ja(J,Q.mode,oe),X.return=Q,X):(X=d(X,J),X.return=Q,X)}function W(Q,X,J,oe){var we=J.type;return we===c?le(Q,X,J.props.children,oe,J.key):X!==null&&(X.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===m&&ls(we)===X.type)?(X=d(X,J.props),yr(X,J),X.return=Q,X):(X=fn(J.type,J.key,J.props,null,Q.mode,oe),yr(X,J),X.return=Q,X)}function te(Q,X,J,oe){return X===null||X.tag!==4||X.stateNode.containerInfo!==J.containerInfo||X.stateNode.implementation!==J.implementation?(X=$a(J,Q.mode,oe),X.return=Q,X):(X=d(X,J.children||[]),X.return=Q,X)}function le(Q,X,J,oe,we){return X===null||X.tag!==7?(X=is(J,Q.mode,oe,we),X.return=Q,X):(X=d(X,J),X.return=Q,X)}function he(Q,X,J){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=ja(""+X,Q.mode,J),X.return=Q,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case w:return J=fn(X.type,X.key,X.props,null,Q.mode,J),yr(J,X),J.return=Q,J;case b:return X=$a(X,Q.mode,J),X.return=Q,X;case m:return X=ls(X),he(Q,X,J)}if($(X)||L(X))return X=is(X,Q.mode,J,null),X.return=Q,X;if(typeof X.then=="function")return he(Q,Cn(X),J);if(X.$$typeof===l)return he(Q,gn(Q,X),J);yn(Q,X)}return null}function re(Q,X,J,oe){var we=X!==null?X.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return we!==null?null:k(Q,X,""+J,oe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case w:return J.key===we?W(Q,X,J,oe):null;case b:return J.key===we?te(Q,X,J,oe):null;case m:return J=ls(J),re(Q,X,J,oe)}if($(J)||L(J))return we!==null?null:le(Q,X,J,oe,null);if(typeof J.then=="function")return re(Q,X,Cn(J),oe);if(J.$$typeof===l)return re(Q,X,gn(Q,J),oe);yn(Q,J)}return null}function ae(Q,X,J,oe,we){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Q=Q.get(J)||null,k(X,Q,""+oe,we);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case w:return Q=Q.get(oe.key===null?J:oe.key)||null,W(X,Q,oe,we);case b:return Q=Q.get(oe.key===null?J:oe.key)||null,te(X,Q,oe,we);case m:return oe=ls(oe),ae(Q,X,J,oe,we)}if($(oe)||L(oe))return Q=Q.get(J)||null,le(X,Q,oe,we,null);if(typeof oe.then=="function")return ae(Q,X,J,Cn(oe),we);if(oe.$$typeof===l)return ae(Q,X,J,gn(X,oe),we);yn(X,oe)}return null}function Ce(Q,X,J,oe){for(var we=null,Fe=null,ye=X,Be=X=0,Ue=null;ye!==null&&Be<J.length;Be++){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var je=re(Q,ye,J[Be],oe);if(je===null){ye===null&&(ye=Ue);break}e&&ye&&je.alternate===null&&t(Q,ye),X=g(je,X,Be),Fe===null?we=je:Fe.sibling=je,Fe=je,ye=Ue}if(Be===J.length)return i(Q,ye),Pe&&fi(Q,Be),we;if(ye===null){for(;Be<J.length;Be++)ye=he(Q,J[Be],oe),ye!==null&&(X=g(ye,X,Be),Fe===null?we=ye:Fe.sibling=ye,Fe=ye);return Pe&&fi(Q,Be),we}for(ye=s(ye);Be<J.length;Be++)Ue=ae(ye,Q,Be,J[Be],oe),Ue!==null&&(e&&Ue.alternate!==null&&ye.delete(Ue.key===null?Be:Ue.key),X=g(Ue,X,Be),Fe===null?we=Ue:Fe.sibling=Ue,Fe=Ue);return e&&ye.forEach(function(Ki){return t(Q,Ki)}),Pe&&fi(Q,Be),we}function Ee(Q,X,J,oe){if(J==null)throw Error(P(151));for(var we=null,Fe=null,ye=X,Be=X=0,Ue=null,je=J.next();ye!==null&&!je.done;Be++,je=J.next()){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var Ki=re(Q,ye,je.value,oe);if(Ki===null){ye===null&&(ye=Ue);break}e&&ye&&Ki.alternate===null&&t(Q,ye),X=g(Ki,X,Be),Fe===null?we=Ki:Fe.sibling=Ki,Fe=Ki,ye=Ue}if(je.done)return i(Q,ye),Pe&&fi(Q,Be),we;if(ye===null){for(;!je.done;Be++,je=J.next())je=he(Q,je.value,oe),je!==null&&(X=g(je,X,Be),Fe===null?we=je:Fe.sibling=je,Fe=je);return Pe&&fi(Q,Be),we}for(ye=s(ye);!je.done;Be++,je=J.next())je=ae(ye,Q,Be,je.value,oe),je!==null&&(e&&je.alternate!==null&&ye.delete(je.key===null?Be:je.key),X=g(je,X,Be),Fe===null?we=je:Fe.sibling=je,Fe=je);return e&&ye.forEach(function(bv){return t(Q,bv)}),Pe&&fi(Q,Be),we}function Ye(Q,X,J,oe){if(typeof J=="object"&&J!==null&&J.type===c&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case w:e:{for(var we=J.key;X!==null;){if(X.key===we){if(we=J.type,we===c){if(X.tag===7){i(Q,X.sibling),oe=d(X,J.props.children),oe.return=Q,Q=oe;break e}}else if(X.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===m&&ls(we)===X.type){i(Q,X.sibling),oe=d(X,J.props),yr(oe,J),oe.return=Q,Q=oe;break e}i(Q,X);break}else t(Q,X);X=X.sibling}J.type===c?(oe=is(J.props.children,Q.mode,oe,J.key),oe.return=Q,Q=oe):(oe=fn(J.type,J.key,J.props,null,Q.mode,oe),yr(oe,J),oe.return=Q,Q=oe)}return M(Q);case b:e:{for(we=J.key;X!==null;){if(X.key===we)if(X.tag===4&&X.stateNode.containerInfo===J.containerInfo&&X.stateNode.implementation===J.implementation){i(Q,X.sibling),oe=d(X,J.children||[]),oe.return=Q,Q=oe;break e}else{i(Q,X);break}else t(Q,X);X=X.sibling}oe=$a(J,Q.mode,oe),oe.return=Q,Q=oe}return M(Q);case m:return J=ls(J),Ye(Q,X,J,oe)}if($(J))return Ce(Q,X,J,oe);if(L(J)){if(we=L(J),typeof we!="function")throw Error(P(150));return J=we.call(J),Ee(Q,X,J,oe)}if(typeof J.then=="function")return Ye(Q,X,Cn(J),oe);if(J.$$typeof===l)return Ye(Q,X,gn(Q,J),oe);yn(Q,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,X!==null&&X.tag===6?(i(Q,X.sibling),oe=d(X,J),oe.return=Q,Q=oe):(i(Q,X),oe=ja(J,Q.mode,oe),oe.return=Q,Q=oe),M(Q)):i(Q,X)}return function(Q,X,J,oe){try{Cr=0;var we=Ye(Q,X,J,oe);return Ns=null,we}catch(ye){if(ye===zs||ye===mn)throw ye;var Fe=Ht(29,ye,null,Q.mode);return Fe.lanes=oe,Fe.return=Q,Fe}finally{}}}var cs=Qc(!0),Zc=Qc(!1),Oi=!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 ki(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Hi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,($e&2)!==0){var d=s.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),s.pending=t,t=dn(e),Hc(e,null,i),t}return un(e,s,t,i),dn(e)}function br(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,$o(e,i)}}function sl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var d=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var M={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};g===null?d=g=M:g=g.next=M,i=i.next}while(i!==null);g===null?d=g=t:g=g.next=t}else d=g=t;i={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:g,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 wr(){if(rl){var e=Hs;if(e!==null)throw e}}function xr(e,t,i,s){rl=!1;var d=e.updateQueue;Oi=!1;var g=d.firstBaseUpdate,M=d.lastBaseUpdate,k=d.shared.pending;if(k!==null){d.shared.pending=null;var W=k,te=W.next;W.next=null,M===null?g=te:M.next=te,M=W;var le=e.alternate;le!==null&&(le=le.updateQueue,k=le.lastBaseUpdate,k!==M&&(k===null?le.firstBaseUpdate=te:k.next=te,le.lastBaseUpdate=W))}if(g!==null){var he=d.baseState;M=0,le=te=W=null,k=g;do{var re=k.lane&-536870913,ae=re!==k.lane;if(ae?(Ne&re)===re:(s&re)===re){re!==0&&re===ks&&(rl=!0),le!==null&&(le=le.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ce=e,Ee=k;re=t;var Ye=i;switch(Ee.tag){case 1:if(Ce=Ee.payload,typeof Ce=="function"){he=Ce.call(Ye,he,re);break e}he=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Ee.payload,re=typeof Ce=="function"?Ce.call(Ye,he,re):Ce,re==null)break e;he=a({},he,re);break e;case 2:Oi=!0}}re=k.callback,re!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=d.callbacks,ae===null?d.callbacks=[re]:ae.push(re))}else ae={lane:re,tag:k.tag,payload:k.payload,callback:k.callback,next:null},le===null?(te=le=ae,W=he):le=le.next=ae,M|=re;if(k=k.next,k===null){if(k=d.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,d.lastBaseUpdate=ae,d.shared.pending=null}}while(!0);le===null&&(W=he),d.baseState=W,d.firstBaseUpdate=te,d.lastBaseUpdate=le,g===null&&(d.shared.lanes=0),Pi|=M,e.lanes=M,e.memoizedState=he}}function Jc(e,t){if(typeof e!="function")throw Error(P(191,e));e.call(t)}function eh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Jc(i[e],t)}var Us=T(null),bn=T(0);function th(e,t){e=xi,G(bn,e),G(Us,t),xi=e|t.baseLanes}function nl(){G(bn,xi),G(Us,Us.current)}function al(){xi=bn.current,H(Us),H(bn)}var zt=T(null),Yt=null;function zi(e){var t=e.alternate;G(nt,nt.current&1),G(zt,e),Yt===null&&(t===null||Us.current!==null||t.memoizedState!==null)&&(Yt=e)}function ll(e){G(nt,nt.current),G(zt,e),Yt===null&&(Yt=e)}function ih(e){e.tag===22?(G(nt,nt.current),G(zt,e),Yt===null&&(Yt=e)):Ni()}function Ni(){G(nt,nt.current),G(zt,zt.current)}function Nt(e){H(zt),Yt===e&&(Yt=null),H(nt)}var nt=T(0);function wn(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 gi=0,Te=null,Xe=null,ot=null,xn=!1,Is=!1,hs=!1,En=0,Er=0,Ps=null,d_=0;function st(){throw Error(P(321))}function ol(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}function cl(e,t,i,s,d,g){return gi=g,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Ih:xl,hs=!1,g=i(s,d),hs=!1,Is&&(g=rh(t,i,s,d)),sh(e),g}function sh(e){N.H=Ar;var t=Xe!==null&&Xe.next!==null;if(gi=0,ot=Xe=Te=null,xn=!1,Er=0,Ps=null,t)throw Error(P(300));e===null||ct||(e=e.dependencies,e!==null&&vn(e)&&(ct=!0))}function rh(e,t,i,s){Te=e;var d=0;do{if(Is&&(Ps=null),Er=0,Is=!1,25<=d)throw Error(P(301));if(d+=1,ot=Xe=null,e.updateQueue!=null){var g=e.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}N.H=Ph,g=t(i,s)}while(Is);return g}function f_(){var e=N.H,t=e.useState()[0];return t=typeof t.then=="function"?Lr(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Te.flags|=1024),t}function hl(){var e=En!==0;return En=0,e}function ul(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function dl(e){if(xn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xn=!1}gi=0,ot=Xe=Te=null,Is=!1,Er=En=0,Ps=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Te.memoizedState=ot=e:ot=ot.next=e,ot}function at(){if(Xe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?Te.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw Te.alternate===null?Error(P(467)):Error(P(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?Te.memoizedState=ot=e:ot=ot.next=e}return ot}function Ln(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lr(e){var t=Er;return Er+=1,Ps===null&&(Ps=[]),e=Vc(Ps,e,t),t=Te,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Ih:xl),e}function Mn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Lr(e);if(e.$$typeof===l)return Ct(e)}throw Error(P(438,String(e)))}function fl(e){var t=null,i=Te.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Te.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Ln(),Te.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]=E;return t.index++,i}function pi(e,t){return typeof t=="function"?t(e):t}function An(e){var t=at();return _l(t,Xe,e)}function _l(e,t,i){var s=e.queue;if(s===null)throw Error(P(311));s.lastRenderedReducer=i;var d=e.baseQueue,g=s.pending;if(g!==null){if(d!==null){var M=d.next;d.next=g.next,g.next=M}t.baseQueue=d=g,s.pending=null}if(g=e.baseState,d===null)e.memoizedState=g;else{t=d.next;var k=M=null,W=null,te=t,le=!1;do{var he=te.lane&-536870913;if(he!==te.lane?(Ne&he)===he:(gi&he)===he){var re=te.revertLane;if(re===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),he===ks&&(le=!0);else if((gi&re)===re){te=te.next,re===ks&&(le=!0);continue}else he={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},W===null?(k=W=he,M=g):W=W.next=he,Te.lanes|=re,Pi|=re;he=te.action,hs&&i(g,he),g=te.hasEagerState?te.eagerState:i(g,he)}else re={lane:he,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},W===null?(k=W=re,M=g):W=W.next=re,Te.lanes|=he,Pi|=he;te=te.next}while(te!==null&&te!==t);if(W===null?M=g:W.next=k,!kt(g,e.memoizedState)&&(ct=!0,le&&(i=Hs,i!==null)))throw i;e.memoizedState=g,e.baseState=M,e.baseQueue=W,s.lastRenderedState=g}return d===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function vl(e){var t=at(),i=t.queue;if(i===null)throw Error(P(311));i.lastRenderedReducer=e;var s=i.dispatch,d=i.pending,g=t.memoizedState;if(d!==null){i.pending=null;var M=d=d.next;do g=e(g,M.action),M=M.next;while(M!==d);kt(g,t.memoizedState)||(ct=!0),t.memoizedState=g,t.baseQueue===null&&(t.baseState=g),i.lastRenderedState=g}return[g,s]}function nh(e,t,i){var s=Te,d=at(),g=Pe;if(g){if(i===void 0)throw Error(P(407));i=i()}else i=t();var M=!kt((Xe||d).memoizedState,i);if(M&&(d.memoizedState=i,ct=!0),d=d.queue,ml(oh.bind(null,s,d,e),[e]),d.getSnapshot!==t||M||ot!==null&&ot.memoizedState.tag&1){if(s.flags|=2048,Fs(9,{destroy:void 0},lh.bind(null,s,d,i,t),null),Ke===null)throw Error(P(349));g||(gi&127)!==0||ah(s,t,i)}return i}function ah(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=Ln(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function lh(e,t,i,s){t.value=i,t.getSnapshot=s,ch(t)&&hh(e)}function oh(e,t,i){return i(function(){ch(t)&&hh(e)})}function ch(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function hh(e){var t=ts(e,2);t!==null&&Bt(t,e,2)}function gl(e){var t=Et();if(typeof e=="function"){var i=e;if(e=i(),hs){vt(!0);try{i()}finally{vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:e},t}function uh(e,t,i,s){return e.baseState=i,_l(e,Xe,typeof s=="function"?s:pi)}function __(e,t,i,s,d){if(Tn(e))throw Error(P(485));if(e=t.action,e!==null){var g={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){g.listeners.push(M)}};N.T!==null?i(!0):g.isTransition=!1,s(g),i=t.pending,i===null?(g.next=t.pending=g,dh(t,g)):(g.next=i.next,t.pending=i.next=g)}}function dh(e,t){var i=t.action,s=t.payload,d=e.state;if(t.isTransition){var g=N.T,M={};N.T=M;try{var k=i(d,s),W=N.S;W!==null&&W(M,k),fh(e,t,k)}catch(te){pl(e,t,te)}finally{g!==null&&M.types!==null&&(g.types=M.types),N.T=g}}else try{g=i(d,s),fh(e,t,g)}catch(te){pl(e,t,te)}}function fh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){_h(e,t,s)},function(s){return pl(e,t,s)}):_h(e,t,i)}function _h(e,t,i){t.status="fulfilled",t.value=i,vh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,dh(e,i)))}function pl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,vh(t),t=t.next;while(t!==s)}e.action=null}function vh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gh(e,t){return t}function ph(e,t){if(Pe){var i=Ke.formState;if(i!==null){e:{var s=Te;if(Pe){if(Ze){t:{for(var d=Ze,g=Vt;d.nodeType!==8;){if(!g){d=null;break t}if(d=Kt(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){Ze=Kt(d.nextSibling),s=d.data==="F!";break e}}Ti(s)}s=!1}s&&(t=i[0])}}return i=Et(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gh,lastRenderedState:t},i.queue=s,i=zh.bind(null,Te,s),s.dispatch=i,s=gl(!1),g=wl.bind(null,Te,!1,s.queue),s=Et(),d={state:t,dispatch:null,action:e,pending:null},s.queue=d,i=__.bind(null,Te,d,g,i),d.dispatch=i,s.memoizedState=e,[t,i,!1]}function mh(e){var t=at();return Sh(t,Xe,e)}function Sh(e,t,i){if(t=_l(e,t,gh)[0],e=An(pi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Lr(t)}catch(M){throw M===zs?mn:M}else s=t;t=at();var d=t.queue,g=d.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,Fs(9,{destroy:void 0},v_.bind(null,d,i),null)),[s,g,e]}function v_(e,t){e.action=t}function Ch(e){var t=at(),i=Xe;if(i!==null)return Sh(t,i,e);at(),t=t.memoizedState,i=at();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=Te.updateQueue,t===null&&(t=Ln(),Te.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 at().memoizedState}function Rn(e,t,i,s){var d=Et();Te.flags|=e,d.memoizedState=Fs(1|t,{destroy:void 0},i,s===void 0?null:s)}function Dn(e,t,i,s){var d=at();s=s===void 0?null:s;var g=d.memoizedState.inst;Xe!==null&&s!==null&&ol(s,Xe.memoizedState.deps)?d.memoizedState=Fs(t,g,i,s):(Te.flags|=e,d.memoizedState=Fs(1|t,g,i,s))}function bh(e,t){Rn(8390656,8,e,t)}function ml(e,t){Dn(2048,8,e,t)}function g_(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Ln(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function wh(e){var t=at().memoizedState;return g_({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(P(440));return t.impl.apply(void 0,arguments)}}function xh(e,t){return Dn(4,2,e,t)}function Eh(e,t){return Dn(4,4,e,t)}function Lh(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 Mh(e,t,i){i=i!=null?i.concat([e]):null,Dn(4,4,Lh.bind(null,t,e),i)}function Sl(){}function Ah(e,t){var i=at();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=at();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ol(t,s[1]))return s[0];if(s=e(),hs){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s}function Cl(e,t,i){return i===void 0||(gi&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Du(),Te.lanes|=e,Pi|=e,i)}function Dh(e,t,i,s){return kt(i,t)?i:Us.current!==null?(e=Cl(e,i,s),kt(e,t)||(ct=!0),e):(gi&42)===0||(gi&1073741824)!==0&&(Ne&261930)===0?(ct=!0,e.memoizedState=i):(e=Du(),Te.lanes|=e,Pi|=e,t)}function Th(e,t,i,s,d){var g=U.p;U.p=g!==0&&8>g?g:8;var M=N.T,k={};N.T=k,wl(e,!1,t,i);try{var W=d(),te=N.S;if(te!==null&&te(k,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var le=u_(W,s);Mr(e,t,le,Pt(e))}else Mr(e,t,s,Pt(e))}catch(he){Mr(e,t,{then:function(){},status:"rejected",reason:he},Pt())}finally{U.p=g,M!==null&&k.types!==null&&(M.types=k.types),N.T=M}}function p_(){}function yl(e,t,i,s){if(e.tag!==5)throw Error(P(476));var d=Bh(e).queue;Th(e,d,t,I,i===null?p_:function(){return Oh(e),i(s)})}function Bh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:I},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Oh(e){var t=Bh(e);t.next===null&&(t=e.alternate.memoizedState),Mr(e,t.next.queue,{},Pt())}function bl(){return Ct(qr)}function kh(){return at().memoizedState}function Hh(){return at().memoizedState}function m_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Pt();e=ki(i);var s=Hi(t,e,i);s!==null&&(Bt(s,t,i),br(s,t,i)),t={cache:Qa()},e.payload=t;return}t=t.return}}function S_(e,t,i){var s=Pt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tn(e)?Nh(t,i):(i=Pa(e,t,i,s),i!==null&&(Bt(i,e,s),Uh(i,t,s)))}function zh(e,t,i){var s=Pt();Mr(e,t,i,s)}function Mr(e,t,i,s){var d={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tn(e))Nh(t,d);else{var g=e.alternate;if(e.lanes===0&&(g===null||g.lanes===0)&&(g=t.lastRenderedReducer,g!==null))try{var M=t.lastRenderedState,k=g(M,i);if(d.hasEagerState=!0,d.eagerState=k,kt(k,M))return un(e,t,d,0),Ke===null&&hn(),!1}catch{}finally{}if(i=Pa(e,t,d,s),i!==null)return Bt(i,e,s),Uh(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},Tn(e)){if(t)throw Error(P(479))}else t=Pa(e,i,s,2),t!==null&&Bt(t,e,2)}function Tn(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Nh(e,t){Is=xn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Uh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,$o(e,i)}}var Ar={readContext:Ct,use:Mn,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};Ar.useEffectEvent=st;var Ih={readContext:Ct,use:Mn,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:bh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Rn(4194308,4,Lh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Rn(4194308,4,e,t)},useInsertionEffect:function(e,t){Rn(4,2,e,t)},useMemo:function(e,t){var i=Et();t=t===void 0?null:t;var s=e();if(hs){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Et();if(i!==void 0){var d=i(t);if(hs){vt(!0);try{i(t)}finally{vt(!1)}}}else d=t;return s.memoizedState=s.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},s.queue=e,e=e.dispatch=S_.bind(null,Te,e),[s.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=gl(e);var t=e.queue,i=zh.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Sl,useDeferredValue:function(e,t){var i=Et();return Cl(i,e,t)},useTransition:function(){var e=gl(!1);return e=Th.bind(null,Te,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Te,d=Et();if(Pe){if(i===void 0)throw Error(P(407));i=i()}else{if(i=t(),Ke===null)throw Error(P(349));(Ne&127)!==0||ah(s,t,i)}d.memoizedState=i;var g={value:i,getSnapshot:t};return d.queue=g,bh(oh.bind(null,s,g,e),[e]),s.flags|=2048,Fs(9,{destroy:void 0},lh.bind(null,s,g,i,t),null),i},useId:function(){var e=Et(),t=Ke.identifierPrefix;if(Pe){var i=ai,s=ni;i=(s&~(1<<32-ut(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=En++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=d_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bl,useFormState:ph,useActionState:ph,useOptimistic:function(e){var t=Et();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,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:fl,useCacheRefresh:function(){return Et().memoizedState=m_.bind(null,Te)},useEffectEvent:function(e){var t=Et(),i={impl:e};return t.memoizedState=i,function(){if(($e&2)!==0)throw Error(P(440));return i.impl.apply(void 0,arguments)}}},xl={readContext:Ct,use:Mn,useCallback:Ah,useContext:Ct,useEffect:ml,useImperativeHandle:Mh,useInsertionEffect:xh,useLayoutEffect:Eh,useMemo:Rh,useReducer:An,useRef:yh,useState:function(){return An(pi)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=at();return Dh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=An(pi)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Lr(e),t]},useSyncExternalStore:nh,useId:kh,useHostTransitionStatus:bl,useFormState:mh,useActionState:mh,useOptimistic:function(e,t){var i=at();return uh(i,Xe,e,t)},useMemoCache:fl,useCacheRefresh:Hh};xl.useEffectEvent=wh;var Ph={readContext:Ct,use:Mn,useCallback:Ah,useContext:Ct,useEffect:ml,useImperativeHandle:Mh,useInsertionEffect:xh,useLayoutEffect:Eh,useMemo:Rh,useReducer:vl,useRef:yh,useState:function(){return vl(pi)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=at();return Xe===null?Cl(i,e,t):Dh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=vl(pi)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Lr(e),t]},useSyncExternalStore:nh,useId:kh,useHostTransitionStatus:bl,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var i=at();return Xe!==null?uh(i,Xe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:fl,useCacheRefresh:Hh};Ph.useEffectEvent=wh;function El(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:a({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Ll={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Pt(),d=ki(s);d.payload=t,i!=null&&(d.callback=i),t=Hi(e,d,s),t!==null&&(Bt(t,e,s),br(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Pt(),d=ki(s);d.tag=1,d.payload=t,i!=null&&(d.callback=i),t=Hi(e,d,s),t!==null&&(Bt(t,e,s),br(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Pt(),s=ki(i);s.tag=2,t!=null&&(s.callback=t),t=Hi(e,s,i),t!==null&&(Bt(t,e,i),br(t,e,i))}};function Fh(e,t,i,s,d,g,M){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,g,M):t.prototype&&t.prototype.isPureReactComponent?!_r(i,s)||!_r(d,g):!0}function jh(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 us(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=a({},i));for(var d in e)i[d]===void 0&&(i[d]=e[d])}return i}function $h(e){cn(e)}function qh(e){console.error(e)}function Wh(e){cn(e)}function Bn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Gh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Ml(e,t,i){return i=ki(i),i.tag=3,i.payload={element:null},i.callback=function(){Bn(e,t)},i}function Xh(e){return e=ki(e),e.tag=3,e}function Vh(e,t,i,s){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;e.payload=function(){return d(g)},e.callback=function(){Gh(t,i,s)}}var M=i.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(e.callback=function(){Gh(t,i,s),typeof d!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})})}function C_(e,t,i,s,d){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Os(t,i,d,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Yt===null?qn():i.alternate===null&&rt===0&&(rt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,s===Sn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Zl(e,s,d)),!1;case 22:return i.flags|=65536,s===Sn?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,d)),!1}throw Error(P(435,i.tag))}return Zl(e,s,d),qn(),!1}if(Pe)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,s!==Ga&&(e=Error(P(422),{cause:s}),pr(Wt(e,i)))):(s!==Ga&&(t=Error(P(423),{cause:s}),pr(Wt(t,i))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,s=Wt(s,i),d=Ml(e.stateNode,s,d),sl(e,d),rt!==4&&(rt=2)),!1;var g=Error(P(520),{cause:s});if(g=Wt(g,i),zr===null?zr=[g]:zr.push(g),rt!==4&&(rt=2),t===null)return!0;s=Wt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=d&-d,i.lanes|=e,e=Ml(i.stateNode,s,e),sl(i,e),!1;case 1:if(t=i.type,g=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Fi===null||!Fi.has(g))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Xh(d),Vh(d,e,i,s),sl(i,d),!1}i=i.return}while(i!==null);return!1}var Al=Error(P(461)),ct=!1;function yt(e,t,i,s){t.child=e===null?Zc(t,null,i,s):cs(t,e.child,i,s)}function Yh(e,t,i,s,d){i=i.render;var g=t.ref;if("ref"in s){var M={};for(var k in s)k!=="ref"&&(M[k]=s[k])}else M=s;return ns(t),s=cl(e,t,i,M,g,d),k=hl(),e!==null&&!ct?(ul(e,t,d),mi(e,t,d)):(Pe&&k&&qa(t),t.flags|=1,yt(e,t,s,d),t.child)}function Kh(e,t,i,s,d){if(e===null){var g=i.type;return typeof g=="function"&&!Fa(g)&&g.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=g,Qh(e,t,g,s,d)):(e=fn(i.type,null,s,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(g=e.child,!zl(e,d)){var M=g.memoizedProps;if(i=i.compare,i=i!==null?i:_r,i(M,s)&&e.ref===t.ref)return mi(e,t,d)}return t.flags|=1,e=di(g,s),e.ref=t.ref,e.return=t,t.child=e}function Qh(e,t,i,s,d){if(e!==null){var g=e.memoizedProps;if(_r(g,s)&&e.ref===t.ref)if(ct=!1,t.pendingProps=s=g,zl(e,d))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,mi(e,t,d)}return Rl(e,t,i,s,d)}function Zh(e,t,i,s){var d=s.children,g=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(g=g!==null?g.baseLanes|i:i,e!==null){for(s=t.child=e.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~g}else s=0,t.child=null;return Jh(e,t,g,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pn(t,g!==null?g.cachePool:null),g!==null?th(t,g):nl(),ih(t);else return s=t.lanes=536870912,Jh(e,t,g!==null?g.baseLanes|i:i,i,s)}else g!==null?(pn(t,g.cachePool),th(t,g),Ni(),t.memoizedState=null):(e!==null&&pn(t,null),nl(),Ni());return yt(e,t,d,i),t.child}function Rr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Jh(e,t,i,s,d){var g=Ja();return g=g===null?null:{parent:lt._currentValue,pool:g},t.memoizedState={baseLanes:i,cachePool:g},e!==null&&pn(t,null),nl(),ih(t),e!==null&&Os(e,t,s,!0),t.childLanes=d,null}function On(e,t){return t=Hn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function eu(e,t,i){return cs(t,e.child,null,i),e=On(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function y_(e,t,i){var s=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(s.mode==="hidden")return e=On(t,s),t.lanes=536870912,Rr(null,e);if(ll(t),(e=Ze)?(e=dd(e,Vt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Nc(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Ti(t);return t.lanes=536870912,null}return On(t,s)}var g=e.memoizedState;if(g!==null){var M=g.dehydrated;if(ll(t),d)if(t.flags&256)t.flags&=-257,t=eu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(P(558));else if(ct||Os(e,t,i,!1),d=(i&e.childLanes)!==0,ct||d){if(s=Ke,s!==null&&(M=qo(s,i),M!==0&&M!==g.retryLane))throw g.retryLane=M,ts(e,M),Bt(s,e,M),Al;qn(),t=eu(e,t,i)}else e=g.treeContext,Ze=Kt(M.nextSibling),St=t,Pe=!0,Di=null,Vt=!1,e!==null&&Pc(t,e),t=On(t,s),t.flags|=4096;return t}return e=di(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kn(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(P(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Rl(e,t,i,s,d){return ns(t),i=cl(e,t,i,s,void 0,d),s=hl(),e!==null&&!ct?(ul(e,t,d),mi(e,t,d)):(Pe&&s&&qa(t),t.flags|=1,yt(e,t,i,d),t.child)}function tu(e,t,i,s,d,g){return ns(t),t.updateQueue=null,i=rh(t,s,i,d),sh(e),s=hl(),e!==null&&!ct?(ul(e,t,g),mi(e,t,g)):(Pe&&s&&qa(t),t.flags|=1,yt(e,t,i,g),t.child)}function iu(e,t,i,s,d){if(ns(t),t.stateNode===null){var g=Rs,M=i.contextType;typeof M=="object"&&M!==null&&(g=Ct(M)),g=new i(s,g),t.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Ll,t.stateNode=g,g._reactInternals=t,g=t.stateNode,g.props=s,g.state=t.memoizedState,g.refs={},tl(t),M=i.contextType,g.context=typeof M=="object"&&M!==null?Ct(M):Rs,g.state=t.memoizedState,M=i.getDerivedStateFromProps,typeof M=="function"&&(El(t,i,M,s),g.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(M=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),M!==g.state&&Ll.enqueueReplaceState(g,g.state,null),xr(t,s,g,d),wr(),g.state=t.memoizedState),typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){g=t.stateNode;var k=t.memoizedProps,W=us(i,k);g.props=W;var te=g.context,le=i.contextType;M=Rs,typeof le=="object"&&le!==null&&(M=Ct(le));var he=i.getDerivedStateFromProps;le=typeof he=="function"||typeof g.getSnapshotBeforeUpdate=="function",k=t.pendingProps!==k,le||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k||te!==M)&&jh(t,g,s,M),Oi=!1;var re=t.memoizedState;g.state=re,xr(t,s,g,d),wr(),te=t.memoizedState,k||re!==te||Oi?(typeof he=="function"&&(El(t,i,he,s),te=t.memoizedState),(W=Oi||Fh(t,i,W,s,re,te,M))?(le||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(t.flags|=4194308)):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=te),g.props=s,g.state=te,g.context=M,s=W):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{g=t.stateNode,il(e,t),M=t.memoizedProps,le=us(i,M),g.props=le,he=t.pendingProps,re=g.context,te=i.contextType,W=Rs,typeof te=="object"&&te!==null&&(W=Ct(te)),k=i.getDerivedStateFromProps,(te=typeof k=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(M!==he||re!==W)&&jh(t,g,s,W),Oi=!1,re=t.memoizedState,g.state=re,xr(t,s,g,d),wr();var ae=t.memoizedState;M!==he||re!==ae||Oi||e!==null&&e.dependencies!==null&&vn(e.dependencies)?(typeof k=="function"&&(El(t,i,k,s),ae=t.memoizedState),(le=Oi||Fh(t,i,le,s,re,ae,W)||e!==null&&e.dependencies!==null&&vn(e.dependencies))?(te||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,ae,W),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,ae,W)),typeof g.componentDidUpdate=="function"&&(t.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof g.componentDidUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ae),g.props=s,g.state=ae,g.context=W,s=le):(typeof g.componentDidUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),s=!1)}return g=s,kn(e,t),s=(t.flags&128)!==0,g||s?(g=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:g.render(),t.flags|=1,e!==null&&s?(t.child=cs(t,e.child,null,d),t.child=cs(t,null,i,d)):yt(e,t,i,d),t.memoizedState=g.state,e=t.child):e=mi(e,t,d),e}function su(e,t,i,s){return ss(),t.flags|=256,yt(e,t,i,s),t.child}var Dl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tl(e){return{baseLanes:e,cachePool:Gc()}}function Bl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=It),e}function ru(e,t,i){var s=t.pendingProps,d=!1,g=(t.flags&128)!==0,M;if((M=g)||(M=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),M&&(d=!0,t.flags&=-129),M=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(d?zi(t):Ni(),(e=Ze)?(e=dd(e,Vt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Nc(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Ti(t);return vo(e)?t.lanes=32:t.lanes=536870912,null}var k=s.children;return s=s.fallback,d?(Ni(),d=t.mode,k=Hn({mode:"hidden",children:k},d),s=is(s,d,i,null),k.return=t,s.return=t,k.sibling=s,t.child=k,s=t.child,s.memoizedState=Tl(i),s.childLanes=Bl(e,M,i),t.memoizedState=Dl,Rr(null,s)):(zi(t),Ol(t,k))}var W=e.memoizedState;if(W!==null&&(k=W.dehydrated,k!==null)){if(g)t.flags&256?(zi(t),t.flags&=-257,t=kl(e,t,i)):t.memoizedState!==null?(Ni(),t.child=e.child,t.flags|=128,t=null):(Ni(),k=s.fallback,d=t.mode,s=Hn({mode:"visible",children:s.children},d),k=is(k,d,i,null),k.flags|=2,s.return=t,k.return=t,s.sibling=k,t.child=s,cs(t,e.child,null,i),s=t.child,s.memoizedState=Tl(i),s.childLanes=Bl(e,M,i),t.memoizedState=Dl,t=Rr(null,s));else if(zi(t),vo(k)){if(M=k.nextSibling&&k.nextSibling.dataset,M)var te=M.dgst;M=te,s=Error(P(419)),s.stack="",s.digest=M,pr({value:s,source:null,stack:null}),t=kl(e,t,i)}else if(ct||Os(e,t,i,!1),M=(i&e.childLanes)!==0,ct||M){if(M=Ke,M!==null&&(s=qo(M,i),s!==0&&s!==W.retryLane))throw W.retryLane=s,ts(e,s),Bt(M,e,s),Al;_o(k)||qn(),t=kl(e,t,i)}else _o(k)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,Ze=Kt(k.nextSibling),St=t,Pe=!0,Di=null,Vt=!1,e!==null&&Pc(t,e),t=Ol(t,s.children),t.flags|=4096);return t}return d?(Ni(),k=s.fallback,d=t.mode,W=e.child,te=W.sibling,s=di(W,{mode:"hidden",children:s.children}),s.subtreeFlags=W.subtreeFlags&65011712,te!==null?k=di(te,k):(k=is(k,d,i,null),k.flags|=2),k.return=t,s.return=t,s.sibling=k,t.child=s,Rr(null,s),s=t.child,k=e.child.memoizedState,k===null?k=Tl(i):(d=k.cachePool,d!==null?(W=lt._currentValue,d=d.parent!==W?{parent:W,pool:W}:d):d=Gc(),k={baseLanes:k.baseLanes|i,cachePool:d}),s.memoizedState=k,s.childLanes=Bl(e,M,i),t.memoizedState=Dl,Rr(e.child,s)):(zi(t),i=e.child,e=i.sibling,i=di(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(M=t.deletions,M===null?(t.deletions=[e],t.flags|=16):M.push(e)),t.child=i,t.memoizedState=null,i)}function Ol(e,t){return t=Hn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hn(e,t){return e=Ht(22,e,null,t),e.lanes=0,e}function kl(e,t,i){return cs(t,e.child,null,i),e=Ol(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ya(e.return,t,i)}function Hl(e,t,i,s,d,g){var M=e.memoizedState;M===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:d,treeForkCount:g}:(M.isBackwards=t,M.rendering=null,M.renderingStartTime=0,M.last=s,M.tail=i,M.tailMode=d,M.treeForkCount=g)}function au(e,t,i){var s=t.pendingProps,d=s.revealOrder,g=s.tail;s=s.children;var M=nt.current,k=(M&2)!==0;if(k?(M=M&1|2,t.flags|=128):M&=1,G(nt,M),yt(e,t,s,i),s=Pe?gr:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nu(e,i,t);else if(e.tag===19)nu(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(d){case"forwards":for(i=t.child,d=null;i!==null;)e=i.alternate,e!==null&&wn(e)===null&&(d=i),i=i.sibling;i=d,i===null?(d=t.child,t.child=null):(d=i.sibling,i.sibling=null),Hl(t,!1,d,i,g,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&wn(e)===null){t.child=d;break}e=d.sibling,d.sibling=i,i=d,d=e}Hl(t,!0,i,null,g,s);break;case"together":Hl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function mi(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Pi|=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(P(153));if(t.child!==null){for(e=t.child,i=di(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=di(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&&vn(e)))}function b_(e,t,i){switch(t.tag){case 3:z(t,t.stateNode.containerInfo),Bi(t,lt,e.memoizedState.cache),ss();break;case 27:case 5:ie(t);break;case 4:z(t,t.stateNode.containerInfo);break;case 10:Bi(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?(zi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ru(e,t,i):(zi(t),e=mi(e,t,i),e!==null?e.sibling:null);zi(t);break;case 19:var d=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Os(e,t,i,!1),s=(i&t.childLanes)!==0),d){if(s)return au(e,t,i);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),G(nt,nt.current),s)break;return null;case 22:return t.lanes=0,Zh(e,t,i,t.pendingProps);case 24:Bi(t,lt,e.memoizedState.cache)}return mi(e,t,i)}function lu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!zl(e,i)&&(t.flags&128)===0)return ct=!1,b_(e,t,i);ct=(e.flags&131072)!==0}else ct=!1,Pe&&(t.flags&1048576)!==0&&Ic(t,gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ls(t.elementType),t.type=e,typeof e=="function")Fa(e)?(s=us(e,s),t.tag=1,t=iu(null,t,e,s,i)):(t.tag=0,t=Rl(null,t,e,s,i));else{if(e!=null){var d=e.$$typeof;if(d===S){t.tag=11,t=Yh(null,t,e,s,i);break e}else if(d===C){t.tag=14,t=Kh(null,t,e,s,i);break e}}throw t=O(e)||e,Error(P(306,t,""))}}return t;case 0:return Rl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,d=us(s,t.pendingProps),iu(e,t,s,d,i);case 3:e:{if(z(t,t.stateNode.containerInfo),e===null)throw Error(P(387));s=t.pendingProps;var g=t.memoizedState;d=g.element,il(e,t),xr(t,s,null,i);var M=t.memoizedState;if(s=M.cache,Bi(t,lt,s),s!==g.cache&&Ka(t,[lt],i,!0),wr(),s=M.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:M.cache},t.updateQueue.baseState=g,t.memoizedState=g,t.flags&256){t=su(e,t,s,i);break e}else if(s!==d){d=Wt(Error(P(424)),t),pr(d),t=su(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(Ze=Kt(e.firstChild),St=t,Pe=!0,Di=null,Vt=!0,i=Zc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ss(),s===d){t=mi(e,t,i);break e}yt(e,t,s,i)}t=t.child}return t;case 26:return kn(e,t),e===null?(i=md(t.type,null,t.pendingProps,null))?t.memoizedState=i:Pe||(i=t.type,e=t.pendingProps,s=Qn(de.current).createElement(i),s[mt]=t,s[Lt]=e,bt(s,i,e),gt(s),t.stateNode=s):t.memoizedState=md(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Pe&&(s=t.stateNode=vd(t.type,t.pendingProps,de.current),St=t,Vt=!0,d=Ze,Wi(t.type)?(go=d,Ze=Kt(s.firstChild)):Ze=d),yt(e,t,t.pendingProps.children,i),kn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((d=s=Ze)&&(s=Z_(s,t.type,t.pendingProps,Vt),s!==null?(t.stateNode=s,St=t,Ze=Kt(s.firstChild),Vt=!1,d=!0):d=!1),d||Ti(t)),ie(t),d=t.type,g=t.pendingProps,M=e!==null?e.memoizedProps:null,s=g.children,ho(d,g)?s=null:M!==null&&ho(d,M)&&(t.flags|=32),t.memoizedState!==null&&(d=cl(e,t,f_,null,null,i),qr._currentValue=d),kn(e,t),yt(e,t,s,i),t.child;case 6:return e===null&&Pe&&((e=i=Ze)&&(i=J_(i,t.pendingProps,Vt),i!==null?(t.stateNode=i,St=t,Ze=null,e=!0):e=!1),e||Ti(t)),null;case 13:return ru(e,t,i);case 4:return z(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=cs(t,null,s,i):yt(e,t,s,i),t.child;case 11:return Yh(e,t,t.type,t.pendingProps,i);case 7:return yt(e,t,t.pendingProps,i),t.child;case 8:return yt(e,t,t.pendingProps.children,i),t.child;case 12:return yt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Bi(t,t.type,s.value),yt(e,t,s.children,i),t.child;case 9:return d=t.type._context,s=t.pendingProps.children,ns(t),d=Ct(d),s=s(d),t.flags|=1,yt(e,t,s,i),t.child;case 14:return Kh(e,t,t.type,t.pendingProps,i);case 15:return Qh(e,t,t.type,t.pendingProps,i);case 19:return au(e,t,i);case 31:return y_(e,t,i);case 22:return Zh(e,t,i,t.pendingProps);case 24:return ns(t),s=Ct(lt),e===null?(d=Ja(),d===null&&(d=Ke,g=Qa(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=i),d=g),t.memoizedState={parent:s,cache:d},tl(t),Bi(t,lt,d)):((e.lanes&i)!==0&&(il(e,t),xr(t,null,null,i),wr()),d=e.memoizedState,g=t.memoizedState,d.parent!==s?(d={parent:s,cache:s},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Bi(t,lt,s)):(s=g.cache,Bi(t,lt,s),s!==d.cache&&Ka(t,[lt],i,!0))),yt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(P(156,t.tag))}function Si(e){e.flags|=4}function Nl(e,t,i,s,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(ku())e.flags|=8192;else throw os=Sn,el}else e.flags&=-16777217}function ou(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wd(t))if(ku())e.flags|=8192;else throw os=Sn,el}function zn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Fo():536870912,e.lanes|=t,Ws|=t)}function Dr(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function w_(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 Je(t),null;case 1:return Je(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),vi(lt),se(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?Si(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xa())),Je(t),null;case 26:var d=t.type,g=t.memoizedState;return e===null?(Si(t),g!==null?(Je(t),ou(t,g)):(Je(t),Nl(t,d,null,s,i))):g?g!==e.memoizedState?(Si(t),Je(t),ou(t,g)):(Je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Si(t),Je(t),Nl(t,d,e,s,i)),null;case 27:if(ve(t),i=de.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Si(t);else{if(!s){if(t.stateNode===null)throw Error(P(166));return Je(t),null}e=V.current,Bs(t)?Fc(t):(e=vd(d,s,i),t.stateNode=e,Si(t))}return Je(t),null;case 5:if(ve(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Si(t);else{if(!s){if(t.stateNode===null)throw Error(P(166));return Je(t),null}if(g=V.current,Bs(t))Fc(t);else{var M=Qn(de.current);switch(g){case 1:g=M.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:g=M.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":g=M.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":g=M.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":g=M.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?M.createElement("select",{is:s.is}):M.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?M.createElement(d,{is:s.is}):M.createElement(d)}}g[mt]=t,g[Lt]=s;e:for(M=t.child;M!==null;){if(M.tag===5||M.tag===6)g.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===t)break e;for(;M.sibling===null;){if(M.return===null||M.return===t)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}t.stateNode=g;e:switch(bt(g,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Si(t)}}return Je(t),Nl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Si(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(P(166));if(e=de.current,Bs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,d=St,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}e[mt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||rd(e.nodeValue,i)),e||Ti(t,!0)}else e=Qn(e).createTextNode(s),e[mt]=t,t.stateNode=e}return Je(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(P(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(557));e[mt]=t}else ss(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),e=!1}else i=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(P(558))}return Je(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!d)throw Error(P(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(P(317));d[mt]=t}else ss(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),d=!1}else d=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==d&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),zn(t,t.updateQueue),Je(t),null);case 4:return se(),e===null&&no(t.stateNode.containerInfo),Je(t),null;case 10:return vi(t.type),Je(t),null;case 19:if(H(nt),s=t.memoizedState,s===null)return Je(t),null;if(d=(t.flags&128)!==0,g=s.rendering,g===null)if(d)Dr(s,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(g=wn(e),g!==null){for(t.flags|=128,Dr(s,!1),e=g.updateQueue,t.updateQueue=e,zn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)zc(i,e),i=i.sibling;return G(nt,nt.current&1|2),Pe&&fi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ge()>Fn&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304)}else{if(!d)if(e=wn(g),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,zn(t,e),Dr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!g.alternate&&!Pe)return Je(t),null}else 2*ge()-s.renderingStartTime>Fn&&i!==536870912&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304);s.isBackwards?(g.sibling=t.child,t.child=g):(e=s.last,e!==null?e.sibling=g:t.child=g,s.last=g)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ge(),e.sibling=null,i=nt.current,G(nt,d?i&1|2:i&1),Pe&&fi(t,s.treeForkCount),e):(Je(t),null);case 22:case 23:return Nt(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&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),i=t.updateQueue,i!==null&&zn(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&&H(as),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),vi(lt),Je(t),null;case 25:return null;case 30:return null}throw Error(P(156,t.tag))}function x_(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 vi(lt),se(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(P(340));ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(nt),null;case 4:return se(),null;case 10:return vi(t.type),null;case 22:case 23:return Nt(t),al(),e!==null&&H(as),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return vi(lt),null;case 25:return null;default:return null}}function cu(e,t){switch(Wa(t),t.tag){case 3:vi(lt),se();break;case 26:case 27:case 5:ve(t);break;case 4:se();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:H(nt);break;case 10:vi(t.type);break;case 22:case 23:Nt(t),al(),e!==null&&H(as);break;case 24:vi(lt)}}function Tr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var d=s.next;i=d;do{if((i.tag&e)===e){s=void 0;var g=i.create,M=i.inst;s=g(),M.destroy=s}i=i.next}while(i!==d)}}catch(k){Ge(t,t.return,k)}}function Ui(e,t,i){try{var s=t.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var g=d.next;s=g;do{if((s.tag&e)===e){var M=s.inst,k=M.destroy;if(k!==void 0){M.destroy=void 0,d=t;var W=i,te=k;try{te()}catch(le){Ge(d,W,le)}}}s=s.next}while(s!==g)}}catch(le){Ge(t,t.return,le)}}function hu(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{eh(t,i)}catch(s){Ge(e,e.return,s)}}}function uu(e,t,i){i.props=us(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Ge(e,t,s)}}function Br(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(d){Ge(e,t,d)}}function li(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(d){Ge(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Ge(e,t,d)}else i.current=null}function du(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(d){Ge(e,e.return,d)}}function Ul(e,t,i){try{var s=e.stateNode;G_(s,e.type,i,t),s[Lt]=t}catch(d){Ge(e,e.return,d)}}function fu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wi(e.type)||e.tag===4}function Il(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&&Wi(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 Pl(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=hi));else if(s!==4&&(s===27&&Wi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Pl(e,t,i),e=e.sibling;e!==null;)Pl(e,t,i),e=e.sibling}function Nn(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&&Wi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Nn(e,t,i),e=e.sibling;e!==null;)Nn(e,t,i),e=e.sibling}function _u(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);bt(t,s,i),t[mt]=e,t[Lt]=i}catch(g){Ge(e,e.return,g)}}var Ci=!1,ht=!1,Fl=!1,vu=typeof WeakSet=="function"?WeakSet:Set,pt=null;function E_(e,t){if(e=e.containerInfo,oo=ra,e=Mc(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 d=s.anchorOffset,g=s.focusNode;s=s.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var M=0,k=-1,W=-1,te=0,le=0,he=e,re=null;t:for(;;){for(var ae;he!==i||d!==0&&he.nodeType!==3||(k=M+d),he!==g||s!==0&&he.nodeType!==3||(W=M+s),he.nodeType===3&&(M+=he.nodeValue.length),(ae=he.firstChild)!==null;)re=he,he=ae;for(;;){if(he===e)break t;if(re===i&&++te===d&&(k=M),re===g&&++le===s&&(W=M),(ae=he.nextSibling)!==null)break;he=re,re=he.parentNode}he=ae}i=k===-1||W===-1?null:{start:k,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(co={focusedElem:e,selectionRange:i},ra=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,g=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++)d=e[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&g!==null){e=void 0,i=t,d=g.memoizedProps,g=g.memoizedState,s=i.stateNode;try{var Ce=us(i.type,d);e=s.getSnapshotBeforeUpdate(Ce,g),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Ge(i,i.return,Ee)}}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(P(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function gu(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:bi(e,i),s&4&&Tr(5,i);break;case 1:if(bi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(M){Ge(i,i.return,M)}else{var d=us(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(M){Ge(i,i.return,M)}}s&64&&hu(i),s&512&&Br(i,i.return);break;case 3:if(bi(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{eh(e,t)}catch(M){Ge(i,i.return,M)}}break;case 27:t===null&&s&4&&_u(i);case 26:case 5:bi(e,i),t===null&&s&4&&du(i),s&512&&Br(i,i.return);break;case 12:bi(e,i);break;case 31:bi(e,i),s&4&&Su(e,i);break;case 13:bi(e,i),s&4&&Cu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=k_.bind(null,i),ev(e,i))));break;case 22:if(s=i.memoizedState!==null||Ci,!s){t=t!==null&&t.memoizedState!==null||ht,d=Ci;var g=ht;Ci=s,(ht=t)&&!g?wi(e,i,(i.subtreeFlags&8772)!==0):bi(e,i),Ci=d,ht=g}break;case 30:break;default:bi(e,i)}}function pu(e){var t=e.alternate;t!==null&&(e.alternate=null,pu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pa(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 et=null,At=!1;function yi(e,t,i){for(i=i.child;i!==null;)mu(e,t,i),i=i.sibling}function mu(e,t,i){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(xt,i)}catch{}switch(i.tag){case 26:ht||li(i,t),yi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ht||li(i,t);var s=et,d=At;Wi(i.type)&&(et=i.stateNode,At=!1),yi(e,t,i),Fr(i.stateNode),et=s,At=d;break;case 5:ht||li(i,t);case 6:if(s=et,d=At,et=null,yi(e,t,i),et=s,At=d,et!==null)if(At)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(i.stateNode)}catch(g){Ge(i,t,g)}else try{et.removeChild(i.stateNode)}catch(g){Ge(i,t,g)}break;case 18:et!==null&&(At?(e=et,hd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Js(e)):hd(et,i.stateNode));break;case 4:s=et,d=At,et=i.stateNode.containerInfo,At=!0,yi(e,t,i),et=s,At=d;break;case 0:case 11:case 14:case 15:Ui(2,i,t),ht||Ui(4,i,t),yi(e,t,i);break;case 1:ht||(li(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&uu(i,t,s)),yi(e,t,i);break;case 21:yi(e,t,i);break;case 22:ht=(s=ht)||i.memoizedState!==null,yi(e,t,i),ht=s;break;default:yi(e,t,i)}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Js(e)}catch(i){Ge(t,t.return,i)}}}function Cu(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){Ge(t,t.return,i)}}function L_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vu),t;default:throw Error(P(435,e.tag))}}function Un(e,t){var i=L_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var d=H_.bind(null,e,s);s.then(d,d)}})}function Rt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var d=i[s],g=e,M=t,k=M;e:for(;k!==null;){switch(k.tag){case 27:if(Wi(k.type)){et=k.stateNode,At=!1;break e}break;case 5:et=k.stateNode,At=!1;break e;case 3:case 4:et=k.stateNode.containerInfo,At=!0;break e}k=k.return}if(et===null)throw Error(P(160));mu(g,M,d),et=null,At=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yu(t,e),t=t.sibling}var ti=null;function yu(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rt(t,e),Dt(e),s&4&&(Ui(3,e,e.return),Tr(3,e),Ui(5,e,e.return));break;case 1:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&64&&Ci&&(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 d=ti;if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&4){var g=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,d=d.ownerDocument||d;t:switch(s){case"title":g=d.getElementsByTagName("title")[0],(!g||g[nr]||g[mt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(s),d.head.insertBefore(g,d.querySelector("head > title"))),bt(g,s,i),g[mt]=e,gt(g),s=g;break e;case"link":var M=yd("link","href",d).get(s+(i.href||""));if(M){for(var k=0;k<M.length;k++)if(g=M[k],g.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&g.getAttribute("rel")===(i.rel==null?null:i.rel)&&g.getAttribute("title")===(i.title==null?null:i.title)&&g.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){M.splice(k,1);break t}}g=d.createElement(s),bt(g,s,i),d.head.appendChild(g);break;case"meta":if(M=yd("meta","content",d).get(s+(i.content||""))){for(k=0;k<M.length;k++)if(g=M[k],g.getAttribute("content")===(i.content==null?null:""+i.content)&&g.getAttribute("name")===(i.name==null?null:i.name)&&g.getAttribute("property")===(i.property==null?null:i.property)&&g.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&g.getAttribute("charset")===(i.charSet==null?null:i.charSet)){M.splice(k,1);break t}}g=d.createElement(s),bt(g,s,i),d.head.appendChild(g);break;default:throw Error(P(468,s))}g[mt]=e,gt(g),s=g}e.stateNode=s}else bd(d,e.type,e.stateNode);else e.stateNode=Cd(d,s,e.memoizedProps);else g!==s?(g===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):g.count--,s===null?bd(d,e.type,e.stateNode):Cd(d,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ul(e,e.memoizedProps,i.memoizedProps)}break;case 27:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),i!==null&&s&4&&Ul(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),e.flags&32){d=e.stateNode;try{bs(d,"")}catch(Ce){Ge(e,e.return,Ce)}}s&4&&e.stateNode!=null&&(d=e.memoizedProps,Ul(e,d,i!==null?i.memoizedProps:d)),s&1024&&(Fl=!0);break;case 6:if(Rt(t,e),Dt(e),s&4){if(e.stateNode===null)throw Error(P(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(Ce){Ge(e,e.return,Ce)}}break;case 3:if(ea=null,d=ti,ti=Zn(t.containerInfo),Rt(t,e),ti=d,Dt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(Ce){Ge(e,e.return,Ce)}Fl&&(Fl=!1,bu(e));break;case 4:s=ti,ti=Zn(e.stateNode.containerInfo),Rt(t,e),Dt(e),ti=s;break;case 12:Rt(t,e),Dt(e);break;case 31:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 13:Rt(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Pn=ge()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 22:d=e.memoizedState!==null;var W=i!==null&&i.memoizedState!==null,te=Ci,le=ht;if(Ci=te||d,ht=le||W,Rt(t,e),ht=le,Ci=te,Dt(e),s&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(i===null||W||Ci||ht||ds(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){W=i=t;try{if(g=W.stateNode,d)M=g.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{k=W.stateNode;var he=W.memoizedProps.style,re=he!=null&&he.hasOwnProperty("display")?he.display:null;k.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=d?"":W.memoizedProps}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===18){if(i===null){W=t;try{var ae=W.stateNode;d?ud(ae,!0):ud(W.stateNode,!1)}catch(Ce){Ge(W,W.return,Ce)}}}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,Un(e,i))));break;case 19:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 30:break;case 21:break;default:Rt(t,e),Dt(e)}}function Dt(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(P(160));switch(i.tag){case 27:var d=i.stateNode,g=Il(e);Nn(e,g,d);break;case 5:var M=i.stateNode;i.flags&32&&(bs(M,""),i.flags&=-33);var k=Il(e);Nn(e,k,M);break;case 3:case 4:var W=i.stateNode.containerInfo,te=Il(e);Pl(e,te,W);break;default:throw Error(P(161))}}catch(le){Ge(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 bi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gu(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:Ui(4,t,t.return),ds(t);break;case 1:li(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&uu(t,t.return,i),ds(t);break;case 27:Fr(t.stateNode);case 26:case 5:li(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 wi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,d=e,g=t,M=g.flags;switch(g.tag){case 0:case 11:case 15:wi(d,g,i),Tr(4,g);break;case 1:if(wi(d,g,i),s=g,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(te){Ge(s,s.return,te)}if(s=g,d=s.updateQueue,d!==null){var k=s.stateNode;try{var W=d.shared.hiddenCallbacks;if(W!==null)for(d.shared.hiddenCallbacks=null,d=0;d<W.length;d++)Jc(W[d],k)}catch(te){Ge(s,s.return,te)}}i&&M&64&&hu(g),Br(g,g.return);break;case 27:_u(g);case 26:case 5:wi(d,g,i),i&&s===null&&M&4&&du(g),Br(g,g.return);break;case 12:wi(d,g,i);break;case 31:wi(d,g,i),i&&M&4&&Su(d,g);break;case 13:wi(d,g,i),i&&M&4&&Cu(d,g);break;case 22:g.memoizedState===null&&wi(d,g,i),Br(g,g.return);break;case 30:break;default:wi(d,g,i)}t=t.sibling}}function jl(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&&mr(i))}function $l(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e))}function ii(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wu(e,t,i,s),t=t.sibling}function wu(e,t,i,s){var d=t.flags;switch(t.tag){case 0:case 11:case 15:ii(e,t,i,s),d&2048&&Tr(9,t);break;case 1:ii(e,t,i,s);break;case 3:ii(e,t,i,s),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e)));break;case 12:if(d&2048){ii(e,t,i,s),e=t.stateNode;try{var g=t.memoizedProps,M=g.id,k=g.onPostCommit;typeof k=="function"&&k(M,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Ge(t,t.return,W)}}else ii(e,t,i,s);break;case 31:ii(e,t,i,s);break;case 13:ii(e,t,i,s);break;case 23:break;case 22:g=t.stateNode,M=t.alternate,t.memoizedState!==null?g._visibility&2?ii(e,t,i,s):Or(e,t):g._visibility&2?ii(e,t,i,s):(g._visibility|=2,js(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),d&2048&&jl(M,t);break;case 24:ii(e,t,i,s),d&2048&&$l(t.alternate,t);break;default:ii(e,t,i,s)}}function js(e,t,i,s,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var g=e,M=t,k=i,W=s,te=M.flags;switch(M.tag){case 0:case 11:case 15:js(g,M,k,W,d),Tr(8,M);break;case 23:break;case 22:var le=M.stateNode;M.memoizedState!==null?le._visibility&2?js(g,M,k,W,d):Or(g,M):(le._visibility|=2,js(g,M,k,W,d)),d&&te&2048&&jl(M.alternate,M);break;case 24:js(g,M,k,W,d),d&&te&2048&&$l(M.alternate,M);break;default:js(g,M,k,W,d)}t=t.sibling}}function Or(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,d=s.flags;switch(s.tag){case 22:Or(i,s),d&2048&&jl(s.alternate,s);break;case 24:Or(i,s),d&2048&&$l(s.alternate,s);break;default:Or(i,s)}t=t.sibling}}var kr=8192;function $s(e,t,i){if(e.subtreeFlags&kr)for(e=e.child;e!==null;)xu(e,t,i),e=e.sibling}function xu(e,t,i){switch(e.tag){case 26:$s(e,t,i),e.flags&kr&&e.memoizedState!==null&&dv(i,ti,e.memoizedState,e.memoizedProps);break;case 5:$s(e,t,i);break;case 3:case 4:var s=ti;ti=Zn(e.stateNode.containerInfo),$s(e,t,i),ti=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=kr,kr=16777216,$s(e,t,i),kr=s):$s(e,t,i));break;default:$s(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 Hr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];pt=s,Mu(s,e)}Eu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lu(e),e=e.sibling}function Lu(e){switch(e.tag){case 0:case 11:case 15:Hr(e),e.flags&2048&&Ui(9,e,e.return);break;case 3:Hr(e);break;case 12:Hr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,In(e)):Hr(e);break;default:Hr(e)}}function In(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];pt=s,Mu(s,e)}Eu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ui(8,t,t.return),In(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,In(t));break;default:In(t)}e=e.sibling}}function Mu(e,t){for(;pt!==null;){var i=pt;switch(i.tag){case 0:case 11:case 15:Ui(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:mr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,pt=s;else e:for(i=e;pt!==null;){s=pt;var d=s.sibling,g=s.return;if(pu(s),s===i){pt=null;break e}if(d!==null){d.return=g,pt=d;break e}pt=g}}}var M_={getCacheForType:function(e){var t=Ct(lt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ct(lt).controller.signal}},A_=typeof WeakMap=="function"?WeakMap:Map,$e=0,Ke=null,ke=null,Ne=0,We=0,Ut=null,Ii=!1,qs=!1,ql=!1,xi=0,rt=0,Pi=0,fs=0,Wl=0,It=0,Ws=0,zr=null,Tt=null,Gl=!1,Pn=0,Au=0,Fn=1/0,jn=null,Fi=null,dt=0,ji=null,Gs=null,Ei=0,Xl=0,Vl=null,Ru=null,Nr=0,Yl=null;function Pt(){return($e&2)!==0&&Ne!==0?Ne&-Ne:N.T!==null?to():Wo()}function Du(){if(It===0)if((Ne&536870912)===0||Pe){var e=si;si<<=1,(si&3932160)===0&&(si=262144),It=e}else It=536870912;return e=zt.current,e!==null&&(e.flags|=32),It}function Bt(e,t,i){(e===Ke&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Xs(e,0),$i(e,Ne,It,!1)),rr(e,i),(($e&2)===0||e!==Ke)&&(e===Ke&&(($e&2)===0&&(fs|=i),rt===4&&$i(e,Ne,It,!1)),oi(e))}function Tu(e,t,i){if(($e&6)!==0)throw Error(P(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||sr(e,t),d=s?T_(e,t):Ql(e,t,!0),g=s;do{if(d===0){qs&&!s&&$i(e,t,0,!1);break}else{if(i=e.current.alternate,g&&!R_(i)){d=Ql(e,t,!1),g=!1;continue}if(d===2){if(g=t,e.errorRecoveryDisabledLanes&g)var M=0;else M=e.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){t=M;e:{var k=e;d=zr;var W=k.current.memoizedState.isDehydrated;if(W&&(Xs(k,M).flags|=256),M=Ql(k,M,!1),M!==2){if(ql&&!W){k.errorRecoveryDisabledLanes|=g,fs|=g,d=4;break e}g=Tt,Tt=d,g!==null&&(Tt===null?Tt=g:Tt.push.apply(Tt,g))}d=M}if(g=!1,d!==2)continue}}if(d===1){Xs(e,0),$i(e,t,0,!0);break}e:{switch(s=e,g=d,g){case 0:case 1:throw Error(P(345));case 4:if((t&4194048)!==t)break;case 6:$i(s,t,It,!Ii);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(P(329))}if((t&62914560)===t&&(d=Pn+300-ge(),10<d)){if($i(s,t,It,!Ii),Qr(s,0,!0)!==0)break e;Ei=t,s.timeoutHandle=od(Bu.bind(null,s,i,Tt,jn,Gl,t,It,fs,Ws,Ii,g,"Throttled",-0,0),d);break e}Bu(s,i,Tt,jn,Gl,t,It,fs,Ws,Ii,g,null,-0,0)}}break}while(!0);oi(e)}function Bu(e,t,i,s,d,g,M,k,W,te,le,he,re,ae){if(e.timeoutHandle=-1,he=t.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:hi},xu(t,g,he);var Ce=(g&62914560)===g?Pn-ge():(g&4194048)===g?Au-ge():0;if(Ce=fv(he,Ce),Ce!==null){Ei=g,e.cancelPendingCommit=Ce(Pu.bind(null,e,t,g,i,s,d,M,k,W,le,he,null,re,ae)),$i(e,g,M,!te);return}}Pu(e,t,g,i,s,d,M,k,W)}function R_(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 d=i[s],g=d.getSnapshot;d=d.value;try{if(!kt(g(),d))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 $i(e,t,i,s){t&=~Wl,t&=~fs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var d=t;0<d;){var g=31-ut(d),M=1<<g;s[g]=-1,d&=~M}i!==0&&jo(e,i,t)}function $n(){return($e&6)===0?(Ur(0),!1):!0}function Kl(){if(ke!==null){if(We===0)var e=ke.return;else e=ke,_i=rs=null,dl(e),Ns=null,Cr=0,e=ke;for(;e!==null;)cu(e.alternate,e),e=e.return;ke=null}}function Xs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Y_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ei=0,Kl(),Ke=e,ke=i=di(e.current,null),Ne=t,We=0,Ut=null,Ii=!1,qs=sr(e,t),ql=!1,Ws=It=Wl=fs=Pi=rt=0,Tt=zr=null,Gl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var d=31-ut(s),g=1<<d;t|=e[d],s&=~g}return xi=t,hn(),i}function Ou(e,t){Te=null,N.H=Ar,t===zs||t===mn?(t=Yc(),We=3):t===el?(t=Yc(),We=4):We=t===Al?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,ke===null&&(rt=1,Bn(e,Wt(t,e.current)))}function ku(){var e=zt.current;return e===null?!0:(Ne&4194048)===Ne?Yt===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===Yt:!1}function Hu(){var e=N.H;return N.H=Ar,e===null?Ar:e}function zu(){var e=N.A;return N.A=M_,e}function qn(){rt=4,Ii||(Ne&4194048)!==Ne&&zt.current!==null||(qs=!0),(Pi&134217727)===0&&(fs&134217727)===0||Ke===null||$i(Ke,Ne,It,!1)}function Ql(e,t,i){var s=$e;$e|=2;var d=Hu(),g=zu();(Ke!==e||Ne!==t)&&(jn=null,Xs(e,t)),t=!1;var M=rt;e:do try{if(We!==0&&ke!==null){var k=ke,W=Ut;switch(We){case 8:Kl(),M=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var te=We;if(We=0,Ut=null,Vs(e,k,W,te),i&&qs){M=0;break e}break;default:te=We,We=0,Ut=null,Vs(e,k,W,te)}}D_(),M=rt;break}catch(le){Ou(e,le)}while(!0);return t&&e.shellSuspendCounter++,_i=rs=null,$e=s,N.H=d,N.A=g,ke===null&&(Ke=null,Ne=0,hn()),M}function D_(){for(;ke!==null;)Nu(ke)}function T_(e,t){var i=$e;$e|=2;var s=Hu(),d=zu();Ke!==e||Ne!==t?(jn=null,Fn=ge()+500,Xs(e,t)):qs=sr(e,t);e:do try{if(We!==0&&ke!==null){t=ke;var g=Ut;t:switch(We){case 1:We=0,Ut=null,Vs(e,t,g,1);break;case 2:case 9:if(Xc(g)){We=0,Ut=null,Uu(t);break}t=function(){We!==2&&We!==9||Ke!==e||(We=7),oi(e)},g.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Xc(g)?(We=0,Ut=null,Uu(t)):(We=0,Ut=null,Vs(e,t,g,7));break;case 5:var M=null;switch(ke.tag){case 26:M=ke.memoizedState;case 5:case 27:var k=ke;if(M?wd(M):k.stateNode.complete){We=0,Ut=null;var W=k.sibling;if(W!==null)ke=W;else{var te=k.return;te!==null?(ke=te,Wn(te)):ke=null}break t}}We=0,Ut=null,Vs(e,t,g,5);break;case 6:We=0,Ut=null,Vs(e,t,g,6);break;case 8:Kl(),rt=6;break e;default:throw Error(P(462))}}B_();break}catch(le){Ou(e,le)}while(!0);return _i=rs=null,N.H=s,N.A=d,$e=i,ke!==null?0:(Ke=null,Ne=0,hn(),rt)}function B_(){for(;ke!==null&&!me();)Nu(ke)}function Nu(e){var t=lu(e.alternate,e,xi);e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function Uu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=tu(i,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=tu(i,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:dl(t);default:cu(i,t),t=ke=zc(t,xi),t=lu(i,t,xi)}e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function Vs(e,t,i,s){_i=rs=null,dl(t),Ns=null,Cr=0;var d=t.return;try{if(C_(e,d,t,i,Ne)){rt=1,Bn(e,Wt(i,e.current)),ke=null;return}}catch(g){if(d!==null)throw ke=d,g;rt=1,Bn(e,Wt(i,e.current)),ke=null;return}t.flags&32768?(Pe||s===1?e=!0:qs||(Ne&536870912)!==0?e=!1:(Ii=e=!0,(s===2||s===9||s===3||s===6)&&(s=zt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Iu(t,e)):Wn(t)}function Wn(e){var t=e;do{if((t.flags&32768)!==0){Iu(t,Ii);return}e=t.return;var i=w_(t.alternate,t,xi);if(i!==null){ke=i;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);rt===0&&(rt=5)}function Iu(e,t){do{var i=x_(e.alternate,e);if(i!==null){i.flags&=32767,ke=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=i}while(e!==null);rt=6,ke=null}function Pu(e,t,i,s,d,g,M,k,W){e.cancelPendingCommit=null;do Gn();while(dt!==0);if(($e&6)!==0)throw Error(P(327));if(t!==null){if(t===e.current)throw Error(P(177));if(g=t.lanes|t.childLanes,g|=Ia,uf(e,i,g,M,k,W),e===Ke&&(ke=Ke=null,Ne=0),Gs=t,ji=e,Ei=i,Xl=g,Vl=d,Ru=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,z_(Qe,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=N.T,N.T=null,d=U.p,U.p=2,M=$e,$e|=4;try{E_(e,t,i)}finally{$e=M,U.p=d,N.T=s}}dt=1,Fu(),ju(),$u()}}function Fu(){if(dt===1){dt=0;var e=ji,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=N.T,N.T=null;var s=U.p;U.p=2;var d=$e;$e|=4;try{yu(t,e);var g=co,M=Mc(e.containerInfo),k=g.focusedElem,W=g.selectionRange;if(M!==k&&k&&k.ownerDocument&&Lc(k.ownerDocument.documentElement,k)){if(W!==null&&ka(k)){var te=W.start,le=W.end;if(le===void 0&&(le=te),"selectionStart"in k)k.selectionStart=te,k.selectionEnd=Math.min(le,k.value.length);else{var he=k.ownerDocument||document,re=he&&he.defaultView||window;if(re.getSelection){var ae=re.getSelection(),Ce=k.textContent.length,Ee=Math.min(W.start,Ce),Ye=W.end===void 0?Ee:Math.min(W.end,Ce);!ae.extend&&Ee>Ye&&(M=Ye,Ye=Ee,Ee=M);var Q=Ec(k,Ee),X=Ec(k,Ye);if(Q&&X&&(ae.rangeCount!==1||ae.anchorNode!==Q.node||ae.anchorOffset!==Q.offset||ae.focusNode!==X.node||ae.focusOffset!==X.offset)){var J=he.createRange();J.setStart(Q.node,Q.offset),ae.removeAllRanges(),Ee>Ye?(ae.addRange(J),ae.extend(X.node,X.offset)):(J.setEnd(X.node,X.offset),ae.addRange(J))}}}}for(he=[],ae=k;ae=ae.parentNode;)ae.nodeType===1&&he.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<he.length;k++){var oe=he[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ra=!!oo,co=oo=null}finally{$e=d,U.p=s,N.T=i}}e.current=t,dt=2}}function ju(){if(dt===2){dt=0;var e=ji,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=N.T,N.T=null;var s=U.p;U.p=2;var d=$e;$e|=4;try{gu(e,t.alternate,t)}finally{$e=d,U.p=s,N.T=i}}dt=3}}function $u(){if(dt===4||dt===3){dt=0,ce();var e=ji,t=Gs,i=Ei,s=Ru;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Gs=ji=null,qu(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Fi=null),va(i),t=t.stateNode,tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(xt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=N.T,d=U.p,U.p=2,N.T=null;try{for(var g=e.onRecoverableError,M=0;M<s.length;M++){var k=s[M];g(k.value,{componentStack:k.stack})}}finally{N.T=t,U.p=d}}(Ei&3)!==0&&Gn(),oi(e),d=e.pendingLanes,(i&261930)!==0&&(d&42)!==0?e===Yl?Nr++:(Nr=0,Yl=e):Nr=0,Ur(0)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,mr(t)))}function Gn(){return Fu(),ju(),$u(),Wu()}function Wu(){if(dt!==5)return!1;var e=ji,t=Xl;Xl=0;var i=va(Ei),s=N.T,d=U.p;try{U.p=32>i?32:i,N.T=null,i=Vl,Vl=null;var g=ji,M=Ei;if(dt=0,Gs=ji=null,Ei=0,($e&6)!==0)throw Error(P(331));var k=$e;if($e|=4,Lu(g.current),wu(g,g.current,M,i),$e=k,Ur(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(xt,g)}catch{}return!0}finally{U.p=d,N.T=s,qu(e,t)}}function Gu(e,t,i){t=Wt(i,t),t=Ml(e.stateNode,t,2),e=Hi(e,t,2),e!==null&&(rr(e,2),oi(e))}function Ge(e,t,i){if(e.tag===3)Gu(e,e,i);else for(;t!==null;){if(t.tag===3){Gu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Fi===null||!Fi.has(s))){e=Wt(i,e),i=Xh(2),s=Hi(t,i,2),s!==null&&(Vh(i,s,t,e),rr(s,2),oi(s));break}}t=t.return}}function Zl(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new A_;var d=new Set;s.set(t,d)}else d=s.get(t),d===void 0&&(d=new Set,s.set(t,d));d.has(i)||(ql=!0,d.add(i),e=O_.bind(null,e,t,i),t.then(e,e))}function O_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ke===e&&(Ne&i)===i&&(rt===4||rt===3&&(Ne&62914560)===Ne&&300>ge()-Pn?($e&2)===0&&Xs(e,0):Wl|=i,Ws===Ne&&(Ws=0)),oi(e)}function Xu(e,t){t===0&&(t=Fo()),e=ts(e,t),e!==null&&(rr(e,t),oi(e))}function k_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Xu(e,i)}function H_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,d=e.memoizedState;d!==null&&(i=d.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(P(314))}s!==null&&s.delete(t),Xu(e,i)}function z_(e,t){return Se(e,t)}var Xn=null,Ys=null,Jl=!1,Vn=!1,eo=!1,qi=0;function oi(e){e!==Ys&&e.next===null&&(Ys===null?Xn=Ys=e:Ys=Ys.next=e),Vn=!0,Jl||(Jl=!0,U_())}function Ur(e,t){if(!eo&&Vn){eo=!0;do for(var i=!1,s=Xn;s!==null;){if(e!==0){var d=s.pendingLanes;if(d===0)var g=0;else{var M=s.suspendedLanes,k=s.pingedLanes;g=(1<<31-ut(42|e)+1)-1,g&=d&~(M&~k),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(i=!0,Qu(s,g))}else g=Ne,g=Qr(s,s===Ke?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||sr(s,g)||(i=!0,Qu(s,g));s=s.next}while(i);eo=!1}}function N_(){Vu()}function Vu(){Vn=Jl=!1;var e=0;qi!==0&&V_()&&(e=qi);for(var t=ge(),i=null,s=Xn;s!==null;){var d=s.next,g=Yu(s,t);g===0?(s.next=null,i===null?Xn=d:i.next=d,d===null&&(Ys=i)):(i=s,(e!==0||(g&3)!==0)&&(Vn=!0)),s=d}dt!==0&&dt!==5||Ur(e),qi!==0&&(qi=0)}function Yu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,d=e.expirationTimes,g=e.pendingLanes&-62914561;0<g;){var M=31-ut(g),k=1<<M,W=d[M];W===-1?((k&i)===0||(k&s)!==0)&&(d[M]=hf(k,t)):W<=t&&(e.expiredLanes|=k),g&=~k}if(t=Ke,i=Ne,i=Qr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pe(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||sr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&pe(s),va(i)){case 2:case 8:i=_t;break;case 32:i=Qe;break;case 268435456:i=Ie;break;default:i=Qe}return s=Ku.bind(null,e),i=Se(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&pe(s),e.callbackPriority=2,e.callbackNode=null,2}function Ku(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gn()&&e.callbackNode!==i)return null;var s=Ne;return s=Qr(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Tu(e,s,t),Yu(e,ge()),e.callbackNode!=null&&e.callbackNode===i?Ku.bind(null,e):null)}function Qu(e,t){if(Gn())return null;Tu(e,t,!0)}function U_(){K_(function(){($e&6)!==0?Se(Re,N_):Vu()})}function to(){if(qi===0){var e=ks;e===0&&(e=Ft,Ft<<=1,(Ft&261888)===0&&(Ft=256)),qi=e}return qi}function Zu(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:tn(""+e)}function Ju(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 I_(e,t,i,s,d){if(t==="submit"&&i&&i.stateNode===d){var g=Zu((d[Lt]||null).action),M=s.submitter;M&&(t=(t=M[Lt]||null)?Zu(t.formAction):M.getAttribute("formAction"),t!==null&&(g=t,M=null));var k=new an("action","action",null,s,d);e.push({event:k,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(qi!==0){var W=M?Ju(d,M):new FormData(d);yl(i,{pending:!0,data:W,method:d.method,action:g},null,W)}}else typeof g=="function"&&(k.preventDefault(),W=M?Ju(d,M):new FormData(d),yl(i,{pending:!0,data:W,method:d.method,action:g},g,W))},currentTarget:d}]})}}for(var io=0;io<Ua.length;io++){var so=Ua[io],P_=so.toLowerCase(),F_=so[0].toUpperCase()+so.slice(1);ei(P_,"on"+F_)}ei(Dc,"onAnimationEnd"),ei(Tc,"onAnimationIteration"),ei(Bc,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(s_,"onTransitionRun"),ei(r_,"onTransitionStart"),ei(n_,"onTransitionCancel"),ei(Oc,"onTransitionEnd"),Cs("onMouseEnter",["mouseout","mouseover"]),Cs("onMouseLeave",["mouseout","mouseover"]),Cs("onPointerEnter",["pointerout","pointerover"]),Cs("onPointerLeave",["pointerout","pointerover"]),Qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="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(" "),j_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ir));function ed(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],d=s.event;s=s.listeners;e:{var g=void 0;if(t)for(var M=s.length-1;0<=M;M--){var k=s[M],W=k.instance,te=k.currentTarget;if(k=k.listener,W!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=te;try{g(d)}catch(le){cn(le)}d.currentTarget=null,g=W}else for(M=0;M<s.length;M++){if(k=s[M],W=k.instance,te=k.currentTarget,k=k.listener,W!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=te;try{g(d)}catch(le){cn(le)}d.currentTarget=null,g=W}}}}function He(e,t){var i=t[ga];i===void 0&&(i=t[ga]=new Set);var s=e+"__bubble";i.has(s)||(td(t,e,2,!1),i.add(s))}function ro(e,t,i){var s=0;t&&(s|=4),td(i,e,s,t)}var Yn="_reactListening"+Math.random().toString(36).slice(2);function no(e){if(!e[Yn]){e[Yn]=!0,Vo.forEach(function(i){i!=="selectionchange"&&(j_.has(i)||ro(i,!1,e),ro(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yn]||(t[Yn]=!0,ro("selectionchange",!1,t))}}function td(e,t,i,s){switch(Dd(t)){case 2:var d=gv;break;case 8:d=pv;break;default:d=yo}i=d.bind(null,t,i,e),d=void 0,!Ea||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),s?d!==void 0?e.addEventListener(t,i,{capture:!0,passive:d}):e.addEventListener(t,i,!0):d!==void 0?e.addEventListener(t,i,{passive:d}):e.addEventListener(t,i,!1)}function ao(e,t,i,s,d){var g=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var M=s.tag;if(M===3||M===4){var k=s.stateNode.containerInfo;if(k===d)break;if(M===4)for(M=s.return;M!==null;){var W=M.tag;if((W===3||W===4)&&M.stateNode.containerInfo===d)return;M=M.return}for(;k!==null;){if(M=ps(k),M===null)return;if(W=M.tag,W===5||W===6||W===26||W===27){s=g=M;continue e}k=k.parentNode}}s=s.return}ac(function(){var te=g,le=wa(i),he=[];e:{var re=kc.get(e);if(re!==void 0){var ae=an,Ce=e;switch(e){case"keypress":if(rn(i)===0)break e;case"keydown":case"keyup":ae=Hf;break;case"focusin":Ce="focus",ae=Ra;break;case"focusout":Ce="blur",ae=Ra;break;case"beforeblur":case"afterblur":ae=Ra;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=cc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=wf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=Uf;break;case Dc:case Tc:case Bc:ae=Lf;break;case Oc:ae=Pf;break;case"scroll":case"scrollend":ae=yf;break;case"wheel":ae=jf;break;case"copy":case"cut":case"paste":ae=Af;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=uc;break;case"toggle":case"beforetoggle":ae=qf}var Ee=(t&4)!==0,Ye=!Ee&&(e==="scroll"||e==="scrollend"),Q=Ee?re!==null?re+"Capture":null:re;Ee=[];for(var X=te,J;X!==null;){var oe=X;if(J=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||J===null||Q===null||(oe=lr(X,Q),oe!=null&&Ee.push(Pr(X,oe,J))),Ye)break;X=X.return}0<Ee.length&&(re=new ae(re,Ce,null,i,le),he.push({event:re,listeners:Ee}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",re&&i!==ba&&(Ce=i.relatedTarget||i.fromElement)&&(ps(Ce)||Ce[gs]))break e;if((ae||re)&&(re=le.window===le?le:(re=le.ownerDocument)?re.defaultView||re.parentWindow:window,ae?(Ce=i.relatedTarget||i.toElement,ae=te,Ce=Ce?ps(Ce):null,Ce!==null&&(Ye=ne(Ce),Ee=Ce.tag,Ce!==Ye||Ee!==5&&Ee!==27&&Ee!==6)&&(Ce=null)):(ae=null,Ce=te),ae!==Ce)){if(Ee=cc,oe="onMouseLeave",Q="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=uc,oe="onPointerLeave",Q="onPointerEnter",X="pointer"),Ye=ae==null?re:ar(ae),J=Ce==null?re:ar(Ce),re=new Ee(oe,X+"leave",ae,i,le),re.target=Ye,re.relatedTarget=J,oe=null,ps(le)===te&&(Ee=new Ee(Q,X+"enter",Ce,i,le),Ee.target=J,Ee.relatedTarget=Ye,oe=Ee),Ye=oe,ae&&Ce)t:{for(Ee=$_,Q=ae,X=Ce,J=0,oe=Q;oe;oe=Ee(oe))J++;oe=0;for(var we=X;we;we=Ee(we))oe++;for(;0<J-oe;)Q=Ee(Q),J--;for(;0<oe-J;)X=Ee(X),oe--;for(;J--;){if(Q===X||X!==null&&Q===X.alternate){Ee=Q;break t}Q=Ee(Q),X=Ee(X)}Ee=null}else Ee=null;ae!==null&&id(he,re,ae,Ee,!1),Ce!==null&&Ye!==null&&id(he,Ye,Ce,Ee,!0)}}e:{if(re=te?ar(te):window,ae=re.nodeName&&re.nodeName.toLowerCase(),ae==="select"||ae==="input"&&re.type==="file")var Fe=Sc;else if(pc(re))if(Cc)Fe=e_;else{Fe=Zf;var ye=Qf}else ae=re.nodeName,!ae||ae.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?te&&ya(te.elementType)&&(Fe=Sc):Fe=Jf;if(Fe&&(Fe=Fe(e,te))){mc(he,Fe,i,le);break e}ye&&ye(e,re,te),e==="focusout"&&te&&re.type==="number"&&te.memoizedProps.value!=null&&Ca(re,"number",re.value)}switch(ye=te?ar(te):window,e){case"focusin":(pc(ye)||ye.contentEditable==="true")&&(Ls=ye,Ha=te,vr=null);break;case"focusout":vr=Ha=Ls=null;break;case"mousedown":za=!0;break;case"contextmenu":case"mouseup":case"dragend":za=!1,Ac(he,i,le);break;case"selectionchange":if(i_)break;case"keydown":case"keyup":Ac(he,i,le)}var Be;if(Ta)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Es?vc(e,i)&&(Ue="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ue="onCompositionStart");Ue&&(dc&&i.locale!=="ko"&&(Es||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Es&&(Be=lc()):(Ai=le,La="value"in Ai?Ai.value:Ai.textContent,Es=!0)),ye=Kn(te,Ue),0<ye.length&&(Ue=new hc(Ue,e,null,i,le),he.push({event:Ue,listeners:ye}),Be?Ue.data=Be:(Be=gc(i),Be!==null&&(Ue.data=Be)))),(Be=Gf?Xf(e,i):Vf(e,i))&&(Ue=Kn(te,"onBeforeInput"),0<Ue.length&&(ye=new hc("onBeforeInput","beforeinput",null,i,le),he.push({event:ye,listeners:Ue}),ye.data=Be)),I_(he,e,te,i,le)}ed(he,t)})}function Pr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Kn(e,t){for(var i=t+"Capture",s=[];e!==null;){var d=e,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=lr(e,i),d!=null&&s.unshift(Pr(e,d,g)),d=lr(e,t),d!=null&&s.push(Pr(e,d,g))),e.tag===3)return s;e=e.return}return[]}function $_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function id(e,t,i,s,d){for(var g=t._reactName,M=[];i!==null&&i!==s;){var k=i,W=k.alternate,te=k.stateNode;if(k=k.tag,W!==null&&W===s)break;k!==5&&k!==26&&k!==27||te===null||(W=te,d?(te=lr(i,g),te!=null&&M.unshift(Pr(i,te,W))):d||(te=lr(i,g),te!=null&&M.push(Pr(i,te,W)))),i=i.return}M.length!==0&&e.push({event:t,listeners:M})}var q_=/\r\n?/g,W_=/\u0000|\uFFFD/g;function sd(e){return(typeof e=="string"?e:""+e).replace(q_,`
49
+ `).replace(W_,"")}function rd(e,t){return t=sd(t),sd(e)===t}function Ve(e,t,i,s,d,g){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||bs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&bs(e,""+s);break;case"className":Jr(e,"class",s);break;case"tabIndex":Jr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Jr(e,i,s);break;case"style":rc(e,s,g);break;case"data":if(t!=="object"){Jr(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=tn(""+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 g=="function"&&(i==="formAction"?(t!=="input"&&Ve(e,t,"name",d.name,d,null),Ve(e,t,"formEncType",d.formEncType,d,null),Ve(e,t,"formMethod",d.formMethod,d,null),Ve(e,t,"formTarget",d.formTarget,d,null)):(Ve(e,t,"encType",d.encType,d,null),Ve(e,t,"method",d.method,d,null),Ve(e,t,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=tn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=hi);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(P(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(P(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=tn(""+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":He("beforetoggle",e),He("toggle",e),Zr(e,"popover",s);break;case"xlinkActuate":ci(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ci(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ci(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ci(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ci(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ci(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ci(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ci(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ci(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Zr(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=Sf.get(i)||i,Zr(e,i,s))}}function lo(e,t,i,s,d,g){switch(i){case"style":rc(e,s,g);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(P(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(P(60));e.innerHTML=i}}break;case"children":typeof s=="string"?bs(e,s):(typeof s=="number"||typeof s=="bigint")&&bs(e,""+s);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"onClick":s!=null&&(e.onclick=hi);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"&&(d=i.endsWith("Capture"),t=i.slice(2,d?i.length-7:void 0),g=e[Lt]||null,g=g!=null?g[i]:null,typeof g=="function"&&e.removeEventListener(t,g,d),typeof s=="function")){typeof g!="function"&&g!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,d);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Zr(e,i,s)}}}function bt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var s=!1,d=!1,g;for(g in i)if(i.hasOwnProperty(g)){var M=i[g];if(M!=null)switch(g){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Ve(e,t,g,M,i,null)}}d&&Ve(e,t,"srcSet",i.srcSet,i,null),s&&Ve(e,t,"src",i.src,i,null);return;case"input":He("invalid",e);var k=g=M=d=null,W=null,te=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":d=le;break;case"type":M=le;break;case"checked":W=le;break;case"defaultChecked":te=le;break;case"value":g=le;break;case"defaultValue":k=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(P(137,t));break;default:Ve(e,t,s,le,i,null)}}ec(e,g,k,W,te,M,d,!1);return;case"select":He("invalid",e),s=M=g=null;for(d in i)if(i.hasOwnProperty(d)&&(k=i[d],k!=null))switch(d){case"value":g=k;break;case"defaultValue":M=k;break;case"multiple":s=k;default:Ve(e,t,d,k,i,null)}t=g,i=M,e.multiple=!!s,t!=null?ys(e,!!s,t,!1):i!=null&&ys(e,!!s,i,!0);return;case"textarea":He("invalid",e),g=d=s=null;for(M in i)if(i.hasOwnProperty(M)&&(k=i[M],k!=null))switch(M){case"value":s=k;break;case"defaultValue":d=k;break;case"children":g=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(P(91));break;default:Ve(e,t,M,k,i,null)}ic(e,s,d,g);return;case"option":for(W in i)if(i.hasOwnProperty(W)&&(s=i[W],s!=null))switch(W){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ve(e,t,W,s,i,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(s=0;s<Ir.length;s++)He(Ir[s],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in i)if(i.hasOwnProperty(te)&&(s=i[te],s!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Ve(e,t,te,s,i,null)}return;default:if(ya(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&lo(e,t,le,s,i,void 0));return}}for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null&&Ve(e,t,k,s,i,null))}function G_(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 d=null,g=null,M=null,k=null,W=null,te=null,le=null;for(ae in i){var he=i[ae];if(i.hasOwnProperty(ae)&&he!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":W=he;default:s.hasOwnProperty(ae)||Ve(e,t,ae,null,s,he)}}for(var re in s){var ae=s[re];if(he=i[re],s.hasOwnProperty(re)&&(ae!=null||he!=null))switch(re){case"type":g=ae;break;case"name":d=ae;break;case"checked":te=ae;break;case"defaultChecked":le=ae;break;case"value":M=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(P(137,t));break;default:ae!==he&&Ve(e,t,re,ae,s,he)}}Sa(e,M,k,W,te,le,g,d);return;case"select":ae=M=k=re=null;for(g in i)if(W=i[g],i.hasOwnProperty(g)&&W!=null)switch(g){case"value":break;case"multiple":ae=W;default:s.hasOwnProperty(g)||Ve(e,t,g,null,s,W)}for(d in s)if(g=s[d],W=i[d],s.hasOwnProperty(d)&&(g!=null||W!=null))switch(d){case"value":re=g;break;case"defaultValue":k=g;break;case"multiple":M=g;default:g!==W&&Ve(e,t,d,g,s,W)}t=k,i=M,s=ae,re!=null?ys(e,!!i,re,!1):!!s!=!!i&&(t!=null?ys(e,!!i,t,!0):ys(e,!!i,i?[]:"",!1));return;case"textarea":ae=re=null;for(k in i)if(d=i[k],i.hasOwnProperty(k)&&d!=null&&!s.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ve(e,t,k,null,s,d)}for(M in s)if(d=s[M],g=i[M],s.hasOwnProperty(M)&&(d!=null||g!=null))switch(M){case"value":re=d;break;case"defaultValue":ae=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(P(91));break;default:d!==g&&Ve(e,t,M,d,s,g)}tc(e,re,ae);return;case"option":for(var Ce in i)if(re=i[Ce],i.hasOwnProperty(Ce)&&re!=null&&!s.hasOwnProperty(Ce))switch(Ce){case"selected":e.selected=!1;break;default:Ve(e,t,Ce,null,s,re)}for(W in s)if(re=s[W],ae=i[W],s.hasOwnProperty(W)&&re!==ae&&(re!=null||ae!=null))switch(W){case"selected":e.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:Ve(e,t,W,re,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 Ee in i)re=i[Ee],i.hasOwnProperty(Ee)&&re!=null&&!s.hasOwnProperty(Ee)&&Ve(e,t,Ee,null,s,re);for(te in s)if(re=s[te],ae=i[te],s.hasOwnProperty(te)&&re!==ae&&(re!=null||ae!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(P(137,t));break;default:Ve(e,t,te,re,s,ae)}return;default:if(ya(t)){for(var Ye in i)re=i[Ye],i.hasOwnProperty(Ye)&&re!==void 0&&!s.hasOwnProperty(Ye)&&lo(e,t,Ye,void 0,s,re);for(le in s)re=s[le],ae=i[le],!s.hasOwnProperty(le)||re===ae||re===void 0&&ae===void 0||lo(e,t,le,re,s,ae);return}}for(var Q in i)re=i[Q],i.hasOwnProperty(Q)&&re!=null&&!s.hasOwnProperty(Q)&&Ve(e,t,Q,null,s,re);for(he in s)re=s[he],ae=i[he],!s.hasOwnProperty(he)||re===ae||re==null&&ae==null||Ve(e,t,he,re,s,ae)}function nd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function X_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var d=i[s],g=d.transferSize,M=d.initiatorType,k=d.duration;if(g&&k&&nd(M)){for(M=0,k=d.responseEnd,s+=1;s<i.length;s++){var W=i[s],te=W.startTime;if(te>k)break;var le=W.transferSize,he=W.initiatorType;le&&nd(he)&&(W=W.responseEnd,M+=le*(W<k?1:(k-te)/(W-te)))}if(--s,t+=8*(g+M)/(d.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 Qn(e){return e.nodeType===9?e:e.ownerDocument}function ad(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 ld(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 V_(){var e=window.event;return e&&e.type==="popstate"?e===uo?!1:(uo=e,!0):(uo=null,!1)}var od=typeof setTimeout=="function"?setTimeout:void 0,Y_=typeof clearTimeout=="function"?clearTimeout:void 0,cd=typeof Promise=="function"?Promise:void 0,K_=typeof queueMicrotask=="function"?queueMicrotask:typeof cd<"u"?function(e){return cd.resolve(null).then(e).catch(Q_)}:od;function Q_(e){setTimeout(function(){throw e})}function Wi(e){return e==="head"}function hd(e,t){var i=t,s=0;do{var d=i.nextSibling;if(e.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(d),Js(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Fr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Fr(i);for(var g=i.firstChild;g;){var M=g.nextSibling,k=g.nodeName;g[nr]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&g.rel.toLowerCase()==="stylesheet"||i.removeChild(g),g=M}}else i==="body"&&Fr(e.ownerDocument.body);i=d}while(i);Js(t)}function ud(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),pa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Z_(e,t,i,s){for(;e.nodeType===1;){var d=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[nr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(g=e.getAttribute("rel"),g==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(g!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(g=e.getAttribute("src"),(g!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===g)return e}else return e;if(e=Kt(e.nextSibling),e===null)break}return null}function J_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Kt(e.nextSibling),e===null))return null;return e}function dd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Kt(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 ev(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 Kt(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 fd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Kt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function _d(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 vd(e,t,i){switch(t=Qn(i),e){case"html":if(e=t.documentElement,!e)throw Error(P(452));return e;case"head":if(e=t.head,!e)throw Error(P(453));return e;case"body":if(e=t.body,!e)throw Error(P(454));return e;default:throw Error(P(451))}}function Fr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pa(e)}var Qt=new Map,gd=new Set;function Zn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Li=U.d;U.d={f:tv,r:iv,D:sv,C:rv,L:nv,m:av,X:ov,S:lv,M:cv};function tv(){var e=Li.f(),t=$n();return e||t}function iv(e){var t=ms(e);t!==null&&t.tag===5&&t.type==="form"?Oh(t):Li.r(e)}var Ks=typeof document>"u"?null:document;function pd(e,t,i){var s=Ks;if(s&&typeof t=="string"&&t){var d=$t(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),gd.has(d)||(gd.add(d),e={rel:e,crossOrigin:i,href:t},s.querySelector(d)===null&&(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function sv(e){Li.D(e),pd("dns-prefetch",e,null)}function rv(e,t){Li.C(e,t),pd("preconnect",e,t)}function nv(e,t,i){Li.L(e,t,i);var s=Ks;if(s&&e&&t){var d='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+$t(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+$t(i.imageSizes)+'"]')):d+='[href="'+$t(e)+'"]';var g=d;switch(t){case"style":g=Qs(e);break;case"script":g=Zs(e)}Qt.has(g)||(e=a({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Qt.set(g,e),s.querySelector(d)!==null||t==="style"&&s.querySelector(jr(g))||t==="script"&&s.querySelector($r(g))||(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function av(e,t){Li.m(e,t);var i=Ks;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+$t(s)+'"][href="'+$t(e)+'"]',g=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Zs(e)}if(!Qt.has(g)&&(e=a({rel:"modulepreload",href:e},t),Qt.set(g,e),i.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector($r(g)))return}s=i.createElement("link"),bt(s,"link",e),gt(s),i.head.appendChild(s)}}}function lv(e,t,i){Li.S(e,t,i);var s=Ks;if(s&&e){var d=Ss(s).hoistableStyles,g=Qs(e);t=t||"default";var M=d.get(g);if(!M){var k={loading:0,preload:null};if(M=s.querySelector(jr(g)))k.loading=5;else{e=a({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qt.get(g))&&po(e,i);var W=M=s.createElement("link");gt(W),bt(W,"link",e),W._p=new Promise(function(te,le){W.onload=te,W.onerror=le}),W.addEventListener("load",function(){k.loading|=1}),W.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Jn(M,t,s)}M={type:"stylesheet",instance:M,count:1,state:k},d.set(g,M)}}}function ov(e,t){Li.X(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),g=s.get(d);g||(g=i.querySelector($r(d)),g||(e=a({src:e,async:!0},t),(t=Qt.get(d))&&mo(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function cv(e,t){Li.M(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),g=s.get(d);g||(g=i.querySelector($r(d)),g||(e=a({src:e,async:!0,type:"module"},t),(t=Qt.get(d))&&mo(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function md(e,t,i,s){var d=(d=de.current)?Zn(d):null;if(!d)throw Error(P(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(d).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 g=Ss(d).hoistableStyles,M=g.get(e);if(M||(d=d.ownerDocument||d,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(e,M),(g=d.querySelector(jr(e)))&&!g._p&&(M.instance=g,M.state.loading=5),Qt.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},Qt.set(e,i),g||hv(d,e,i,M.state))),t&&s===null)throw Error(P(528,""));return M}if(t&&s!==null)throw Error(P(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(d).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(P(444,e))}}function Qs(e){return'href="'+$t(e)+'"'}function jr(e){return'link[rel="stylesheet"]['+e+"]"}function Sd(e){return a({},e,{"data-precedence":e.precedence,precedence:null})}function hv(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}),bt(t,"link",i),gt(t),e.head.appendChild(t))}function Zs(e){return'[src="'+$t(e)+'"]'}function $r(e){return"script[async]"+e}function Cd(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+$t(i.href)+'"]');if(s)return t.instance=s,gt(s),s;var d=a({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),gt(s),bt(s,"style",d),Jn(s,i.precedence,e),t.instance=s;case"stylesheet":d=Qs(i.href);var g=e.querySelector(jr(d));if(g)return t.state.loading|=4,t.instance=g,gt(g),g;s=Sd(i),(d=Qt.get(d))&&po(s,d),g=(e.ownerDocument||e).createElement("link"),gt(g);var M=g;return M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),bt(g,"link",s),t.state.loading|=4,Jn(g,i.precedence,e),t.instance=g;case"script":return g=Zs(i.src),(d=e.querySelector($r(g)))?(t.instance=d,gt(d),d):(s=i,(d=Qt.get(g))&&(s=a({},i),mo(s,d)),e=e.ownerDocument||e,d=e.createElement("script"),gt(d),bt(d,"link",s),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(P(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Jn(s,i.precedence,e));return t.instance}function Jn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,g=d,M=0;M<s.length;M++){var k=s[M];if(k.dataset.precedence===t)g=k;else if(g!==d)break}g?g.parentNode.insertBefore(e,g.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function po(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function mo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ea=null;function yd(e,t,i){if(ea===null){var s=new Map,d=ea=new Map;d.set(i,s)}else d=ea,s=d.get(i),s||(s=new Map,d.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),d=0;d<i.length;d++){var g=i[d];if(!(g[nr]||g[mt]||e==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var M=g.getAttribute(t)||"";M=e+M;var k=s.get(M);k?k.push(g):s.set(M,[g])}}return s}function bd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function uv(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 wd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function dv(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 d=Qs(s.href),g=t.querySelector(jr(d));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ta.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=g,gt(g);return}g=t.ownerDocument||t,s=Sd(s),(d=Qt.get(d))&&po(s,d),g=g.createElement("link"),gt(g);var M=g;M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),bt(g,"link",s),i.instance=g}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ta.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var So=0;function fv(e,t){return e.stylesheets&&e.count===0&&sa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend){var g=e.unsuspend;e.unsuspend=null,g()}},6e4+t);0<e.imgBytes&&So===0&&(So=62500*X_());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend)){var g=e.unsuspend;e.unsuspend=null,g()}},(e.imgBytes>So?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function ta(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ia=null;function sa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ia=new Map,t.forEach(_v,e),ia=null,ta.call(e))}function _v(e,t){if(!(t.state.loading&4)){var i=ia.get(e);if(i)var s=i.get(null);else{i=new Map,ia.set(e,i);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var M=d[g];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(i.set(M.dataset.precedence,M),s=M)}s&&i.set(null,s)}d=t.instance,M=d.getAttribute("data-precedence"),g=i.get(M)||s,g===s&&i.set(null,d),i.set(M,d),this.count++,s=ta.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),g?g.parentNode.insertBefore(d,g.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var qr={$$typeof:l,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function vv(e,t,i,s,d,g,M,k,W){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.hiddenUpdates=fa(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function xd(e,t,i,s,d,g,M,k,W,te,le,he){return e=new vv(e,t,i,M,W,te,le,he,k),t=1,g===!0&&(t|=24),g=Ht(3,null,null,t),e.current=g,g.stateNode=e,t=Qa(),t.refCount++,e.pooledCache=t,t.refCount++,g.memoizedState={element:s,isDehydrated:i,cache:t},tl(g),e}function Ed(e){return e?(e=Rs,e):Rs}function Ld(e,t,i,s,d,g){d=Ed(d),s.context===null?s.context=d:s.pendingContext=d,s=ki(t),s.payload={element:i},g=g===void 0?null:g,g!==null&&(s.callback=g),i=Hi(e,s,t),i!==null&&(Bt(i,e,t),br(i,e,t))}function Md(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Co(e,t){Md(e,t),(e=e.alternate)&&Md(e,t)}function Ad(e){if(e.tag===13||e.tag===31){var t=ts(e,67108864);t!==null&&Bt(t,e,67108864),Co(e,67108864)}}function Rd(e){if(e.tag===13||e.tag===31){var t=Pt();t=_a(t);var i=ts(e,t);i!==null&&Bt(i,e,t),Co(e,t)}}var ra=!0;function gv(e,t,i,s){var d=N.T;N.T=null;var g=U.p;try{U.p=2,yo(e,t,i,s)}finally{U.p=g,N.T=d}}function pv(e,t,i,s){var d=N.T;N.T=null;var g=U.p;try{U.p=8,yo(e,t,i,s)}finally{U.p=g,N.T=d}}function yo(e,t,i,s){if(ra){var d=bo(s);if(d===null)ao(e,t,s,na,i),Td(e,s);else if(Sv(d,e,t,i,s))s.stopPropagation();else if(Td(e,s),t&4&&-1<mv.indexOf(e)){for(;d!==null;){var g=ms(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var M=Jt(g.pendingLanes);if(M!==0){var k=g;for(k.pendingLanes|=2,k.entangledLanes|=2;M;){var W=1<<31-ut(M);k.entanglements[1]|=W,M&=~W}oi(g),($e&6)===0&&(Fn=ge()+500,Ur(0))}}break;case 31:case 13:k=ts(g,2),k!==null&&Bt(k,g,2),$n(),Co(g,2)}if(g=bo(s),g===null&&ao(e,t,s,na,i),g===d)break;d=g}d!==null&&s.stopPropagation()}else ao(e,t,s,null,i)}}function bo(e){return e=wa(e),wo(e)}var na=null;function wo(e){if(na=null,e=ps(e),e!==null){var t=ne(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=F(t),e!==null)return e;e=null}else if(i===31){if(e=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 na=e,null}function Dd(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(ze()){case Re:return 2;case _t:return 8;case Qe:case it:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var xo=!1,Gi=null,Xi=null,Vi=null,Wr=new Map,Gr=new Map,Yi=[],mv="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 Td(e,t){switch(e){case"focusin":case"focusout":Gi=null;break;case"dragenter":case"dragleave":Xi=null;break;case"mouseover":case"mouseout":Vi=null;break;case"pointerover":case"pointerout":Wr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gr.delete(t.pointerId)}}function Xr(e,t,i,s,d,g){return e===null||e.nativeEvent!==g?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:g,targetContainers:[d]},t!==null&&(t=ms(t),t!==null&&Ad(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function Sv(e,t,i,s,d){switch(t){case"focusin":return Gi=Xr(Gi,e,t,i,s,d),!0;case"dragenter":return Xi=Xr(Xi,e,t,i,s,d),!0;case"mouseover":return Vi=Xr(Vi,e,t,i,s,d),!0;case"pointerover":var g=d.pointerId;return Wr.set(g,Xr(Wr.get(g)||null,e,t,i,s,d)),!0;case"gotpointercapture":return g=d.pointerId,Gr.set(g,Xr(Gr.get(g)||null,e,t,i,s,d)),!0}return!1}function Bd(e){var t=ps(e.target);if(t!==null){var i=ne(t);if(i!==null){if(t=i.tag,t===13){if(t=F(i),t!==null){e.blockedOn=t,Go(e.priority,function(){Rd(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,Go(e.priority,function(){Rd(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 aa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=bo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ba=s,i.target.dispatchEvent(s),ba=null}else return t=ms(i),t!==null&&Ad(t),e.blockedOn=i,!1;t.shift()}return!0}function Od(e,t,i){aa(e)&&i.delete(t)}function Cv(){xo=!1,Gi!==null&&aa(Gi)&&(Gi=null),Xi!==null&&aa(Xi)&&(Xi=null),Vi!==null&&aa(Vi)&&(Vi=null),Wr.forEach(Od),Gr.forEach(Od)}function la(e,t){e.blockedOn===t&&(e.blockedOn=null,xo||(xo=!0,j.unstable_scheduleCallback(j.unstable_NormalPriority,Cv)))}var oa=null;function kd(e){oa!==e&&(oa=e,j.unstable_scheduleCallback(j.unstable_NormalPriority,function(){oa===e&&(oa=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],d=e[t+2];if(typeof s!="function"){if(wo(s||i)===null)continue;break}var g=ms(i);g!==null&&(e.splice(t,3),t-=3,yl(g,{pending:!0,data:d,method:i.method,action:s},s,d))}}))}function Js(e){function t(W){return la(W,e)}Gi!==null&&la(Gi,e),Xi!==null&&la(Xi,e),Vi!==null&&la(Vi,e),Wr.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);)Bd(i),i.blockedOn===null&&Yi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var d=i[s],g=i[s+1],M=d[Lt]||null;if(typeof g=="function")M||kd(i);else if(M){var k=null;if(g&&g.hasAttribute("formAction")){if(d=g,M=g[Lt]||null)k=M.formAction;else if(wo(d)!==null)continue}else k=M.action;typeof k=="function"?i[s+1]=k:(i.splice(s,3),s-=3),kd(i)}}}function Hd(){function e(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(M){return d=M})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,d=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),d!==null&&(d(),d=null)}}}function Eo(e){this._internalRoot=e}ca.prototype.render=Eo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));var i=t.current,s=Pt();Ld(i,s,e,t,null,null)},ca.prototype.unmount=Eo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ld(e.current,2,null,e,null,null),$n(),t[gs]=null}};function ca(e){this._internalRoot=e}ca.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wo();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&&Bd(e)}};var zd=K.version;if(zd!=="19.2.4")throw Error(P(527,zd,"19.2.4"));U.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=f(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var yv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ha=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ha.isDisabled&&ha.supportsFiber)try{xt=ha.inject(yv),tt=ha}catch{}}return Yr.createRoot=function(e,t){if(!ee(e))throw Error(P(299));var i=!1,s="",d=$h,g=qh,M=Wh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(g=t.onCaughtError),t.onRecoverableError!==void 0&&(M=t.onRecoverableError)),t=xd(e,1,!1,null,null,i,s,null,d,g,M,Hd),e[gs]=t.current,no(e),new Eo(t)},Yr.hydrateRoot=function(e,t,i){if(!ee(e))throw Error(P(299));var s=!1,d="",g=$h,M=qh,k=Wh,W=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(M=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=xd(e,1,!0,t,i??null,s,d,W,g,M,k,Hd),t.context=Ed(null),i=t.current,s=Pt(),s=_a(s),d=ki(s),d.callback=null,Hi(i,d,s),i=s,t.current.lanes=i,rr(t,i),oi(t),e[gs]=t.current,no(e),new ca(t)},Yr.version="19.2.4",Yr}var Gd;function Tv(){if(Gd)return Ao.exports;Gd=1;function j(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(K){console.error(K)}}return j(),Ao.exports=Dv(),Ao.exports}var Bv=Tv();const Ov=768,kv=1e3;function Kr(){const K=window.location.pathname.match(/^(\/project\/[^/]+\/)/);return K?K[1]:"/"}function _s(j){const K=Kr(),Y=j.startsWith("/")?j.slice(1):j;return K+Y}function vs(){const j=localStorage.getItem("codev-web-key");return j?{Authorization:`Bearer ${j}`}:{}}async function Hv(){const j=await fetch(_s("api/state"),{headers:vs()});if(!j.ok)throw new Error(`Failed to fetch state: ${j.status}`);return j.json()}async function zv(){const j=await fetch(_s("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...vs()}});if(!j.ok)throw new Error(await j.text());return j.json()}async function tf(j,K){const Y=await fetch(_s("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...vs()},body:JSON.stringify({path:j,line:K})});if(!Y.ok)throw new Error(await Y.text());return Y.json()}async function Nv(j){const K=await fetch(_s(`api/tabs/${j}`),{method:"DELETE",headers:vs()});if(!K.ok)throw new Error(await K.text())}async function Uv(){const j=await fetch(_s("api/files"),{headers:vs()});if(!j.ok)throw new Error(`Failed to fetch files: ${j.status}`);return j.json()}function Xd(j){return j.terminalId?`${Kr()}ws/terminal/${j.terminalId}`:null}async function Iv(){const j=await fetch(_s("api/git/status"),{headers:vs()});if(!j.ok)throw new Error(`Failed to fetch git status: ${j.status}`);return j.json()}async function Pv(){const j=await fetch(_s("api/files/recent"),{headers:vs()});if(!j.ok)throw new Error(`Failed to fetch recent files: ${j.status}`);return j.json()}function Fv(){const[j,K]=Ae.useState(null),[Y,P]=Ae.useState(null),ee=Ae.useCallback(async()=>{try{const ne=await Hv();K(ne),P(null)}catch(ne){P(ne.message)}},[]);return Ae.useEffect(()=>{ee();const ne=setInterval(ee,kv);return()=>clearInterval(ne)},[ee]),{state:j,error:Y,refresh:ee}}function jv(j){const K=[{id:"dashboard",type:"dashboard",label:"Dashboard",closable:!1}];j!=null&&j.architect&&K.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:j.architect.terminalId});for(const Y of(j==null?void 0:j.builders)??[])K.push({id:Y.id,type:"builder",label:Y.name||`Builder ${Y.id}`,closable:!0,projectId:Y.id,terminalId:Y.terminalId});for(const Y of(j==null?void 0:j.utils)??[])!Y.terminalId&&(!Y.pid||Y.pid===0)||K.push({id:Y.id,type:"shell",label:Y.name||`Shell ${Y.id}`,closable:!0,utilId:Y.id,terminalId:Y.terminalId});for(const Y of(j==null?void 0:j.annotations)??[]){const P=Y.file.split("/").pop()??Y.file;K.push({id:Y.id,type:"file",label:P,closable:!0,annotationId:Y.id,filePath:Y.file})}return K}function $v(j){const[K,Y]=Ae.useState("dashboard"),P=Ae.useRef(null),ee=Ae.useRef(!1),ne=jv(j);Ae.useEffect(()=>{if(ee.current||j===null)return;const f=new URLSearchParams(window.location.search).get("tab");if(f){const v=ne.find(a=>a.id===f||a.type===f);if(v){Y(v.id),ee.current=!0;const a=new URL(window.location.href);a.searchParams.delete("tab"),window.history.replaceState({},"",a.toString())}}else ee.current=!0},[ne,j]),Ae.useEffect(()=>{const u=new Set(ne.map(f=>f.id));if(P.current===null){j!==null&&(P.current=u);return}for(const f of ne)!P.current.has(f.id)&&f.type!=="architect"&&Y(f.id);P.current=u},[ne.map(u=>u.id).join(","),j!==null]);const F=Ae.useCallback(u=>{Y(u)},[]),n=ne.find(u=>u.id===K)??ne[0];return{tabs:ne,activeTab:n,activeTabId:K,selectTab:F}}function qv(j){const[K,Y]=Ae.useState(()=>typeof window<"u"?window.matchMedia(j).matches:!1);return Ae.useEffect(()=>{const P=window.matchMedia(j),ee=ne=>Y(ne.matches);return P.addEventListener("change",ee),Y(P.matches),()=>P.removeEventListener("change",ee)},[j]),K}function Wv({left:j,right:K,defaultSplit:Y=50}){const[P,ee]=Ae.useState(Y),ne=Ae.useRef(null),F=Ae.useRef(!1),n=Ae.useCallback(u=>{u.preventDefault(),F.current=!0;const f=a=>{if(!F.current||!ne.current)return;const p=ne.current.getBoundingClientRect(),w=(a.clientX-p.left)/p.width*100;ee(Math.max(20,Math.min(80,w)))},v=()=>{F.current=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",v)},[]);return Z.jsxs("div",{ref:ne,className:"split-pane",children:[Z.jsx("div",{className:"split-left",style:{width:`${P}%`},children:j}),Z.jsx("div",{className:"split-handle",onMouseDown:n,role:"separator","aria-label":"Resize panels"}),Z.jsx("div",{className:"split-right",style:{width:`${100-P}%`},children:K})]})}function sf({tabs:j,activeTabId:K,onSelectTab:Y,onRefresh:P}){const ee=async(ne,F)=>{ne.stopPropagation();try{await Nv(F.id),P()}catch(n){console.error("Failed to close tab:",n)}};return Z.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:j.map(ne=>Z.jsxs("button",{role:"tab","aria-selected":ne.id===K,className:`tab ${ne.id===K?"tab-active":""}`,onClick:()=>Y(ne.id),title:ne.label,children:[Z.jsx("span",{className:"tab-label",children:ne.label}),ne.closable&&Z.jsx("span",{className:"tab-close",onClick:F=>ee(F,ne),role:"button","aria-label":`Close ${ne.label}`,tabIndex:0,onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),ee(F,ne))},children:"×"})]},ne.id))})}var Bo={exports:{}},Vd;function Gv(){return Vd||(Vd=1,(function(j,K){(function(Y,P){j.exports=P()})(globalThis,(()=>(()=>{var Y={4567:function(F,n,u){var f=this&&this.__decorate||function(o,l,S,x){var _,C=arguments.length,m=C<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var y=o.length-1;y>=0;y--)(_=o[y])&&(m=(C<3?_(m):C>3?_(l,S,m):_(l,S))||m);return C>3&&m&&Object.defineProperty(l,S,m),m},v=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const a=u(9042),p=u(9924),w=u(844),b=u(4725),c=u(2585),r=u(3656);let h=n.AccessibilityManager=class extends w.Disposable{constructor(o,l,S,x){super(),this._terminal=o,this._coreBrowserService=S,this._renderService=x,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 _=0;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);if(this._topBoundaryFocusListener=_=>this._handleBoundaryFocus(_,0),this._bottomBoundaryFocusListener=_=>this._handleBoundaryFocus(_,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 p.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((_=>this._handleResize(_.rows)))),this.register(this._terminal.onRender((_=>this._refreshRows(_.start,_.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((_=>this._handleChar(_)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
50
+ `)))),this.register(this._terminal.onA11yTab((_=>this._handleTab(_)))),this.register(this._terminal.onKey((_=>this._handleKey(_.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,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let l=0;l<o;l++)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+=a.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,l){this._liveRegionDebouncer.refresh(o,l,this._terminal.rows)}_renderRows(o,l){const S=this._terminal.buffer,x=S.lines.length.toString();for(let _=o;_<=l;_++){const C=S.lines.get(S.ydisp+_),m=[],y=(C==null?void 0:C.translateToString(!0,void 0,void 0,m))||"",E=(S.ydisp+_+1).toString(),A=this._rowElements[_];A&&(y.length===0?(A.innerText=" ",this._rowColumns.set(A,[0,1])):(A.textContent=y,this._rowColumns.set(A,m)),A.setAttribute("aria-posinset",E),A.setAttribute("aria-setsize",x))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,l){const S=o.target,x=this._rowElements[l===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==x)return;let _,C;if(l===0?(_=S,C=this._rowElements.pop(),this._rowContainer.removeChild(C)):(_=this._rowElements.shift(),C=S,this._rowContainer.removeChild(_)),_.removeEventListener("focus",this._topBoundaryFocusListener),C.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const m=this._createAccessibilityTreeNode();this._rowElements.unshift(m),this._rowContainer.insertAdjacentElement("afterbegin",m)}else{const m=this._createAccessibilityTreeNode();this._rowElements.push(m),this._rowContainer.appendChild(m)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var y;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 l={node:o.anchorNode,offset:o.anchorOffset},S={node:o.focusNode,offset:o.focusOffset};if((l.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===S.node&&l.offset>S.offset)&&([l,S]=[S,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const x=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(x)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:x,offset:((y=x.textContent)==null?void 0:y.length)??0}),!this._rowContainer.contains(S.node))return;const _=({node:E,offset:A})=>{const L=E instanceof Text?E.parentNode:E;let D=parseInt(L==null?void 0:L.getAttribute("aria-posinset"),10)-1;if(isNaN(D))return console.warn("row is invalid. Race condition?"),null;const O=this._rowColumns.get(L);if(!O)return console.warn("columns is null. Race condition?"),null;let $=A<O.length?O[A]:O.slice(-1)[0]+1;return $>=this._terminal.cols&&(++D,$=0),{row:D,column:$}},C=_(l),m=_(S);if(C&&m){if(C.row>m.row||C.row===m.row&&C.column>=m.column)throw new Error("invalid range");this._terminal.select(C.column,C.row,(m.row-C.row)*this._terminal.cols-C.column+m.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);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=f([v(1,c.IInstantiationService),v(2,b.ICoreBrowserService),v(3,b.IRenderService)],h)},3614:(F,n)=>{function u(p){return p.replace(/\r?\n/g,"\r")}function f(p,w){return w?"\x1B[200~"+p+"\x1B[201~":p}function v(p,w,b,c){p=f(p=u(p),b.decPrivateModes.bracketedPasteMode&&c.rawOptions.ignoreBracketedPasteMode!==!0),b.triggerDataEvent(p,!0),w.value=""}function a(p,w,b){const c=b.getBoundingClientRect(),r=p.clientX-c.left-10,h=p.clientY-c.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${r}px`,w.style.top=`${h}px`,w.style.zIndex="1000",w.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=u,n.bracketTextForPaste=f,n.copyHandler=function(p,w){p.clipboardData&&p.clipboardData.setData("text/plain",w.selectionText),p.preventDefault()},n.handlePasteEvent=function(p,w,b,c){p.stopPropagation(),p.clipboardData&&v(p.clipboardData.getData("text/plain"),w,b,c)},n.paste=v,n.moveTextAreaUnderMouseCursor=a,n.rightClickHandler=function(p,w,b,c,r){a(p,w,b),r&&c.rightClickSelect(p),w.value=c.selectionText,w.select()}},7239:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const f=u(1505);n.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(v,a,p){this._css.set(v,a,p)}getCss(v,a){return this._css.get(v,a)}setColor(v,a,p){this._color.set(v,a,p)}getColor(v,a){return this._color.get(v,a)}clear(){this._color.clear(),this._css.clear()}}},3656:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,v,a){u.addEventListener(f,v,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,v,a))}}}},3551:function(F,n,u){var f=this&&this.__decorate||function(h,o,l,S){var x,_=arguments.length,C=_<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(C=(_<3?x(C):_>3?x(o,l,C):x(o,l))||C);return _>3&&C&&Object.defineProperty(o,l,C),C},v=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const a=u(3656),p=u(8460),w=u(844),b=u(2585),c=u(4725);let r=n.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(h,o,l,S,x){super(),this._element=h,this._mouseService=o,this._renderService=l,this._bufferService=S,this._linkProviderService=x,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var _;this._lastMouseEvent=void 0,(_=this._activeProviderReplies)==null||_.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,a.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,a.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,a.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 l=h.composedPath();for(let S=0;S<l.length;S++){const x=l[S];if(x.classList.contains("xterm"))break;if(x.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 S,x;this._activeProviderReplies&&o||((S=this._activeProviderReplies)==null||S.forEach((_=>{_==null||_.forEach((C=>{C.link.dispose&&C.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let l=!1;for(const[_,C]of this._linkProviderService.linkProviders.entries())o?(x=this._activeProviderReplies)!=null&&x.get(_)&&(l=this._checkLinkProviderResult(_,h,l)):C.provideLinks(h.y,(m=>{var E,A;if(this._isMouseOut)return;const y=m==null?void 0:m.map((L=>({link:L})));(E=this._activeProviderReplies)==null||E.set(_,y),l=this._checkLinkProviderResult(_,h,l),((A=this._activeProviderReplies)==null?void 0:A.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,o){const l=new Set;for(let S=0;S<o.size;S++){const x=o.get(S);if(x)for(let _=0;_<x.length;_++){const C=x[_],m=C.link.range.start.y<h?0:C.link.range.start.x,y=C.link.range.end.y>h?this._bufferService.cols:C.link.range.end.x;for(let E=m;E<=y;E++){if(l.has(E)){x.splice(_--,1);break}l.add(E)}}}}_checkLinkProviderResult(h,o,l){var _;if(!this._activeProviderReplies)return l;const S=this._activeProviderReplies.get(h);let x=!1;for(let C=0;C<h;C++)this._activeProviderReplies.has(C)&&!this._activeProviderReplies.get(C)||(x=!0);if(!x&&S){const C=S.find((m=>this._linkAtPosition(m.link,o)));C&&(l=!0,this._handleNewLink(C))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let C=0;C<this._activeProviderReplies.size;C++){const m=(_=this._activeProviderReplies.get(C))==null?void 0:_.find((y=>this._linkAtPosition(y.link,o)));if(m){l=!0,this._handleNewLink(m);break}}return l}_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,w.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 l,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.pointerCursor},set:l=>{var S;(S=this._currentLink)!=null&&S.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.underline},set:l=>{var S,x,_;(S=this._currentLink)!=null&&S.state&&((_=(x=this._currentLink)==null?void 0:x.state)==null?void 0:_.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const S=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,x=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=x&&(this._clearCurrentLink(S,x),this._lastMouseEvent)){const _=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);_&&this._askForLink(_,!1)}}))))}_linkHover(h,o,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(l,o.text)}_fireUnderlineEvent(h,o){const l=h.range,S=this._bufferService.buffer.ydisp,x=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-S-1,l.end.x,l.end.y-S-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(x)}_linkLeave(h,o,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(l,o.text)}_linkAtPosition(h,o){const l=h.range.start.y*this._bufferService.cols+h.range.start.x,S=h.range.end.y*this._bufferService.cols+h.range.end.x,x=o.y*this._bufferService.cols+o.x;return l<=x&&x<=S}_positionFromMouseEvent(h,o,l){const S=l.getCoords(h,o,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,o,l,S,x){return{x1:h,y1:o,x2:l,y2:S,cols:this._bufferService.cols,fg:x}}};n.Linkifier=r=f([v(1,c.IMouseService),v(2,c.IRenderService),v(3,b.IBufferService),v(4,c.ILinkProviderService)],r)},9042:(F,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(F,n,u){var f=this&&this.__decorate||function(c,r,h,o){var l,S=arguments.length,x=S<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var _=c.length-1;_>=0;_--)(l=c[_])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},v=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const a=u(511),p=u(2585);let w=n.OscLinkProvider=class{constructor(c,r,h){this._bufferService=c,this._optionsService=r,this._oscLinkService=h}provideLinks(c,r){var y;const h=this._bufferService.buffer.lines.get(c-1);if(!h)return void r(void 0);const o=[],l=this._optionsService.rawOptions.linkHandler,S=new a.CellData,x=h.getTrimmedLength();let _=-1,C=-1,m=!1;for(let E=0;E<x;E++)if(C!==-1||h.hasContent(E)){if(h.loadCell(E,S),S.hasExtendedAttrs()&&S.extended.urlId){if(C===-1){C=E,_=S.extended.urlId;continue}m=S.extended.urlId!==_}else C!==-1&&(m=!0);if(m||C!==-1&&E===x-1){const A=(y=this._oscLinkService.getLinkData(_))==null?void 0:y.uri;if(A){const L={start:{x:C+1,y:c},end:{x:E+(m||E!==x-1?0:1),y:c}};let D=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const O=new URL(A);["http:","https:"].includes(O.protocol)||(D=!0)}catch{D=!0}D||o.push({text:A,range:L,activate:(O,$)=>l?l.activate(O,$,L):b(0,$),hover:(O,$)=>{var N;return(N=l==null?void 0:l.hover)==null?void 0:N.call(l,O,$,L)},leave:(O,$)=>{var N;return(N=l==null?void 0:l.leave)==null?void 0:N.call(l,O,$,L)}})}m=!1,S.hasExtendedAttrs()&&S.extended.urlId?(C=E,_=S.extended.urlId):(C=-1,_=-1)}}r(o)}};function b(c,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=f([v(0,p.IBufferService),v(1,p.IOptionsService),v(2,p.IOscLinkService)],y)},6193:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,f,v){this._rowCount=v,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const f=u(3614),v=u(3656),a=u(3551),p=u(9042),y=u(3730),b=u(1680),c=u(3107),r=u(5744),h=u(2950),o=u(1296),l=u(428),m=u(4269),x=u(5114),_=u(8934),w=u(3230),S=u(9312),C=u(4725),L=u(6731),A=u(8055),E=u(8969),D=u(8460),O=u(844),$=u(6114),N=u(8437),U=u(2584),I=u(7399),R=u(5941),B=u(9074),T=u(2585),H=u(5435),G=u(4567),V=u(779);class ue extends E.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(q={}){super(q),this.browser=$,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new O.MutableDisposable),this._onCursorMove=this.register(new D.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new D.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new D.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new D.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new D.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new D.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new D.EventEmitter),this._onBlur=this.register(new D.EventEmitter),this._onA11yCharEmitter=this.register(new D.EventEmitter),this._onA11yTabEmitter=this.register(new D.EventEmitter),this._onWillOpen=this.register(new D.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(T.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(V.LinkProviderService),this._instantiationService.setService(C.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((z,se)=>this.refresh(z,se)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((z=>this._reportWindowsOptions(z)))),this.register(this._inputHandler.onColor((z=>this._handleColorEvent(z)))),this.register((0,D.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,D.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,D.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,D.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((z=>this._afterResize(z.cols,z.rows)))),this.register((0,O.toDisposable)((()=>{var z,se;this._customKeyEventHandler=void 0,(se=(z=this.element)==null?void 0:z.parentNode)==null||se.removeChild(this.element)})))}_handleColorEvent(q){if(this._themeService)for(const z of q){let se,ie="";switch(z.index){case 256:se="foreground",ie="10";break;case 257:se="background",ie="11";break;case 258:se="cursor",ie="12";break;default:se="ansi",ie="4;"+z.index}switch(z.type){case 0:const ve=A.color.toColorRGB(se==="ansi"?this._themeService.colors.ansi[z.index]:this._themeService.colors[se]);this.coreService.triggerDataEvent(`${U.C0.ESC}]${ie};${(0,R.toRgbString)(ve)}${U.C1_ESCAPED.ST}`);break;case 1:if(se==="ansi")this._themeService.modifyColors((fe=>fe.ansi[z.index]=A.channels.toColor(...z.color)));else{const fe=se;this._themeService.modifyColors((Ee=>Ee[fe]=A.channels.toColor(...z.color)))}break;case 2:this._themeService.restoreColor(z.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(q){q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(U.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var q;return(q=this.textarea)==null?void 0:q.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(U.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 q=this.buffer.ybase+this.buffer.y,z=this.buffer.lines.get(q);if(!z)return;const se=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,ve=z.getWidth(se),fe=this._renderService.dimensions.css.cell.width*ve,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,_e=se*this._renderService.dimensions.css.cell.width;this.textarea.style.left=_e+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(z=>{this.hasSelection()&&(0,f.copyHandler)(z,this._selectionService)})));const q=z=>(0,f.handlePasteEvent)(z,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",q)),this.register((0,v.addDisposableDomListener)(this.element,"paste",q)),$.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(z=>{z.button===2&&(0,f.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(z=>{(0,f.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),$.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(z=>{z.button===1&&(0,f.moveTextAreaUnderMouseCursor)(z,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(q=>this._keyUp(q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(q=>this._keyDown(q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(q=>this._keyPress(q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(q=>this._compositionHelper.compositionupdate(q)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(q=>this._inputEvent(q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(q){var se;if(!q)throw new Error("Terminal requires a parent element.");if(q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((se=this.element)==null?void 0:se.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=q.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"),q.appendChild(this.element);const z=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),z.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",(ie=>this.updateCursorStyle(ie)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),z.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),$.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(x.CoreBrowserService,this.textarea,q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(C.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(ie=>this._handleTextAreaFocus(ie)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(C.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(C.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(m.CharacterJoinerService),this._instantiationService.setService(C.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(C.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ie=>this._onRender.fire(ie)))),this.onResize((ie=>this._renderService.resize(ie.cols,ie.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(_.MouseService),this._instantiationService.setService(C.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(a.Linkifier,this.screenElement)),this.element.appendChild(z);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((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(S.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(C.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ie=>this._renderService.handleSelectionChanged(ie.start,ie.end,ie.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ie=>{this.textarea.value=ie,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ie=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(ie=>this._selectionService.handleMouseDown(ie)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ie=>this._handleScreenReaderModeOptionChange(ie)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ie=>{!this._overviewRulerRenderer&&ie&&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 q=this,z=this.element;function se(fe){const Ee=q._mouseService.getMouseReportCoords(fe,q.screenElement);if(!Ee)return!1;let _e,Oe;switch(fe.overrideType||fe.type){case"mousemove":Oe=32,fe.buttons===void 0?(_e=3,fe.button!==void 0&&(_e=fe.button<3?fe.button:3)):_e=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Oe=0,_e=fe.button<3?fe.button:3;break;case"mousedown":Oe=1,_e=fe.button<3?fe.button:3;break;case"wheel":if(q._customWheelEventHandler&&q._customWheelEventHandler(fe)===!1||q.viewport.getLinesScrolled(fe)===0)return!1;Oe=fe.deltaY<0?0:1,_e=4;break;default:return!1}return!(Oe===void 0||_e===void 0||_e>4)&&q.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:_e,action:Oe,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:fe=>(se(fe),fe.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(fe)),wheel:fe=>(se(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&se(fe)},mousemove:fe=>{fe.buttons||se(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?ie.mousemove||(z.addEventListener("mousemove",ve.mousemove),ie.mousemove=ve.mousemove):(z.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&fe?ie.wheel||(z.addEventListener("wheel",ve.wheel,{passive:!1}),ie.wheel=ve.wheel):(z.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&fe?ie.mouseup||(ie.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&fe?ie.mousedrag||(ie.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(z,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return se(fe),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(fe)}))),this.register((0,v.addDisposableDomListener)(z,"wheel",(fe=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(fe);if(Ee===0)return;const _e=U.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Oe="";for(let qe=0;qe<Math.abs(Ee);qe++)Oe+=_e;return this.coreService.triggerDataEvent(Oe,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(z,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(z,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(q,z){var se;(se=this._renderService)==null||se.refreshRows(q,z)}updateCursorStyle(q){var z;(z=this._selectionService)!=null&&z.shouldColumnSelect(q)?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(q,z,se=0){var ie;se===1?(super.scrollLines(q,z,se),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(q)}paste(q){(0,f.paste)(q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(q){this._customKeyEventHandler=q}attachCustomWheelEventHandler(q){this._customWheelEventHandler=q}registerLinkProvider(q){return this._linkProviderService.registerLinkProvider(q)}registerCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const z=this._characterJoinerService.register(q);return this.refresh(0,this.rows-1),z}deregisterCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+q)}registerDecoration(q){return this._decorationService.registerDecoration(q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(q,z,se){this._selectionService.setSelection(q,z,se)}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 q;(q=this._selectionService)==null||q.clearSelection()}selectAll(){var q;(q=this._selectionService)==null||q.selectAll()}selectLines(q,z){var se;(se=this._selectionService)==null||se.selectLines(q,z)}_keyDown(q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;const z=this.browser.isMac&&this.options.macOptionIsMeta&&q.altKey;if(!z&&!this._compositionHelper.keydown(q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;z||q.key!=="Dead"&&q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const se=(0,I.evaluateKeyboardEvent)(q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(q),se.type===3||se.type===2){const ie=this.rows-1;return this.scrollLines(se.type===2?-ie:ie),this.cancel(q,!0)}return se.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,q)||(se.cancel&&this.cancel(q,!0),!se.key||!!(q.key&&!q.ctrlKey&&!q.altKey&&!q.metaKey&&q.key.length===1&&q.key.charCodeAt(0)>=65&&q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(se.key!==U.C0.ETX&&se.key!==U.C0.CR||(this.textarea.value=""),this._onKey.fire({key:se.key,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(se.key,!0),!this.optionsService.rawOptions.screenReaderMode||q.altKey||q.ctrlKey?this.cancel(q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(q,z){const se=q.isMac&&!this.options.macOptionIsMeta&&z.altKey&&!z.ctrlKey&&!z.metaKey||q.isWindows&&z.altKey&&z.ctrlKey&&!z.metaKey||q.isWindows&&z.getModifierState("AltGraph");return z.type==="keypress"?se:se&&(!z.keyCode||z.keyCode>47)}_keyUp(q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1||((function(z){return z.keyCode===16||z.keyCode===17||z.keyCode===18})(q)||this.focus(),this.updateCursorStyle(q),this._keyPressHandled=!1)}_keyPress(q){let z;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;if(this.cancel(q),q.charCode)z=q.charCode;else if(q.which===null||q.which===void 0)z=q.keyCode;else{if(q.which===0||q.charCode===0)return!1;z=q.which}return!(!z||(q.altKey||q.ctrlKey||q.metaKey)&&!this._isThirdLevelShift(this.browser,q)||(z=String.fromCharCode(z),this._onKey.fire({key:z,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(z,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(q){if(q.data&&q.inputType==="insertText"&&(!q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const z=q.data;return this.coreService.triggerDataEvent(z,!0),this.cancel(q),!0}return!1}resize(q,z){q!==this.cols||z!==this.rows?super.resize(q,z):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(q,z){var se,ie;(se=this._charSizeService)==null||se.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var q;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 z=1;z<this.rows;z++)this.buffer.lines.push(this.buffer.getBlankLine(N.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(q=this.viewport)==null||q.reset(),this.refresh(0,this.rows-1)}}reset(){var z,se;this.options.rows=this.rows,this.options.cols=this.cols;const q=this._customKeyEventHandler;this._setup(),super.reset(),(z=this._selectionService)==null||z.reset(),this._decorationService.reset(),(se=this.viewport)==null||se.reset(),this._customKeyEventHandler=q,this.refresh(0,this.rows-1)}clearTextureAtlas(){var q;(q=this._renderService)==null||q.clearTextureAtlas()}_reportFocus(){var q;(q=this.element)!=null&&q.classList.contains("focus")?this.coreService.triggerDataEvent(U.C0.ESC+"[I"):this.coreService.triggerDataEvent(U.C0.ESC+"[O")}_reportWindowsOptions(q){if(this._renderService)switch(q){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const z=this._renderService.dimensions.css.canvas.width.toFixed(0),se=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${U.C0.ESC}[4;${se};${z}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),ve=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${U.C0.ESC}[6;${ve};${ie}t`)}}cancel(q,z){if(this.options.cancelEvents||z)return q.preventDefault(),q.stopPropagation(),!1}}n.Terminal=ue},9924:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(u,f=1e3){this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,f,v){this._rowCount=v,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const a=Date.now();if(a-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=a,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=a-this._lastRefreshMs,y=this._debounceThresholdMS-p;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 u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}}},1680:function(F,n,u){var f=this&&this.__decorate||function(h,o,l,m){var x,_=arguments.length,w=_<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,l):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,l,m);else for(var S=h.length-1;S>=0;S--)(x=h[S])&&(w=(_<3?x(w):_>3?x(o,l,w):x(o,l))||w);return _>3&&w&&Object.defineProperty(o,l,w),w},v=this&&this.__param||function(h,o){return function(l,m){o(l,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const a=u(3656),p=u(4725),y=u(8460),b=u(844),c=u(2585);let r=n.Viewport=class extends b.Disposable{constructor(h,o,l,m,x,_,w,S){super(),this._viewportElement=h,this._scrollArea=o,this._bufferService=l,this._optionsService=m,this._charSizeService=x,this._renderService=_,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,a.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((C=>this._activeBuffer=C.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((C=>this._renderDimensions=C))),this._handleThemeChange(S.colors),this.register(S.onChangeColors((C=>this._handleThemeChange(C)))),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 l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&l<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 S;let l,m="";const x=[],_=o??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let C=h;C<_;C++){const L=w.get(C);if(!L)continue;const A=(S=w.get(C+1))==null?void 0:S.isWrapped;if(m+=L.translateToString(!A),!A||C===w.length-1){const E=document.createElement("div");E.textContent=m,x.push(E),m.length>0&&(l=E),m=""}}return{bufferElements:x,cursorElement:l}}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 l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&o.altKey||l==="ctrl"&&o.ctrlKey||l==="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=f([v(2,c.IBufferService),v(3,c.IOptionsService),v(4,p.ICharSizeService),v(5,p.IRenderService),v(6,p.ICoreBrowserService),v(7,p.IThemeService)],r)},3107:function(F,n,u){var f=this&&this.__decorate||function(c,r,h,o){var l,m=arguments.length,x=m<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var _=c.length-1;_>=0;_--)(l=c[_])&&(x=(m<3?l(x):m>3?l(r,h,x):l(r,h))||x);return m>3&&x&&Object.defineProperty(r,h,x),x},v=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const a=u(4725),p=u(844),y=u(2585);let b=n.BufferDecorationRenderer=class extends p.Disposable{constructor(c,r,h,o,l){super(),this._screenElement=c,this._bufferService=r,this._coreBrowserService=h,this._decorationService=o,this._renderService=l,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((m=>this._removeDecoration(m)))),this.register((0,p.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 c of this._decorationService.decorations)this._renderDecoration(c);this._dimensionsChanged=!1}_renderDecoration(c){this._refreshStyle(c),this._dimensionsChanged&&this._refreshXPosition(c)}_createElement(c){var o;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((o=c==null?void 0:c.options)==null?void 0:o.layer)==="top"),r.style.width=`${Math.round((c.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(c.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(c.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=c.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(c,r),r}_refreshStyle(c){const r=c.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)c.element&&(c.element.style.display="none",c.onRenderEmitter.fire(c.element));else{let h=this._decorationElements.get(c);h||(h=this._createElement(c),c.element=h,this._decorationElements.set(c,h),this._container.appendChild(h),c.onDispose((()=>{this._decorationElements.delete(c),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",c.onRenderEmitter.fire(h)}}_refreshXPosition(c,r=c.element){if(!r)return;const h=c.options.x??0;(c.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(c){var r;(r=this._decorationElements.get(c))==null||r.remove(),this._decorationElements.delete(c),c.dispose()}};n.BufferDecorationRenderer=b=f([v(1,y.IBufferService),v(2,a.ICoreBrowserService),v(3,y.IDecorationService),v(4,a.IRenderService)],b)},5871:(F,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(u){if(u.options.overviewRulerOptions){for(const f of this._zones)if(f.color===u.options.overviewRulerOptions.color&&f.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,u.marker.line))return;if(this._lineAdjacentToZone(f,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(f,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,f){return f>=u.startBufferLine&&f<=u.endBufferLine}_lineAdjacentToZone(u,f,v){return f>=u.startBufferLine-this._linePadding[v||"full"]&&f<=u.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(u,f){u.startBufferLine=Math.min(u.startBufferLine,f),u.endBufferLine=Math.max(u.endBufferLine,f)}}},5744:function(F,n,u){var f=this&&this.__decorate||function(l,m,x,_){var w,S=arguments.length,C=S<3?m:_===null?_=Object.getOwnPropertyDescriptor(m,x):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,m,x,_);else for(var L=l.length-1;L>=0;L--)(w=l[L])&&(C=(S<3?w(C):S>3?w(m,x,C):w(m,x))||C);return S>3&&C&&Object.defineProperty(m,x,C),C},v=this&&this.__param||function(l,m){return function(x,_){m(x,_,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const a=u(5871),p=u(4725),y=u(844),b=u(2585),c={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(l,m,x,_,w,S,C){var A;super(),this._viewportElement=l,this._screenElement=m,this._bufferService=x,this._decorationService=_,this._renderService=w,this._optionsService=S,this._coreBrowserService=C,this._colorZoneStore=new a.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(),(A=this._viewportElement.parentElement)==null||A.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 E;(E=this._canvas)==null||E.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 l=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=l,r.center=m,r.right=l,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);c.left=m,c.center=m,c.right=m}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.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 m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const m of l)m.position!=="full"&&this._renderColorZone(m);for(const m of l)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(h[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-c[l.position||"full"]/2),r[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[l.position||"full"]))}_queueRefresh(l,m){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=o=f([v(2,b.IBufferService),v(3,b.IDecorationService),v(4,p.IRenderService),v(5,b.IOptionsService),v(6,p.ICoreBrowserService)],o)},2950:function(F,n,u){var f=this&&this.__decorate||function(c,r,h,o){var l,m=arguments.length,x=m<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var _=c.length-1;_>=0;_--)(l=c[_])&&(x=(m<3?l(x):m>3?l(r,h,x):l(r,h))||x);return m>3&&x&&Object.defineProperty(r,h,x),x},v=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const a=u(4725),p=u(2585),y=u(2584);let b=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(c,r,h,o,l,m){this._textarea=c,this._compositionView=r,this._bufferService=h,this._optionsService=o,this._coreService=l,this._renderService=m,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(c){this._compositionView.textContent=c.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(c){if(this._isComposing||this._isSendingComposition){if(c.keyCode===229||c.keyCode===16||c.keyCode===17||c.keyCode===18)return!1;this._finalizeComposition(!1)}return c.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(c){if(this._compositionView.classList.remove("active"),this._isComposing=!1,c){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 c=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(c,"");this._dataAlreadySent=h,r.length>c.length?this._coreService.triggerDataEvent(h,!0):r.length<c.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):r.length===c.length&&r!==c&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(c){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,l=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"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 m=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(m.width,1)+"px",this._textarea.style.height=Math.max(m.height,1)+"px",this._textarea.style.lineHeight=m.height+"px"}c||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=b=f([v(2,p.IBufferService),v(3,p.IOptionsService),v(4,p.ICoreService),v(5,a.IRenderService)],b)},9806:(F,n)=>{function u(f,v,a){const p=a.getBoundingClientRect(),y=f.getComputedStyle(a),b=parseInt(y.getPropertyValue("padding-left")),c=parseInt(y.getPropertyValue("padding-top"));return[v.clientX-p.left-b,v.clientY-p.top-c]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=u,n.getCoords=function(f,v,a,p,y,b,c,r,h){if(!b)return;const o=u(f,v,a);return o?(o[0]=Math.ceil((o[0]+(h?c/2:0))/c),o[1]=Math.ceil(o[1]/r),o[0]=Math.min(Math.max(o[0],1),p+(h?1:0)),o[1]=Math.min(Math.max(o[1],1),y),o):void 0}},9504:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const f=u(2584);function v(r,h,o,l){const m=r-a(r,o),x=h-a(h,o),_=Math.abs(m-x)-(function(w,S,C){let L=0;const A=w-a(w,C),E=S-a(S,C);for(let D=0;D<Math.abs(A-E);D++){const O=p(w,S)==="A"?-1:1,$=C.buffer.lines.get(A+O*D);$!=null&&$.isWrapped&&L++}return L})(r,h,o);return c(_,b(p(r,h),l))}function a(r,h){let o=0,l=h.buffer.lines.get(r),m=l==null?void 0:l.isWrapped;for(;m&&r>=0&&r<h.rows;)o++,l=h.buffer.lines.get(--r),m=l==null?void 0:l.isWrapped;return o}function p(r,h){return r>h?"A":"B"}function y(r,h,o,l,m,x){let _=r,w=h,S="";for(;_!==o||w!==l;)_+=m?1:-1,m&&_>x.cols-1?(S+=x.buffer.translateBufferLineToString(w,!1,r,_),_=0,r=0,w++):!m&&_<0&&(S+=x.buffer.translateBufferLineToString(w,!1,0,r+1),_=x.cols-1,r=_,w--);return S+x.buffer.translateBufferLineToString(w,!1,r,_)}function b(r,h){const o=h?"O":"[";return f.C0.ESC+o+r}function c(r,h){r=Math.floor(r);let o="";for(let l=0;l<r;l++)o+=h;return o}n.moveToCellSequence=function(r,h,o,l){const m=o.buffer.x,x=o.buffer.y;if(!o.buffer.hasScrollback)return(function(S,C,L,A,E,D){return v(C,A,E,D).length===0?"":c(y(S,C,S,C-a(C,E),!1,E).length,b("D",D))})(m,x,0,h,o,l)+v(x,h,o,l)+(function(S,C,L,A,E,D){let O;O=v(C,A,E,D).length>0?A-a(A,E):C;const $=A,N=(function(U,I,R,B,T,H){let G;return G=v(R,B,T,H).length>0?B-a(B,T):I,U<R&&G<=B||U>=R&&G<B?"C":"D"})(S,C,L,A,E,D);return c(y(S,O,L,$,N==="C",E).length,b(N,D))})(m,x,r,h,o,l);let _;if(x===h)return _=m>r?"D":"C",c(Math.abs(m-r),b(_,l));_=x>h?"D":"C";const w=Math.abs(x-h);return c((function(S,C){return C.cols-S})(x>h?r:m,o)+(w-1)*o.cols+1+((x>h?m:r)-1),b(_,l))}},1296:function(F,n,u){var f=this&&this.__decorate||function(D,O,$,N){var U,I=arguments.length,R=I<3?O:N===null?N=Object.getOwnPropertyDescriptor(O,$):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(D,O,$,N);else for(var B=D.length-1;B>=0;B--)(U=D[B])&&(R=(I<3?U(R):I>3?U(O,$,R):U(O,$))||R);return I>3&&R&&Object.defineProperty(O,$,R),R},v=this&&this.__param||function(D,O){return function($,N){O($,N,D)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const a=u(3787),p=u(2550),y=u(2223),b=u(6171),c=u(6052),r=u(4725),h=u(8055),o=u(8460),l=u(844),m=u(2585),x="xterm-dom-renderer-owner-",_="xterm-rows",w="xterm-fg-",S="xterm-bg-",C="xterm-focus",L="xterm-selection";let A=1,E=n.DomRenderer=class extends l.Disposable{constructor(D,O,$,N,U,I,R,B,T,H,G,V,ue){super(),this._terminal=D,this._document=O,this._element=$,this._screenElement=N,this._viewportElement=U,this._helperContainer=I,this._linkifier2=R,this._charSizeService=T,this._optionsService=H,this._bufferService=G,this._coreBrowserService=V,this._themeService=ue,this._terminalClass=A++,this._rowElements=[],this._selectionRenderModel=(0,c.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(_),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((de=>this._injectCss(de)))),this._injectCss(this._themeService.colors),this._rowFactory=B.createInstance(a.DomRendererRowFactory,document),this._element.classList.add(x+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((de=>this._handleLinkHover(de)))),this.register(this._linkifier2.onHideLinkUnderline((de=>this._handleLinkLeave(de)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(x+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.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 D=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*D,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*D),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/D),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/D),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const $ of this._rowElements)$.style.width=`${this.dimensions.css.canvas.width}px`,$.style.height=`${this.dimensions.css.cell.height}px`,$.style.lineHeight=`${this.dimensions.css.cell.height}px`,$.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const O=`${this._terminalSelector} .${_} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=O,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(D){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let O=`${this._terminalSelector} .${_} { color: ${D.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;O+=`${this._terminalSelector} .${_} .xterm-dim { color: ${h.color.multiplyOpacity(D.foreground,.5).css};}`,O+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const $=`blink_underline_${this._terminalClass}`,N=`blink_bar_${this._terminalClass}`,U=`blink_block_${this._terminalClass}`;O+=`@keyframes ${$} { 50% { border-bottom-style: hidden; }}`,O+=`@keyframes ${N} { 50% { box-shadow: none; }}`,O+=`@keyframes ${U} { 0% { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css}; } 50% { background-color: inherit; color: ${D.cursor.css}; }}`,O+=`${this._terminalSelector} .${_}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${_}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${N} 1s step-end infinite;}${this._terminalSelector} .${_}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-block { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css};}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${D.cursor.css} !important; color: ${D.cursorAccent.css} !important;}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${D.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${D.cursor.css} inset;}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${D.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,O+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${D.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${D.selectionInactiveBackgroundOpaque.css};}`;for(const[I,R]of D.ansi.entries())O+=`${this._terminalSelector} .${w}${I} { color: ${R.css}; }${this._terminalSelector} .${w}${I}.xterm-dim { color: ${h.color.multiplyOpacity(R,.5).css}; }${this._terminalSelector} .${S}${I} { background-color: ${R.css}; }`;O+=`${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(D.background).css}; }${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(D.background),.5).css}; }${this._terminalSelector} .${S}${y.INVERTED_DEFAULT_COLOR} { background-color: ${D.foreground.css}; }`,this._themeStyleElement.textContent=O}_setDefaultSpacing(){const D=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${D}px`,this._rowFactory.defaultSpacing=D}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(D,O){for(let $=this._rowElements.length;$<=O;$++){const N=this._document.createElement("div");this._rowContainer.appendChild(N),this._rowElements.push(N)}for(;this._rowElements.length>O;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(D,O){this._refreshRowElements(D,O),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(C),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(C),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(D,O,$){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(D,O,$),this.renderRows(0,this._bufferService.rows-1),!D||!O)return;this._selectionRenderModel.update(this._terminal,D,O,$);const N=this._selectionRenderModel.viewportStartRow,U=this._selectionRenderModel.viewportEndRow,I=this._selectionRenderModel.viewportCappedStartRow,R=this._selectionRenderModel.viewportCappedEndRow;if(I>=this._bufferService.rows||R<0)return;const B=this._document.createDocumentFragment();if($){const T=D[0]>O[0];B.appendChild(this._createSelectionElement(I,T?O[0]:D[0],T?D[0]:O[0],R-I+1))}else{const T=N===I?D[0]:0,H=I===U?O[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(I,T,H));const G=R-I-1;if(B.appendChild(this._createSelectionElement(I+1,0,this._bufferService.cols,G)),I!==R){const V=U===R?O[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(R,0,V))}}this._selectionContainer.appendChild(B)}_createSelectionElement(D,O,$,N=1){const U=this._document.createElement("div"),I=O*this.dimensions.css.cell.width;let R=this.dimensions.css.cell.width*($-O);return I+R>this.dimensions.css.canvas.width&&(R=this.dimensions.css.canvas.width-I),U.style.height=N*this.dimensions.css.cell.height+"px",U.style.top=D*this.dimensions.css.cell.height+"px",U.style.left=`${I}px`,U.style.width=`${R}px`,U}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 D of this._rowElements)D.replaceChildren()}renderRows(D,O){const $=this._bufferService.buffer,N=$.ybase+$.y,U=Math.min($.x,this._bufferService.cols-1),I=this._optionsService.rawOptions.cursorBlink,R=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let T=D;T<=O;T++){const H=T+$.ydisp,G=this._rowElements[T],V=$.lines.get(H);if(!G||!V)break;G.replaceChildren(...this._rowFactory.createRow(V,H,H===N,R,B,U,I,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${x}${this._terminalClass}`}_handleLinkHover(D){this._setCellUnderline(D.x1,D.x2,D.y1,D.y2,D.cols,!0)}_handleLinkLeave(D){this._setCellUnderline(D.x1,D.x2,D.y1,D.y2,D.cols,!1)}_setCellUnderline(D,O,$,N,U,I){$<0&&(D=0),N<0&&(O=0);const R=this._bufferService.rows-1;$=Math.max(Math.min($,R),0),N=Math.max(Math.min(N,R),0),U=Math.min(U,this._bufferService.cols);const B=this._bufferService.buffer,T=B.ybase+B.y,H=Math.min(B.x,U-1),G=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,ue=this._optionsService.rawOptions.cursorInactiveStyle;for(let de=$;de<=N;++de){const q=de+B.ydisp,z=this._rowElements[de],se=B.lines.get(q);if(!z||!se)break;z.replaceChildren(...this._rowFactory.createRow(se,q,q===T,V,ue,H,G,this.dimensions.css.cell.width,this._widthCache,I?de===$?D:0:-1,I?(de===N?O:U)-1:-1))}}};n.DomRenderer=E=f([v(7,m.IInstantiationService),v(8,r.ICharSizeService),v(9,m.IOptionsService),v(10,m.IBufferService),v(11,r.ICoreBrowserService),v(12,r.IThemeService)],E)},3787:function(F,n,u){var f=this&&this.__decorate||function(_,w,S,C){var L,A=arguments.length,E=A<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,S):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(_,w,S,C);else for(var D=_.length-1;D>=0;D--)(L=_[D])&&(E=(A<3?L(E):A>3?L(w,S,E):L(w,S))||E);return A>3&&E&&Object.defineProperty(w,S,E),E},v=this&&this.__param||function(_,w){return function(S,C){w(S,C,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const a=u(2223),p=u(643),y=u(511),b=u(2585),c=u(8055),r=u(4725),h=u(4269),o=u(6171),l=u(3734);let m=n.DomRendererRowFactory=class{constructor(_,w,S,C,L,A,E){this._document=_,this._characterJoinerService=w,this._optionsService=S,this._coreBrowserService=C,this._coreService=L,this._decorationService=A,this._themeService=E,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(_,w,S){this._selectionStart=_,this._selectionEnd=w,this._columnSelectMode=S}createRow(_,w,S,C,L,A,E,D,O,$,N){const U=[],I=this._characterJoinerService.getJoinedCharacters(w),R=this._themeService.colors;let B,T=_.getNoBgTrimmedLength();S&&T<A+1&&(T=A+1);let H=0,G="",V=0,ue=0,de=0,q=!1,z=0,se=!1,ie=0;const ve=[],fe=$!==-1&&N!==-1;for(let Ee=0;Ee<T;Ee++){_.loadCell(Ee,this._workCell);let _e=this._workCell.getWidth();if(_e===0)continue;let Oe=!1,qe=Ee,be=this._workCell;if(I.length>0&&Ee===I[0][0]){Oe=!0;const xe=I.shift();be=new h.JoinedCellData(this._workCell,_.translateToString(!0,xe[0],xe[1]),xe[1]-xe[0]),qe=xe[1]-1,_e=be.getWidth()}const ft=this._isCellInSelection(Ee,w),Ot=S&&Ee===A,Se=fe&&Ee>=$&&Ee<=N;let pe=!1;this._decorationService.forEachDecorationAtCell(Ee,w,void 0,(xe=>{pe=!0}));let me=be.getChars()||p.WHITESPACE_CELL_CHAR;if(me===" "&&(be.isUnderline()||be.isOverline())&&(me=" "),ie=_e*D-O.get(me,be.isBold(),be.isItalic()),B){if(H&&(ft&&se||!ft&&!se&&be.bg===V)&&(ft&&se&&R.selectionForeground||be.fg===ue)&&be.extended.ext===de&&Se===q&&ie===z&&!Ot&&!Oe&&!pe){be.isInvisible()?G+=p.WHITESPACE_CELL_CHAR:G+=me,H++;continue}H&&(B.textContent=G),B=this._document.createElement("span"),H=0,G=""}else B=this._document.createElement("span");if(V=be.bg,ue=be.fg,de=be.extended.ext,q=Se,z=ie,se=ft,Oe&&A>=Ee&&A<=qe&&(A=Ee),!this._coreService.isCursorHidden&&Ot&&this._coreService.isCursorInitialized){if(ve.push("xterm-cursor"),this._coreBrowserService.isFocused)E&&ve.push("xterm-cursor-blink"),ve.push(C==="bar"?"xterm-cursor-bar":C==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":ve.push("xterm-cursor-outline");break;case"block":ve.push("xterm-cursor-block");break;case"bar":ve.push("xterm-cursor-bar");break;case"underline":ve.push("xterm-cursor-underline")}}if(be.isBold()&&ve.push("xterm-bold"),be.isItalic()&&ve.push("xterm-italic"),be.isDim()&&ve.push("xterm-dim"),G=be.isInvisible()?p.WHITESPACE_CELL_CHAR:be.getChars()||p.WHITESPACE_CELL_CHAR,be.isUnderline()&&(ve.push(`xterm-underline-${be.extended.underlineStyle}`),G===" "&&(G=" "),!be.isUnderlineColorDefault()))if(be.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(be.getUnderlineColor()).join(",")})`;else{let xe=be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&be.isBold()&&xe<8&&(xe+=8),B.style.textDecorationColor=R.ansi[xe].css}be.isOverline()&&(ve.push("xterm-overline"),G===" "&&(G=" ")),be.isStrikethrough()&&ve.push("xterm-strikethrough"),Se&&(B.style.textDecoration="underline");let ce=be.getFgColor(),ge=be.getFgColorMode(),ze=be.getBgColor(),Ae=be.getBgColorMode();const _t=!!be.isInverse();if(_t){const xe=ce;ce=ze,ze=xe;const xt=ge;ge=Ae,Ae=xt}let Qe,it,Ie,Me=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,w,void 0,(xe=>{xe.options.layer!=="top"&&Me||(xe.backgroundColorRGB&&(Ae=50331648,ze=xe.backgroundColorRGB.rgba>>8&16777215,Qe=xe.backgroundColorRGB),xe.foregroundColorRGB&&(ge=50331648,ce=xe.foregroundColorRGB.rgba>>8&16777215,it=xe.foregroundColorRGB),Me=xe.options.layer==="top")})),!Me&&ft&&(Qe=this._coreBrowserService.isFocused?R.selectionBackgroundOpaque:R.selectionInactiveBackgroundOpaque,ze=Qe.rgba>>8&16777215,Ae=50331648,Me=!0,R.selectionForeground&&(ge=50331648,ce=R.selectionForeground.rgba>>8&16777215,it=R.selectionForeground)),Me&&ve.push("xterm-decoration-top"),Ae){case 16777216:case 33554432:Ie=R.ansi[ze],ve.push(`xterm-bg-${ze}`);break;case 50331648:Ie=c.channels.toColor(ze>>16,ze>>8&255,255&ze),this._addStyle(B,`background-color:#${x((ze>>>0).toString(16),"0",6)}`);break;default:_t?(Ie=R.foreground,ve.push(`xterm-bg-${a.INVERTED_DEFAULT_COLOR}`)):Ie=R.background}switch(Qe||be.isDim()&&(Qe=c.color.multiplyOpacity(Ie,.5)),ge){case 16777216:case 33554432:be.isBold()&&ce<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ce+=8),this._applyMinimumContrast(B,Ie,R.ansi[ce],be,Qe,void 0)||ve.push(`xterm-fg-${ce}`);break;case 50331648:const xe=c.channels.toColor(ce>>16&255,ce>>8&255,255&ce);this._applyMinimumContrast(B,Ie,xe,be,Qe,it)||this._addStyle(B,`color:#${x(ce.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Ie,R.foreground,be,Qe,it)||_t&&ve.push(`xterm-fg-${a.INVERTED_DEFAULT_COLOR}`)}ve.length&&(B.className=ve.join(" "),ve.length=0),Ot||Oe||pe?B.textContent=G:H++,ie!==this.defaultSpacing&&(B.style.letterSpacing=`${ie}px`),U.push(B),Ee=qe}return B&&H&&(B.textContent=G),U}_applyMinimumContrast(_,w,S,C,L,A){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(C.getCode()))return!1;const E=this._getContrastCache(C);let D;if(L||A||(D=E.getColor(w.rgba,S.rgba)),D===void 0){const O=this._optionsService.rawOptions.minimumContrastRatio/(C.isDim()?2:1);D=c.color.ensureContrastRatio(L||w,A||S,O),E.setColor((L||w).rgba,(A||S).rgba,D??null)}return!!D&&(this._addStyle(_,`color:${D.css}`),!0)}_getContrastCache(_){return _.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(_,w){_.setAttribute("style",`${_.getAttribute("style")||""}${w};`)}_isCellInSelection(_,w){const S=this._selectionStart,C=this._selectionEnd;return!(!S||!C)&&(this._columnSelectMode?S[0]<=C[0]?_>=S[0]&&w>=S[1]&&_<C[0]&&w<=C[1]:_<S[0]&&w>=S[1]&&_>=C[0]&&w<=C[1]:w>S[1]&&w<C[1]||S[1]===C[1]&&w===S[1]&&_>=S[0]&&_<C[0]||S[1]<C[1]&&w===C[1]&&_<C[0]||S[1]<C[1]&&w===S[1]&&_>=S[0])}};function x(_,w,S){for(;_.length<S;)_=w+_;return _}n.DomRendererRowFactory=m=f([v(1,r.ICharacterJoinerService),v(2,b.IOptionsService),v(3,r.ICoreBrowserService),v(4,b.ICoreService),v(5,b.IDecorationService),v(6,r.IThemeService)],m)},2550:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(u,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const v=u.createElement("span");v.classList.add("xterm-char-measure-element");const a=u.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontWeight="bold";const p=u.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const y=u.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[v,a,p,y],this._container.appendChild(v),this._container.appendChild(a),this._container.appendChild(p),this._container.appendChild(y),f.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,f,v,a){u===this._font&&f===this._fontSize&&v===this._weight&&a===this._weightBold||(this._font=u,this._fontSize=f,this._weight=v,this._weightBold=a,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${a}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${a}`,this.clear())}get(u,f,v){let a=0;if(!f&&!v&&u.length===1&&(a=u.charCodeAt(0))<256){if(this._flat[a]!==-9999)return this._flat[a];const b=this._measure(u,0);return b>0&&(this._flat[a]=b),b}let p=u;f&&(p+="B"),v&&(p+="I");let y=this._holey.get(p);if(y===void 0){let b=0;f&&(b|=1),v&&(b|=2),y=this._measure(u,b),y>0&&this._holey.set(p,y)}return y}_measure(u,f){const v=this._measureElements[f];return v.textContent=u.repeat(32),v.offsetWidth/32}}},2223:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(F,n)=>{function u(v){return 57508<=v&&v<=57558}function f(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=u,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=f,n.allowRescaling=function(v,a,p,y){return a===1&&p>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!f(v)&&!u(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(a){return 9472<=a&&a<=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,a,p=0){return(v-(2*Math.round(a)-p))%(2*Math.round(a))}},6052:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,a,p,y=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const b=v.buffers.active.ydisp,c=a[1]-b,r=p[1]-b,h=Math.max(c,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(v,a,p){return!!this.hasSelection&&(p-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},456:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(F,n,u){var f=this&&this.__decorate||function(o,l,m,x){var _,w=arguments.length,S=w<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,m):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(o,l,m,x);else for(var C=o.length-1;C>=0;C--)(_=o[C])&&(S=(w<3?_(S):w>3?_(l,m,S):_(l,m))||S);return w>3&&S&&Object.defineProperty(l,m,S),S},v=this&&this.__param||function(o,l){return function(m,x){l(m,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const a=u(2585),p=u(8460),y=u(844);let b=n.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,l,m){super(),this._optionsService=m,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(o,l,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=f([v(2,a.IOptionsService)],b);class c extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,m){l!==void 0&&l>0&&m!==void 0&&m>0&&(this._result.width=l,this._result.height=m)}}class r extends c{constructor(l,m,x){super(),this._document=l,this._parentElement=m,this._optionsService=x,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 c{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const m=this._ctx.measureText("W");if(!("width"in m&&"fontBoundingBoxAscent"in m&&"fontBoundingBoxDescent"in m))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(F,n,u){var f=this&&this.__decorate||function(h,o,l,m){var x,_=arguments.length,w=_<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,l):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,l,m);else for(var S=h.length-1;S>=0;S--)(x=h[S])&&(w=(_<3?x(w):_>3?x(o,l,w):x(o,l))||w);return _>3&&w&&Object.defineProperty(o,l,w),w},v=this&&this.__param||function(h,o){return function(l,m){o(l,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(3734),p=u(643),y=u(511),b=u(2585);class c extends a.AttributeData{constructor(o,l,m){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=m}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=c;let r=n.CharacterJoinerService=class tf{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const m=[],x=l.translateToString(!0);let _=0,w=0,S=0,C=l.getFg(0),L=l.getBg(0);for(let A=0;A<l.getTrimmedLength();A++)if(l.loadCell(A,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(A-_>1){const E=this._getJoinedRanges(x,S,w,l,_);for(let D=0;D<E.length;D++)m.push(E[D])}_=A,S=w,C=this._workCell.fg,L=this._workCell.bg}w+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-_>1){const A=this._getJoinedRanges(x,S,w,l,_);for(let E=0;E<A.length;E++)m.push(A[E])}return m}_getJoinedRanges(o,l,m,x,_){const w=o.substring(l,m);let S=[];try{S=this._characterJoiners[0].handler(w)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(w);for(let A=0;A<L.length;A++)tf._mergeRanges(S,L[A])}catch(L){console.error(L)}return this._stringRangesToCellRanges(S,x,_),S}_stringRangesToCellRanges(o,l,m){let x=0,_=!1,w=0,S=o[x];if(S){for(let C=m;C<this._bufferService.cols;C++){const L=l.getWidth(C),A=l.getString(C).length||p.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!_&&S[0]<=w&&(S[0]=C,_=!0),S[1]<=w){if(S[1]=C,S=o[++x],!S)break;S[0]<=w?(S[0]=C,_=!0):_=!1}w+=A}}S&&(S[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let m=!1;for(let x=0;x<o.length;x++){const _=o[x];if(m){if(l[1]<=_[0])return o[x-1][1]=l[1],o;if(l[1]<=_[1])return o[x-1][1]=Math.max(l[1],_[1]),o.splice(x,1),o;o.splice(x,1),x--}else{if(l[1]<=_[0])return o.splice(x,0,l),o;if(l[1]<=_[1])return _[0]=Math.min(l[0],_[0]),o;l[0]<_[1]&&(_[0]=Math.min(l[0],_[0]),m=!0)}}return m?o[o.length-1][1]=l[1]:o.push(l),o}};n.CharacterJoinerService=r=f([v(0,b.IBufferService)],r)},5114:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const f=u(844),v=u(8460),a=u(3656);class p extends f.Disposable{constructor(c,r,h){super(),this._textarea=c,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(c){this._window!==c&&(this._window=c,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=p;class y extends f.Disposable{constructor(c){super(),this._parentWindow=c,this._windowResizeListener=this.register(new f.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,f.toDisposable)((()=>this.clearListener())))}setWindow(c){this._parentWindow=c,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,a.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var c;this._outerListener&&((c=this._resolutionMediaMatchList)==null||c.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const f=u(844);class v extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const y=this.linkProviders.indexOf(p);y!==-1&&this.linkProviders.splice(y,1)}}}}n.LinkProviderService=v},8934:function(F,n,u){var f=this&&this.__decorate||function(b,c,r,h){var o,l=arguments.length,m=l<3?c:h===null?h=Object.getOwnPropertyDescriptor(c,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(b,c,r,h);else for(var x=b.length-1;x>=0;x--)(o=b[x])&&(m=(l<3?o(m):l>3?o(c,r,m):o(c,r))||m);return l>3&&m&&Object.defineProperty(c,r,m),m},v=this&&this.__param||function(b,c){return function(r,h){c(r,h,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const a=u(4725),p=u(9806);let y=n.MouseService=class{constructor(b,c){this._renderService=b,this._charSizeService=c}getCoords(b,c,r,h,o){return(0,p.getCoords)(window,b,c,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(b,c){const r=(0,p.getCoordsRelativeToElement)(window,b,c);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=f([v(0,a.IRenderService),v(1,a.ICharSizeService)],y)},3230:function(F,n,u){var f=this&&this.__decorate||function(o,l,m,x){var _,w=arguments.length,S=w<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,m):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(o,l,m,x);else for(var C=o.length-1;C>=0;C--)(_=o[C])&&(S=(w<3?_(S):w>3?_(l,m,S):_(l,m))||S);return w>3&&S&&Object.defineProperty(l,m,S),S},v=this&&this.__param||function(o,l){return function(m,x){l(m,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const a=u(6193),p=u(4725),y=u(8460),b=u(844),c=u(7226),r=u(2585);let h=n.RenderService=class extends b.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,l,m,x,_,w,S,C){super(),this._rowCount=o,this._charSizeService=x,this._renderer=this.register(new b.MutableDisposable),this._pausedResizeTask=new c.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 a.RenderDebouncer(((L,A)=>this._renderRows(L,A)),S),this.register(this._renderDebouncer),this.register(S.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(m.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(_.onDecorationRegistered((()=>this._fullRefresh()))),this.register(_.onDecorationRemoved((()=>this._fullRefresh()))),this.register(m.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(m.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(C.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(S.window,l),this.register(S.onWindowChange((L=>this._registerIntersectionObserver(L,l))))}_registerIntersectionObserver(o,l){if("IntersectionObserver"in o){const m=new o.IntersectionObserver((x=>this._handleIntersectionChange(x[x.length-1])),{threshold:0});m.observe(l),this._observerDisposable.value=(0,b.toDisposable)((()=>m.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,l,m=!1){this._isPaused?this._needsFullRefresh=!0:(m||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,l,this._rowCount))}_renderRows(o,l){this._renderer.value&&(o=Math.min(o,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(o,l),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:l}),this._onRender.fire({start:o,end:l}),this._isNextRenderRedrawOnly=!0)}resize(o,l){this._rowCount=l,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((l=>this.refreshRows(l.start,l.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,l;this._renderer.value&&((l=(o=this._renderer.value).clearTextureAtlas)==null||l.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var m;return(m=this._renderer.value)==null?void 0:m.handleResize(o,l)})):this._renderer.value.handleResize(o,l),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,l,m){var x;this._selectionState.start=o,this._selectionState.end=l,this._selectionState.columnSelectMode=m,(x=this._renderer.value)==null||x.handleSelectionChanged(o,l,m)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};n.RenderService=h=f([v(2,r.IOptionsService),v(3,p.ICharSizeService),v(4,r.IDecorationService),v(5,r.IBufferService),v(6,p.ICoreBrowserService),v(7,p.IThemeService)],h)},9312:function(F,n,u){var f=this&&this.__decorate||function(S,C,L,A){var E,D=arguments.length,O=D<3?C:A===null?A=Object.getOwnPropertyDescriptor(C,L):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(S,C,L,A);else for(var $=S.length-1;$>=0;$--)(E=S[$])&&(O=(D<3?E(O):D>3?E(C,L,O):E(C,L))||O);return D>3&&O&&Object.defineProperty(C,L,O),O},v=this&&this.__param||function(S,C){return function(L,A){C(L,A,S)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const a=u(9806),p=u(9504),y=u(456),b=u(4725),c=u(8460),r=u(844),h=u(6114),o=u(4841),l=u(511),m=u(2585),x=" ",_=new RegExp(x,"g");let w=n.SelectionService=class extends r.Disposable{constructor(S,C,L,A,E,D,O,$,N){super(),this._element=S,this._screenElement=C,this._linkifier=L,this._bufferService=A,this._coreService=E,this._mouseService=D,this._optionsService=O,this._renderService=$,this._coreBrowserService=N,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new c.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new c.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new c.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=U=>this._handleMouseMove(U),this._mouseUpListener=U=>this._handleMouseUp(U),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((U=>this._handleTrim(U))),this.register(this._bufferService.buffers.onBufferActivate((U=>this._handleBufferActivate(U)))),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 S=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;return!(!S||!C||S[0]===C[0]&&S[1]===C[1])}get selectionText(){const S=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;if(!S||!C)return"";const L=this._bufferService.buffer,A=[];if(this._activeSelectionMode===3){if(S[0]===C[0])return"";const E=S[0]<C[0]?S[0]:C[0],D=S[0]<C[0]?C[0]:S[0];for(let O=S[1];O<=C[1];O++){const $=L.translateBufferLineToString(O,!0,E,D);A.push($)}}else{const E=S[1]===C[1]?C[0]:void 0;A.push(L.translateBufferLineToString(S[1],!0,S[0],E));for(let D=S[1]+1;D<=C[1]-1;D++){const O=L.lines.get(D),$=L.translateBufferLineToString(D,!0);O!=null&&O.isWrapped?A[A.length-1]+=$:A.push($)}if(S[1]!==C[1]){const D=L.lines.get(C[1]),O=L.translateBufferLineToString(C[1],!0,0,C[0]);D&&D.isWrapped?A[A.length-1]+=O:A.push(O)}}return A.map((E=>E.replace(_," "))).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=w=f([v(0,p.IBufferService),v(1,p.IOptionsService),v(2,p.IOscLinkService)],w)},6193:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,f,v){this._rowCount=v,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const f=u(3614),v=u(3656),a=u(3551),p=u(9042),w=u(3730),b=u(1680),c=u(3107),r=u(5744),h=u(2950),o=u(1296),l=u(428),S=u(4269),x=u(5114),_=u(8934),C=u(3230),m=u(9312),y=u(4725),E=u(6731),A=u(8055),L=u(8969),D=u(8460),O=u(844),$=u(6114),N=u(8437),U=u(2584),I=u(7399),R=u(5941),B=u(9074),T=u(2585),H=u(5435),G=u(4567),V=u(779);class ue extends L.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(q={}){super(q),this.browser=$,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new O.MutableDisposable),this._onCursorMove=this.register(new D.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new D.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new D.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new D.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new D.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new D.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new D.EventEmitter),this._onBlur=this.register(new D.EventEmitter),this._onA11yCharEmitter=this.register(new D.EventEmitter),this._onA11yTabEmitter=this.register(new D.EventEmitter),this._onWillOpen=this.register(new D.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(T.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(V.LinkProviderService),this._instantiationService.setService(y.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((z,se)=>this.refresh(z,se)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((z=>this._reportWindowsOptions(z)))),this.register(this._inputHandler.onColor((z=>this._handleColorEvent(z)))),this.register((0,D.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,D.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,D.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,D.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((z=>this._afterResize(z.cols,z.rows)))),this.register((0,O.toDisposable)((()=>{var z,se;this._customKeyEventHandler=void 0,(se=(z=this.element)==null?void 0:z.parentNode)==null||se.removeChild(this.element)})))}_handleColorEvent(q){if(this._themeService)for(const z of q){let se,ie="";switch(z.index){case 256:se="foreground",ie="10";break;case 257:se="background",ie="11";break;case 258:se="cursor",ie="12";break;default:se="ansi",ie="4;"+z.index}switch(z.type){case 0:const ve=A.color.toColorRGB(se==="ansi"?this._themeService.colors.ansi[z.index]:this._themeService.colors[se]);this.coreService.triggerDataEvent(`${U.C0.ESC}]${ie};${(0,R.toRgbString)(ve)}${U.C1_ESCAPED.ST}`);break;case 1:if(se==="ansi")this._themeService.modifyColors((fe=>fe.ansi[z.index]=A.channels.toColor(...z.color)));else{const fe=se;this._themeService.modifyColors((Le=>Le[fe]=A.channels.toColor(...z.color)))}break;case 2:this._themeService.restoreColor(z.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(q){q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(U.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var q;return(q=this.textarea)==null?void 0:q.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(U.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 q=this.buffer.ybase+this.buffer.y,z=this.buffer.lines.get(q);if(!z)return;const se=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,ve=z.getWidth(se),fe=this._renderService.dimensions.css.cell.width*ve,Le=this.buffer.y*this._renderService.dimensions.css.cell.height,_e=se*this._renderService.dimensions.css.cell.width;this.textarea.style.left=_e+"px",this.textarea.style.top=Le+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(z=>{this.hasSelection()&&(0,f.copyHandler)(z,this._selectionService)})));const q=z=>(0,f.handlePasteEvent)(z,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",q)),this.register((0,v.addDisposableDomListener)(this.element,"paste",q)),$.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(z=>{z.button===2&&(0,f.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(z=>{(0,f.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),$.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(z=>{z.button===1&&(0,f.moveTextAreaUnderMouseCursor)(z,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(q=>this._keyUp(q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(q=>this._keyDown(q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(q=>this._keyPress(q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(q=>this._compositionHelper.compositionupdate(q)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(q=>this._inputEvent(q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(q){var se;if(!q)throw new Error("Terminal requires a parent element.");if(q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((se=this.element)==null?void 0:se.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=q.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"),q.appendChild(this.element);const z=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),z.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",(ie=>this.updateCursorStyle(ie)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),z.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),$.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(x.CoreBrowserService,this.textarea,q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(y.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(ie=>this._handleTextAreaFocus(ie)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(y.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(E.ThemeService),this._instantiationService.setService(y.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(y.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(C.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(y.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ie=>this._onRender.fire(ie)))),this.onResize((ie=>this._renderService.resize(ie.cols,ie.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(_.MouseService),this._instantiationService.setService(y.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(a.Linkifier,this.screenElement)),this.element.appendChild(z);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((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(m.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(y.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ie=>this._renderService.handleSelectionChanged(ie.start,ie.end,ie.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ie=>{this.textarea.value=ie,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ie=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(ie=>this._selectionService.handleMouseDown(ie)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ie=>this._handleScreenReaderModeOptionChange(ie)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ie=>{!this._overviewRulerRenderer&&ie&&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 q=this,z=this.element;function se(fe){const Le=q._mouseService.getMouseReportCoords(fe,q.screenElement);if(!Le)return!1;let _e,Oe;switch(fe.overrideType||fe.type){case"mousemove":Oe=32,fe.buttons===void 0?(_e=3,fe.button!==void 0&&(_e=fe.button<3?fe.button:3)):_e=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Oe=0,_e=fe.button<3?fe.button:3;break;case"mousedown":Oe=1,_e=fe.button<3?fe.button:3;break;case"wheel":if(q._customWheelEventHandler&&q._customWheelEventHandler(fe)===!1||q.viewport.getLinesScrolled(fe)===0)return!1;Oe=fe.deltaY<0?0:1,_e=4;break;default:return!1}return!(Oe===void 0||_e===void 0||_e>4)&&q.coreMouseService.triggerMouseEvent({col:Le.col,row:Le.row,x:Le.x,y:Le.y,button:_e,action:Oe,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:fe=>(se(fe),fe.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(fe)),wheel:fe=>(se(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&se(fe)},mousemove:fe=>{fe.buttons||se(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?ie.mousemove||(z.addEventListener("mousemove",ve.mousemove),ie.mousemove=ve.mousemove):(z.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&fe?ie.wheel||(z.addEventListener("wheel",ve.wheel,{passive:!1}),ie.wheel=ve.wheel):(z.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&fe?ie.mouseup||(ie.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&fe?ie.mousedrag||(ie.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(z,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return se(fe),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(fe)}))),this.register((0,v.addDisposableDomListener)(z,"wheel",(fe=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Le=this.viewport.getLinesScrolled(fe);if(Le===0)return;const _e=U.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Oe="";for(let qe=0;qe<Math.abs(Le);qe++)Oe+=_e;return this.coreService.triggerDataEvent(Oe,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(z,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(z,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(q,z){var se;(se=this._renderService)==null||se.refreshRows(q,z)}updateCursorStyle(q){var z;(z=this._selectionService)!=null&&z.shouldColumnSelect(q)?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(q,z,se=0){var ie;se===1?(super.scrollLines(q,z,se),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(q)}paste(q){(0,f.paste)(q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(q){this._customKeyEventHandler=q}attachCustomWheelEventHandler(q){this._customWheelEventHandler=q}registerLinkProvider(q){return this._linkProviderService.registerLinkProvider(q)}registerCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const z=this._characterJoinerService.register(q);return this.refresh(0,this.rows-1),z}deregisterCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+q)}registerDecoration(q){return this._decorationService.registerDecoration(q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(q,z,se){this._selectionService.setSelection(q,z,se)}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 q;(q=this._selectionService)==null||q.clearSelection()}selectAll(){var q;(q=this._selectionService)==null||q.selectAll()}selectLines(q,z){var se;(se=this._selectionService)==null||se.selectLines(q,z)}_keyDown(q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;const z=this.browser.isMac&&this.options.macOptionIsMeta&&q.altKey;if(!z&&!this._compositionHelper.keydown(q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;z||q.key!=="Dead"&&q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const se=(0,I.evaluateKeyboardEvent)(q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(q),se.type===3||se.type===2){const ie=this.rows-1;return this.scrollLines(se.type===2?-ie:ie),this.cancel(q,!0)}return se.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,q)||(se.cancel&&this.cancel(q,!0),!se.key||!!(q.key&&!q.ctrlKey&&!q.altKey&&!q.metaKey&&q.key.length===1&&q.key.charCodeAt(0)>=65&&q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(se.key!==U.C0.ETX&&se.key!==U.C0.CR||(this.textarea.value=""),this._onKey.fire({key:se.key,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(se.key,!0),!this.optionsService.rawOptions.screenReaderMode||q.altKey||q.ctrlKey?this.cancel(q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(q,z){const se=q.isMac&&!this.options.macOptionIsMeta&&z.altKey&&!z.ctrlKey&&!z.metaKey||q.isWindows&&z.altKey&&z.ctrlKey&&!z.metaKey||q.isWindows&&z.getModifierState("AltGraph");return z.type==="keypress"?se:se&&(!z.keyCode||z.keyCode>47)}_keyUp(q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1||((function(z){return z.keyCode===16||z.keyCode===17||z.keyCode===18})(q)||this.focus(),this.updateCursorStyle(q),this._keyPressHandled=!1)}_keyPress(q){let z;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;if(this.cancel(q),q.charCode)z=q.charCode;else if(q.which===null||q.which===void 0)z=q.keyCode;else{if(q.which===0||q.charCode===0)return!1;z=q.which}return!(!z||(q.altKey||q.ctrlKey||q.metaKey)&&!this._isThirdLevelShift(this.browser,q)||(z=String.fromCharCode(z),this._onKey.fire({key:z,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(z,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(q){if(q.data&&q.inputType==="insertText"&&(!q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const z=q.data;return this.coreService.triggerDataEvent(z,!0),this.cancel(q),!0}return!1}resize(q,z){q!==this.cols||z!==this.rows?super.resize(q,z):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(q,z){var se,ie;(se=this._charSizeService)==null||se.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var q;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 z=1;z<this.rows;z++)this.buffer.lines.push(this.buffer.getBlankLine(N.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(q=this.viewport)==null||q.reset(),this.refresh(0,this.rows-1)}}reset(){var z,se;this.options.rows=this.rows,this.options.cols=this.cols;const q=this._customKeyEventHandler;this._setup(),super.reset(),(z=this._selectionService)==null||z.reset(),this._decorationService.reset(),(se=this.viewport)==null||se.reset(),this._customKeyEventHandler=q,this.refresh(0,this.rows-1)}clearTextureAtlas(){var q;(q=this._renderService)==null||q.clearTextureAtlas()}_reportFocus(){var q;(q=this.element)!=null&&q.classList.contains("focus")?this.coreService.triggerDataEvent(U.C0.ESC+"[I"):this.coreService.triggerDataEvent(U.C0.ESC+"[O")}_reportWindowsOptions(q){if(this._renderService)switch(q){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const z=this._renderService.dimensions.css.canvas.width.toFixed(0),se=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${U.C0.ESC}[4;${se};${z}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),ve=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${U.C0.ESC}[6;${ve};${ie}t`)}}cancel(q,z){if(this.options.cancelEvents||z)return q.preventDefault(),q.stopPropagation(),!1}}n.Terminal=ue},9924:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(u,f=1e3){this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,f,v){this._rowCount=v,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const a=Date.now();if(a-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=a,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=a-this._lastRefreshMs,w=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}}},1680:function(F,n,u){var f=this&&this.__decorate||function(h,o,l,S){var x,_=arguments.length,C=_<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(C=(_<3?x(C):_>3?x(o,l,C):x(o,l))||C);return _>3&&C&&Object.defineProperty(o,l,C),C},v=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const a=u(3656),p=u(4725),w=u(8460),b=u(844),c=u(2585);let r=n.Viewport=class extends b.Disposable{constructor(h,o,l,S,x,_,C,m){super(),this._viewportElement=h,this._scrollArea=o,this._bufferService=l,this._optionsService=S,this._charSizeService=x,this._renderService=_,this._coreBrowserService=C,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,a.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((y=>this._activeBuffer=y.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((y=>this._renderDimensions=y))),this._handleThemeChange(m.colors),this.register(m.onChangeColors((y=>this._handleThemeChange(y)))),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 l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&l<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 m;let l,S="";const x=[],_=o??this._bufferService.buffer.lines.length,C=this._bufferService.buffer.lines;for(let y=h;y<_;y++){const E=C.get(y);if(!E)continue;const A=(m=C.get(y+1))==null?void 0:m.isWrapped;if(S+=E.translateToString(!A),!A||y===C.length-1){const L=document.createElement("div");L.textContent=S,x.push(L),S.length>0&&(l=L),S=""}}return{bufferElements:x,cursorElement:l}}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 l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&o.altKey||l==="ctrl"&&o.ctrlKey||l==="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=f([v(2,c.IBufferService),v(3,c.IOptionsService),v(4,p.ICharSizeService),v(5,p.IRenderService),v(6,p.ICoreBrowserService),v(7,p.IThemeService)],r)},3107:function(F,n,u){var f=this&&this.__decorate||function(c,r,h,o){var l,S=arguments.length,x=S<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var _=c.length-1;_>=0;_--)(l=c[_])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},v=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const a=u(4725),p=u(844),w=u(2585);let b=n.BufferDecorationRenderer=class extends p.Disposable{constructor(c,r,h,o,l){super(),this._screenElement=c,this._bufferService=r,this._coreBrowserService=h,this._decorationService=o,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((S=>this._removeDecoration(S)))),this.register((0,p.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 c of this._decorationService.decorations)this._renderDecoration(c);this._dimensionsChanged=!1}_renderDecoration(c){this._refreshStyle(c),this._dimensionsChanged&&this._refreshXPosition(c)}_createElement(c){var o;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((o=c==null?void 0:c.options)==null?void 0:o.layer)==="top"),r.style.width=`${Math.round((c.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(c.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(c.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=c.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(c,r),r}_refreshStyle(c){const r=c.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)c.element&&(c.element.style.display="none",c.onRenderEmitter.fire(c.element));else{let h=this._decorationElements.get(c);h||(h=this._createElement(c),c.element=h,this._decorationElements.set(c,h),this._container.appendChild(h),c.onDispose((()=>{this._decorationElements.delete(c),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",c.onRenderEmitter.fire(h)}}_refreshXPosition(c,r=c.element){if(!r)return;const h=c.options.x??0;(c.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(c){var r;(r=this._decorationElements.get(c))==null||r.remove(),this._decorationElements.delete(c),c.dispose()}};n.BufferDecorationRenderer=b=f([v(1,w.IBufferService),v(2,a.ICoreBrowserService),v(3,w.IDecorationService),v(4,a.IRenderService)],b)},5871:(F,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(u){if(u.options.overviewRulerOptions){for(const f of this._zones)if(f.color===u.options.overviewRulerOptions.color&&f.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,u.marker.line))return;if(this._lineAdjacentToZone(f,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(f,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,f){return f>=u.startBufferLine&&f<=u.endBufferLine}_lineAdjacentToZone(u,f,v){return f>=u.startBufferLine-this._linePadding[v||"full"]&&f<=u.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(u,f){u.startBufferLine=Math.min(u.startBufferLine,f),u.endBufferLine=Math.max(u.endBufferLine,f)}}},5744:function(F,n,u){var f=this&&this.__decorate||function(l,S,x,_){var C,m=arguments.length,y=m<3?S:_===null?_=Object.getOwnPropertyDescriptor(S,x):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(l,S,x,_);else for(var E=l.length-1;E>=0;E--)(C=l[E])&&(y=(m<3?C(y):m>3?C(S,x,y):C(S,x))||y);return m>3&&y&&Object.defineProperty(S,x,y),y},v=this&&this.__param||function(l,S){return function(x,_){S(x,_,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const a=u(5871),p=u(4725),w=u(844),b=u(2585),c={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 w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,S,x,_,C,m,y){var A;super(),this._viewportElement=l,this._screenElement=S,this._bufferService=x,this._decorationService=_,this._renderService=C,this._optionsService=m,this._coreBrowserService=y,this._colorZoneStore=new a.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(),(A=this._viewportElement.parentElement)==null||A.insertBefore(this._canvas,this._viewportElement);const E=this._canvas.getContext("2d");if(!E)throw new Error("Ctx cannot be null");this._ctx=E,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var L;(L=this._canvas)==null||L.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 l=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=l,r.center=S,r.right=l,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);c.left=S,c.center=S,c.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const S of l)S.position!=="full"&&this._renderColorZone(S);for(const S of l)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(h[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-c[l.position||"full"]/2),r[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[l.position||"full"]))}_queueRefresh(l,S){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=o=f([v(2,b.IBufferService),v(3,b.IDecorationService),v(4,p.IRenderService),v(5,b.IOptionsService),v(6,p.ICoreBrowserService)],o)},2950:function(F,n,u){var f=this&&this.__decorate||function(c,r,h,o){var l,S=arguments.length,x=S<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var _=c.length-1;_>=0;_--)(l=c[_])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},v=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const a=u(4725),p=u(2585),w=u(2584);let b=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(c,r,h,o,l,S){this._textarea=c,this._compositionView=r,this._bufferService=h,this._optionsService=o,this._coreService=l,this._renderService=S,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(c){this._compositionView.textContent=c.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(c){if(this._isComposing||this._isSendingComposition){if(c.keyCode===229||c.keyCode===16||c.keyCode===17||c.keyCode===18)return!1;this._finalizeComposition(!1)}return c.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(c){if(this._compositionView.classList.remove("active"),this._isComposing=!1,c){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 c=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(c,"");this._dataAlreadySent=h,r.length>c.length?this._coreService.triggerDataEvent(h,!0):r.length<c.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):r.length===c.length&&r!==c&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(c){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,l=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"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 S=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(S.width,1)+"px",this._textarea.style.height=Math.max(S.height,1)+"px",this._textarea.style.lineHeight=S.height+"px"}c||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=b=f([v(2,p.IBufferService),v(3,p.IOptionsService),v(4,p.ICoreService),v(5,a.IRenderService)],b)},9806:(F,n)=>{function u(f,v,a){const p=a.getBoundingClientRect(),w=f.getComputedStyle(a),b=parseInt(w.getPropertyValue("padding-left")),c=parseInt(w.getPropertyValue("padding-top"));return[v.clientX-p.left-b,v.clientY-p.top-c]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=u,n.getCoords=function(f,v,a,p,w,b,c,r,h){if(!b)return;const o=u(f,v,a);return o?(o[0]=Math.ceil((o[0]+(h?c/2:0))/c),o[1]=Math.ceil(o[1]/r),o[0]=Math.min(Math.max(o[0],1),p+(h?1:0)),o[1]=Math.min(Math.max(o[1],1),w),o):void 0}},9504:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const f=u(2584);function v(r,h,o,l){const S=r-a(r,o),x=h-a(h,o),_=Math.abs(S-x)-(function(C,m,y){let E=0;const A=C-a(C,y),L=m-a(m,y);for(let D=0;D<Math.abs(A-L);D++){const O=p(C,m)==="A"?-1:1,$=y.buffer.lines.get(A+O*D);$!=null&&$.isWrapped&&E++}return E})(r,h,o);return c(_,b(p(r,h),l))}function a(r,h){let o=0,l=h.buffer.lines.get(r),S=l==null?void 0:l.isWrapped;for(;S&&r>=0&&r<h.rows;)o++,l=h.buffer.lines.get(--r),S=l==null?void 0:l.isWrapped;return o}function p(r,h){return r>h?"A":"B"}function w(r,h,o,l,S,x){let _=r,C=h,m="";for(;_!==o||C!==l;)_+=S?1:-1,S&&_>x.cols-1?(m+=x.buffer.translateBufferLineToString(C,!1,r,_),_=0,r=0,C++):!S&&_<0&&(m+=x.buffer.translateBufferLineToString(C,!1,0,r+1),_=x.cols-1,r=_,C--);return m+x.buffer.translateBufferLineToString(C,!1,r,_)}function b(r,h){const o=h?"O":"[";return f.C0.ESC+o+r}function c(r,h){r=Math.floor(r);let o="";for(let l=0;l<r;l++)o+=h;return o}n.moveToCellSequence=function(r,h,o,l){const S=o.buffer.x,x=o.buffer.y;if(!o.buffer.hasScrollback)return(function(m,y,E,A,L,D){return v(y,A,L,D).length===0?"":c(w(m,y,m,y-a(y,L),!1,L).length,b("D",D))})(S,x,0,h,o,l)+v(x,h,o,l)+(function(m,y,E,A,L,D){let O;O=v(y,A,L,D).length>0?A-a(A,L):y;const $=A,N=(function(U,I,R,B,T,H){let G;return G=v(R,B,T,H).length>0?B-a(B,T):I,U<R&&G<=B||U>=R&&G<B?"C":"D"})(m,y,E,A,L,D);return c(w(m,O,E,$,N==="C",L).length,b(N,D))})(S,x,r,h,o,l);let _;if(x===h)return _=S>r?"D":"C",c(Math.abs(S-r),b(_,l));_=x>h?"D":"C";const C=Math.abs(x-h);return c((function(m,y){return y.cols-m})(x>h?r:S,o)+(C-1)*o.cols+1+((x>h?S:r)-1),b(_,l))}},1296:function(F,n,u){var f=this&&this.__decorate||function(D,O,$,N){var U,I=arguments.length,R=I<3?O:N===null?N=Object.getOwnPropertyDescriptor(O,$):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(D,O,$,N);else for(var B=D.length-1;B>=0;B--)(U=D[B])&&(R=(I<3?U(R):I>3?U(O,$,R):U(O,$))||R);return I>3&&R&&Object.defineProperty(O,$,R),R},v=this&&this.__param||function(D,O){return function($,N){O($,N,D)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const a=u(3787),p=u(2550),w=u(2223),b=u(6171),c=u(6052),r=u(4725),h=u(8055),o=u(8460),l=u(844),S=u(2585),x="xterm-dom-renderer-owner-",_="xterm-rows",C="xterm-fg-",m="xterm-bg-",y="xterm-focus",E="xterm-selection";let A=1,L=n.DomRenderer=class extends l.Disposable{constructor(D,O,$,N,U,I,R,B,T,H,G,V,ue){super(),this._terminal=D,this._document=O,this._element=$,this._screenElement=N,this._viewportElement=U,this._helperContainer=I,this._linkifier2=R,this._charSizeService=T,this._optionsService=H,this._bufferService=G,this._coreBrowserService=V,this._themeService=ue,this._terminalClass=A++,this._rowElements=[],this._selectionRenderModel=(0,c.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(_),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(E),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((de=>this._injectCss(de)))),this._injectCss(this._themeService.colors),this._rowFactory=B.createInstance(a.DomRendererRowFactory,document),this._element.classList.add(x+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((de=>this._handleLinkHover(de)))),this.register(this._linkifier2.onHideLinkUnderline((de=>this._handleLinkLeave(de)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(x+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.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 D=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*D,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*D),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/D),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/D),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const $ of this._rowElements)$.style.width=`${this.dimensions.css.canvas.width}px`,$.style.height=`${this.dimensions.css.cell.height}px`,$.style.lineHeight=`${this.dimensions.css.cell.height}px`,$.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const O=`${this._terminalSelector} .${_} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=O,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(D){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let O=`${this._terminalSelector} .${_} { color: ${D.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;O+=`${this._terminalSelector} .${_} .xterm-dim { color: ${h.color.multiplyOpacity(D.foreground,.5).css};}`,O+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const $=`blink_underline_${this._terminalClass}`,N=`blink_bar_${this._terminalClass}`,U=`blink_block_${this._terminalClass}`;O+=`@keyframes ${$} { 50% { border-bottom-style: hidden; }}`,O+=`@keyframes ${N} { 50% { box-shadow: none; }}`,O+=`@keyframes ${U} { 0% { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css}; } 50% { background-color: inherit; color: ${D.cursor.css}; }}`,O+=`${this._terminalSelector} .${_}.${y} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${_}.${y} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${N} 1s step-end infinite;}${this._terminalSelector} .${_}.${y} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-block { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css};}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${D.cursor.css} !important; color: ${D.cursorAccent.css} !important;}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${D.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${D.cursor.css} inset;}${this._terminalSelector} .${_} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${D.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,O+=`${this._terminalSelector} .${E} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${E} div { position: absolute; background-color: ${D.selectionBackgroundOpaque.css};}${this._terminalSelector} .${E} div { position: absolute; background-color: ${D.selectionInactiveBackgroundOpaque.css};}`;for(const[I,R]of D.ansi.entries())O+=`${this._terminalSelector} .${C}${I} { color: ${R.css}; }${this._terminalSelector} .${C}${I}.xterm-dim { color: ${h.color.multiplyOpacity(R,.5).css}; }${this._terminalSelector} .${m}${I} { background-color: ${R.css}; }`;O+=`${this._terminalSelector} .${C}${w.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(D.background).css}; }${this._terminalSelector} .${C}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(D.background),.5).css}; }${this._terminalSelector} .${m}${w.INVERTED_DEFAULT_COLOR} { background-color: ${D.foreground.css}; }`,this._themeStyleElement.textContent=O}_setDefaultSpacing(){const D=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${D}px`,this._rowFactory.defaultSpacing=D}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(D,O){for(let $=this._rowElements.length;$<=O;$++){const N=this._document.createElement("div");this._rowContainer.appendChild(N),this._rowElements.push(N)}for(;this._rowElements.length>O;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(D,O){this._refreshRowElements(D,O),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(y),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(y),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(D,O,$){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(D,O,$),this.renderRows(0,this._bufferService.rows-1),!D||!O)return;this._selectionRenderModel.update(this._terminal,D,O,$);const N=this._selectionRenderModel.viewportStartRow,U=this._selectionRenderModel.viewportEndRow,I=this._selectionRenderModel.viewportCappedStartRow,R=this._selectionRenderModel.viewportCappedEndRow;if(I>=this._bufferService.rows||R<0)return;const B=this._document.createDocumentFragment();if($){const T=D[0]>O[0];B.appendChild(this._createSelectionElement(I,T?O[0]:D[0],T?D[0]:O[0],R-I+1))}else{const T=N===I?D[0]:0,H=I===U?O[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(I,T,H));const G=R-I-1;if(B.appendChild(this._createSelectionElement(I+1,0,this._bufferService.cols,G)),I!==R){const V=U===R?O[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(R,0,V))}}this._selectionContainer.appendChild(B)}_createSelectionElement(D,O,$,N=1){const U=this._document.createElement("div"),I=O*this.dimensions.css.cell.width;let R=this.dimensions.css.cell.width*($-O);return I+R>this.dimensions.css.canvas.width&&(R=this.dimensions.css.canvas.width-I),U.style.height=N*this.dimensions.css.cell.height+"px",U.style.top=D*this.dimensions.css.cell.height+"px",U.style.left=`${I}px`,U.style.width=`${R}px`,U}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 D of this._rowElements)D.replaceChildren()}renderRows(D,O){const $=this._bufferService.buffer,N=$.ybase+$.y,U=Math.min($.x,this._bufferService.cols-1),I=this._optionsService.rawOptions.cursorBlink,R=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let T=D;T<=O;T++){const H=T+$.ydisp,G=this._rowElements[T],V=$.lines.get(H);if(!G||!V)break;G.replaceChildren(...this._rowFactory.createRow(V,H,H===N,R,B,U,I,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${x}${this._terminalClass}`}_handleLinkHover(D){this._setCellUnderline(D.x1,D.x2,D.y1,D.y2,D.cols,!0)}_handleLinkLeave(D){this._setCellUnderline(D.x1,D.x2,D.y1,D.y2,D.cols,!1)}_setCellUnderline(D,O,$,N,U,I){$<0&&(D=0),N<0&&(O=0);const R=this._bufferService.rows-1;$=Math.max(Math.min($,R),0),N=Math.max(Math.min(N,R),0),U=Math.min(U,this._bufferService.cols);const B=this._bufferService.buffer,T=B.ybase+B.y,H=Math.min(B.x,U-1),G=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,ue=this._optionsService.rawOptions.cursorInactiveStyle;for(let de=$;de<=N;++de){const q=de+B.ydisp,z=this._rowElements[de],se=B.lines.get(q);if(!z||!se)break;z.replaceChildren(...this._rowFactory.createRow(se,q,q===T,V,ue,H,G,this.dimensions.css.cell.width,this._widthCache,I?de===$?D:0:-1,I?(de===N?O:U)-1:-1))}}};n.DomRenderer=L=f([v(7,S.IInstantiationService),v(8,r.ICharSizeService),v(9,S.IOptionsService),v(10,S.IBufferService),v(11,r.ICoreBrowserService),v(12,r.IThemeService)],L)},3787:function(F,n,u){var f=this&&this.__decorate||function(_,C,m,y){var E,A=arguments.length,L=A<3?C:y===null?y=Object.getOwnPropertyDescriptor(C,m):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,C,m,y);else for(var D=_.length-1;D>=0;D--)(E=_[D])&&(L=(A<3?E(L):A>3?E(C,m,L):E(C,m))||L);return A>3&&L&&Object.defineProperty(C,m,L),L},v=this&&this.__param||function(_,C){return function(m,y){C(m,y,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const a=u(2223),p=u(643),w=u(511),b=u(2585),c=u(8055),r=u(4725),h=u(4269),o=u(6171),l=u(3734);let S=n.DomRendererRowFactory=class{constructor(_,C,m,y,E,A,L){this._document=_,this._characterJoinerService=C,this._optionsService=m,this._coreBrowserService=y,this._coreService=E,this._decorationService=A,this._themeService=L,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(_,C,m){this._selectionStart=_,this._selectionEnd=C,this._columnSelectMode=m}createRow(_,C,m,y,E,A,L,D,O,$,N){const U=[],I=this._characterJoinerService.getJoinedCharacters(C),R=this._themeService.colors;let B,T=_.getNoBgTrimmedLength();m&&T<A+1&&(T=A+1);let H=0,G="",V=0,ue=0,de=0,q=!1,z=0,se=!1,ie=0;const ve=[],fe=$!==-1&&N!==-1;for(let Le=0;Le<T;Le++){_.loadCell(Le,this._workCell);let _e=this._workCell.getWidth();if(_e===0)continue;let Oe=!1,qe=Le,be=this._workCell;if(I.length>0&&Le===I[0][0]){Oe=!0;const xe=I.shift();be=new h.JoinedCellData(this._workCell,_.translateToString(!0,xe[0],xe[1]),xe[1]-xe[0]),qe=xe[1]-1,_e=be.getWidth()}const ft=this._isCellInSelection(Le,C),Ot=m&&Le===A,Se=fe&&Le>=$&&Le<=N;let pe=!1;this._decorationService.forEachDecorationAtCell(Le,C,void 0,(xe=>{pe=!0}));let me=be.getChars()||p.WHITESPACE_CELL_CHAR;if(me===" "&&(be.isUnderline()||be.isOverline())&&(me=" "),ie=_e*D-O.get(me,be.isBold(),be.isItalic()),B){if(H&&(ft&&se||!ft&&!se&&be.bg===V)&&(ft&&se&&R.selectionForeground||be.fg===ue)&&be.extended.ext===de&&Se===q&&ie===z&&!Ot&&!Oe&&!pe){be.isInvisible()?G+=p.WHITESPACE_CELL_CHAR:G+=me,H++;continue}H&&(B.textContent=G),B=this._document.createElement("span"),H=0,G=""}else B=this._document.createElement("span");if(V=be.bg,ue=be.fg,de=be.extended.ext,q=Se,z=ie,se=ft,Oe&&A>=Le&&A<=qe&&(A=Le),!this._coreService.isCursorHidden&&Ot&&this._coreService.isCursorInitialized){if(ve.push("xterm-cursor"),this._coreBrowserService.isFocused)L&&ve.push("xterm-cursor-blink"),ve.push(y==="bar"?"xterm-cursor-bar":y==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(E)switch(E){case"outline":ve.push("xterm-cursor-outline");break;case"block":ve.push("xterm-cursor-block");break;case"bar":ve.push("xterm-cursor-bar");break;case"underline":ve.push("xterm-cursor-underline")}}if(be.isBold()&&ve.push("xterm-bold"),be.isItalic()&&ve.push("xterm-italic"),be.isDim()&&ve.push("xterm-dim"),G=be.isInvisible()?p.WHITESPACE_CELL_CHAR:be.getChars()||p.WHITESPACE_CELL_CHAR,be.isUnderline()&&(ve.push(`xterm-underline-${be.extended.underlineStyle}`),G===" "&&(G=" "),!be.isUnderlineColorDefault()))if(be.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(be.getUnderlineColor()).join(",")})`;else{let xe=be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&be.isBold()&&xe<8&&(xe+=8),B.style.textDecorationColor=R.ansi[xe].css}be.isOverline()&&(ve.push("xterm-overline"),G===" "&&(G=" ")),be.isStrikethrough()&&ve.push("xterm-strikethrough"),Se&&(B.style.textDecoration="underline");let ce=be.getFgColor(),ge=be.getFgColorMode(),ze=be.getBgColor(),Re=be.getBgColorMode();const _t=!!be.isInverse();if(_t){const xe=ce;ce=ze,ze=xe;const xt=ge;ge=Re,Re=xt}let Qe,it,Ie,Me=!1;switch(this._decorationService.forEachDecorationAtCell(Le,C,void 0,(xe=>{xe.options.layer!=="top"&&Me||(xe.backgroundColorRGB&&(Re=50331648,ze=xe.backgroundColorRGB.rgba>>8&16777215,Qe=xe.backgroundColorRGB),xe.foregroundColorRGB&&(ge=50331648,ce=xe.foregroundColorRGB.rgba>>8&16777215,it=xe.foregroundColorRGB),Me=xe.options.layer==="top")})),!Me&&ft&&(Qe=this._coreBrowserService.isFocused?R.selectionBackgroundOpaque:R.selectionInactiveBackgroundOpaque,ze=Qe.rgba>>8&16777215,Re=50331648,Me=!0,R.selectionForeground&&(ge=50331648,ce=R.selectionForeground.rgba>>8&16777215,it=R.selectionForeground)),Me&&ve.push("xterm-decoration-top"),Re){case 16777216:case 33554432:Ie=R.ansi[ze],ve.push(`xterm-bg-${ze}`);break;case 50331648:Ie=c.channels.toColor(ze>>16,ze>>8&255,255&ze),this._addStyle(B,`background-color:#${x((ze>>>0).toString(16),"0",6)}`);break;default:_t?(Ie=R.foreground,ve.push(`xterm-bg-${a.INVERTED_DEFAULT_COLOR}`)):Ie=R.background}switch(Qe||be.isDim()&&(Qe=c.color.multiplyOpacity(Ie,.5)),ge){case 16777216:case 33554432:be.isBold()&&ce<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ce+=8),this._applyMinimumContrast(B,Ie,R.ansi[ce],be,Qe,void 0)||ve.push(`xterm-fg-${ce}`);break;case 50331648:const xe=c.channels.toColor(ce>>16&255,ce>>8&255,255&ce);this._applyMinimumContrast(B,Ie,xe,be,Qe,it)||this._addStyle(B,`color:#${x(ce.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Ie,R.foreground,be,Qe,it)||_t&&ve.push(`xterm-fg-${a.INVERTED_DEFAULT_COLOR}`)}ve.length&&(B.className=ve.join(" "),ve.length=0),Ot||Oe||pe?B.textContent=G:H++,ie!==this.defaultSpacing&&(B.style.letterSpacing=`${ie}px`),U.push(B),Le=qe}return B&&H&&(B.textContent=G),U}_applyMinimumContrast(_,C,m,y,E,A){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(y.getCode()))return!1;const L=this._getContrastCache(y);let D;if(E||A||(D=L.getColor(C.rgba,m.rgba)),D===void 0){const O=this._optionsService.rawOptions.minimumContrastRatio/(y.isDim()?2:1);D=c.color.ensureContrastRatio(E||C,A||m,O),L.setColor((E||C).rgba,(A||m).rgba,D??null)}return!!D&&(this._addStyle(_,`color:${D.css}`),!0)}_getContrastCache(_){return _.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(_,C){_.setAttribute("style",`${_.getAttribute("style")||""}${C};`)}_isCellInSelection(_,C){const m=this._selectionStart,y=this._selectionEnd;return!(!m||!y)&&(this._columnSelectMode?m[0]<=y[0]?_>=m[0]&&C>=m[1]&&_<y[0]&&C<=y[1]:_<m[0]&&C>=m[1]&&_>=y[0]&&C<=y[1]:C>m[1]&&C<y[1]||m[1]===y[1]&&C===m[1]&&_>=m[0]&&_<y[0]||m[1]<y[1]&&C===y[1]&&_<y[0]||m[1]<y[1]&&C===m[1]&&_>=m[0])}};function x(_,C,m){for(;_.length<m;)_=C+_;return _}n.DomRendererRowFactory=S=f([v(1,r.ICharacterJoinerService),v(2,b.IOptionsService),v(3,r.ICoreBrowserService),v(4,b.ICoreService),v(5,b.IDecorationService),v(6,r.IThemeService)],S)},2550:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(u,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const v=u.createElement("span");v.classList.add("xterm-char-measure-element");const a=u.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontWeight="bold";const p=u.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[v,a,p,w],this._container.appendChild(v),this._container.appendChild(a),this._container.appendChild(p),this._container.appendChild(w),f.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,f,v,a){u===this._font&&f===this._fontSize&&v===this._weight&&a===this._weightBold||(this._font=u,this._fontSize=f,this._weight=v,this._weightBold=a,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${a}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${a}`,this.clear())}get(u,f,v){let a=0;if(!f&&!v&&u.length===1&&(a=u.charCodeAt(0))<256){if(this._flat[a]!==-9999)return this._flat[a];const b=this._measure(u,0);return b>0&&(this._flat[a]=b),b}let p=u;f&&(p+="B"),v&&(p+="I");let w=this._holey.get(p);if(w===void 0){let b=0;f&&(b|=1),v&&(b|=2),w=this._measure(u,b),w>0&&this._holey.set(p,w)}return w}_measure(u,f){const v=this._measureElements[f];return v.textContent=u.repeat(32),v.offsetWidth/32}}},2223:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(F,n)=>{function u(v){return 57508<=v&&v<=57558}function f(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=u,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=f,n.allowRescaling=function(v,a,p,w){return a===1&&p>Math.ceil(1.5*w)&&v!==void 0&&v>255&&!f(v)&&!u(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(a){return 9472<=a&&a<=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,a,p=0){return(v-(2*Math.round(a)-p))%(2*Math.round(a))}},6052:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,a,p,w=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const b=v.buffers.active.ydisp,c=a[1]-b,r=p[1]-b,h=Math.max(c,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(v,a,p){return!!this.hasSelection&&(p-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},456:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(F,n,u){var f=this&&this.__decorate||function(o,l,S,x){var _,C=arguments.length,m=C<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var y=o.length-1;y>=0;y--)(_=o[y])&&(m=(C<3?_(m):C>3?_(l,S,m):_(l,S))||m);return C>3&&m&&Object.defineProperty(l,S,m),m},v=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const a=u(2585),p=u(8460),w=u(844);let b=n.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,l,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(o,l,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=f([v(2,a.IOptionsService)],b);class c extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,S){l!==void 0&&l>0&&S!==void 0&&S>0&&(this._result.width=l,this._result.height=S)}}class r extends c{constructor(l,S,x){super(),this._document=l,this._parentElement=S,this._optionsService=x,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 c{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(F,n,u){var f=this&&this.__decorate||function(h,o,l,S){var x,_=arguments.length,C=_<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(C=(_<3?x(C):_>3?x(o,l,C):x(o,l))||C);return _>3&&C&&Object.defineProperty(o,l,C),C},v=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(3734),p=u(643),w=u(511),b=u(2585);class c extends a.AttributeData{constructor(o,l,S){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=c;let r=n.CharacterJoinerService=class rf{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const S=[],x=l.translateToString(!0);let _=0,C=0,m=0,y=l.getFg(0),E=l.getBg(0);for(let A=0;A<l.getTrimmedLength();A++)if(l.loadCell(A,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==y||this._workCell.bg!==E){if(A-_>1){const L=this._getJoinedRanges(x,m,C,l,_);for(let D=0;D<L.length;D++)S.push(L[D])}_=A,m=C,y=this._workCell.fg,E=this._workCell.bg}C+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-_>1){const A=this._getJoinedRanges(x,m,C,l,_);for(let L=0;L<A.length;L++)S.push(A[L])}return S}_getJoinedRanges(o,l,S,x,_){const C=o.substring(l,S);let m=[];try{m=this._characterJoiners[0].handler(C)}catch(y){console.error(y)}for(let y=1;y<this._characterJoiners.length;y++)try{const E=this._characterJoiners[y].handler(C);for(let A=0;A<E.length;A++)rf._mergeRanges(m,E[A])}catch(E){console.error(E)}return this._stringRangesToCellRanges(m,x,_),m}_stringRangesToCellRanges(o,l,S){let x=0,_=!1,C=0,m=o[x];if(m){for(let y=S;y<this._bufferService.cols;y++){const E=l.getWidth(y),A=l.getString(y).length||p.WHITESPACE_CELL_CHAR.length;if(E!==0){if(!_&&m[0]<=C&&(m[0]=y,_=!0),m[1]<=C){if(m[1]=y,m=o[++x],!m)break;m[0]<=C?(m[0]=y,_=!0):_=!1}C+=A}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let S=!1;for(let x=0;x<o.length;x++){const _=o[x];if(S){if(l[1]<=_[0])return o[x-1][1]=l[1],o;if(l[1]<=_[1])return o[x-1][1]=Math.max(l[1],_[1]),o.splice(x,1),o;o.splice(x,1),x--}else{if(l[1]<=_[0])return o.splice(x,0,l),o;if(l[1]<=_[1])return _[0]=Math.min(l[0],_[0]),o;l[0]<_[1]&&(_[0]=Math.min(l[0],_[0]),S=!0)}}return S?o[o.length-1][1]=l[1]:o.push(l),o}};n.CharacterJoinerService=r=f([v(0,b.IBufferService)],r)},5114:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const f=u(844),v=u(8460),a=u(3656);class p extends f.Disposable{constructor(c,r,h){super(),this._textarea=c,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(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(c){this._window!==c&&(this._window=c,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=p;class w extends f.Disposable{constructor(c){super(),this._parentWindow=c,this._windowResizeListener=this.register(new f.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,f.toDisposable)((()=>this.clearListener())))}setWindow(c){this._parentWindow=c,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,a.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var c;this._outerListener&&((c=this._resolutionMediaMatchList)==null||c.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const f=u(844);class v extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const w=this.linkProviders.indexOf(p);w!==-1&&this.linkProviders.splice(w,1)}}}}n.LinkProviderService=v},8934:function(F,n,u){var f=this&&this.__decorate||function(b,c,r,h){var o,l=arguments.length,S=l<3?c:h===null?h=Object.getOwnPropertyDescriptor(c,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(b,c,r,h);else for(var x=b.length-1;x>=0;x--)(o=b[x])&&(S=(l<3?o(S):l>3?o(c,r,S):o(c,r))||S);return l>3&&S&&Object.defineProperty(c,r,S),S},v=this&&this.__param||function(b,c){return function(r,h){c(r,h,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const a=u(4725),p=u(9806);let w=n.MouseService=class{constructor(b,c){this._renderService=b,this._charSizeService=c}getCoords(b,c,r,h,o){return(0,p.getCoords)(window,b,c,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(b,c){const r=(0,p.getCoordsRelativeToElement)(window,b,c);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=w=f([v(0,a.IRenderService),v(1,a.ICharSizeService)],w)},3230:function(F,n,u){var f=this&&this.__decorate||function(o,l,S,x){var _,C=arguments.length,m=C<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var y=o.length-1;y>=0;y--)(_=o[y])&&(m=(C<3?_(m):C>3?_(l,S,m):_(l,S))||m);return C>3&&m&&Object.defineProperty(l,S,m),m},v=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const a=u(6193),p=u(4725),w=u(8460),b=u(844),c=u(7226),r=u(2585);let h=n.RenderService=class extends b.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,l,S,x,_,C,m,y){super(),this._rowCount=o,this._charSizeService=x,this._renderer=this.register(new b.MutableDisposable),this._pausedResizeTask=new c.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 w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new a.RenderDebouncer(((E,A)=>this._renderRows(E,A)),m),this.register(this._renderDebouncer),this.register(m.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(C.onResize((()=>this._fullRefresh()))),this.register(C.buffers.onBufferActivate((()=>{var E;return(E=this._renderer.value)==null?void 0:E.clear()}))),this.register(S.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(_.onDecorationRegistered((()=>this._fullRefresh()))),this.register(_.onDecorationRemoved((()=>this._fullRefresh()))),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(C.cols,C.rows),this._fullRefresh()}))),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(C.buffer.y,C.buffer.y,!0)))),this.register(y.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(m.window,l),this.register(m.onWindowChange((E=>this._registerIntersectionObserver(E,l))))}_registerIntersectionObserver(o,l){if("IntersectionObserver"in o){const S=new o.IntersectionObserver((x=>this._handleIntersectionChange(x[x.length-1])),{threshold:0});S.observe(l),this._observerDisposable.value=(0,b.toDisposable)((()=>S.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(o,l,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,l,this._rowCount))}_renderRows(o,l){this._renderer.value&&(o=Math.min(o,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(o,l),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:l}),this._onRender.fire({start:o,end:l}),this._isNextRenderRedrawOnly=!0)}resize(o,l){this._rowCount=l,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((l=>this.refreshRows(l.start,l.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,l;this._renderer.value&&((l=(o=this._renderer.value).clearTextureAtlas)==null||l.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(o,l)})):this._renderer.value.handleResize(o,l),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,l,S){var x;this._selectionState.start=o,this._selectionState.end=l,this._selectionState.columnSelectMode=S,(x=this._renderer.value)==null||x.handleSelectionChanged(o,l,S)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};n.RenderService=h=f([v(2,r.IOptionsService),v(3,p.ICharSizeService),v(4,r.IDecorationService),v(5,r.IBufferService),v(6,p.ICoreBrowserService),v(7,p.IThemeService)],h)},9312:function(F,n,u){var f=this&&this.__decorate||function(m,y,E,A){var L,D=arguments.length,O=D<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,E):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(m,y,E,A);else for(var $=m.length-1;$>=0;$--)(L=m[$])&&(O=(D<3?L(O):D>3?L(y,E,O):L(y,E))||O);return D>3&&O&&Object.defineProperty(y,E,O),O},v=this&&this.__param||function(m,y){return function(E,A){y(E,A,m)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const a=u(9806),p=u(9504),w=u(456),b=u(4725),c=u(8460),r=u(844),h=u(6114),o=u(4841),l=u(511),S=u(2585),x=" ",_=new RegExp(x,"g");let C=n.SelectionService=class extends r.Disposable{constructor(m,y,E,A,L,D,O,$,N){super(),this._element=m,this._screenElement=y,this._linkifier=E,this._bufferService=A,this._coreService=L,this._mouseService=D,this._optionsService=O,this._renderService=$,this._coreBrowserService=N,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new c.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new c.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new c.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=U=>this._handleMouseMove(U),this._mouseUpListener=U=>this._handleMouseUp(U),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((U=>this._handleTrim(U))),this.register(this._bufferService.buffers.onBufferActivate((U=>this._handleBufferActivate(U)))),this.enable(),this._model=new w.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 m=this._model.finalSelectionStart,y=this._model.finalSelectionEnd;return!(!m||!y||m[0]===y[0]&&m[1]===y[1])}get selectionText(){const m=this._model.finalSelectionStart,y=this._model.finalSelectionEnd;if(!m||!y)return"";const E=this._bufferService.buffer,A=[];if(this._activeSelectionMode===3){if(m[0]===y[0])return"";const L=m[0]<y[0]?m[0]:y[0],D=m[0]<y[0]?y[0]:m[0];for(let O=m[1];O<=y[1];O++){const $=E.translateBufferLineToString(O,!0,L,D);A.push($)}}else{const L=m[1]===y[1]?y[0]:void 0;A.push(E.translateBufferLineToString(m[1],!0,m[0],L));for(let D=m[1]+1;D<=y[1]-1;D++){const O=E.lines.get(D),$=E.translateBufferLineToString(D,!0);O!=null&&O.isWrapped?A[A.length-1]+=$:A.push($)}if(m[1]!==y[1]){const D=E.lines.get(y[1]),O=E.translateBufferLineToString(y[1],!0,0,y[0]);D&&D.isWrapped?A[A.length-1]+=O:A.push(O)}}return A.map((L=>L.replace(_," "))).join(h.isWindows?`\r
54
54
  `:`
55
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(S){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&S&&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(S){const C=this._getMouseBufferCoords(S),L=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!!(L&&A&&C)&&this._areCoordsInSelection(C,L,A)}isCellInSelection(S,C){const L=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!L||!A)&&this._areCoordsInSelection([S,C],L,A)}_areCoordsInSelection(S,C,L){return S[1]>C[1]&&S[1]<L[1]||C[1]===L[1]&&S[1]===C[1]&&S[0]>=C[0]&&S[0]<L[0]||C[1]<L[1]&&S[1]===L[1]&&S[0]<L[0]||C[1]<L[1]&&S[1]===C[1]&&S[0]>=C[0]}_selectWordAtCursor(S,C){var E,D;const L=(D=(E=this._linkifier.currentLink)==null?void 0:E.link)==null?void 0:D.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 A=this._getMouseBufferCoords(S);return!!A&&(this._selectWordAt(A,C),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(S,C){this._model.clearSelection(),S=Math.max(S,0),C=Math.min(C,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,S],this._model.selectionEnd=[this._bufferService.cols,C],this.refresh(),this._onSelectionChange.fire()}_handleTrim(S){this._model.handleTrim(S)&&this.refresh()}_getMouseBufferCoords(S){const C=this._mouseService.getCoords(S,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(C)return C[0]--,C[1]--,C[1]+=this._bufferService.buffer.ydisp,C}_getMouseEventScrollAmount(S){let C=(0,a.getCoordsRelativeToElement)(this._coreBrowserService.window,S,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return C>=0&&C<=L?0:(C>L&&(C-=L),C=Math.min(Math.max(C,-50),50),C/=50,C/Math.abs(C)+Math.round(14*C))}shouldForceSelection(S){return h.isMac?S.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:S.shiftKey}handleMouseDown(S){if(this._mouseDownTimeStamp=S.timeStamp,(S.button!==2||!this.hasSelection)&&S.button===0){if(!this._enabled){if(!this.shouldForceSelection(S))return;S.stopPropagation()}S.preventDefault(),this._dragScrollAmount=0,this._enabled&&S.shiftKey?this._handleIncrementalClick(S):S.detail===1?this._handleSingleClick(S):S.detail===2?this._handleDoubleClick(S):S.detail===3&&this._handleTripleClick(S),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(S){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(S))}_handleSingleClick(S){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(S)?3:0,this._model.selectionStart=this._getMouseBufferCoords(S),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const C=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);C&&C.length!==this._model.selectionStart[0]&&C.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(S){this._selectWordAtCursor(S,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(S){const C=this._getMouseBufferCoords(S);C&&(this._activeSelectionMode=2,this._selectLineAt(C[1]))}shouldColumnSelect(S){return S.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(S){if(S.stopImmediatePropagation(),!this._model.selectionStart)return;const C=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(S),!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(S),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 A=L.lines.get(this._model.selectionEnd[1]);A&&A.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}C&&C[0]===this._model.selectionEnd[0]&&C[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 S=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(S.ydisp+this._bufferService.rows,S.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=S.ydisp),this.refresh()}}_handleMouseUp(S){const C=S.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&C<500&&S.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(S,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const A=(0,p.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(A,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const S=this._model.finalSelectionStart,C=this._model.finalSelectionEnd,L=!(!S||!C||S[0]===C[0]&&S[1]===C[1]);L?S&&C&&(this._oldSelectionStart&&this._oldSelectionEnd&&S[0]===this._oldSelectionStart[0]&&S[1]===this._oldSelectionStart[1]&&C[0]===this._oldSelectionEnd[0]&&C[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(S,C,L)):this._oldHasSelection&&this._fireOnSelectionChange(S,C,L)}_fireOnSelectionChange(S,C,L){this._oldSelectionStart=S,this._oldSelectionEnd=C,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(S){this.clearSelection(),this._trimListener.dispose(),this._trimListener=S.activeBuffer.lines.onTrim((C=>this._handleTrim(C)))}_convertViewportColToCharacterIndex(S,C){let L=C;for(let A=0;C>=A;A++){const E=S.loadCell(A,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:E>1&&C!==A&&(L+=E-1)}return L}setSelection(S,C,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[S,C],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(S){this._isClickInSelection(S)||(this._selectWordAtCursor(S,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(S,C,L=!0,A=!0){if(S[0]>=this._bufferService.cols)return;const E=this._bufferService.buffer,D=E.lines.get(S[1]);if(!D)return;const O=E.translateBufferLineToString(S[1],!1);let $=this._convertViewportColToCharacterIndex(D,S[0]),N=$;const U=S[0]-$;let I=0,R=0,B=0,T=0;if(O.charAt($)===" "){for(;$>0&&O.charAt($-1)===" ";)$--;for(;N<O.length&&O.charAt(N+1)===" ";)N++}else{let V=S[0],ue=S[0];D.getWidth(V)===0&&(I++,V--),D.getWidth(ue)===2&&(R++,ue++);const de=D.getString(ue).length;for(de>1&&(T+=de-1,N+=de-1);V>0&&$>0&&!this._isCharWordSeparator(D.loadCell(V-1,this._workCell));){D.loadCell(V-1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===0?(I++,V--):q>1&&(B+=q-1,$-=q-1),$--,V--}for(;ue<D.length&&N+1<O.length&&!this._isCharWordSeparator(D.loadCell(ue+1,this._workCell));){D.loadCell(ue+1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===2?(R++,ue++):q>1&&(T+=q-1,N+=q-1),N++,ue++}}N++;let H=$+U-I+B,G=Math.min(this._bufferService.cols,N-$+I+R-B-T);if(C||O.slice($,N).trim()!==""){if(L&&H===0&&D.getCodePoint(0)!==32){const V=E.lines.get(S[1]-1);if(V&&D.isWrapped&&V.getCodePoint(this._bufferService.cols-1)!==32){const ue=this._getWordAt([this._bufferService.cols-1,S[1]-1],!1,!0,!1);if(ue){const de=this._bufferService.cols-ue.start;H-=de,G+=de}}}if(A&&H+G===this._bufferService.cols&&D.getCodePoint(this._bufferService.cols-1)!==32){const V=E.lines.get(S[1]+1);if(V!=null&&V.isWrapped&&V.getCodePoint(0)!==32){const ue=this._getWordAt([0,S[1]+1],!1,!1,!0);ue&&(G+=ue.length)}}return{start:H,length:G}}}_selectWordAt(S,C){const L=this._getWordAt(S,C);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,S[1]--;this._model.selectionStart=[L.start,S[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(S){const C=this._getWordAt(S,!0);if(C){let L=S[1];for(;C.start<0;)C.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;C.start+C.length>this._bufferService.cols;)C.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?C.start:C.start+C.length,L]}}_isCharWordSeparator(S){return S.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(S.getChars())>=0}_selectLineAt(S){const C=this._bufferService.buffer.getWrappedRangeForLine(S),L={start:{x:0,y:C.first},end:{x:this._bufferService.cols-1,y:C.last}};this._model.selectionStart=[0,C.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(L,this._bufferService.cols)}};n.SelectionService=w=f([v(3,m.IBufferService),v(4,m.ICoreService),v(5,b.IMouseService),v(6,m.IOptionsService),v(7,b.IRenderService),v(8,b.ICoreBrowserService)],w)},4725:(F,n,u)=>{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 f=u(8343);n.ICharSizeService=(0,f.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),n.IMouseService=(0,f.createDecorator)("MouseService"),n.IRenderService=(0,f.createDecorator)("RenderService"),n.ISelectionService=(0,f.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,f.createDecorator)("ThemeService"),n.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(F,n,u){var f=this&&this.__decorate||function(w,S,C,L){var A,E=arguments.length,D=E<3?S:L===null?L=Object.getOwnPropertyDescriptor(S,C):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(w,S,C,L);else for(var O=w.length-1;O>=0;O--)(A=w[O])&&(D=(E<3?A(D):E>3?A(S,C,D):A(S,C))||D);return E>3&&D&&Object.defineProperty(S,C,D),D},v=this&&this.__param||function(w,S){return function(C,L){S(C,L,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const a=u(7239),p=u(8055),y=u(8460),b=u(844),c=u(2585),r=p.css.toColor("#ffffff"),h=p.css.toColor("#000000"),o=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),m={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],S=[0,95,135,175,215,255];for(let C=0;C<216;C++){const L=S[C/36%6|0],A=S[C/6%6|0],E=S[C%6];w.push({css:p.channels.toCss(L,A,E),rgba:p.channels.toRgba(L,A,E)})}for(let C=0;C<24;C++){const L=8+10*C;w.push({css:p.channels.toCss(L,L,L),rgba:p.channels.toRgba(L,L,L)})}return w})());let x=n.ThemeService=class extends b.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new a.ColorContrastCache,this._halfContrastCache=new a.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:o,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:m,selectionBackgroundOpaque:p.color.blend(h,m),selectionInactiveBackgroundTransparent:m,selectionInactiveBackgroundOpaque:p.color.blend(h,m),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 S=this._colors;if(S.foreground=_(w.foreground,r),S.background=_(w.background,h),S.cursor=_(w.cursor,o),S.cursorAccent=_(w.cursorAccent,l),S.selectionBackgroundTransparent=_(w.selectionBackground,m),S.selectionBackgroundOpaque=p.color.blend(S.background,S.selectionBackgroundTransparent),S.selectionInactiveBackgroundTransparent=_(w.selectionInactiveBackground,S.selectionBackgroundTransparent),S.selectionInactiveBackgroundOpaque=p.color.blend(S.background,S.selectionInactiveBackgroundTransparent),S.selectionForeground=w.selectionForeground?_(w.selectionForeground,p.NULL_COLOR):void 0,S.selectionForeground===p.NULL_COLOR&&(S.selectionForeground=void 0),p.color.isOpaque(S.selectionBackgroundTransparent)&&(S.selectionBackgroundTransparent=p.color.opacity(S.selectionBackgroundTransparent,.3)),p.color.isOpaque(S.selectionInactiveBackgroundTransparent)&&(S.selectionInactiveBackgroundTransparent=p.color.opacity(S.selectionInactiveBackgroundTransparent,.3)),S.ansi=n.DEFAULT_ANSI_COLORS.slice(),S.ansi[0]=_(w.black,n.DEFAULT_ANSI_COLORS[0]),S.ansi[1]=_(w.red,n.DEFAULT_ANSI_COLORS[1]),S.ansi[2]=_(w.green,n.DEFAULT_ANSI_COLORS[2]),S.ansi[3]=_(w.yellow,n.DEFAULT_ANSI_COLORS[3]),S.ansi[4]=_(w.blue,n.DEFAULT_ANSI_COLORS[4]),S.ansi[5]=_(w.magenta,n.DEFAULT_ANSI_COLORS[5]),S.ansi[6]=_(w.cyan,n.DEFAULT_ANSI_COLORS[6]),S.ansi[7]=_(w.white,n.DEFAULT_ANSI_COLORS[7]),S.ansi[8]=_(w.brightBlack,n.DEFAULT_ANSI_COLORS[8]),S.ansi[9]=_(w.brightRed,n.DEFAULT_ANSI_COLORS[9]),S.ansi[10]=_(w.brightGreen,n.DEFAULT_ANSI_COLORS[10]),S.ansi[11]=_(w.brightYellow,n.DEFAULT_ANSI_COLORS[11]),S.ansi[12]=_(w.brightBlue,n.DEFAULT_ANSI_COLORS[12]),S.ansi[13]=_(w.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),S.ansi[14]=_(w.brightCyan,n.DEFAULT_ANSI_COLORS[14]),S.ansi[15]=_(w.brightWhite,n.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const C=Math.min(S.ansi.length-16,w.extendedAnsi.length);for(let L=0;L<C;L++)S.ansi[L+16]=_(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 S=0;S<this._restoreColors.ansi.length;++S)this._colors.ansi[S]=this._restoreColors.ansi[S]}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 _(w,S){if(w!==void 0)try{return p.css.toColor(w)}catch{}return S}n.ThemeService=x=f([v(0,c.IOptionsService)],x)},6349:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const f=u(8460),v=u(844);class a extends v.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.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 c=0;c<Math.min(y,this.length);c++)b[c]=this._array[this._getCyclicIndex(c)];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,...c){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+c.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<c.length;r++)this._array[this._getCyclicIndex(y+r)]=c[r];if(c.length&&this.onInsertEmitter.fire({index:y,amount:c.length}),this._length+c.length>this._maxLength){const r=this._length+c.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=c.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,b,c){if(!(b<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+c<0)throw new Error("Cannot shift elements in list beyond index 0");if(c>0){for(let h=b-1;h>=0;h--)this.set(y+h+c,this.get(y+h));const r=y+b+c-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+c,this.get(y+r))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}n.CircularList=a},1439:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function u(f,v=5){if(typeof f!="object")return f;const a=Array.isArray(f)?[]:{};for(const p in f)a[p]=v<=1?f[p]:f[p]&&u(f[p],v-1);return a}},8055:(F,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 u=0,f=0,v=0,a=0;var p,y,b,c,r;function h(l){const m=l.toString(16);return m.length<2?"0"+m:m}function o(l,m){return l<m?(m+.05)/(l+.05):(l+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(m,x,_,w){return w!==void 0?`#${h(m)}${h(x)}${h(_)}${h(w)}`:`#${h(m)}${h(x)}${h(_)}`},l.toRgba=function(m,x,_,w=255){return(m<<24|x<<16|_<<8|w)>>>0},l.toColor=function(m,x,_,w){return{css:l.toCss(m,x,_,w),rgba:l.toRgba(m,x,_,w)}}})(p||(n.channels=p={})),(function(l){function m(x,_){return a=Math.round(255*_),[u,f,v]=r.toChannels(x.rgba),{css:p.toCss(u,f,v,a),rgba:p.toRgba(u,f,v,a)}}l.blend=function(x,_){if(a=(255&_.rgba)/255,a===1)return{css:_.css,rgba:_.rgba};const w=_.rgba>>24&255,S=_.rgba>>16&255,C=_.rgba>>8&255,L=x.rgba>>24&255,A=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((w-L)*a),f=A+Math.round((S-A)*a),v=E+Math.round((C-E)*a),{css:p.toCss(u,f,v),rgba:p.toRgba(u,f,v)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,_,w){const S=r.ensureContrastRatio(x.rgba,_.rgba,w);if(S)return p.toColor(S>>24&255,S>>16&255,S>>8&255)},l.opaque=function(x){const _=(255|x.rgba)>>>0;return[u,f,v]=r.toChannels(_),{css:p.toCss(u,f,v),rgba:_}},l.opacity=m,l.multiplyOpacity=function(x,_){return a=255&x.rgba,m(x,a*_/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(y||(n.color=y={})),(function(l){let m,x;try{const _=document.createElement("canvas");_.width=1,_.height=1;const w=_.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",x=m.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(_){if(_.match(/#[\da-f]{3,8}/i))switch(_.length){case 4:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),p.toColor(u,f,v);case 5:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),a=parseInt(_.slice(4,5).repeat(2),16),p.toColor(u,f,v,a);case 7:return{css:_,rgba:(parseInt(_.slice(1),16)<<8|255)>>>0};case 9:return{css:_,rgba:parseInt(_.slice(1),16)>>>0}}const w=_.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 u=parseInt(w[1]),f=parseInt(w[2]),v=parseInt(w[3]),a=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),p.toColor(u,f,v,a);if(!m||!x)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=x,m.fillStyle=_,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[u,f,v,a]=m.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,v,a),css:_}}})(b||(n.css=b={})),(function(l){function m(x,_,w){const S=x/255,C=_/255,L=w/255;return .2126*(S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}l.relativeLuminance=function(x){return m(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=m})(c||(n.rgb=c={})),(function(l){function m(_,w,S){const C=_>>24&255,L=_>>16&255,A=_>>8&255;let E=w>>24&255,D=w>>16&255,O=w>>8&255,$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;$<S&&(E>0||D>0||O>0);)E-=Math.max(0,Math.ceil(.1*E)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}function x(_,w,S){const C=_>>24&255,L=_>>16&255,A=_>>8&255;let E=w>>24&255,D=w>>16&255,O=w>>8&255,$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;$<S&&(E<255||D<255||O<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}l.blend=function(_,w){if(a=(255&w)/255,a===1)return w;const S=w>>24&255,C=w>>16&255,L=w>>8&255,A=_>>24&255,E=_>>16&255,D=_>>8&255;return u=A+Math.round((S-A)*a),f=E+Math.round((C-E)*a),v=D+Math.round((L-D)*a),p.toRgba(u,f,v)},l.ensureContrastRatio=function(_,w,S){const C=c.relativeLuminance(_>>8),L=c.relativeLuminance(w>>8);if(o(C,L)<S){if(L<C){const D=m(_,w,S),O=o(C,c.relativeLuminance(D>>8));if(O<S){const $=x(_,w,S);return O>o(C,c.relativeLuminance($>>8))?D:$}return D}const A=x(_,w,S),E=o(C,c.relativeLuminance(A>>8));if(E<S){const D=m(_,w,S);return E>o(C,c.relativeLuminance(D>>8))?A:D}return A}},l.reduceLuminance=m,l.increaseLuminance=x,l.toChannels=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},8969:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const f=u(844),v=u(2585),a=u(4348),p=u(7866),y=u(744),b=u(7302),c=u(6975),r=u(8460),h=u(1753),o=u(1480),l=u(7994),m=u(9282),x=u(5435),_=u(5981),w=u(2660);let S=!1;class C extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((A=>{var E;(E=this._onScrollApi)==null||E.fire(A.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(A){for(const E in A)this.optionsService.options[E]=A[E]}constructor(A){super(),this._windowsWrappingHeuristics=this.register(new f.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 a.InstantiationService,this.optionsService=this.register(new b.OptionsService(A)),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(p.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(c.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(l.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 x.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((E=>{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((E=>{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 _.WriteBuffer(((E,D)=>this._inputHandler.parse(E,D)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(A,E){this._writeBuffer.write(A,E)}writeSync(A,E){this._logService.logLevel<=v.LogLevelEnum.WARN&&!S&&(this._logService.warn("writeSync is unreliable and will be removed soon."),S=!0),this._writeBuffer.writeSync(A,E)}input(A,E=!0){this.coreService.triggerDataEvent(A,E)}resize(A,E){isNaN(A)||isNaN(E)||(A=Math.max(A,y.MINIMUM_COLS),E=Math.max(E,y.MINIMUM_ROWS),this._bufferService.resize(A,E))}scroll(A,E=!1){this._bufferService.scroll(A,E)}scrollLines(A,E,D){this._bufferService.scrollLines(A,E,D)}scrollPages(A){this.scrollLines(A*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(A){const E=A-this._bufferService.buffer.ydisp;E!==0&&this.scrollLines(E)}registerEscHandler(A,E){return this._inputHandler.registerEscHandler(A,E)}registerDcsHandler(A,E){return this._inputHandler.registerDcsHandler(A,E)}registerCsiHandler(A,E){return this._inputHandler.registerCsiHandler(A,E)}registerOscHandler(A,E){return this._inputHandler.registerOscHandler(A,E)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let A=!1;const E=this.optionsService.rawOptions.windowsPty;E&&E.buildNumber!==void 0&&E.buildNumber!==void 0?A=E.backend==="conpty"&&E.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(A=!0),A?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const A=[];A.push(this.onLineFeed(m.updateWindowsModeWrappedState.bind(null,this._bufferService))),A.push(this.registerCsiHandler({final:"H"},(()=>((0,m.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const E of A)E.dispose()}))}}}n.CoreTerminal=C},8460:(F,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const v=[];for(let a=0;a<this._listeners.length;a++)v.push(this._listeners[a]);for(let a=0;a<v.length;a++)v[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((v=>f.fire(v)))},n.runAndSubscribe=function(u,f){return f(void 0),u((v=>f(v)))}},5435:function(F,n,u){var f=this&&this.__decorate||function(I,R,B,T){var H,G=arguments.length,V=G<3?R:T===null?T=Object.getOwnPropertyDescriptor(R,B):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(I,R,B,T);else for(var ue=I.length-1;ue>=0;ue--)(H=I[ue])&&(V=(G<3?H(V):G>3?H(R,B,V):H(R,B))||V);return G>3&&V&&Object.defineProperty(R,B,V),V},v=this&&this.__param||function(I,R){return function(B,T){R(B,T,I)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const a=u(2584),p=u(7116),y=u(2015),b=u(844),c=u(482),r=u(8437),h=u(8460),o=u(643),l=u(511),m=u(3734),x=u(2585),_=u(1480),w=u(6242),S=u(6351),C=u(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},A=131072;function E(I,R){if(I>24)return R.setWinLines||!1;switch(I){case 1:return!!R.restoreWin;case 2:return!!R.minimizeWin;case 3:return!!R.setWinPosition;case 4:return!!R.setWinSizePixels;case 5:return!!R.raiseWin;case 6:return!!R.lowerWin;case 7:return!!R.refreshWin;case 8:return!!R.setWinSizeChars;case 9:return!!R.maximizeWin;case 10:return!!R.fullscreenWin;case 11:return!!R.getWinState;case 13:return!!R.getWinPosition;case 14:return!!R.getWinSizePixels;case 15:return!!R.getScreenSizePixels;case 16:return!!R.getCellSizePixels;case 18:return!!R.getWinSizeChars;case 19:return!!R.getScreenSizeChars;case 20:return!!R.getIconTitle;case 21:return!!R.getWinTitle;case 22:return!!R.pushTitle;case 23:return!!R.popTitle;case 24:return!!R.setWinLines}return!1}var D;(function(I){I[I.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",I[I.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(D||(n.WindowsOptionsReportType=D={}));let O=0;class $ extends b.Disposable{getAttrData(){return this._curAttrData}constructor(R,B,T,H,G,V,ue,de,q=new y.EscapeSequenceParser){super(),this._bufferService=R,this._charsetService=B,this._coreService=T,this._logService=H,this._optionsService=G,this._oscLinkService=V,this._coreMouseService=ue,this._unicodeService=de,this._parser=q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new c.StringToUtf32,this._utf8Decoder=new c.Utf8ToUtf32,this._workCell=new l.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((z=>this._activeBuffer=z.activeBuffer))),this._parser.setCsiHandlerFallback(((z,se)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(z),params:se.toArray()})})),this._parser.setEscHandlerFallback((z=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(z)})})),this._parser.setExecuteHandlerFallback((z=>{this._logService.debug("Unknown EXECUTE code: ",{code:z})})),this._parser.setOscHandlerFallback(((z,se,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:z,action:se,data:ie})})),this._parser.setDcsHandlerFallback(((z,se,ie)=>{se==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(z),action:se,payload:ie})})),this._parser.setPrintHandler(((z,se,ie)=>this.print(z,se,ie))),this._parser.registerCsiHandler({final:"@"},(z=>this.insertChars(z))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(z=>this.scrollLeft(z))),this._parser.registerCsiHandler({final:"A"},(z=>this.cursorUp(z))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(z=>this.scrollRight(z))),this._parser.registerCsiHandler({final:"B"},(z=>this.cursorDown(z))),this._parser.registerCsiHandler({final:"C"},(z=>this.cursorForward(z))),this._parser.registerCsiHandler({final:"D"},(z=>this.cursorBackward(z))),this._parser.registerCsiHandler({final:"E"},(z=>this.cursorNextLine(z))),this._parser.registerCsiHandler({final:"F"},(z=>this.cursorPrecedingLine(z))),this._parser.registerCsiHandler({final:"G"},(z=>this.cursorCharAbsolute(z))),this._parser.registerCsiHandler({final:"H"},(z=>this.cursorPosition(z))),this._parser.registerCsiHandler({final:"I"},(z=>this.cursorForwardTab(z))),this._parser.registerCsiHandler({final:"J"},(z=>this.eraseInDisplay(z,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(z=>this.eraseInDisplay(z,!0))),this._parser.registerCsiHandler({final:"K"},(z=>this.eraseInLine(z,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(z=>this.eraseInLine(z,!0))),this._parser.registerCsiHandler({final:"L"},(z=>this.insertLines(z))),this._parser.registerCsiHandler({final:"M"},(z=>this.deleteLines(z))),this._parser.registerCsiHandler({final:"P"},(z=>this.deleteChars(z))),this._parser.registerCsiHandler({final:"S"},(z=>this.scrollUp(z))),this._parser.registerCsiHandler({final:"T"},(z=>this.scrollDown(z))),this._parser.registerCsiHandler({final:"X"},(z=>this.eraseChars(z))),this._parser.registerCsiHandler({final:"Z"},(z=>this.cursorBackwardTab(z))),this._parser.registerCsiHandler({final:"`"},(z=>this.charPosAbsolute(z))),this._parser.registerCsiHandler({final:"a"},(z=>this.hPositionRelative(z))),this._parser.registerCsiHandler({final:"b"},(z=>this.repeatPrecedingCharacter(z))),this._parser.registerCsiHandler({final:"c"},(z=>this.sendDeviceAttributesPrimary(z))),this._parser.registerCsiHandler({prefix:">",final:"c"},(z=>this.sendDeviceAttributesSecondary(z))),this._parser.registerCsiHandler({final:"d"},(z=>this.linePosAbsolute(z))),this._parser.registerCsiHandler({final:"e"},(z=>this.vPositionRelative(z))),this._parser.registerCsiHandler({final:"f"},(z=>this.hVPosition(z))),this._parser.registerCsiHandler({final:"g"},(z=>this.tabClear(z))),this._parser.registerCsiHandler({final:"h"},(z=>this.setMode(z))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(z=>this.setModePrivate(z))),this._parser.registerCsiHandler({final:"l"},(z=>this.resetMode(z))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(z=>this.resetModePrivate(z))),this._parser.registerCsiHandler({final:"m"},(z=>this.charAttributes(z))),this._parser.registerCsiHandler({final:"n"},(z=>this.deviceStatus(z))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(z=>this.deviceStatusPrivate(z))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(z=>this.softReset(z))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(z=>this.setCursorStyle(z))),this._parser.registerCsiHandler({final:"r"},(z=>this.setScrollRegion(z))),this._parser.registerCsiHandler({final:"s"},(z=>this.saveCursor(z))),this._parser.registerCsiHandler({final:"t"},(z=>this.windowOptions(z))),this._parser.registerCsiHandler({final:"u"},(z=>this.restoreCursor(z))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(z=>this.insertColumns(z))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(z=>this.deleteColumns(z))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(z=>this.selectProtected(z))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(z=>this.requestMode(z,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(z=>this.requestMode(z,!1))),this._parser.setExecuteHandler(a.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(a.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(a.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(a.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(a.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(a.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(a.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(a.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(a.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new w.OscHandler((z=>(this.setTitle(z),this.setIconName(z),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((z=>this.setIconName(z)))),this._parser.registerOscHandler(2,new w.OscHandler((z=>this.setTitle(z)))),this._parser.registerOscHandler(4,new w.OscHandler((z=>this.setOrReportIndexedColor(z)))),this._parser.registerOscHandler(8,new w.OscHandler((z=>this.setHyperlink(z)))),this._parser.registerOscHandler(10,new w.OscHandler((z=>this.setOrReportFgColor(z)))),this._parser.registerOscHandler(11,new w.OscHandler((z=>this.setOrReportBgColor(z)))),this._parser.registerOscHandler(12,new w.OscHandler((z=>this.setOrReportCursorColor(z)))),this._parser.registerOscHandler(104,new w.OscHandler((z=>this.restoreIndexedColor(z)))),this._parser.registerOscHandler(110,new w.OscHandler((z=>this.restoreFgColor(z)))),this._parser.registerOscHandler(111,new w.OscHandler((z=>this.restoreBgColor(z)))),this._parser.registerOscHandler(112,new w.OscHandler((z=>this.restoreCursorColor(z)))),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 z in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:z},(()=>this.selectCharset("("+z))),this._parser.registerEscHandler({intermediates:")",final:z},(()=>this.selectCharset(")"+z))),this._parser.registerEscHandler({intermediates:"*",final:z},(()=>this.selectCharset("*"+z))),this._parser.registerEscHandler({intermediates:"+",final:z},(()=>this.selectCharset("+"+z))),this._parser.registerEscHandler({intermediates:"-",final:z},(()=>this.selectCharset("-"+z))),this._parser.registerEscHandler({intermediates:".",final:z},(()=>this.selectCharset("."+z))),this._parser.registerEscHandler({intermediates:"/",final:z},(()=>this.selectCharset("/"+z)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((z=>(this._logService.error("Parsing error: ",z),z))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new S.DcsHandler(((z,se)=>this.requestStatusString(z,se))))}_preserveStack(R,B,T,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=R,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=T,this._parseStack.position=H}_logSlowResolvingAsync(R){this._logService.logLevel<=x.LogLevelEnum.WARN&&Promise.race([R,new Promise(((B,T)=>setTimeout((()=>T("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(R,B){let T,H=this._activeBuffer.x,G=this._activeBuffer.y,V=0;const ue=this._parseStack.paused;if(ue){if(T=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(T),T;H=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,R.length>A&&(V=this._parseStack.position+A)}if(this._logService.logLevel<=x.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof R=="string"?` "${R}"`:` "${Array.prototype.map.call(R,(z=>String.fromCharCode(z))).join("")}"`),typeof R=="string"?R.split("").map((z=>z.charCodeAt(0))):R),this._parseBuffer.length<R.length&&this._parseBuffer.length<A&&(this._parseBuffer=new Uint32Array(Math.min(R.length,A))),ue||this._dirtyRowTracker.clearRange(),R.length>A)for(let z=V;z<R.length;z+=A){const se=z+A<R.length?z+A:R.length,ie=typeof R=="string"?this._stringDecoder.decode(R.substring(z,se),this._parseBuffer):this._utf8Decoder.decode(R.subarray(z,se),this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(H,G,ie,z),this._logSlowResolvingAsync(T),T}else if(!ue){const z=typeof R=="string"?this._stringDecoder.decode(R,this._parseBuffer):this._utf8Decoder.decode(R,this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,z))return this._preserveStack(H,G,z,0),this._logSlowResolvingAsync(T),T}this._activeBuffer.x===H&&this._activeBuffer.y===G||this._onCursorMove.fire();const de=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(q,this._bufferService.rows-1),Math.min(de,this._bufferService.rows-1))}print(R,B,T){let H,G;const V=this._charsetService.charset,ue=this._optionsService.rawOptions.screenReaderMode,de=this._bufferService.cols,q=this._coreService.decPrivateModes.wraparound,z=this._coreService.modes.insertMode,se=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&T-B>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,se);let ve=this._parser.precedingJoinState;for(let fe=B;fe<T;++fe){if(H=R[fe],H<127&&V){const qe=V[String.fromCharCode(H)];qe&&(H=qe.charCodeAt(0))}const Ee=this._unicodeService.charProperties(H,ve);G=_.UnicodeService.extractWidth(Ee);const _e=_.UnicodeService.extractShouldJoin(Ee),Oe=_e?_.UnicodeService.extractWidth(ve):0;if(ve=Ee,ue&&this._onA11yChar.fire((0,c.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+G-Oe>de){if(q){const qe=ie;let be=this._activeBuffer.x-Oe;for(this._activeBuffer.x=Oe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Oe>0&&ie instanceof r.BufferLine&&ie.copyCellsFrom(qe,be,0,Oe,!1);be<de;)qe.setCellFromCodepoint(be++,0,1,se)}else if(this._activeBuffer.x=de-1,G===2)continue}if(_e&&this._activeBuffer.x){const qe=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-qe,H,G);for(let be=G-Oe;--be>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}else if(z&&(ie.insertCells(this._activeBuffer.x,G-Oe,this._activeBuffer.getNullCell(se)),ie.getWidth(de-1)===2&&ie.setCellFromCodepoint(de-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,se)),ie.setCellFromCodepoint(this._activeBuffer.x++,H,G,se),G>0)for(;--G;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}this._parser.precedingJoinState=ve,this._activeBuffer.x<de&&T-B>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,se),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(R,B){return R.final!=="t"||R.prefix||R.intermediates?this._parser.registerCsiHandler(R,B):this._parser.registerCsiHandler(R,(T=>!E(T.params[0],this._optionsService.rawOptions.windowOptions)||B(T)))}registerDcsHandler(R,B){return this._parser.registerDcsHandler(R,new S.DcsHandler(B))}registerEscHandler(R,B){return this._parser.registerEscHandler(R,B)}registerOscHandler(R,B){return this._parser.registerOscHandler(R,new w.OscHandler(B))}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 R;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&&((R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&R.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const R=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-R),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(R=this._bufferService.cols-1){this._activeBuffer.x=Math.min(R,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(R,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=R,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=R,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(R,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+R,this._activeBuffer.y+B)}cursorUp(R){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,R.params[0]||1)):this._moveCursor(0,-(R.params[0]||1)),!0}cursorDown(R){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,R.params[0]||1)):this._moveCursor(0,R.params[0]||1),!0}cursorForward(R){return this._moveCursor(R.params[0]||1,0),!0}cursorBackward(R){return this._moveCursor(-(R.params[0]||1),0),!0}cursorNextLine(R){return this.cursorDown(R),this._activeBuffer.x=0,!0}cursorPrecedingLine(R){return this.cursorUp(R),this._activeBuffer.x=0,!0}cursorCharAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(R){return this._setCursor(R.length>=2?(R.params[1]||1)-1:0,(R.params[0]||1)-1),!0}charPosAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(R){return this._moveCursor(R.params[0]||1,0),!0}linePosAbsolute(R){return this._setCursor(this._activeBuffer.x,(R.params[0]||1)-1),!0}vPositionRelative(R){return this._moveCursor(0,R.params[0]||1),!0}hVPosition(R){return this.cursorPosition(R),!0}tabClear(R){const B=R.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=R.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=R.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(R){const B=R.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(R,B,T,H=!1,G=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);V.replaceCells(B,T,this._activeBuffer.getNullCell(this._eraseAttrData()),G),H&&(V.isWrapped=!1)}_resetBufferLine(R,B=!1){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);T&&(T.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+R),T.isWrapped=!1)}eraseInDisplay(R,B=!1){let T;switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);T<this._bufferService.rows;T++)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(T);break;case 1:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(T+1).isWrapped=!1);T--;)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(T=this._bufferService.rows,this._dirtyRowTracker.markDirty(T-1);T--;)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(0);break;case 3:const H=this._activeBuffer.lines.length-this._bufferService.rows;H>0&&(this._activeBuffer.lines.trimStart(H),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-H,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-H,0),this._onScroll.fire(0))}return!0}eraseInLine(R,B=!1){switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(R){this._restrictCursor();let B=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,G=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;B--;)this._activeBuffer.lines.splice(G-1,1),this._activeBuffer.lines.splice(T,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(R){this._restrictCursor();let B=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y;let H;for(H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-H;B--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(H,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(R){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(R){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(R){let B=R.params[0]||1;for(;B--;)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(R){let B=R.params[0]||1;for(;B--;)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(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(R){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(R.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(R){const B=this._parser.precedingJoinState;if(!B)return!0;const T=R.params[0]||1,H=_.UnicodeService.extractWidth(B),G=this._activeBuffer.x-H,V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(G),ue=new Uint32Array(V.length*T);let de=0;for(let z=0;z<V.length;){const se=V.codePointAt(z)||0;ue[de++]=se,z+=se>65535?2:1}let q=de;for(let z=1;z<T;++z)ue.copyWithin(q,0,de),q+=de;return this.print(ue,0,q),!0}sendDeviceAttributesPrimary(R){return R.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(a.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(a.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(R){return R.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(a.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(a.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(R.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(a.C0.ESC+"[>83;40003;0c")),!0}_is(R){return(this._optionsService.rawOptions.termName+"").indexOf(R)===0}setMode(R){for(let B=0;B<R.length;B++)switch(R.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(R){for(let B=0;B<R.length;B++)switch(R.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.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(R){for(let B=0;B<R.length;B++)switch(R.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(R){for(let B=0;B<R.length;B++)switch(R.params[B]){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(),R.params[B]===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(R,B){const T=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:G}=this._coreMouseService,V=this._coreService,{buffers:ue,cols:de}=this._bufferService,{active:q,alt:z}=ue,se=this._optionsService.rawOptions,ie=_e=>_e?1:2,ve=R.params[0];return fe=ve,Ee=B?ve===2?4:ve===4?ie(V.modes.insertMode):ve===12?3:ve===20?ie(se.convertEol):0:ve===1?ie(T.applicationCursorKeys):ve===3?se.windowOptions.setWinLines?de===80?2:de===132?1:0:0:ve===6?ie(T.origin):ve===7?ie(T.wraparound):ve===8?3:ve===9?ie(H==="X10"):ve===12?ie(se.cursorBlink):ve===25?ie(!V.isCursorHidden):ve===45?ie(T.reverseWraparound):ve===66?ie(T.applicationKeypad):ve===67?4:ve===1e3?ie(H==="VT200"):ve===1002?ie(H==="DRAG"):ve===1003?ie(H==="ANY"):ve===1004?ie(T.sendFocus):ve===1005?4:ve===1006?ie(G==="SGR"):ve===1015?4:ve===1016?ie(G==="SGR_PIXELS"):ve===1048?1:ve===47||ve===1047||ve===1049?ie(q===z):ve===2004?ie(T.bracketedPasteMode):0,V.triggerDataEvent(`${a.C0.ESC}[${B?"":"?"}${fe};${Ee}$y`),!0;var fe,Ee}_updateAttrColor(R,B,T,H,G){return B===2?(R|=50331648,R&=-16777216,R|=m.AttributeData.fromColorRGB([T,H,G])):B===5&&(R&=-50331904,R|=33554432|255&T),R}_extractColor(R,B,T){const H=[0,0,-1,0,0,0];let G=0,V=0;do{if(H[V+G]=R.params[B+V],R.hasSubParams(B+V)){const ue=R.getSubParams(B+V);let de=0;do H[1]===5&&(G=1),H[V+de+1+G]=ue[de];while(++de<ue.length&&de+V+1+G<H.length);break}if(H[1]===5&&V+G>=2||H[1]===2&&V+G>=5)break;H[1]&&(G=1)}while(++V+B<R.length&&V+G<H.length);for(let ue=2;ue<H.length;++ue)H[ue]===-1&&(H[ue]=0);switch(H[0]){case 38:T.fg=this._updateAttrColor(T.fg,H[1],H[3],H[4],H[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,H[1],H[3],H[4],H[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,H[1],H[3],H[4],H[5])}return V}_processUnderline(R,B){B.extended=B.extended.clone(),(!~R||R>5)&&(R=1),B.extended.underlineStyle=R,B.fg|=268435456,R===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(R){R.fg=r.DEFAULT_ATTR_DATA.fg,R.bg=r.DEFAULT_ATTR_DATA.bg,R.extended=R.extended.clone(),R.extended.underlineStyle=0,R.extended.underlineColor&=-67108864,R.updateExtended()}charAttributes(R){if(R.length===1&&R.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=R.length;let T;const H=this._curAttrData;for(let G=0;G<B;G++)T=R.params[G],T>=30&&T<=37?(H.fg&=-50331904,H.fg|=16777216|T-30):T>=40&&T<=47?(H.bg&=-50331904,H.bg|=16777216|T-40):T>=90&&T<=97?(H.fg&=-50331904,H.fg|=16777224|T-90):T>=100&&T<=107?(H.bg&=-50331904,H.bg|=16777224|T-100):T===0?this._processSGR0(H):T===1?H.fg|=134217728:T===3?H.bg|=67108864:T===4?(H.fg|=268435456,this._processUnderline(R.hasSubParams(G)?R.getSubParams(G)[0]:1,H)):T===5?H.fg|=536870912:T===7?H.fg|=67108864:T===8?H.fg|=1073741824:T===9?H.fg|=2147483648:T===2?H.bg|=134217728:T===21?this._processUnderline(2,H):T===22?(H.fg&=-134217729,H.bg&=-134217729):T===23?H.bg&=-67108865:T===24?(H.fg&=-268435457,this._processUnderline(0,H)):T===25?H.fg&=-536870913:T===27?H.fg&=-67108865:T===28?H.fg&=-1073741825:T===29?H.fg&=2147483647:T===39?(H.fg&=-67108864,H.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):T===49?(H.bg&=-67108864,H.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):T===38||T===48||T===58?G+=this._extractColor(R,G,H):T===53?H.bg|=1073741824:T===55?H.bg&=-1073741825:T===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):T===100?(H.fg&=-67108864,H.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",T);return!0}deviceStatus(R){switch(R.params[0]){case 5:this._coreService.triggerDataEvent(`${a.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[${B};${T}R`)}return!0}deviceStatusPrivate(R){if(R.params[0]===6){const B=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[?${B};${T}R`)}return!0}softReset(R){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(R){const B=R.params[0]||1;switch(B){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 T=B%2==1;return this._optionsService.options.cursorBlink=T,!0}setScrollRegion(R){const B=R.params[0]||1;let T;return(R.length<2||(T=R.params[1])>this._bufferService.rows||T===0)&&(T=this._bufferService.rows),T>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=T-1,this._setCursor(0,0)),!0}windowOptions(R){if(!E(R.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=R.length>1?R.params[1]:0;switch(R.params[0]){case 14:B!==2&&this._onRequestWindowsOptionsReport.fire(D.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(D.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${a.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(R){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(R){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(R){return this._windowTitle=R,this._onTitleChange.fire(R),!0}setIconName(R){return this._iconName=R,!0}setOrReportIndexedColor(R){const B=[],T=R.split(";");for(;T.length>1;){const H=T.shift(),G=T.shift();if(/^\d+$/.exec(H)){const V=parseInt(H);if(U(V))if(G==="?")B.push({type:0,index:V});else{const ue=(0,C.parseColor)(G);ue&&B.push({type:1,index:V,color:ue})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(R){const B=R.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(R,B){this._getCurrentLinkId()&&this._finishHyperlink();const T=R.split(":");let H;const G=T.findIndex((V=>V.startsWith("id=")));return G!==-1&&(H=T[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(R,B){const T=R.split(";");for(let H=0;H<T.length&&!(B>=this._specialColors.length);++H,++B)if(T[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const G=(0,C.parseColor)(T[H]);G&&this._onColor.fire([{type:1,index:this._specialColors[B],color:G}])}return!0}setOrReportFgColor(R){return this._setOrReportSpecialColor(R,0)}setOrReportBgColor(R){return this._setOrReportSpecialColor(R,1)}setOrReportCursorColor(R){return this._setOrReportSpecialColor(R,2)}restoreIndexedColor(R){if(!R)return this._onColor.fire([{type:2}]),!0;const B=[],T=R.split(";");for(let H=0;H<T.length;++H)if(/^\d+$/.exec(T[H])){const G=parseInt(T[H]);U(G)&&B.push({type:2,index:G})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(R){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(R){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(R){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,p.DEFAULT_CHARSET),!0}selectCharset(R){return R.length!==2?(this.selectDefaultCharset(),!0):(R[0]==="/"||this._charsetService.setgCharset(L[R[0]],p.CHARSETS[R[1]]||p.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 R=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,R,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(R){return this._charsetService.setgLevel(R),!0}screenAlignmentPattern(){const R=new l.CellData;R.content=4194373,R.fg=this._curAttrData.fg,R.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const T=this._activeBuffer.ybase+this._activeBuffer.y+B,H=this._activeBuffer.lines.get(T);H&&(H.fill(R),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(R,B){const T=this._bufferService.buffer,H=this._optionsService.rawOptions;return(G=>(this._coreService.triggerDataEvent(`${a.C0.ESC}${G}${a.C0.ESC}\\`),!0))(R==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:R==='"p'?'P1$r61;1"p':R==="r"?`P1$r${T.scrollTop+1};${T.scrollBottom+1}r`:R==="m"?"P1$r0m":R===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(R,B){this._dirtyRowTracker.markRangeDirty(R,B)}}n.InputHandler=$;let N=class{constructor(I){this._bufferService=I,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(I){I<this.start?this.start=I:I>this.end&&(this.end=I)}markRangeDirty(I,R){I>R&&(O=I,I=R,R=O),I<this.start&&(this.start=I),R>this.end&&(this.end=R)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function U(I){return 0<=I&&I<256}N=f([v(0,x.IBufferService)],N)},844:(F,n)=>{function u(f){for(const v of f)v.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const v=this._disposables.indexOf(f);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(f){var v;this._isDisposed||f===this._value||((v=this._value)==null||v.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},1505:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,a,p){this._data[v]||(this._data[v]={}),this._data[v][a]=p}get(v,a){return this._data[v]?this._data[v][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,v,a,p,y){this._data.get(f,v)||this._data.set(f,v,new u),this._data.get(f,v).set(a,p,y)}get(f,v,a,p){var y;return(y=this._data.get(f,v))==null?void 0:y.get(a,p)}clear(){this._data.clear()}}},6114:(F,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},6106:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let u=0;n.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(u=this._search(this._getKey(f)),this._array.splice(u,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const v=this._getKey(f);if(v===void 0||(u=this._search(v),u===-1)||this._getKey(this._array[u])!==v)return!1;do if(this._array[u]===f)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===v);return!1}*getKeyIterator(f){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===f)}forEachByKey(f,v){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do v(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let v=0,a=this._array.length-1;for(;a>=v;){let p=v+a>>1;const y=this._getKey(this._array[p]);if(y>f)a=p-1;else{if(!(y<f)){for(;p>0&&this._getKey(this._array[p-1])===f;)p--;return p}v=p+1}}return v}}},7226:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(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,c=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),c=Math.max(b,c),h=y.timeRemaining(),1.5*c>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 a 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=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const f=u(643);n.updateWindowsModeWrappedState=function(v){const a=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),p=a==null?void 0:a.get(v.cols-1),y=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);y&&p&&(y.isWrapped=p[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&p[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},9092:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const f=u(6349),v=u(7226),a=u(3734),p=u(8437),y=u(4634),b=u(511),c=u(643),r=u(4863),h=u(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(o,l,m){this._hasScrollback=o,this._optionsService=l,this._bufferService=m,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=b.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=b.CellData.fromCharData([0,c.WHITESPACE_CELL_CHAR,c.WHITESPACE_CELL_WIDTH,c.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 f.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 a.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 a.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,l){return new p.BufferLine(this._bufferService.cols,this.getNullCell(o),l)}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 l=o+this._optionsService.rawOptions.scrollback;return l>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:l}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=p.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,l){const m=this.getNullCell(p.DEFAULT_ATTR_DATA);let x=0;const _=this._getCorrectBufferLength(l);if(_>this.lines.maxLength&&(this.lines.maxLength=_),this.lines.length>0){if(this._cols<o)for(let S=0;S<this.lines.length;S++)x+=+this.lines.get(S).resize(o,m);let w=0;if(this._rows<l)for(let S=this._rows;S<l;S++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(o,m)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(o,m)));else for(let S=this._rows;S>l;S--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(_<this.lines.maxLength){const S=this.lines.length-_;S>0&&(this.lines.trimStart(S),this.ybase=Math.max(this.ybase-S,0),this.ydisp=Math.max(this.ydisp-S,0),this.savedY=Math.max(this.savedY-S,0)),this.lines.maxLength=_}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,l-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(o,l),this._cols>o))for(let w=0;w<this.lines.length;w++)x+=+this.lines.get(w).resize(o,m);this._cols=o,this._rows=l,this._memoryCleanupQueue.clear(),x>.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 l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>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,l){this._cols!==o&&(o>this._cols?this._reflowLarger(o,l):this._reflowSmaller(o,l))}_reflowLarger(o,l){const m=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(m.length>0){const x=(0,y.reflowLargerCreateNewLayout)(this.lines,m);(0,y.reflowLargerApplyNewLayout)(this.lines,x.layout),this._reflowLargerAdjustViewport(o,l,x.countRemoved)}}_reflowLargerAdjustViewport(o,l,m){const x=this.getNullCell(p.DEFAULT_ATTR_DATA);let _=m;for(;_-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new p.BufferLine(o,x))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-m,0)}_reflowSmaller(o,l){const m=this.getNullCell(p.DEFAULT_ATTR_DATA),x=[];let _=0;for(let w=this.lines.length-1;w>=0;w--){let S=this.lines.get(w);if(!S||!S.isWrapped&&S.getTrimmedLength()<=o)continue;const C=[S];for(;S.isWrapped&&w>0;)S=this.lines.get(--w),C.unshift(S);const L=this.ybase+this.y;if(L>=w&&L<w+C.length)continue;const A=C[C.length-1].getTrimmedLength(),E=(0,y.reflowSmallerGetNewLineLengths)(C,this._cols,o),D=E.length-C.length;let O;O=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+D):Math.max(0,this.lines.length-this.lines.maxLength+D);const $=[];for(let T=0;T<D;T++){const H=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);$.push(H)}$.length>0&&(x.push({start:w+C.length+_,newLines:$}),_+=$.length),C.push(...$);let N=E.length-1,U=E[N];U===0&&(N--,U=E[N]);let I=C.length-D-1,R=A;for(;I>=0;){const T=Math.min(R,U);if(C[N]===void 0)break;if(C[N].copyCellsFrom(C[I],R-T,U-T,T,!0),U-=T,U===0&&(N--,U=E[N]),R-=T,R===0){I--;const H=Math.max(I,0);R=(0,y.getWrappedLineTrimmedLength)(C,H,this._cols)}}for(let T=0;T<C.length;T++)E[T]<o&&C[T].setCell(E[T],m);let B=D-O;for(;B-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+_)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+D,this.ybase+l-1)}if(x.length>0){const w=[],S=[];for(let N=0;N<this.lines.length;N++)S.push(this.lines.get(N));const C=this.lines.length;let L=C-1,A=0,E=x[A];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+_);let D=0;for(let N=Math.min(this.lines.maxLength-1,C+_-1);N>=0;N--)if(E&&E.start>L+D){for(let U=E.newLines.length-1;U>=0;U--)this.lines.set(N--,E.newLines[U]);N++,w.push({index:L+1,amount:E.newLines.length}),D+=E.newLines.length,E=x[++A]}else this.lines.set(N,S[L--]);let O=0;for(let N=w.length-1;N>=0;N--)w[N].index+=O,this.lines.onInsertEmitter.fire(w[N]),O+=w[N].amount;const $=Math.max(0,C+_-this.lines.maxLength);$>0&&this.lines.onTrimEmitter.fire($)}}translateBufferLineToString(o,l,m=0,x){const _=this.lines.get(o);return _?_.translateToString(l,m,x):""}getWrappedRangeForLine(o){let l=o,m=o;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;m+1<this.lines.length&&this.lines.get(m+1).isWrapped;)m++;return{first:l,last:m}}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 l=0;l<this.markers.length;l++)this.markers[l].line===o&&(this.markers[l].dispose(),this.markers.splice(l--,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 l=new r.Marker(o);return this.markers.push(l),l.register(this.lines.onTrim((m=>{l.line-=m,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((m=>{l.line>=m.index&&(l.line+=m.amount)}))),l.register(this.lines.onDelete((m=>{l.line>=m.index&&l.line<m.index+m.amount&&l.dispose(),l.line>m.index&&(l.line-=m.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const f=u(3734),v=u(511),a=u(643),p=u(482);n.DEFAULT_ATTR_DATA=Object.freeze(new f.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 l=h||v.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]);for(let m=0;m<r;++m)this.setCell(m,l);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,p.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[a.CHAR_DATA_ATTR_INDEX],h[a.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[a.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[a.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,p.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,l){268435456&l.bg&&(this._extendedAttrs[r]=l.extended),this._data[3*r+0]=h|o<<22,this._data[3*r+1]=l.fg,this._data[3*r+2]=l.bg}addCodepointToCell(r,h,o){let l=this._data[3*r+0];2097152&l?this._combined[r]+=(0,p.stringFromCodePoint)(h):2097151&l?(this._combined[r]=(0,p.stringFromCodePoint)(2097151&l)+(0,p.stringFromCodePoint)(h),l&=-2097152,l|=2097152):l=h|4194304,o&&(l&=-12582913,l|=o<<22),this._data[3*r+0]=l}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 l=new v.CellData;for(let m=this.length-r-h-1;m>=0;--m)this.setCell(r+h+m,this.loadCell(r+m,l));for(let m=0;m<h;++m)this.setCell(r+m,o)}else for(let l=r;l<this.length;++l)this.setCell(l,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 l=new v.CellData;for(let m=0;m<this.length-r-h;++m)this.setCell(r+m,this.loadCell(r+h+m,l));for(let m=this.length-h;m<this.length;++m)this.setCell(m,o)}else for(let l=r;l<this.length;++l)this.setCell(l,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,l=!1){if(l)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 l=new Uint32Array(o);l.set(this._data),this._data=l}for(let l=this.length;l<r;++l)this.setCell(l,h)}else{this._data=this._data.subarray(0,o);const l=Object.keys(this._combined);for(let x=0;x<l.length;x++){const _=parseInt(l[x],10);_>=r&&delete this._combined[_]}const m=Object.keys(this._extendedAttrs);for(let x=0;x<m.length;x++){const _=parseInt(m[x],10);_>=r&&delete this._extendedAttrs[_]}}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,l,m){const x=r._data;if(m)for(let w=l-1;w>=0;w--){for(let S=0;S<3;S++)this._data[3*(o+w)+S]=x[3*(h+w)+S];268435456&x[3*(h+w)+2]&&(this._extendedAttrs[o+w]=r._extendedAttrs[h+w])}else for(let w=0;w<l;w++){for(let S=0;S<3;S++)this._data[3*(o+w)+S]=x[3*(h+w)+S];268435456&x[3*(h+w)+2]&&(this._extendedAttrs[o+w]=r._extendedAttrs[h+w])}const _=Object.keys(r._combined);for(let w=0;w<_.length;w++){const S=parseInt(_[w],10);S>=h&&(this._combined[S-h+o]=r._combined[S])}}translateToString(r,h,o,l){h=h??0,o=o??this.length,r&&(o=Math.min(o,this.getTrimmedLength())),l&&(l.length=0);let m="";for(;h<o;){const x=this._data[3*h+0],_=2097151&x,w=2097152&x?this._combined[h]:_?(0,p.stringFromCodePoint)(_):a.WHITESPACE_CELL_CHAR;if(m+=w,l)for(let S=0;S<w.length;++S)l.push(h);h+=x>>22||1}return l&&l.push(h),m}}n.BufferLine=b},4841:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(u,f){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return f*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(F,n)=>{function u(f,v,a){if(v===f.length-1)return f[v].getTrimmedLength();const p=!f[v].hasContent(a-1)&&f[v].getWidth(a-1)===1,y=f[v+1].getWidth(0)===2;return p&&y?a-1:a}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(f,v,a,p,y){const b=[];for(let c=0;c<f.length-1;c++){let r=c,h=f.get(++r);if(!h.isWrapped)continue;const o=[f.get(c)];for(;r<f.length&&h.isWrapped;)o.push(h),h=f.get(++r);if(p>=c&&p<r){c+=o.length-1;continue}let l=0,m=u(o,l,v),x=1,_=0;for(;x<o.length;){const S=u(o,x,v),C=S-_,L=a-m,A=Math.min(C,L);o[l].copyCellsFrom(o[x],_,m,A,!1),m+=A,m===a&&(l++,m=0),_+=A,_===S&&(x++,_=0),m===0&&l!==0&&o[l-1].getWidth(a-1)===2&&(o[l].copyCellsFrom(o[l-1],a-1,m++,1,!1),o[l-1].setCell(a-1,y))}o[l].replaceCells(m,a,y);let w=0;for(let S=o.length-1;S>0&&(S>l||o[S].getTrimmedLength()===0);S--)w++;w>0&&(b.push(c+o.length-w),b.push(w)),c+=o.length-1}return b},n.reflowLargerCreateNewLayout=function(f,v){const a=[];let p=0,y=v[p],b=0;for(let c=0;c<f.length;c++)if(y===c){const r=v[++p];f.onDeleteEmitter.fire({index:c-b,amount:r}),c+=r-1,b+=r,y=v[++p]}else a.push(c);return{layout:a,countRemoved:b}},n.reflowLargerApplyNewLayout=function(f,v){const a=[];for(let p=0;p<v.length;p++)a.push(f.get(v[p]));for(let p=0;p<a.length;p++)f.set(p,a[p]);f.length=v.length},n.reflowSmallerGetNewLineLengths=function(f,v,a){const p=[],y=f.map(((h,o)=>u(f,o,v))).reduce(((h,o)=>h+o));let b=0,c=0,r=0;for(;r<y;){if(y-r<a){p.push(y-r);break}b+=a;const h=u(f,c,v);b>h&&(b-=h,c++);const o=f[c].getWidth(b-1)===2;o&&b--;const l=o?a-1:a;p.push(l),r+=l}return p},n.getWrappedLineTrimmedLength=u},5295:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const f=u(8460),v=u(844),a=u(9092);class p extends v.Disposable{constructor(b,c){super(),this._optionsService=b,this._bufferService=c,this._onBufferActivate=this.register(new f.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 a.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new a.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,c){this._normal.resize(b,c),this._alt.resize(b,c),this.setupTabStops(b)}setupTabStops(b){this._normal.setupTabStops(b),this._alt.setupTabStops(b)}}n.BufferSet=p},511:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(482),v=u(643),a=u(3734);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const c=new p;return c.setFromCharData(b),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.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 c=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)c=!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:c=!0}else c=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;c&&(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=p},643:(F,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:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const f=u(8460),v=u(844);class a{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=a._nextId++,this._onDispose=this.register(new f.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=a,a._nextId=1},7116:(F,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:(F,n)=>{var u,f,v;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,(function(a){a.NUL="\0",a.SOH="",a.STX="",a.ETX="",a.EOT="",a.ENQ="",a.ACK="",a.BEL="\x07",a.BS="\b",a.HT=" ",a.LF=`
56
- `,a.VT="\v",a.FF="\f",a.CR="\r",a.SO="",a.SI="",a.DLE="",a.DC1="",a.DC2="",a.DC3="",a.DC4="",a.NAK="",a.SYN="",a.ETB="",a.CAN="",a.EM="",a.SUB="",a.ESC="\x1B",a.FS="",a.GS="",a.RS="",a.US="",a.SP=" ",a.DEL=""})(u||(n.C0=u={})),(function(a){a.PAD="€",a.HOP="",a.BPH="‚",a.NBH="ƒ",a.IND="„",a.NEL="…",a.SSA="†",a.ESA="‡",a.HTS="ˆ",a.HTJ="‰",a.VTS="Š",a.PLD="‹",a.PLU="Œ",a.RI="",a.SS2="Ž",a.SS3="",a.DCS="",a.PU1="‘",a.PU2="’",a.STS="“",a.CCH="”",a.MW="•",a.SPA="–",a.EPA="—",a.SOS="˜",a.SGCI="™",a.SCI="š",a.CSI="›",a.ST="œ",a.OSC="",a.PM="ž",a.APC="Ÿ"})(f||(n.C1=f={})),(function(a){a.ST=`${u.ESC}\\`})(v||(n.C1_ESCAPED=v={}))},7399:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const f=u(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(a,p,y,b){const c={type:0,cancel:!1,key:void 0},r=(a.shiftKey?1:0)|(a.altKey?2:0)|(a.ctrlKey?4:0)|(a.metaKey?8:0);switch(a.keyCode){case 0:a.key==="UIKeyInputUpArrow"?c.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":a.key==="UIKeyInputLeftArrow"?c.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":a.key==="UIKeyInputRightArrow"?c.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":a.key==="UIKeyInputDownArrow"&&(c.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:c.key=a.ctrlKey?"\b":f.C0.DEL,a.altKey&&(c.key=f.C0.ESC+c.key);break;case 9:if(a.shiftKey){c.key=f.C0.ESC+"[Z";break}c.key=f.C0.HT,c.cancel=!0;break;case 13:c.key=a.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,c.cancel=!0;break;case 27:c.key=f.C0.ESC,a.altKey&&(c.key=f.C0.ESC+f.C0.ESC),c.cancel=!0;break;case 37:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"D",c.key===f.C0.ESC+"[1;3D"&&(c.key=f.C0.ESC+(y?"b":"[1;5D"))):c.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"C",c.key===f.C0.ESC+"[1;3C"&&(c.key=f.C0.ESC+(y?"f":"[1;5C"))):c.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"A",y||c.key!==f.C0.ESC+"[1;3A"||(c.key=f.C0.ESC+"[1;5A")):c.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"B",y||c.key!==f.C0.ESC+"[1;3B"||(c.key=f.C0.ESC+"[1;5B")):c.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:a.shiftKey||a.ctrlKey||(c.key=f.C0.ESC+"[2~");break;case 46:c.key=r?f.C0.ESC+"[3;"+(r+1)+"~":f.C0.ESC+"[3~";break;case 36:c.key=r?f.C0.ESC+"[1;"+(r+1)+"H":p?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:c.key=r?f.C0.ESC+"[1;"+(r+1)+"F":p?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:a.shiftKey?c.type=2:a.ctrlKey?c.key=f.C0.ESC+"[5;"+(r+1)+"~":c.key=f.C0.ESC+"[5~";break;case 34:a.shiftKey?c.type=3:a.ctrlKey?c.key=f.C0.ESC+"[6;"+(r+1)+"~":c.key=f.C0.ESC+"[6~";break;case 112:c.key=r?f.C0.ESC+"[1;"+(r+1)+"P":f.C0.ESC+"OP";break;case 113:c.key=r?f.C0.ESC+"[1;"+(r+1)+"Q":f.C0.ESC+"OQ";break;case 114:c.key=r?f.C0.ESC+"[1;"+(r+1)+"R":f.C0.ESC+"OR";break;case 115:c.key=r?f.C0.ESC+"[1;"+(r+1)+"S":f.C0.ESC+"OS";break;case 116:c.key=r?f.C0.ESC+"[15;"+(r+1)+"~":f.C0.ESC+"[15~";break;case 117:c.key=r?f.C0.ESC+"[17;"+(r+1)+"~":f.C0.ESC+"[17~";break;case 118:c.key=r?f.C0.ESC+"[18;"+(r+1)+"~":f.C0.ESC+"[18~";break;case 119:c.key=r?f.C0.ESC+"[19;"+(r+1)+"~":f.C0.ESC+"[19~";break;case 120:c.key=r?f.C0.ESC+"[20;"+(r+1)+"~":f.C0.ESC+"[20~";break;case 121:c.key=r?f.C0.ESC+"[21;"+(r+1)+"~":f.C0.ESC+"[21~";break;case 122:c.key=r?f.C0.ESC+"[23;"+(r+1)+"~":f.C0.ESC+"[23~";break;case 123:c.key=r?f.C0.ESC+"[24;"+(r+1)+"~":f.C0.ESC+"[24~";break;default:if(!a.ctrlKey||a.shiftKey||a.altKey||a.metaKey)if(y&&!b||!a.altKey||a.metaKey)!y||a.altKey||a.ctrlKey||a.shiftKey||!a.metaKey?a.key&&!a.ctrlKey&&!a.altKey&&!a.metaKey&&a.keyCode>=48&&a.key.length===1?c.key=a.key:a.key&&a.ctrlKey&&(a.key==="_"&&(c.key=f.C0.US),a.key==="@"&&(c.key=f.C0.NUL)):a.keyCode===65&&(c.type=1);else{const h=v[a.keyCode],o=h==null?void 0:h[a.shiftKey?1:0];if(o)c.key=f.C0.ESC+o;else if(a.keyCode>=65&&a.keyCode<=90){const l=a.ctrlKey?a.keyCode-64:a.keyCode+32;let m=String.fromCharCode(l);a.shiftKey&&(m=m.toUpperCase()),c.key=f.C0.ESC+m}else if(a.keyCode===32)c.key=f.C0.ESC+(a.ctrlKey?f.C0.NUL:" ");else if(a.key==="Dead"&&a.code.startsWith("Key")){let l=a.code.slice(3,4);a.shiftKey||(l=l.toLowerCase()),c.key=f.C0.ESC+l,c.cancel=!0}}else a.keyCode>=65&&a.keyCode<=90?c.key=String.fromCharCode(a.keyCode-64):a.keyCode===32?c.key=f.C0.NUL:a.keyCode>=51&&a.keyCode<=55?c.key=String.fromCharCode(a.keyCode-51+27):a.keyCode===56?c.key=f.C0.DEL:a.keyCode===219?c.key=f.C0.ESC:a.keyCode===220?c.key=f.C0.FS:a.keyCode===221&&(c.key=f.C0.GS)}return c}},482:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,v=u.length){let a="";for(let p=f;p<v;++p){let y=u[p];y>65535?(y-=65536,a+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):a+=String.fromCharCode(y)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const v=u.length;if(!v)return 0;let a=0,p=0;if(this._interim){const y=u.charCodeAt(p++);56320<=y&&y<=57343?f[a++]=1024*(this._interim-55296)+y-56320+65536:(f[a++]=this._interim,f[a++]=y),this._interim=0}for(let y=p;y<v;++y){const b=u.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,a;const c=u.charCodeAt(y);56320<=c&&c<=57343?f[a++]=1024*(b-55296)+c-56320+65536:(f[a++]=b,f[a++]=c)}else b!==65279&&(f[a++]=b)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const v=u.length;if(!v)return 0;let a,p,y,b,c=0,r=0,h=0;if(this.interim[0]){let m=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let _,w=0;for(;(_=63&this.interim[++w])&&w<4;)x<<=6,x|=_;const S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=S-w;for(;h<C;){if(h>=v)return 0;if(_=u[h++],(192&_)!=128){h--,m=!0;break}this.interim[w++]=_,x<<=6,x|=63&_}m||(S===2?x<128?h--:f[c++]=x:S===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const o=v-4;let l=h;for(;l<v;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(y=u[l+2])||128&(b=u[l+3]));)f[c++]=a,f[c++]=p,f[c++]=y,f[c++]=b,l+=4;if(a=u[l++],a<128)f[c++]=a;else if((224&a)==192){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[c++]=r}else if((240&a)==224){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(y=u[l++],(192&y)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(y=u[l++],(192&y)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=y,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;f[c++]=r}}return c}}},225:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const f=u(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]],a=[[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 p;n.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let y=0;y<v.length;++y)p.fill(0,v[y][0],v[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?p[y]:(function(b,c){let r,h=0,o=c.length-1;if(b<c[0][0]||b>c[o][1])return!1;for(;o>=h;)if(r=h+o>>1,b>c[r][1])h=r+1;else{if(!(b<c[r][0]))return!0;o=r-1}return!1})(y,a)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,b){let c=this.wcwidth(y),r=c===0&&b!==0;if(r){const h=f.UnicodeService.extractWidth(b);h===0?r=!1:h>c&&(c=h)}return f.UnicodeService.createPropertyValue(0,c,r)}}},5981:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const f=u(8460),v=u(844);class a 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 f.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 c;for(this._isSyncWriting=!0;c=this._writeBuffer.shift();){this._action(c);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 c=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,b);if(h){const l=m=>Date.now()-c>=12?setTimeout((()=>this._innerWrite(0,m))):this._innerWrite(c,m);return void h.catch((m=>(queueMicrotask((()=>{throw m})),Promise.resolve(!1)))).then(l)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-c>=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=a},5941:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function v(a,p){const y=a.toString(16),b=y.length<2?"0"+y:y;switch(p){case 4:return y[0];case 8:return b;case 12:return(b+b).slice(0,3);default:return b+b}}n.parseColor=function(a){if(!a)return;let p=a.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const y=u.exec(p);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(p.indexOf("#")===0&&(p=p.slice(1),f.exec(p)&&[3,6,9,12].includes(p.length))){const y=p.length/3,b=[0,0,0];for(let c=0;c<3;++c){const r=parseInt(p.slice(y*c,y*c+y),16);b[c]=y===1?r<<4:y===2?r:y===3?r>>4:r>>8}return b}},n.toRgbString=function(a,p=16){const[y,b,c]=a;return`rgb:${v(y,p)}/${v(b,p)}/${v(c,p)}`}},5770:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const f=u(482),v=u(8742),a=u(5770),p=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(b,c){this._handlers[b]===void 0&&(this._handlers[b]=[]);const r=this._handlers[b];return r.push(c),{dispose:()=>{const h=r.indexOf(c);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=p,this._ident=0}hook(b,c){if(this.reset(),this._ident=b,this._active=this._handlers[b]||p,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(c);else this._handlerFb(this._ident,"HOOK",c)}put(b,c,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(b,c,r);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(b,c,r))}unhook(b,c=!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=c,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=p,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,c,r){this._hitLimit||(this._data+=(0,f.utf32ToString)(b,c,r),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(b){let c=!1;if(this._hitLimit)c=!1;else if(b&&(c=this._handler(this._data,this._params),c instanceof Promise))return c.then((r=>(this._params=y,this._data="",this._hitLimit=!1,r)));return this._params=y,this._data="",this._hitLimit=!1,c}}},2015:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const f=u(844),v=u(8742),a=u(6242),p=u(6351);class y{constructor(h){this.table=new Uint8Array(h)}setDefault(h,o){this.table.fill(h<<4|o)}add(h,o,l,m){this.table[o<<8|h]=l<<4|m}addMany(h,o,l,m){for(let x=0;x<h.length;x++)this.table[o<<8|h[x]]=l<<4|m}}n.TransitionTable=y;const b=160;n.VT500_TRANSITION_TABLE=(function(){const r=new y(4095),h=Array.apply(null,Array(256)).map(((w,S)=>S)),o=(w,S)=>h.slice(w,S),l=o(32,127),m=o(0,24);m.push(25),m.push.apply(m,o(28,32));const x=o(0,14);let _;for(_ in r.setDefault(1,0),r.addMany(l,0,2,0),x)r.addMany([24,26,153,154],_,3,0),r.addMany(o(128,144),_,3,0),r.addMany(o(144,152),_,3,0),r.add(156,_,0,0),r.add(27,_,11,1),r.add(157,_,4,8),r.addMany([152,158,159],_,0,7),r.add(155,_,11,3),r.add(144,_,11,9);return r.addMany(m,0,3,0),r.addMany(m,1,3,1),r.add(127,1,0,1),r.addMany(m,8,0,8),r.addMany(m,3,3,3),r.add(127,3,0,3),r.addMany(m,4,3,4),r.add(127,4,0,4),r.addMany(m,6,3,6),r.addMany(m,5,3,5),r.add(127,5,0,5),r.addMany(m,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(l,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(l,7,0,7),r.addMany(m,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(m,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(m,11,0,11),r.addMany(o(32,128),11,0,11),r.addMany(o(28,32),11,0,11),r.addMany(m,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(m,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(m,13,13,13),r.addMany(l,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 c extends f.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,l,m)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,l)=>{},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,f.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new a.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,o=[64,126]){let l=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=h.prefix.charCodeAt(0),l&&60>l||l>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 x=0;x<h.intermediates.length;++x){const _=h.intermediates.charCodeAt(x);if(32>_||_>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=_}}if(h.final.length!==1)throw new Error("final must be a single byte");const m=h.final.charCodeAt(0);if(o[0]>m||m>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return l<<=8,l|=m,l}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 l=this._identifier(h,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const m=this._escHandlers[l];return m.push(o),{dispose:()=>{const x=m.indexOf(o);x!==-1&&m.splice(x,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 l=this._identifier(h);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const m=this._csiHandlers[l];return m.push(o),{dispose:()=>{const x=m.indexOf(o);x!==-1&&m.splice(x,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,l,m,x){this._parseStack.state=h,this._parseStack.handlers=o,this._parseStack.handlerPos=l,this._parseStack.transition=m,this._parseStack.chunkPos=x}parse(h,o,l){let m,x=0,_=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const S=this._parseStack.handlers;let C=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&C>-1){for(;C>=0&&(m=S[C](this._params),m!==!0);C--)if(m instanceof Promise)return this._parseStack.handlerPos=C,m}this._parseStack.handlers=[];break;case 4:if(l===!1&&C>-1){for(;C>=0&&(m=S[C](),m!==!0);C--)if(m instanceof Promise)return this._parseStack.handlerPos=C,m}this._parseStack.handlers=[];break;case 6:if(x=h[this._parseStack.chunkPos],m=this._dcsParser.unhook(x!==24&&x!==26,l),m)return m;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(x=h[this._parseStack.chunkPos],m=this._oscParser.end(x!==24&&x!==26,l),m)return m;x===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 S=w;S<o;++S){switch(x=h[S],_=this._transitions.table[this.currentState<<8|(x<160?x:b)],_>>4){case 2:for(let D=S+1;;++D){if(D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,S,D),S=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,S,D),S=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,S,D),S=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,S,D),S=D-1;break}}break;case 3:this._executeHandlers[x]?this._executeHandlers[x]():this._executeHandlerFb(x),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:S,code:x,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const C=this._csiHandlers[this._collect<<8|x];let L=C?C.length-1:-1;for(;L>=0&&(m=C[L](this._params),m!==!0);L--)if(m instanceof Promise)return this._preserveStack(3,C,L,_,S),m;L<0&&this._csiHandlerFb(this._collect<<8|x,this._params),this.precedingJoinState=0;break;case 8:do switch(x){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(x-48)}while(++S<o&&(x=h[S])>47&&x<60);S--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:const A=this._escHandlers[this._collect<<8|x];let E=A?A.length-1:-1;for(;E>=0&&(m=A[E](),m!==!0);E--)if(m instanceof Promise)return this._preserveStack(4,A,E,_,S),m;E<0&&this._escHandlerFb(this._collect<<8|x),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|x,this._params);break;case 13:for(let D=S+1;;++D)if(D>=o||(x=h[D])===24||x===26||x===27||x>127&&x<b){this._dcsParser.put(h,S,D),S=D-1;break}break;case 14:if(m=this._dcsParser.unhook(x!==24&&x!==26),m)return this._preserveStack(6,[],0,_,S),m;x===27&&(_|=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 D=S+1;;D++)if(D>=o||(x=h[D])<32||x>127&&x<b){this._oscParser.put(h,S,D),S=D-1;break}break;case 6:if(m=this._oscParser.end(x!==24&&x!==26),m)return this._preserveStack(5,[],0,_,S),m;x===27&&(_|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&_}}}n.EscapeSequenceParser=c},6242:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const f=u(5770),v=u(482),a=[];n.OscParser=class{constructor(){this._state=0,this._active=a,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,y){this._handlers[p]===void 0&&(this._handlers[p]=[]);const b=this._handlers[p];return b.push(y),{dispose:()=>{const c=b.indexOf(y);c!==-1&&b.splice(c,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=a}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=a,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||a,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,y,b){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(p,y,b);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(p,y,b))}start(){this.reset(),this._state=1}put(p,y,b){if(this._state!==3){if(this._state===1)for(;y<b;){const c=p[y++];if(c===59){this._state=2,this._start();break}if(c<48||57<c)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+c-48}this._state===2&&b-y>0&&this._put(p,y,b)}}end(p,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let b=!1,c=this._active.length-1,r=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,b=y,r=this._stack.fallThrough,this._stack.paused=!1),!r&&b===!1){for(;c>=0&&(b=this._active[c].end(p),b!==!0);c--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,b;c--}for(;c>=0;c--)if(b=this._active[c].end(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,b}else this._handlerFb(this._id,"END",p);this._active=a,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,y,b){this._hitLimit||(this._data+=(0,v.utf32ToString)(p,y,b),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let y=!1;if(this._hitLimit)y=!1;else if(p&&(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:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const u=2147483647;class f{static fromArray(a){const p=new f;if(!a.length)return p;for(let y=Array.isArray(a[0])?1:0;y<a.length;++y){const b=a[y];if(Array.isArray(b))for(let c=0;c<b.length;++c)p.addSubParam(b[c]);else p.addParam(b)}return p}constructor(a=32,p=32){if(this.maxLength=a,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(a),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(a),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const a=new f(this.maxLength,this.maxSubParamsLength);return a.params.set(this.params),a.length=this.length,a._subParams.set(this._subParams),a._subParamsLength=this._subParamsLength,a._subParamsIdx.set(this._subParamsIdx),a._rejectDigits=this._rejectDigits,a._rejectSubDigits=this._rejectSubDigits,a._digitIsSub=this._digitIsSub,a}toArray(){const a=[];for(let p=0;p<this.length;++p){a.push(this.params[p]);const y=this._subParamsIdx[p]>>8,b=255&this._subParamsIdx[p];b-y>0&&a.push(Array.prototype.slice.call(this._subParams,y,b))}return a}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(a){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=a>u?u:a}}addSubParam(a){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=a>u?u:a,this._subParamsIdx[this.length-1]++}}hasSubParams(a){return(255&this._subParamsIdx[a])-(this._subParamsIdx[a]>>8)>0}getSubParams(a){const p=this._subParamsIdx[a]>>8,y=255&this._subParamsIdx[a];return y-p>0?this._subParams.subarray(p,y):null}getSubParamsAll(){const a={};for(let p=0;p<this.length;++p){const y=this._subParamsIdx[p]>>8,b=255&this._subParamsIdx[p];b-y>0&&(a[p]=this._subParams.slice(y,b))}return a}addDigit(a){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,b=y[p-1];y[p-1]=~b?Math.min(10*b+a,u):a}}n.Params=f},5741:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,f){const v={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(v),f.dispose=()=>this._wrappedAddonDispose(v),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===u){f=v;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}}},8771:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const f=u(3785),v=u(511);n.BufferApiView=class{constructor(a,p){this._buffer=a,this.type=p}init(a){return this._buffer=a,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(a){const p=this._buffer.lines.get(a);if(p)return new f.BufferLineApiView(p)}getNullCell(){return new v.CellData}}},3785:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const f=u(511);n.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,a){if(!(v<0||v>=this._line.length))return a?(this._line.loadCell(v,a),a):this._line.loadCell(v,new f.CellData)}translateToString(v,a,p){return this._line.translateToString(v,a,p)}}},8285:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const f=u(8771),v=u(8460),a=u(844);class p extends a.Disposable{constructor(b){super(),this._core=b,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.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=p},7975:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,f){return this._core.registerCsiHandler(u,(v=>f(v.toArray())))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,((v,a)=>f(v,a.toArray())))}addDcsHandler(u,f){return this.registerDcsHandler(u,f)}registerEscHandler(u,f){return this._core.registerEscHandler(u,f)}addEscHandler(u,f){return this.registerEscHandler(u,f)}registerOscHandler(u,f){return this._core.registerOscHandler(u,f)}addOscHandler(u,f){return this.registerOscHandler(u,f)}}},7090:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(F,n,u){var f=this&&this.__decorate||function(r,h,o,l){var m,x=arguments.length,_=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(r,h,o,l);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(_=(x<3?m(_):x>3?m(h,o,_):m(h,o))||_);return x>3&&_&&Object.defineProperty(h,o,_),_},v=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const a=u(8460),p=u(844),y=u(5295),b=u(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let c=n.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(r){super(),this.isUserScrolling=!1,this._onResize=this.register(new a.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new a.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 l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===r.fg&&l.getBg(0)===r.bg||(l=o.getBlankLine(r,h),this._cachedBlankLine=l),l.isWrapped=h;const m=o.ybase+o.scrollTop,x=o.ybase+o.scrollBottom;if(o.scrollTop===0){const _=o.lines.isFull;x===o.lines.length-1?_?o.lines.recycle().copyFrom(l):o.lines.push(l.clone()):o.lines.splice(x+1,0,l.clone()),_?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const _=x-m+1;o.lines.shiftElements(m+1,_-1,-1),o.lines.set(x,l.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(r,h,o){const l=this.buffer;if(r<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else r+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const m=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+r,l.ybase),0),m!==l.ydisp&&(h||this._onScroll.fire(l.ydisp))}};n.BufferService=c=f([v(0,b.IOptionsService)],c)},7994:(F,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(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)}}},1753:function(F,n,u){var f=this&&this.__decorate||function(l,m,x,_){var w,S=arguments.length,C=S<3?m:_===null?_=Object.getOwnPropertyDescriptor(m,x):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,m,x,_);else for(var L=l.length-1;L>=0;L--)(w=l[L])&&(C=(S<3?w(C):S>3?w(m,x,C):w(m,x))||C);return S>3&&C&&Object.defineProperty(m,x,C),C},v=this&&this.__param||function(l,m){return function(x,_){m(x,_,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const a=u(2585),p=u(8460),y=u(844),b={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function c(l,m){let x=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(x|=64,x|=l.action):(x|=3&l.button,4&l.button&&(x|=64),8&l.button&&(x|=128),l.action===32?x|=32:l.action!==0||m||(x|=3)),x}const r=String.fromCharCode,h={DEFAULT:l=>{const m=[c(l,!1)+32,l.col+32,l.row+32];return m[0]>255||m[1]>255||m[2]>255?"":`\x1B[M${r(m[0])}${r(m[1])}${r(m[2])}`},SGR:l=>{const m=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${c(l,!0)};${l.col};${l.row}${m}`},SGR_PIXELS:l=>{const m=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${c(l,!0)};${l.x};${l.y}${m}`}};let o=n.CoreMouseService=class extends y.Disposable{constructor(l,m){super(),this._bufferService=l,this._coreService=m,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const x of Object.keys(b))this.addProtocol(x,b[x]);for(const x of Object.keys(h))this.addEncoding(x,h[x]);this.reset()}addProtocol(l,m){this._protocols[l]=m}addEncoding(l,m){this._encodings[l]=m}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const m=this._encodings[this._activeEncoding](l);return m&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(m):this._coreService.triggerDataEvent(m,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,m,x){if(x){if(l.x!==m.x||l.y!==m.y)return!1}else if(l.col!==m.col||l.row!==m.row)return!1;return l.button===m.button&&l.action===m.action&&l.ctrl===m.ctrl&&l.alt===m.alt&&l.shift===m.shift}};n.CoreMouseService=o=f([v(0,a.IBufferService),v(1,a.ICoreService)],o)},6975:function(F,n,u){var f=this&&this.__decorate||function(o,l,m,x){var _,w=arguments.length,S=w<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,m):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(o,l,m,x);else for(var C=o.length-1;C>=0;C--)(_=o[C])&&(S=(w<3?_(S):w>3?_(l,m,S):_(l,m))||S);return w>3&&S&&Object.defineProperty(l,m,S),S},v=this&&this.__param||function(o,l){return function(m,x){l(m,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const a=u(1439),p=u(8460),y=u(844),b=u(2585),c=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,l,m){super(),this._bufferService=o,this._logService=l,this._optionsService=m,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}reset(){this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}triggerDataEvent(o,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const m=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&m.ybase!==m.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((x=>x.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(o))}};n.CoreService=h=f([v(0,b.IBufferService),v(1,b.ILogService),v(2,b.IOptionsService)],h)},9074:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const f=u(8055),v=u(8460),a=u(844),p=u(6106);let y=0,b=0;class c extends a.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.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,a.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const l=new r(o);if(l){const m=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),m.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,l,m){let x=0,_=0;for(const w of this._decorations.getKeyIterator(l))x=w.options.x??0,_=x+(w.options.width??1),o>=x&&o<_&&(!m||(w.options.layer??"bottom")===m)&&(yield w)}forEachDecorationAtCell(o,l,m,x){this._decorations.forEachByKey(l,(_=>{y=_.options.x??0,b=y+(_.options.width??1),o>=y&&o<b&&(!m||(_.options.layer??"bottom")===m)&&x(_)}))}}n.DecorationService=c;class r extends a.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.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:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const f=u(2585),v=u(8343);class a{constructor(...y){this._entries=new Map;for(const[b,c]of y)this.set(b,c)}set(y,b){const c=this._entries.get(y);return this._entries.set(y,b),c}forEach(y){for(const[b,c]of this._entries.entries())y(b,c)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}n.ServiceCollection=a,n.InstantiationService=class{constructor(){this._services=new a,this._services.set(f.IInstantiationService,this)}setService(p,y){this._services.set(p,y)}getService(p){return this._services.get(p)}createInstance(p,...y){const b=(0,v.getServiceDependencies)(p).sort(((h,o)=>h.index-o.index)),c=[];for(const h of b){const o=this._services.get(h.id);if(!o)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${h.id}.`);c.push(o)}const r=b.length>0?b[0].index:y.length;if(y.length!==r)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${r+1} conflicts with ${y.length} static arguments`);return new p(...y,...c)}}},7866:function(F,n,u){var f=this&&this.__decorate||function(r,h,o,l){var m,x=arguments.length,_=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(r,h,o,l);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(_=(x<3?m(_):x>3?m(h,o,_):m(h,o))||_);return x>3&&_&&Object.defineProperty(h,o,_),_},v=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(844),p=u(2585),y={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let b,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.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<=p.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<=p.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<=p.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<=p.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<=p.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=c=f([v(0,p.IOptionsService)],c),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...m){if(b.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,m);b.trace(`GlyphRenderer#${l.name}(${m.map((_=>JSON.stringify(_))).join(", ")})`);const x=l.apply(this,m);return b.trace(`GlyphRenderer#${l.name} return`,x),x}}},7302:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const f=u(8460),v=u(844),a=u(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:a.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends v.Disposable{constructor(c){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...n.DEFAULT_OPTIONS};for(const h in c)if(h in r)try{const o=c[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(c,r){return this.onOptionChange((h=>{h===c&&r(this.rawOptions[c])}))}onMultipleOptionChange(c,r){return this.onOptionChange((h=>{c.indexOf(h)!==-1&&r()}))}_setupOptions(){const c=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:c.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,o)}}_sanitizeAndValidateOption(c,r){switch(c){case"cursorStyle":if(r||(r=n.DEFAULT_OPTIONS[c]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${c}`);break;case"wordSeparator":r||(r=n.DEFAULT_OPTIONS[c]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=p.includes(r)?r:n.DEFAULT_OPTIONS[c];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${c} 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(`${c} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${c} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${c} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}n.OptionsService=y},2660:function(F,n,u){var f=this&&this.__decorate||function(y,b,c,r){var h,o=arguments.length,l=o<3?b:r===null?r=Object.getOwnPropertyDescriptor(b,c):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(y,b,c,r);else for(var m=y.length-1;m>=0;m--)(h=y[m])&&(l=(o<3?h(l):o>3?h(b,c,l):h(b,c))||l);return o>3&&l&&Object.defineProperty(b,c,l),l},v=this&&this.__param||function(y,b){return function(c,r){b(c,r,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const a=u(2585);let p=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 m=b.addMarker(b.ybase+b.y),x={data:y,id:this._nextId++,lines:[m]};return m.onDispose((()=>this._removeMarkerFromLink(x,m))),this._dataByLinkId.set(x.id,x),x.id}const c=y,r=this._getEntryIdKey(c),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),l={id:this._nextId++,key:this._getEntryIdKey(c),data:c,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(l,o))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(y,b){const c=this._dataByLinkId.get(y);if(c&&c.lines.every((r=>r.line!==b))){const r=this._bufferService.buffer.addMarker(b);c.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(c,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 c=y.lines.indexOf(b);c!==-1&&(y.lines.splice(c,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};n.OscLinkService=p=f([v(0,a.IBufferService)],p)},8343:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[f]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const a=function(p,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[f].push({id:c,index:h}):(r[f]=[{id:c,index:h}],r[u]=r)})(a,p,b)};return a.toString=()=>v,n.serviceRegistry.set(v,a),a}},2585:(F,n,u)=>{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 f=u(8343);var v;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const f=u(8460),v=u(225);class a{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,b,c=!1){return(16777215&y)<<3|(3&b)<<1|(c?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.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,c=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 x=y.charCodeAt(h);56320<=x&&x<=57343?o=1024*(o-55296)+x-56320+65536:b+=this.wcwidth(x)}const l=this.charProperties(o,c);let m=a.extractWidth(l);a.extractShouldJoin(l)&&(m-=a.extractWidth(c)),b+=m,c=l}return b}charProperties(y,b){return this._activeProvider.charProperties(y,b)}}n.UnicodeService=a}},P={};function te(F){var n=P[F];if(n!==void 0)return n.exports;var u=P[F]={exports:{}};return Y[F].call(u.exports,u,u.exports,te),u.exports}var ne={};return(()=>{var F=ne;Object.defineProperty(F,"__esModule",{value:!0}),F.Terminal=void 0;const n=te(9042),u=te(3236),f=te(844),v=te(5741),a=te(8285),p=te(7975),y=te(7090),b=["cols","rows"];class c extends f.Disposable{constructor(h){super(),this._core=this.register(new u.Terminal(h)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const o=m=>this._core.options[m],l=(m,x)=>{this._checkReadonlyOptions(m),this._core.options[m]=x};for(const m in this._core.options){const x={get:o.bind(this,m),set:l.bind(this,m)};Object.defineProperty(this._publicOptions,m,x)}}_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 p.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 a.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,l){this._verifyIntegers(h,o,l),this._core.select(h,o,l)}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")}}F.Terminal=c})(),ne})()))})(Bo)),Bo.exports}var Gv=Wv(),Oo={exports:{}},Vd;function Xv(){return Vd||(Vd=1,(function(j,K){(function(Y,P){j.exports=P()})(self,(()=>(()=>{var Y={};return(()=>{var P=Y;Object.defineProperty(P,"__esModule",{value:!0}),P.FitAddon=void 0,P.FitAddon=class{activate(te){this._terminal=te}dispose(){}fit(){const te=this.proposeDimensions();if(!te||!this._terminal||isNaN(te.cols)||isNaN(te.rows))return;const ne=this._terminal._core;this._terminal.rows===te.rows&&this._terminal.cols===te.cols||(ne._renderService.clear(),this._terminal.resize(te.cols,te.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const te=this._terminal._core,ne=te._renderService.dimensions;if(ne.css.cell.width===0||ne.css.cell.height===0)return;const F=this._terminal.options.scrollback===0?0:te.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(n.getPropertyValue("height")),f=Math.max(0,parseInt(n.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),a=u-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),p=f-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-F;return{cols:Math.max(2,Math.floor(p/ne.css.cell.width)),rows:Math.max(1,Math.floor(a/ne.css.cell.height))}}}})(),Y})()))})(Oo)),Oo.exports}var Vv=Xv(),ko={exports:{}},Yd;function Yv(){return Yd||(Yd=1,(function(j,K){(function(Y,P){j.exports=P()})(self,(()=>(()=>{var Y={965:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GlyphRenderer=void 0;const f=u(374),v=u(509),a=u(855),p=u(859),y=u(381),b=11,c=b*Float32Array.BYTES_PER_ELEMENT;let r,h=0,o=0,l=0;class m extends p.Disposable{constructor(_,w,S,C){super(),this._terminal=_,this._gl=w,this._dimensions=S,this._optionsService=C,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,f.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS))),v.TextureAtlas.maxTextureSize=(0,f.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_SIZE))),this._program=(0,f.throwIfFalsy)((0,y.createProgram)(L,`#version 300 es
55
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(m){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&m&&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(m){const y=this._getMouseBufferCoords(m),E=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!!(E&&A&&y)&&this._areCoordsInSelection(y,E,A)}isCellInSelection(m,y){const E=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!E||!A)&&this._areCoordsInSelection([m,y],E,A)}_areCoordsInSelection(m,y,E){return m[1]>y[1]&&m[1]<E[1]||y[1]===E[1]&&m[1]===y[1]&&m[0]>=y[0]&&m[0]<E[0]||y[1]<E[1]&&m[1]===E[1]&&m[0]<E[0]||y[1]<E[1]&&m[1]===y[1]&&m[0]>=y[0]}_selectWordAtCursor(m,y){var L,D;const E=(D=(L=this._linkifier.currentLink)==null?void 0:L.link)==null?void 0:D.range;if(E)return this._model.selectionStart=[E.start.x-1,E.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(E,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const A=this._getMouseBufferCoords(m);return!!A&&(this._selectWordAt(A,y),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(m,y){this._model.clearSelection(),m=Math.max(m,0),y=Math.min(y,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,y],this.refresh(),this._onSelectionChange.fire()}_handleTrim(m){this._model.handleTrim(m)&&this.refresh()}_getMouseBufferCoords(m){const y=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(y)return y[0]--,y[1]--,y[1]+=this._bufferService.buffer.ydisp,y}_getMouseEventScrollAmount(m){let y=(0,a.getCoordsRelativeToElement)(this._coreBrowserService.window,m,this._screenElement)[1];const E=this._renderService.dimensions.css.canvas.height;return y>=0&&y<=E?0:(y>E&&(y-=E),y=Math.min(Math.max(y,-50),50),y/=50,y/Math.abs(y)+Math.round(14*y))}shouldForceSelection(m){return h.isMac?m.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:m.shiftKey}handleMouseDown(m){if(this._mouseDownTimeStamp=m.timeStamp,(m.button!==2||!this.hasSelection)&&m.button===0){if(!this._enabled){if(!this.shouldForceSelection(m))return;m.stopPropagation()}m.preventDefault(),this._dragScrollAmount=0,this._enabled&&m.shiftKey?this._handleIncrementalClick(m):m.detail===1?this._handleSingleClick(m):m.detail===2?this._handleDoubleClick(m):m.detail===3&&this._handleTripleClick(m),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(m){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(m))}_handleSingleClick(m){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(m)?3:0,this._model.selectionStart=this._getMouseBufferCoords(m),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const y=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);y&&y.length!==this._model.selectionStart[0]&&y.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(m){this._selectWordAtCursor(m,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(m){const y=this._getMouseBufferCoords(m);y&&(this._activeSelectionMode=2,this._selectLineAt(y[1]))}shouldColumnSelect(m){return m.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(m){if(m.stopImmediatePropagation(),!this._model.selectionStart)return;const y=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(m),!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(m),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const E=this._bufferService.buffer;if(this._model.selectionEnd[1]<E.lines.length){const A=E.lines.get(this._model.selectionEnd[1]);A&&A.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}y&&y[0]===this._model.selectionEnd[0]&&y[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 m=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(m.ydisp+this._bufferService.rows,m.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=m.ydisp),this.refresh()}}_handleMouseUp(m){const y=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&y<500&&m.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const E=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(E&&E[0]!==void 0&&E[1]!==void 0){const A=(0,p.moveToCellSequence)(E[0]-1,E[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(A,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const m=this._model.finalSelectionStart,y=this._model.finalSelectionEnd,E=!(!m||!y||m[0]===y[0]&&m[1]===y[1]);E?m&&y&&(this._oldSelectionStart&&this._oldSelectionEnd&&m[0]===this._oldSelectionStart[0]&&m[1]===this._oldSelectionStart[1]&&y[0]===this._oldSelectionEnd[0]&&y[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(m,y,E)):this._oldHasSelection&&this._fireOnSelectionChange(m,y,E)}_fireOnSelectionChange(m,y,E){this._oldSelectionStart=m,this._oldSelectionEnd=y,this._oldHasSelection=E,this._onSelectionChange.fire()}_handleBufferActivate(m){this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim((y=>this._handleTrim(y)))}_convertViewportColToCharacterIndex(m,y){let E=y;for(let A=0;y>=A;A++){const L=m.loadCell(A,this._workCell).getChars().length;this._workCell.getWidth()===0?E--:L>1&&y!==A&&(E+=L-1)}return E}setSelection(m,y,E){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,y],this._model.selectionStartLength=E,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(m){this._isClickInSelection(m)||(this._selectWordAtCursor(m,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(m,y,E=!0,A=!0){if(m[0]>=this._bufferService.cols)return;const L=this._bufferService.buffer,D=L.lines.get(m[1]);if(!D)return;const O=L.translateBufferLineToString(m[1],!1);let $=this._convertViewportColToCharacterIndex(D,m[0]),N=$;const U=m[0]-$;let I=0,R=0,B=0,T=0;if(O.charAt($)===" "){for(;$>0&&O.charAt($-1)===" ";)$--;for(;N<O.length&&O.charAt(N+1)===" ";)N++}else{let V=m[0],ue=m[0];D.getWidth(V)===0&&(I++,V--),D.getWidth(ue)===2&&(R++,ue++);const de=D.getString(ue).length;for(de>1&&(T+=de-1,N+=de-1);V>0&&$>0&&!this._isCharWordSeparator(D.loadCell(V-1,this._workCell));){D.loadCell(V-1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===0?(I++,V--):q>1&&(B+=q-1,$-=q-1),$--,V--}for(;ue<D.length&&N+1<O.length&&!this._isCharWordSeparator(D.loadCell(ue+1,this._workCell));){D.loadCell(ue+1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===2?(R++,ue++):q>1&&(T+=q-1,N+=q-1),N++,ue++}}N++;let H=$+U-I+B,G=Math.min(this._bufferService.cols,N-$+I+R-B-T);if(y||O.slice($,N).trim()!==""){if(E&&H===0&&D.getCodePoint(0)!==32){const V=L.lines.get(m[1]-1);if(V&&D.isWrapped&&V.getCodePoint(this._bufferService.cols-1)!==32){const ue=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(ue){const de=this._bufferService.cols-ue.start;H-=de,G+=de}}}if(A&&H+G===this._bufferService.cols&&D.getCodePoint(this._bufferService.cols-1)!==32){const V=L.lines.get(m[1]+1);if(V!=null&&V.isWrapped&&V.getCodePoint(0)!==32){const ue=this._getWordAt([0,m[1]+1],!1,!1,!0);ue&&(G+=ue.length)}}return{start:H,length:G}}}_selectWordAt(m,y){const E=this._getWordAt(m,y);if(E){for(;E.start<0;)E.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[E.start,m[1]],this._model.selectionStartLength=E.length}}_selectToWordAt(m){const y=this._getWordAt(m,!0);if(y){let E=m[1];for(;y.start<0;)y.start+=this._bufferService.cols,E--;if(!this._model.areSelectionValuesReversed())for(;y.start+y.length>this._bufferService.cols;)y.length-=this._bufferService.cols,E++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?y.start:y.start+y.length,E]}}_isCharWordSeparator(m){return m.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(m.getChars())>=0}_selectLineAt(m){const y=this._bufferService.buffer.getWrappedRangeForLine(m),E={start:{x:0,y:y.first},end:{x:this._bufferService.cols-1,y:y.last}};this._model.selectionStart=[0,y.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(E,this._bufferService.cols)}};n.SelectionService=C=f([v(3,S.IBufferService),v(4,S.ICoreService),v(5,b.IMouseService),v(6,S.IOptionsService),v(7,b.IRenderService),v(8,b.ICoreBrowserService)],C)},4725:(F,n,u)=>{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 f=u(8343);n.ICharSizeService=(0,f.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),n.IMouseService=(0,f.createDecorator)("MouseService"),n.IRenderService=(0,f.createDecorator)("RenderService"),n.ISelectionService=(0,f.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,f.createDecorator)("ThemeService"),n.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(F,n,u){var f=this&&this.__decorate||function(C,m,y,E){var A,L=arguments.length,D=L<3?m:E===null?E=Object.getOwnPropertyDescriptor(m,y):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(C,m,y,E);else for(var O=C.length-1;O>=0;O--)(A=C[O])&&(D=(L<3?A(D):L>3?A(m,y,D):A(m,y))||D);return L>3&&D&&Object.defineProperty(m,y,D),D},v=this&&this.__param||function(C,m){return function(y,E){m(y,E,C)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const a=u(7239),p=u(8055),w=u(8460),b=u(844),c=u(2585),r=p.css.toColor("#ffffff"),h=p.css.toColor("#000000"),o=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const C=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],m=[0,95,135,175,215,255];for(let y=0;y<216;y++){const E=m[y/36%6|0],A=m[y/6%6|0],L=m[y%6];C.push({css:p.channels.toCss(E,A,L),rgba:p.channels.toRgba(E,A,L)})}for(let y=0;y<24;y++){const E=8+10*y;C.push({css:p.channels.toCss(E,E,E),rgba:p.channels.toRgba(E,E,E)})}return C})());let x=n.ThemeService=class extends b.Disposable{get colors(){return this._colors}constructor(C){super(),this._optionsService=C,this._contrastCache=new a.ColorContrastCache,this._halfContrastCache=new a.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:o,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:p.color.blend(h,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:p.color.blend(h,S),ansi:n.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(C={}){const m=this._colors;if(m.foreground=_(C.foreground,r),m.background=_(C.background,h),m.cursor=_(C.cursor,o),m.cursorAccent=_(C.cursorAccent,l),m.selectionBackgroundTransparent=_(C.selectionBackground,S),m.selectionBackgroundOpaque=p.color.blend(m.background,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundTransparent=_(C.selectionInactiveBackground,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundOpaque=p.color.blend(m.background,m.selectionInactiveBackgroundTransparent),m.selectionForeground=C.selectionForeground?_(C.selectionForeground,p.NULL_COLOR):void 0,m.selectionForeground===p.NULL_COLOR&&(m.selectionForeground=void 0),p.color.isOpaque(m.selectionBackgroundTransparent)&&(m.selectionBackgroundTransparent=p.color.opacity(m.selectionBackgroundTransparent,.3)),p.color.isOpaque(m.selectionInactiveBackgroundTransparent)&&(m.selectionInactiveBackgroundTransparent=p.color.opacity(m.selectionInactiveBackgroundTransparent,.3)),m.ansi=n.DEFAULT_ANSI_COLORS.slice(),m.ansi[0]=_(C.black,n.DEFAULT_ANSI_COLORS[0]),m.ansi[1]=_(C.red,n.DEFAULT_ANSI_COLORS[1]),m.ansi[2]=_(C.green,n.DEFAULT_ANSI_COLORS[2]),m.ansi[3]=_(C.yellow,n.DEFAULT_ANSI_COLORS[3]),m.ansi[4]=_(C.blue,n.DEFAULT_ANSI_COLORS[4]),m.ansi[5]=_(C.magenta,n.DEFAULT_ANSI_COLORS[5]),m.ansi[6]=_(C.cyan,n.DEFAULT_ANSI_COLORS[6]),m.ansi[7]=_(C.white,n.DEFAULT_ANSI_COLORS[7]),m.ansi[8]=_(C.brightBlack,n.DEFAULT_ANSI_COLORS[8]),m.ansi[9]=_(C.brightRed,n.DEFAULT_ANSI_COLORS[9]),m.ansi[10]=_(C.brightGreen,n.DEFAULT_ANSI_COLORS[10]),m.ansi[11]=_(C.brightYellow,n.DEFAULT_ANSI_COLORS[11]),m.ansi[12]=_(C.brightBlue,n.DEFAULT_ANSI_COLORS[12]),m.ansi[13]=_(C.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),m.ansi[14]=_(C.brightCyan,n.DEFAULT_ANSI_COLORS[14]),m.ansi[15]=_(C.brightWhite,n.DEFAULT_ANSI_COLORS[15]),C.extendedAnsi){const y=Math.min(m.ansi.length-16,C.extendedAnsi.length);for(let E=0;E<y;E++)m.ansi[E+16]=_(C.extendedAnsi[E],n.DEFAULT_ANSI_COLORS[E+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(C){this._restoreColor(C),this._onChangeColors.fire(this.colors)}_restoreColor(C){if(C!==void 0)switch(C){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[C]=this._restoreColors.ansi[C]}else for(let m=0;m<this._restoreColors.ansi.length;++m)this._colors.ansi[m]=this._restoreColors.ansi[m]}modifyColors(C){C(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 _(C,m){if(C!==void 0)try{return p.css.toColor(C)}catch{}return m}n.ThemeService=x=f([v(0,c.IOptionsService)],x)},6349:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const f=u(8460),v=u(844);class a extends v.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(w){if(this._maxLength===w)return;const b=new Array(w);for(let c=0;c<Math.min(w,this.length);c++)b[c]=this._array[this._getCyclicIndex(c)];this._array=b,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let b=this._length;b<w;b++)this._array[b]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,b){this._array[this._getCyclicIndex(w)]=b}push(w){this._array[this._getCyclicIndex(this._length)]=w,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(w,b,...c){if(b){for(let r=w;r<this._length-b;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+b)];this._length-=b,this.onDeleteEmitter.fire({index:w,amount:b})}for(let r=this._length-1;r>=w;r--)this._array[this._getCyclicIndex(r+c.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<c.length;r++)this._array[this._getCyclicIndex(w+r)]=c[r];if(c.length&&this.onInsertEmitter.fire({index:w,amount:c.length}),this._length+c.length>this._maxLength){const r=this._length+c.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=c.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,b,c){if(!(b<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+c<0)throw new Error("Cannot shift elements in list beyond index 0");if(c>0){for(let h=b-1;h>=0;h--)this.set(w+h+c,this.get(w+h));const r=w+b+c-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(w+r+c,this.get(w+r))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}n.CircularList=a},1439:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function u(f,v=5){if(typeof f!="object")return f;const a=Array.isArray(f)?[]:{};for(const p in f)a[p]=v<=1?f[p]:f[p]&&u(f[p],v-1);return a}},8055:(F,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 u=0,f=0,v=0,a=0;var p,w,b,c,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,_,C){return C!==void 0?`#${h(S)}${h(x)}${h(_)}${h(C)}`:`#${h(S)}${h(x)}${h(_)}`},l.toRgba=function(S,x,_,C=255){return(S<<24|x<<16|_<<8|C)>>>0},l.toColor=function(S,x,_,C){return{css:l.toCss(S,x,_,C),rgba:l.toRgba(S,x,_,C)}}})(p||(n.channels=p={})),(function(l){function S(x,_){return a=Math.round(255*_),[u,f,v]=r.toChannels(x.rgba),{css:p.toCss(u,f,v,a),rgba:p.toRgba(u,f,v,a)}}l.blend=function(x,_){if(a=(255&_.rgba)/255,a===1)return{css:_.css,rgba:_.rgba};const C=_.rgba>>24&255,m=_.rgba>>16&255,y=_.rgba>>8&255,E=x.rgba>>24&255,A=x.rgba>>16&255,L=x.rgba>>8&255;return u=E+Math.round((C-E)*a),f=A+Math.round((m-A)*a),v=L+Math.round((y-L)*a),{css:p.toCss(u,f,v),rgba:p.toRgba(u,f,v)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,_,C){const m=r.ensureContrastRatio(x.rgba,_.rgba,C);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const _=(255|x.rgba)>>>0;return[u,f,v]=r.toChannels(_),{css:p.toCss(u,f,v),rgba:_}},l.opacity=S,l.multiplyOpacity=function(x,_){return a=255&x.rgba,S(x,a*_/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(n.color=w={})),(function(l){let S,x;try{const _=document.createElement("canvas");_.width=1,_.height=1;const C=_.getContext("2d",{willReadFrequently:!0});C&&(S=C,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(_){if(_.match(/#[\da-f]{3,8}/i))switch(_.length){case 4:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),p.toColor(u,f,v);case 5:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),a=parseInt(_.slice(4,5).repeat(2),16),p.toColor(u,f,v,a);case 7:return{css:_,rgba:(parseInt(_.slice(1),16)<<8|255)>>>0};case 9:return{css:_,rgba:parseInt(_.slice(1),16)>>>0}}const C=_.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(C)return u=parseInt(C[1]),f=parseInt(C[2]),v=parseInt(C[3]),a=Math.round(255*(C[5]===void 0?1:parseFloat(C[5]))),p.toColor(u,f,v,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=_,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,f,v,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,v,a),css:_}}})(b||(n.css=b={})),(function(l){function S(x,_,C){const m=x/255,y=_/255,E=C/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.0722*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(c||(n.rgb=c={})),(function(l){function S(_,C,m){const y=_>>24&255,E=_>>16&255,A=_>>8&255;let L=C>>24&255,D=C>>16&255,O=C>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));for(;$<m&&(L>0||D>0||O>0);)L-=Math.max(0,Math.ceil(.1*L)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));return(L<<24|D<<16|O<<8|255)>>>0}function x(_,C,m){const y=_>>24&255,E=_>>16&255,A=_>>8&255;let L=C>>24&255,D=C>>16&255,O=C>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));for(;$<m&&(L<255||D<255||O<255);)L=Math.min(255,L+Math.ceil(.1*(255-L))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));return(L<<24|D<<16|O<<8|255)>>>0}l.blend=function(_,C){if(a=(255&C)/255,a===1)return C;const m=C>>24&255,y=C>>16&255,E=C>>8&255,A=_>>24&255,L=_>>16&255,D=_>>8&255;return u=A+Math.round((m-A)*a),f=L+Math.round((y-L)*a),v=D+Math.round((E-D)*a),p.toRgba(u,f,v)},l.ensureContrastRatio=function(_,C,m){const y=c.relativeLuminance(_>>8),E=c.relativeLuminance(C>>8);if(o(y,E)<m){if(E<y){const D=S(_,C,m),O=o(y,c.relativeLuminance(D>>8));if(O<m){const $=x(_,C,m);return O>o(y,c.relativeLuminance($>>8))?D:$}return D}const A=x(_,C,m),L=o(y,c.relativeLuminance(A>>8));if(L<m){const D=S(_,C,m);return L>o(y,c.relativeLuminance(D>>8))?A:D}return A}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},8969:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const f=u(844),v=u(2585),a=u(4348),p=u(7866),w=u(744),b=u(7302),c=u(6975),r=u(8460),h=u(1753),o=u(1480),l=u(7994),S=u(9282),x=u(5435),_=u(5981),C=u(2660);let m=!1;class y extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((A=>{var L;(L=this._onScrollApi)==null||L.fire(A.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(A){for(const L in A)this.optionsService.options[L]=A[L]}constructor(A){super(),this._windowsWrappingHeuristics=this.register(new f.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 a.InstantiationService,this.optionsService=this.register(new b.OptionsService(A)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(c.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(l.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(C.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new x.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((L=>{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((L=>{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 _.WriteBuffer(((L,D)=>this._inputHandler.parse(L,D)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(A,L){this._writeBuffer.write(A,L)}writeSync(A,L){this._logService.logLevel<=v.LogLevelEnum.WARN&&!m&&(this._logService.warn("writeSync is unreliable and will be removed soon."),m=!0),this._writeBuffer.writeSync(A,L)}input(A,L=!0){this.coreService.triggerDataEvent(A,L)}resize(A,L){isNaN(A)||isNaN(L)||(A=Math.max(A,w.MINIMUM_COLS),L=Math.max(L,w.MINIMUM_ROWS),this._bufferService.resize(A,L))}scroll(A,L=!1){this._bufferService.scroll(A,L)}scrollLines(A,L,D){this._bufferService.scrollLines(A,L,D)}scrollPages(A){this.scrollLines(A*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(A){const L=A-this._bufferService.buffer.ydisp;L!==0&&this.scrollLines(L)}registerEscHandler(A,L){return this._inputHandler.registerEscHandler(A,L)}registerDcsHandler(A,L){return this._inputHandler.registerDcsHandler(A,L)}registerCsiHandler(A,L){return this._inputHandler.registerCsiHandler(A,L)}registerOscHandler(A,L){return this._inputHandler.registerOscHandler(A,L)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let A=!1;const L=this.optionsService.rawOptions.windowsPty;L&&L.buildNumber!==void 0&&L.buildNumber!==void 0?A=L.backend==="conpty"&&L.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(A=!0),A?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const A=[];A.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),A.push(this.registerCsiHandler({final:"H"},(()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const L of A)L.dispose()}))}}}n.CoreTerminal=y},8460:(F,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const v=[];for(let a=0;a<this._listeners.length;a++)v.push(this._listeners[a]);for(let a=0;a<v.length;a++)v[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((v=>f.fire(v)))},n.runAndSubscribe=function(u,f){return f(void 0),u((v=>f(v)))}},5435:function(F,n,u){var f=this&&this.__decorate||function(I,R,B,T){var H,G=arguments.length,V=G<3?R:T===null?T=Object.getOwnPropertyDescriptor(R,B):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(I,R,B,T);else for(var ue=I.length-1;ue>=0;ue--)(H=I[ue])&&(V=(G<3?H(V):G>3?H(R,B,V):H(R,B))||V);return G>3&&V&&Object.defineProperty(R,B,V),V},v=this&&this.__param||function(I,R){return function(B,T){R(B,T,I)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const a=u(2584),p=u(7116),w=u(2015),b=u(844),c=u(482),r=u(8437),h=u(8460),o=u(643),l=u(511),S=u(3734),x=u(2585),_=u(1480),C=u(6242),m=u(6351),y=u(5941),E={"(":0,")":1,"*":2,"+":3,"-":1,".":2},A=131072;function L(I,R){if(I>24)return R.setWinLines||!1;switch(I){case 1:return!!R.restoreWin;case 2:return!!R.minimizeWin;case 3:return!!R.setWinPosition;case 4:return!!R.setWinSizePixels;case 5:return!!R.raiseWin;case 6:return!!R.lowerWin;case 7:return!!R.refreshWin;case 8:return!!R.setWinSizeChars;case 9:return!!R.maximizeWin;case 10:return!!R.fullscreenWin;case 11:return!!R.getWinState;case 13:return!!R.getWinPosition;case 14:return!!R.getWinSizePixels;case 15:return!!R.getScreenSizePixels;case 16:return!!R.getCellSizePixels;case 18:return!!R.getWinSizeChars;case 19:return!!R.getScreenSizeChars;case 20:return!!R.getIconTitle;case 21:return!!R.getWinTitle;case 22:return!!R.pushTitle;case 23:return!!R.popTitle;case 24:return!!R.setWinLines}return!1}var D;(function(I){I[I.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",I[I.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(D||(n.WindowsOptionsReportType=D={}));let O=0;class $ extends b.Disposable{getAttrData(){return this._curAttrData}constructor(R,B,T,H,G,V,ue,de,q=new w.EscapeSequenceParser){super(),this._bufferService=R,this._charsetService=B,this._coreService=T,this._logService=H,this._optionsService=G,this._oscLinkService=V,this._coreMouseService=ue,this._unicodeService=de,this._parser=q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new c.StringToUtf32,this._utf8Decoder=new c.Utf8ToUtf32,this._workCell=new l.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((z=>this._activeBuffer=z.activeBuffer))),this._parser.setCsiHandlerFallback(((z,se)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(z),params:se.toArray()})})),this._parser.setEscHandlerFallback((z=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(z)})})),this._parser.setExecuteHandlerFallback((z=>{this._logService.debug("Unknown EXECUTE code: ",{code:z})})),this._parser.setOscHandlerFallback(((z,se,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:z,action:se,data:ie})})),this._parser.setDcsHandlerFallback(((z,se,ie)=>{se==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(z),action:se,payload:ie})})),this._parser.setPrintHandler(((z,se,ie)=>this.print(z,se,ie))),this._parser.registerCsiHandler({final:"@"},(z=>this.insertChars(z))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(z=>this.scrollLeft(z))),this._parser.registerCsiHandler({final:"A"},(z=>this.cursorUp(z))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(z=>this.scrollRight(z))),this._parser.registerCsiHandler({final:"B"},(z=>this.cursorDown(z))),this._parser.registerCsiHandler({final:"C"},(z=>this.cursorForward(z))),this._parser.registerCsiHandler({final:"D"},(z=>this.cursorBackward(z))),this._parser.registerCsiHandler({final:"E"},(z=>this.cursorNextLine(z))),this._parser.registerCsiHandler({final:"F"},(z=>this.cursorPrecedingLine(z))),this._parser.registerCsiHandler({final:"G"},(z=>this.cursorCharAbsolute(z))),this._parser.registerCsiHandler({final:"H"},(z=>this.cursorPosition(z))),this._parser.registerCsiHandler({final:"I"},(z=>this.cursorForwardTab(z))),this._parser.registerCsiHandler({final:"J"},(z=>this.eraseInDisplay(z,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(z=>this.eraseInDisplay(z,!0))),this._parser.registerCsiHandler({final:"K"},(z=>this.eraseInLine(z,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(z=>this.eraseInLine(z,!0))),this._parser.registerCsiHandler({final:"L"},(z=>this.insertLines(z))),this._parser.registerCsiHandler({final:"M"},(z=>this.deleteLines(z))),this._parser.registerCsiHandler({final:"P"},(z=>this.deleteChars(z))),this._parser.registerCsiHandler({final:"S"},(z=>this.scrollUp(z))),this._parser.registerCsiHandler({final:"T"},(z=>this.scrollDown(z))),this._parser.registerCsiHandler({final:"X"},(z=>this.eraseChars(z))),this._parser.registerCsiHandler({final:"Z"},(z=>this.cursorBackwardTab(z))),this._parser.registerCsiHandler({final:"`"},(z=>this.charPosAbsolute(z))),this._parser.registerCsiHandler({final:"a"},(z=>this.hPositionRelative(z))),this._parser.registerCsiHandler({final:"b"},(z=>this.repeatPrecedingCharacter(z))),this._parser.registerCsiHandler({final:"c"},(z=>this.sendDeviceAttributesPrimary(z))),this._parser.registerCsiHandler({prefix:">",final:"c"},(z=>this.sendDeviceAttributesSecondary(z))),this._parser.registerCsiHandler({final:"d"},(z=>this.linePosAbsolute(z))),this._parser.registerCsiHandler({final:"e"},(z=>this.vPositionRelative(z))),this._parser.registerCsiHandler({final:"f"},(z=>this.hVPosition(z))),this._parser.registerCsiHandler({final:"g"},(z=>this.tabClear(z))),this._parser.registerCsiHandler({final:"h"},(z=>this.setMode(z))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(z=>this.setModePrivate(z))),this._parser.registerCsiHandler({final:"l"},(z=>this.resetMode(z))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(z=>this.resetModePrivate(z))),this._parser.registerCsiHandler({final:"m"},(z=>this.charAttributes(z))),this._parser.registerCsiHandler({final:"n"},(z=>this.deviceStatus(z))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(z=>this.deviceStatusPrivate(z))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(z=>this.softReset(z))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(z=>this.setCursorStyle(z))),this._parser.registerCsiHandler({final:"r"},(z=>this.setScrollRegion(z))),this._parser.registerCsiHandler({final:"s"},(z=>this.saveCursor(z))),this._parser.registerCsiHandler({final:"t"},(z=>this.windowOptions(z))),this._parser.registerCsiHandler({final:"u"},(z=>this.restoreCursor(z))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(z=>this.insertColumns(z))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(z=>this.deleteColumns(z))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(z=>this.selectProtected(z))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(z=>this.requestMode(z,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(z=>this.requestMode(z,!1))),this._parser.setExecuteHandler(a.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(a.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(a.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(a.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(a.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(a.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(a.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(a.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(a.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new C.OscHandler((z=>(this.setTitle(z),this.setIconName(z),!0)))),this._parser.registerOscHandler(1,new C.OscHandler((z=>this.setIconName(z)))),this._parser.registerOscHandler(2,new C.OscHandler((z=>this.setTitle(z)))),this._parser.registerOscHandler(4,new C.OscHandler((z=>this.setOrReportIndexedColor(z)))),this._parser.registerOscHandler(8,new C.OscHandler((z=>this.setHyperlink(z)))),this._parser.registerOscHandler(10,new C.OscHandler((z=>this.setOrReportFgColor(z)))),this._parser.registerOscHandler(11,new C.OscHandler((z=>this.setOrReportBgColor(z)))),this._parser.registerOscHandler(12,new C.OscHandler((z=>this.setOrReportCursorColor(z)))),this._parser.registerOscHandler(104,new C.OscHandler((z=>this.restoreIndexedColor(z)))),this._parser.registerOscHandler(110,new C.OscHandler((z=>this.restoreFgColor(z)))),this._parser.registerOscHandler(111,new C.OscHandler((z=>this.restoreBgColor(z)))),this._parser.registerOscHandler(112,new C.OscHandler((z=>this.restoreCursorColor(z)))),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 z in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:z},(()=>this.selectCharset("("+z))),this._parser.registerEscHandler({intermediates:")",final:z},(()=>this.selectCharset(")"+z))),this._parser.registerEscHandler({intermediates:"*",final:z},(()=>this.selectCharset("*"+z))),this._parser.registerEscHandler({intermediates:"+",final:z},(()=>this.selectCharset("+"+z))),this._parser.registerEscHandler({intermediates:"-",final:z},(()=>this.selectCharset("-"+z))),this._parser.registerEscHandler({intermediates:".",final:z},(()=>this.selectCharset("."+z))),this._parser.registerEscHandler({intermediates:"/",final:z},(()=>this.selectCharset("/"+z)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((z=>(this._logService.error("Parsing error: ",z),z))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler(((z,se)=>this.requestStatusString(z,se))))}_preserveStack(R,B,T,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=R,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=T,this._parseStack.position=H}_logSlowResolvingAsync(R){this._logService.logLevel<=x.LogLevelEnum.WARN&&Promise.race([R,new Promise(((B,T)=>setTimeout((()=>T("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(R,B){let T,H=this._activeBuffer.x,G=this._activeBuffer.y,V=0;const ue=this._parseStack.paused;if(ue){if(T=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(T),T;H=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,R.length>A&&(V=this._parseStack.position+A)}if(this._logService.logLevel<=x.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof R=="string"?` "${R}"`:` "${Array.prototype.map.call(R,(z=>String.fromCharCode(z))).join("")}"`),typeof R=="string"?R.split("").map((z=>z.charCodeAt(0))):R),this._parseBuffer.length<R.length&&this._parseBuffer.length<A&&(this._parseBuffer=new Uint32Array(Math.min(R.length,A))),ue||this._dirtyRowTracker.clearRange(),R.length>A)for(let z=V;z<R.length;z+=A){const se=z+A<R.length?z+A:R.length,ie=typeof R=="string"?this._stringDecoder.decode(R.substring(z,se),this._parseBuffer):this._utf8Decoder.decode(R.subarray(z,se),this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(H,G,ie,z),this._logSlowResolvingAsync(T),T}else if(!ue){const z=typeof R=="string"?this._stringDecoder.decode(R,this._parseBuffer):this._utf8Decoder.decode(R,this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,z))return this._preserveStack(H,G,z,0),this._logSlowResolvingAsync(T),T}this._activeBuffer.x===H&&this._activeBuffer.y===G||this._onCursorMove.fire();const de=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(q,this._bufferService.rows-1),Math.min(de,this._bufferService.rows-1))}print(R,B,T){let H,G;const V=this._charsetService.charset,ue=this._optionsService.rawOptions.screenReaderMode,de=this._bufferService.cols,q=this._coreService.decPrivateModes.wraparound,z=this._coreService.modes.insertMode,se=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&T-B>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,se);let ve=this._parser.precedingJoinState;for(let fe=B;fe<T;++fe){if(H=R[fe],H<127&&V){const qe=V[String.fromCharCode(H)];qe&&(H=qe.charCodeAt(0))}const Le=this._unicodeService.charProperties(H,ve);G=_.UnicodeService.extractWidth(Le);const _e=_.UnicodeService.extractShouldJoin(Le),Oe=_e?_.UnicodeService.extractWidth(ve):0;if(ve=Le,ue&&this._onA11yChar.fire((0,c.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+G-Oe>de){if(q){const qe=ie;let be=this._activeBuffer.x-Oe;for(this._activeBuffer.x=Oe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Oe>0&&ie instanceof r.BufferLine&&ie.copyCellsFrom(qe,be,0,Oe,!1);be<de;)qe.setCellFromCodepoint(be++,0,1,se)}else if(this._activeBuffer.x=de-1,G===2)continue}if(_e&&this._activeBuffer.x){const qe=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-qe,H,G);for(let be=G-Oe;--be>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}else if(z&&(ie.insertCells(this._activeBuffer.x,G-Oe,this._activeBuffer.getNullCell(se)),ie.getWidth(de-1)===2&&ie.setCellFromCodepoint(de-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,se)),ie.setCellFromCodepoint(this._activeBuffer.x++,H,G,se),G>0)for(;--G;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}this._parser.precedingJoinState=ve,this._activeBuffer.x<de&&T-B>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,se),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(R,B){return R.final!=="t"||R.prefix||R.intermediates?this._parser.registerCsiHandler(R,B):this._parser.registerCsiHandler(R,(T=>!L(T.params[0],this._optionsService.rawOptions.windowOptions)||B(T)))}registerDcsHandler(R,B){return this._parser.registerDcsHandler(R,new m.DcsHandler(B))}registerEscHandler(R,B){return this._parser.registerEscHandler(R,B)}registerOscHandler(R,B){return this._parser.registerOscHandler(R,new C.OscHandler(B))}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 R;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&&((R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&R.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const R=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-R),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(R=this._bufferService.cols-1){this._activeBuffer.x=Math.min(R,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(R,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=R,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=R,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(R,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+R,this._activeBuffer.y+B)}cursorUp(R){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,R.params[0]||1)):this._moveCursor(0,-(R.params[0]||1)),!0}cursorDown(R){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,R.params[0]||1)):this._moveCursor(0,R.params[0]||1),!0}cursorForward(R){return this._moveCursor(R.params[0]||1,0),!0}cursorBackward(R){return this._moveCursor(-(R.params[0]||1),0),!0}cursorNextLine(R){return this.cursorDown(R),this._activeBuffer.x=0,!0}cursorPrecedingLine(R){return this.cursorUp(R),this._activeBuffer.x=0,!0}cursorCharAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(R){return this._setCursor(R.length>=2?(R.params[1]||1)-1:0,(R.params[0]||1)-1),!0}charPosAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(R){return this._moveCursor(R.params[0]||1,0),!0}linePosAbsolute(R){return this._setCursor(this._activeBuffer.x,(R.params[0]||1)-1),!0}vPositionRelative(R){return this._moveCursor(0,R.params[0]||1),!0}hVPosition(R){return this.cursorPosition(R),!0}tabClear(R){const B=R.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=R.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=R.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(R){const B=R.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(R,B,T,H=!1,G=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);V.replaceCells(B,T,this._activeBuffer.getNullCell(this._eraseAttrData()),G),H&&(V.isWrapped=!1)}_resetBufferLine(R,B=!1){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);T&&(T.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+R),T.isWrapped=!1)}eraseInDisplay(R,B=!1){let T;switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);T<this._bufferService.rows;T++)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(T);break;case 1:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(T+1).isWrapped=!1);T--;)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(T=this._bufferService.rows,this._dirtyRowTracker.markDirty(T-1);T--;)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(0);break;case 3:const H=this._activeBuffer.lines.length-this._bufferService.rows;H>0&&(this._activeBuffer.lines.trimStart(H),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-H,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-H,0),this._onScroll.fire(0))}return!0}eraseInLine(R,B=!1){switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(R){this._restrictCursor();let B=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,G=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;B--;)this._activeBuffer.lines.splice(G-1,1),this._activeBuffer.lines.splice(T,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(R){this._restrictCursor();let B=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y;let H;for(H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-H;B--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(H,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(R){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(R){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(R){let B=R.params[0]||1;for(;B--;)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(R){let B=R.params[0]||1;for(;B--;)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(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(R){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(R.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(R){const B=this._parser.precedingJoinState;if(!B)return!0;const T=R.params[0]||1,H=_.UnicodeService.extractWidth(B),G=this._activeBuffer.x-H,V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(G),ue=new Uint32Array(V.length*T);let de=0;for(let z=0;z<V.length;){const se=V.codePointAt(z)||0;ue[de++]=se,z+=se>65535?2:1}let q=de;for(let z=1;z<T;++z)ue.copyWithin(q,0,de),q+=de;return this.print(ue,0,q),!0}sendDeviceAttributesPrimary(R){return R.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(a.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(a.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(R){return R.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(a.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(a.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(R.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(a.C0.ESC+"[>83;40003;0c")),!0}_is(R){return(this._optionsService.rawOptions.termName+"").indexOf(R)===0}setMode(R){for(let B=0;B<R.length;B++)switch(R.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(R){for(let B=0;B<R.length;B++)switch(R.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.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(R){for(let B=0;B<R.length;B++)switch(R.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(R){for(let B=0;B<R.length;B++)switch(R.params[B]){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(),R.params[B]===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(R,B){const T=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:G}=this._coreMouseService,V=this._coreService,{buffers:ue,cols:de}=this._bufferService,{active:q,alt:z}=ue,se=this._optionsService.rawOptions,ie=_e=>_e?1:2,ve=R.params[0];return fe=ve,Le=B?ve===2?4:ve===4?ie(V.modes.insertMode):ve===12?3:ve===20?ie(se.convertEol):0:ve===1?ie(T.applicationCursorKeys):ve===3?se.windowOptions.setWinLines?de===80?2:de===132?1:0:0:ve===6?ie(T.origin):ve===7?ie(T.wraparound):ve===8?3:ve===9?ie(H==="X10"):ve===12?ie(se.cursorBlink):ve===25?ie(!V.isCursorHidden):ve===45?ie(T.reverseWraparound):ve===66?ie(T.applicationKeypad):ve===67?4:ve===1e3?ie(H==="VT200"):ve===1002?ie(H==="DRAG"):ve===1003?ie(H==="ANY"):ve===1004?ie(T.sendFocus):ve===1005?4:ve===1006?ie(G==="SGR"):ve===1015?4:ve===1016?ie(G==="SGR_PIXELS"):ve===1048?1:ve===47||ve===1047||ve===1049?ie(q===z):ve===2004?ie(T.bracketedPasteMode):0,V.triggerDataEvent(`${a.C0.ESC}[${B?"":"?"}${fe};${Le}$y`),!0;var fe,Le}_updateAttrColor(R,B,T,H,G){return B===2?(R|=50331648,R&=-16777216,R|=S.AttributeData.fromColorRGB([T,H,G])):B===5&&(R&=-50331904,R|=33554432|255&T),R}_extractColor(R,B,T){const H=[0,0,-1,0,0,0];let G=0,V=0;do{if(H[V+G]=R.params[B+V],R.hasSubParams(B+V)){const ue=R.getSubParams(B+V);let de=0;do H[1]===5&&(G=1),H[V+de+1+G]=ue[de];while(++de<ue.length&&de+V+1+G<H.length);break}if(H[1]===5&&V+G>=2||H[1]===2&&V+G>=5)break;H[1]&&(G=1)}while(++V+B<R.length&&V+G<H.length);for(let ue=2;ue<H.length;++ue)H[ue]===-1&&(H[ue]=0);switch(H[0]){case 38:T.fg=this._updateAttrColor(T.fg,H[1],H[3],H[4],H[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,H[1],H[3],H[4],H[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,H[1],H[3],H[4],H[5])}return V}_processUnderline(R,B){B.extended=B.extended.clone(),(!~R||R>5)&&(R=1),B.extended.underlineStyle=R,B.fg|=268435456,R===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(R){R.fg=r.DEFAULT_ATTR_DATA.fg,R.bg=r.DEFAULT_ATTR_DATA.bg,R.extended=R.extended.clone(),R.extended.underlineStyle=0,R.extended.underlineColor&=-67108864,R.updateExtended()}charAttributes(R){if(R.length===1&&R.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=R.length;let T;const H=this._curAttrData;for(let G=0;G<B;G++)T=R.params[G],T>=30&&T<=37?(H.fg&=-50331904,H.fg|=16777216|T-30):T>=40&&T<=47?(H.bg&=-50331904,H.bg|=16777216|T-40):T>=90&&T<=97?(H.fg&=-50331904,H.fg|=16777224|T-90):T>=100&&T<=107?(H.bg&=-50331904,H.bg|=16777224|T-100):T===0?this._processSGR0(H):T===1?H.fg|=134217728:T===3?H.bg|=67108864:T===4?(H.fg|=268435456,this._processUnderline(R.hasSubParams(G)?R.getSubParams(G)[0]:1,H)):T===5?H.fg|=536870912:T===7?H.fg|=67108864:T===8?H.fg|=1073741824:T===9?H.fg|=2147483648:T===2?H.bg|=134217728:T===21?this._processUnderline(2,H):T===22?(H.fg&=-134217729,H.bg&=-134217729):T===23?H.bg&=-67108865:T===24?(H.fg&=-268435457,this._processUnderline(0,H)):T===25?H.fg&=-536870913:T===27?H.fg&=-67108865:T===28?H.fg&=-1073741825:T===29?H.fg&=2147483647:T===39?(H.fg&=-67108864,H.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):T===49?(H.bg&=-67108864,H.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):T===38||T===48||T===58?G+=this._extractColor(R,G,H):T===53?H.bg|=1073741824:T===55?H.bg&=-1073741825:T===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):T===100?(H.fg&=-67108864,H.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",T);return!0}deviceStatus(R){switch(R.params[0]){case 5:this._coreService.triggerDataEvent(`${a.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[${B};${T}R`)}return!0}deviceStatusPrivate(R){if(R.params[0]===6){const B=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[?${B};${T}R`)}return!0}softReset(R){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(R){const B=R.params[0]||1;switch(B){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 T=B%2==1;return this._optionsService.options.cursorBlink=T,!0}setScrollRegion(R){const B=R.params[0]||1;let T;return(R.length<2||(T=R.params[1])>this._bufferService.rows||T===0)&&(T=this._bufferService.rows),T>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=T-1,this._setCursor(0,0)),!0}windowOptions(R){if(!L(R.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=R.length>1?R.params[1]:0;switch(R.params[0]){case 14:B!==2&&this._onRequestWindowsOptionsReport.fire(D.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(D.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${a.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(R){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(R){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(R){return this._windowTitle=R,this._onTitleChange.fire(R),!0}setIconName(R){return this._iconName=R,!0}setOrReportIndexedColor(R){const B=[],T=R.split(";");for(;T.length>1;){const H=T.shift(),G=T.shift();if(/^\d+$/.exec(H)){const V=parseInt(H);if(U(V))if(G==="?")B.push({type:0,index:V});else{const ue=(0,y.parseColor)(G);ue&&B.push({type:1,index:V,color:ue})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(R){const B=R.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(R,B){this._getCurrentLinkId()&&this._finishHyperlink();const T=R.split(":");let H;const G=T.findIndex((V=>V.startsWith("id=")));return G!==-1&&(H=T[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(R,B){const T=R.split(";");for(let H=0;H<T.length&&!(B>=this._specialColors.length);++H,++B)if(T[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const G=(0,y.parseColor)(T[H]);G&&this._onColor.fire([{type:1,index:this._specialColors[B],color:G}])}return!0}setOrReportFgColor(R){return this._setOrReportSpecialColor(R,0)}setOrReportBgColor(R){return this._setOrReportSpecialColor(R,1)}setOrReportCursorColor(R){return this._setOrReportSpecialColor(R,2)}restoreIndexedColor(R){if(!R)return this._onColor.fire([{type:2}]),!0;const B=[],T=R.split(";");for(let H=0;H<T.length;++H)if(/^\d+$/.exec(T[H])){const G=parseInt(T[H]);U(G)&&B.push({type:2,index:G})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(R){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(R){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(R){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,p.DEFAULT_CHARSET),!0}selectCharset(R){return R.length!==2?(this.selectDefaultCharset(),!0):(R[0]==="/"||this._charsetService.setgCharset(E[R[0]],p.CHARSETS[R[1]]||p.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 R=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,R,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(R){return this._charsetService.setgLevel(R),!0}screenAlignmentPattern(){const R=new l.CellData;R.content=4194373,R.fg=this._curAttrData.fg,R.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const T=this._activeBuffer.ybase+this._activeBuffer.y+B,H=this._activeBuffer.lines.get(T);H&&(H.fill(R),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(R,B){const T=this._bufferService.buffer,H=this._optionsService.rawOptions;return(G=>(this._coreService.triggerDataEvent(`${a.C0.ESC}${G}${a.C0.ESC}\\`),!0))(R==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:R==='"p'?'P1$r61;1"p':R==="r"?`P1$r${T.scrollTop+1};${T.scrollBottom+1}r`:R==="m"?"P1$r0m":R===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(R,B){this._dirtyRowTracker.markRangeDirty(R,B)}}n.InputHandler=$;let N=class{constructor(I){this._bufferService=I,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(I){I<this.start?this.start=I:I>this.end&&(this.end=I)}markRangeDirty(I,R){I>R&&(O=I,I=R,R=O),I<this.start&&(this.start=I),R>this.end&&(this.end=R)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function U(I){return 0<=I&&I<256}N=f([v(0,x.IBufferService)],N)},844:(F,n)=>{function u(f){for(const v of f)v.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const v=this._disposables.indexOf(f);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(f){var v;this._isDisposed||f===this._value||((v=this._value)==null||v.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},1505:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,a,p){this._data[v]||(this._data[v]={}),this._data[v][a]=p}get(v,a){return this._data[v]?this._data[v][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,v,a,p,w){this._data.get(f,v)||this._data.set(f,v,new u),this._data.get(f,v).set(a,p,w)}get(f,v,a,p){var w;return(w=this._data.get(f,v))==null?void 0:w.get(a,p)}clear(){this._data.clear()}}},6114:(F,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},6106:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let u=0;n.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(u=this._search(this._getKey(f)),this._array.splice(u,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const v=this._getKey(f);if(v===void 0||(u=this._search(v),u===-1)||this._getKey(this._array[u])!==v)return!1;do if(this._array[u]===f)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===v);return!1}*getKeyIterator(f){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===f)}forEachByKey(f,v){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do v(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let v=0,a=this._array.length-1;for(;a>=v;){let p=v+a>>1;const w=this._getKey(this._array[p]);if(w>f)a=p-1;else{if(!(w<f)){for(;p>0&&this._getKey(this._array[p-1])===f;)p--;return p}v=p+1}}return v}}},7226:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(6114);class v{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(w){this._idleCallback=void 0;let b=0,c=0,r=w.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),c=Math.max(b,c),h=w.timeRemaining(),1.5*c>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 a extends v{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const b=Date.now()+w;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const f=u(643);n.updateWindowsModeWrappedState=function(v){const a=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),p=a==null?void 0:a.get(v.cols-1),w=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);w&&p&&(w.isWrapped=p[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&p[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},9092:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const f=u(6349),v=u(7226),a=u(3734),p=u(8437),w=u(4634),b=u(511),c=u(643),r=u(4863),h=u(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(o,l,S){this._hasScrollback=o,this._optionsService=l,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=b.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=b.CellData.fromCharData([0,c.WHITESPACE_CELL_CHAR,c.WHITESPACE_CELL_WIDTH,c.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 f.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 a.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 a.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,l){return new p.BufferLine(this._bufferService.cols,this.getNullCell(o),l)}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 l=o+this._optionsService.rawOptions.scrollback;return l>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:l}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=p.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,l){const S=this.getNullCell(p.DEFAULT_ATTR_DATA);let x=0;const _=this._getCorrectBufferLength(l);if(_>this.lines.maxLength&&(this.lines.maxLength=_),this.lines.length>0){if(this._cols<o)for(let m=0;m<this.lines.length;m++)x+=+this.lines.get(m).resize(o,S);let C=0;if(this._rows<l)for(let m=this._rows;m<l;m++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(o,S)):this.ybase>0&&this.lines.length<=this.ybase+this.y+C+1?(this.ybase--,C++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(o,S)));else for(let m=this._rows;m>l;m--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(_<this.lines.maxLength){const m=this.lines.length-_;m>0&&(this.lines.trimStart(m),this.ybase=Math.max(this.ybase-m,0),this.ydisp=Math.max(this.ydisp-m,0),this.savedY=Math.max(this.savedY-m,0)),this.lines.maxLength=_}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,l-1),C&&(this.y+=C),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(o,l),this._cols>o))for(let C=0;C<this.lines.length;C++)x+=+this.lines.get(C).resize(o,S);this._cols=o,this._rows=l,this._memoryCleanupQueue.clear(),x>.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 l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>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,l){this._cols!==o&&(o>this._cols?this._reflowLarger(o,l):this._reflowSmaller(o,l))}_reflowLarger(o,l){const S=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(S.length>0){const x=(0,w.reflowLargerCreateNewLayout)(this.lines,S);(0,w.reflowLargerApplyNewLayout)(this.lines,x.layout),this._reflowLargerAdjustViewport(o,l,x.countRemoved)}}_reflowLargerAdjustViewport(o,l,S){const x=this.getNullCell(p.DEFAULT_ATTR_DATA);let _=S;for(;_-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new p.BufferLine(o,x))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-S,0)}_reflowSmaller(o,l){const S=this.getNullCell(p.DEFAULT_ATTR_DATA),x=[];let _=0;for(let C=this.lines.length-1;C>=0;C--){let m=this.lines.get(C);if(!m||!m.isWrapped&&m.getTrimmedLength()<=o)continue;const y=[m];for(;m.isWrapped&&C>0;)m=this.lines.get(--C),y.unshift(m);const E=this.ybase+this.y;if(E>=C&&E<C+y.length)continue;const A=y[y.length-1].getTrimmedLength(),L=(0,w.reflowSmallerGetNewLineLengths)(y,this._cols,o),D=L.length-y.length;let O;O=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+D):Math.max(0,this.lines.length-this.lines.maxLength+D);const $=[];for(let T=0;T<D;T++){const H=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);$.push(H)}$.length>0&&(x.push({start:C+y.length+_,newLines:$}),_+=$.length),y.push(...$);let N=L.length-1,U=L[N];U===0&&(N--,U=L[N]);let I=y.length-D-1,R=A;for(;I>=0;){const T=Math.min(R,U);if(y[N]===void 0)break;if(y[N].copyCellsFrom(y[I],R-T,U-T,T,!0),U-=T,U===0&&(N--,U=L[N]),R-=T,R===0){I--;const H=Math.max(I,0);R=(0,w.getWrappedLineTrimmedLength)(y,H,this._cols)}}for(let T=0;T<y.length;T++)L[T]<o&&y[T].setCell(L[T],S);let B=D-O;for(;B-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+_)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+D,this.ybase+l-1)}if(x.length>0){const C=[],m=[];for(let N=0;N<this.lines.length;N++)m.push(this.lines.get(N));const y=this.lines.length;let E=y-1,A=0,L=x[A];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+_);let D=0;for(let N=Math.min(this.lines.maxLength-1,y+_-1);N>=0;N--)if(L&&L.start>E+D){for(let U=L.newLines.length-1;U>=0;U--)this.lines.set(N--,L.newLines[U]);N++,C.push({index:E+1,amount:L.newLines.length}),D+=L.newLines.length,L=x[++A]}else this.lines.set(N,m[E--]);let O=0;for(let N=C.length-1;N>=0;N--)C[N].index+=O,this.lines.onInsertEmitter.fire(C[N]),O+=C[N].amount;const $=Math.max(0,y+_-this.lines.maxLength);$>0&&this.lines.onTrimEmitter.fire($)}}translateBufferLineToString(o,l,S=0,x){const _=this.lines.get(o);return _?_.translateToString(l,S,x):""}getWrappedRangeForLine(o){let l=o,S=o;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;S+1<this.lines.length&&this.lines.get(S+1).isWrapped;)S++;return{first:l,last:S}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===o&&(this.markers[l].dispose(),this.markers.splice(l--,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 l=new r.Marker(o);return this.markers.push(l),l.register(this.lines.onTrim((S=>{l.line-=S,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((S=>{l.line>=S.index&&(l.line+=S.amount)}))),l.register(this.lines.onDelete((S=>{l.line>=S.index&&l.line<S.index+S.amount&&l.dispose(),l.line>S.index&&(l.line-=S.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const f=u(3734),v=u(511),a=u(643),p=u(482);n.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let w=0;class b{constructor(r,h,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const l=h||v.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]);for(let S=0;S<r;++S)this.setCell(S,l);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,p.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[a.CHAR_DATA_ATTR_INDEX],h[a.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[a.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[a.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,p.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return w=3*r,h.content=this._data[w+0],h.fg=this._data[w+1],h.bg=this._data[w+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,l){268435456&l.bg&&(this._extendedAttrs[r]=l.extended),this._data[3*r+0]=h|o<<22,this._data[3*r+1]=l.fg,this._data[3*r+2]=l.bg}addCodepointToCell(r,h,o){let l=this._data[3*r+0];2097152&l?this._combined[r]+=(0,p.stringFromCodePoint)(h):2097151&l?(this._combined[r]=(0,p.stringFromCodePoint)(2097151&l)+(0,p.stringFromCodePoint)(h),l&=-2097152,l|=2097152):l=h|4194304,o&&(l&=-12582913,l|=o<<22),this._data[3*r+0]=l}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 l=new v.CellData;for(let S=this.length-r-h-1;S>=0;--S)this.setCell(r+h+S,this.loadCell(r+S,l));for(let S=0;S<h;++S)this.setCell(r+S,o)}else for(let l=r;l<this.length;++l)this.setCell(l,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 l=new v.CellData;for(let S=0;S<this.length-r-h;++S)this.setCell(r+S,this.loadCell(r+h+S,l));for(let S=this.length-h;S<this.length;++S)this.setCell(S,o)}else for(let l=r;l<this.length;++l)this.setCell(l,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,l=!1){if(l)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 l=new Uint32Array(o);l.set(this._data),this._data=l}for(let l=this.length;l<r;++l)this.setCell(l,h)}else{this._data=this._data.subarray(0,o);const l=Object.keys(this._combined);for(let x=0;x<l.length;x++){const _=parseInt(l[x],10);_>=r&&delete this._combined[_]}const S=Object.keys(this._extendedAttrs);for(let x=0;x<S.length;x++){const _=parseInt(S[x],10);_>=r&&delete this._extendedAttrs[_]}}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,l,S){const x=r._data;if(S)for(let C=l-1;C>=0;C--){for(let m=0;m<3;m++)this._data[3*(o+C)+m]=x[3*(h+C)+m];268435456&x[3*(h+C)+2]&&(this._extendedAttrs[o+C]=r._extendedAttrs[h+C])}else for(let C=0;C<l;C++){for(let m=0;m<3;m++)this._data[3*(o+C)+m]=x[3*(h+C)+m];268435456&x[3*(h+C)+2]&&(this._extendedAttrs[o+C]=r._extendedAttrs[h+C])}const _=Object.keys(r._combined);for(let C=0;C<_.length;C++){const m=parseInt(_[C],10);m>=h&&(this._combined[m-h+o]=r._combined[m])}}translateToString(r,h,o,l){h=h??0,o=o??this.length,r&&(o=Math.min(o,this.getTrimmedLength())),l&&(l.length=0);let S="";for(;h<o;){const x=this._data[3*h+0],_=2097151&x,C=2097152&x?this._combined[h]:_?(0,p.stringFromCodePoint)(_):a.WHITESPACE_CELL_CHAR;if(S+=C,l)for(let m=0;m<C.length;++m)l.push(h);h+=x>>22||1}return l&&l.push(h),S}}n.BufferLine=b},4841:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(u,f){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return f*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(F,n)=>{function u(f,v,a){if(v===f.length-1)return f[v].getTrimmedLength();const p=!f[v].hasContent(a-1)&&f[v].getWidth(a-1)===1,w=f[v+1].getWidth(0)===2;return p&&w?a-1:a}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(f,v,a,p,w){const b=[];for(let c=0;c<f.length-1;c++){let r=c,h=f.get(++r);if(!h.isWrapped)continue;const o=[f.get(c)];for(;r<f.length&&h.isWrapped;)o.push(h),h=f.get(++r);if(p>=c&&p<r){c+=o.length-1;continue}let l=0,S=u(o,l,v),x=1,_=0;for(;x<o.length;){const m=u(o,x,v),y=m-_,E=a-S,A=Math.min(y,E);o[l].copyCellsFrom(o[x],_,S,A,!1),S+=A,S===a&&(l++,S=0),_+=A,_===m&&(x++,_=0),S===0&&l!==0&&o[l-1].getWidth(a-1)===2&&(o[l].copyCellsFrom(o[l-1],a-1,S++,1,!1),o[l-1].setCell(a-1,w))}o[l].replaceCells(S,a,w);let C=0;for(let m=o.length-1;m>0&&(m>l||o[m].getTrimmedLength()===0);m--)C++;C>0&&(b.push(c+o.length-C),b.push(C)),c+=o.length-1}return b},n.reflowLargerCreateNewLayout=function(f,v){const a=[];let p=0,w=v[p],b=0;for(let c=0;c<f.length;c++)if(w===c){const r=v[++p];f.onDeleteEmitter.fire({index:c-b,amount:r}),c+=r-1,b+=r,w=v[++p]}else a.push(c);return{layout:a,countRemoved:b}},n.reflowLargerApplyNewLayout=function(f,v){const a=[];for(let p=0;p<v.length;p++)a.push(f.get(v[p]));for(let p=0;p<a.length;p++)f.set(p,a[p]);f.length=v.length},n.reflowSmallerGetNewLineLengths=function(f,v,a){const p=[],w=f.map(((h,o)=>u(f,o,v))).reduce(((h,o)=>h+o));let b=0,c=0,r=0;for(;r<w;){if(w-r<a){p.push(w-r);break}b+=a;const h=u(f,c,v);b>h&&(b-=h,c++);const o=f[c].getWidth(b-1)===2;o&&b--;const l=o?a-1:a;p.push(l),r+=l}return p},n.getWrappedLineTrimmedLength=u},5295:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const f=u(8460),v=u(844),a=u(9092);class p extends v.Disposable{constructor(b,c){super(),this._optionsService=b,this._bufferService=c,this._onBufferActivate=this.register(new f.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 a.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new a.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,c){this._normal.resize(b,c),this._alt.resize(b,c),this.setupTabStops(b)}setupTabStops(b){this._normal.setupTabStops(b),this._alt.setupTabStops(b)}}n.BufferSet=p},511:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(482),v=u(643),a=u(3734);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const c=new p;return c.setFromCharData(b),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.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 c=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)c=!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:c=!0}else c=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;c&&(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=p},643:(F,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:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const f=u(8460),v=u(844);class a{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=a._nextId++,this._onDispose=this.register(new f.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(w){return this._disposables.push(w),w}}n.Marker=a,a._nextId=1},7116:(F,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:(F,n)=>{var u,f,v;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,(function(a){a.NUL="\0",a.SOH="",a.STX="",a.ETX="",a.EOT="",a.ENQ="",a.ACK="",a.BEL="\x07",a.BS="\b",a.HT=" ",a.LF=`
56
+ `,a.VT="\v",a.FF="\f",a.CR="\r",a.SO="",a.SI="",a.DLE="",a.DC1="",a.DC2="",a.DC3="",a.DC4="",a.NAK="",a.SYN="",a.ETB="",a.CAN="",a.EM="",a.SUB="",a.ESC="\x1B",a.FS="",a.GS="",a.RS="",a.US="",a.SP=" ",a.DEL=""})(u||(n.C0=u={})),(function(a){a.PAD="€",a.HOP="",a.BPH="‚",a.NBH="ƒ",a.IND="„",a.NEL="…",a.SSA="†",a.ESA="‡",a.HTS="ˆ",a.HTJ="‰",a.VTS="Š",a.PLD="‹",a.PLU="Œ",a.RI="",a.SS2="Ž",a.SS3="",a.DCS="",a.PU1="‘",a.PU2="’",a.STS="“",a.CCH="”",a.MW="•",a.SPA="–",a.EPA="—",a.SOS="˜",a.SGCI="™",a.SCI="š",a.CSI="›",a.ST="œ",a.OSC="",a.PM="ž",a.APC="Ÿ"})(f||(n.C1=f={})),(function(a){a.ST=`${u.ESC}\\`})(v||(n.C1_ESCAPED=v={}))},7399:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const f=u(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(a,p,w,b){const c={type:0,cancel:!1,key:void 0},r=(a.shiftKey?1:0)|(a.altKey?2:0)|(a.ctrlKey?4:0)|(a.metaKey?8:0);switch(a.keyCode){case 0:a.key==="UIKeyInputUpArrow"?c.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":a.key==="UIKeyInputLeftArrow"?c.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":a.key==="UIKeyInputRightArrow"?c.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":a.key==="UIKeyInputDownArrow"&&(c.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:c.key=a.ctrlKey?"\b":f.C0.DEL,a.altKey&&(c.key=f.C0.ESC+c.key);break;case 9:if(a.shiftKey){c.key=f.C0.ESC+"[Z";break}c.key=f.C0.HT,c.cancel=!0;break;case 13:c.key=a.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,c.cancel=!0;break;case 27:c.key=f.C0.ESC,a.altKey&&(c.key=f.C0.ESC+f.C0.ESC),c.cancel=!0;break;case 37:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"D",c.key===f.C0.ESC+"[1;3D"&&(c.key=f.C0.ESC+(w?"b":"[1;5D"))):c.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"C",c.key===f.C0.ESC+"[1;3C"&&(c.key=f.C0.ESC+(w?"f":"[1;5C"))):c.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"A",w||c.key!==f.C0.ESC+"[1;3A"||(c.key=f.C0.ESC+"[1;5A")):c.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"B",w||c.key!==f.C0.ESC+"[1;3B"||(c.key=f.C0.ESC+"[1;5B")):c.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:a.shiftKey||a.ctrlKey||(c.key=f.C0.ESC+"[2~");break;case 46:c.key=r?f.C0.ESC+"[3;"+(r+1)+"~":f.C0.ESC+"[3~";break;case 36:c.key=r?f.C0.ESC+"[1;"+(r+1)+"H":p?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:c.key=r?f.C0.ESC+"[1;"+(r+1)+"F":p?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:a.shiftKey?c.type=2:a.ctrlKey?c.key=f.C0.ESC+"[5;"+(r+1)+"~":c.key=f.C0.ESC+"[5~";break;case 34:a.shiftKey?c.type=3:a.ctrlKey?c.key=f.C0.ESC+"[6;"+(r+1)+"~":c.key=f.C0.ESC+"[6~";break;case 112:c.key=r?f.C0.ESC+"[1;"+(r+1)+"P":f.C0.ESC+"OP";break;case 113:c.key=r?f.C0.ESC+"[1;"+(r+1)+"Q":f.C0.ESC+"OQ";break;case 114:c.key=r?f.C0.ESC+"[1;"+(r+1)+"R":f.C0.ESC+"OR";break;case 115:c.key=r?f.C0.ESC+"[1;"+(r+1)+"S":f.C0.ESC+"OS";break;case 116:c.key=r?f.C0.ESC+"[15;"+(r+1)+"~":f.C0.ESC+"[15~";break;case 117:c.key=r?f.C0.ESC+"[17;"+(r+1)+"~":f.C0.ESC+"[17~";break;case 118:c.key=r?f.C0.ESC+"[18;"+(r+1)+"~":f.C0.ESC+"[18~";break;case 119:c.key=r?f.C0.ESC+"[19;"+(r+1)+"~":f.C0.ESC+"[19~";break;case 120:c.key=r?f.C0.ESC+"[20;"+(r+1)+"~":f.C0.ESC+"[20~";break;case 121:c.key=r?f.C0.ESC+"[21;"+(r+1)+"~":f.C0.ESC+"[21~";break;case 122:c.key=r?f.C0.ESC+"[23;"+(r+1)+"~":f.C0.ESC+"[23~";break;case 123:c.key=r?f.C0.ESC+"[24;"+(r+1)+"~":f.C0.ESC+"[24~";break;default:if(!a.ctrlKey||a.shiftKey||a.altKey||a.metaKey)if(w&&!b||!a.altKey||a.metaKey)!w||a.altKey||a.ctrlKey||a.shiftKey||!a.metaKey?a.key&&!a.ctrlKey&&!a.altKey&&!a.metaKey&&a.keyCode>=48&&a.key.length===1?c.key=a.key:a.key&&a.ctrlKey&&(a.key==="_"&&(c.key=f.C0.US),a.key==="@"&&(c.key=f.C0.NUL)):a.keyCode===65&&(c.type=1);else{const h=v[a.keyCode],o=h==null?void 0:h[a.shiftKey?1:0];if(o)c.key=f.C0.ESC+o;else if(a.keyCode>=65&&a.keyCode<=90){const l=a.ctrlKey?a.keyCode-64:a.keyCode+32;let S=String.fromCharCode(l);a.shiftKey&&(S=S.toUpperCase()),c.key=f.C0.ESC+S}else if(a.keyCode===32)c.key=f.C0.ESC+(a.ctrlKey?f.C0.NUL:" ");else if(a.key==="Dead"&&a.code.startsWith("Key")){let l=a.code.slice(3,4);a.shiftKey||(l=l.toLowerCase()),c.key=f.C0.ESC+l,c.cancel=!0}}else a.keyCode>=65&&a.keyCode<=90?c.key=String.fromCharCode(a.keyCode-64):a.keyCode===32?c.key=f.C0.NUL:a.keyCode>=51&&a.keyCode<=55?c.key=String.fromCharCode(a.keyCode-51+27):a.keyCode===56?c.key=f.C0.DEL:a.keyCode===219?c.key=f.C0.ESC:a.keyCode===220?c.key=f.C0.FS:a.keyCode===221&&(c.key=f.C0.GS)}return c}},482:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,v=u.length){let a="";for(let p=f;p<v;++p){let w=u[p];w>65535?(w-=65536,a+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):a+=String.fromCharCode(w)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const v=u.length;if(!v)return 0;let a=0,p=0;if(this._interim){const w=u.charCodeAt(p++);56320<=w&&w<=57343?f[a++]=1024*(this._interim-55296)+w-56320+65536:(f[a++]=this._interim,f[a++]=w),this._interim=0}for(let w=p;w<v;++w){const b=u.charCodeAt(w);if(55296<=b&&b<=56319){if(++w>=v)return this._interim=b,a;const c=u.charCodeAt(w);56320<=c&&c<=57343?f[a++]=1024*(b-55296)+c-56320+65536:(f[a++]=b,f[a++]=c)}else b!==65279&&(f[a++]=b)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const v=u.length;if(!v)return 0;let a,p,w,b,c=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let _,C=0;for(;(_=63&this.interim[++C])&&C<4;)x<<=6,x|=_;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,y=m-C;for(;h<y;){if(h>=v)return 0;if(_=u[h++],(192&_)!=128){h--,S=!0;break}this.interim[C++]=_,x<<=6,x|=63&_}S||(m===2?x<128?h--:f[c++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const o=v-4;let l=h;for(;l<v;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(w=u[l+2])||128&(b=u[l+3]));)f[c++]=a,f[c++]=p,f[c++]=w,f[c++]=b,l+=4;if(a=u[l++],a<128)f[c++]=a;else if((224&a)==192){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[c++]=r}else if((240&a)==224){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&w,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=w,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&w)<<6|63&b,r<65536||r>1114111)continue;f[c++]=r}}return c}}},225:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const f=u(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]],a=[[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 p;n.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let w=0;w<v.length;++w)p.fill(0,v[w][0],v[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?p[w]:(function(b,c){let r,h=0,o=c.length-1;if(b<c[0][0]||b>c[o][1])return!1;for(;o>=h;)if(r=h+o>>1,b>c[r][1])h=r+1;else{if(!(b<c[r][0]))return!0;o=r-1}return!1})(w,a)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,b){let c=this.wcwidth(w),r=c===0&&b!==0;if(r){const h=f.UnicodeService.extractWidth(b);h===0?r=!1:h>c&&(c=h)}return f.UnicodeService.createPropertyValue(0,c,r)}}},5981:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const f=u(8460),v=u(844);class a extends v.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,b){if(b!==void 0&&this._syncCalls>b)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let c;for(this._isSyncWriting=!0;c=this._writeBuffer.shift();){this._action(c);const r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,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+=w.length,this._writeBuffer.push(w),this._callbacks.push(b),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(b)}_innerWrite(w=0,b=!0){const c=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,b);if(h){const l=S=>Date.now()-c>=12?setTimeout((()=>this._innerWrite(0,S))):this._innerWrite(c,S);return void h.catch((S=>(queueMicrotask((()=>{throw S})),Promise.resolve(!1)))).then(l)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-c>=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=a},5941:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function v(a,p){const w=a.toString(16),b=w.length<2?"0"+w:w;switch(p){case 4:return w[0];case 8:return b;case 12:return(b+b).slice(0,3);default:return b+b}}n.parseColor=function(a){if(!a)return;let p=a.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const w=u.exec(p);if(w){const b=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/b*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/b*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/b*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),f.exec(p)&&[3,6,9,12].includes(p.length))){const w=p.length/3,b=[0,0,0];for(let c=0;c<3;++c){const r=parseInt(p.slice(w*c,w*c+w),16);b[c]=w===1?r<<4:w===2?r:w===3?r>>4:r>>8}return b}},n.toRgbString=function(a,p=16){const[w,b,c]=a;return`rgb:${v(w,p)}/${v(b,p)}/${v(c,p)}`}},5770:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const f=u(482),v=u(8742),a=u(5770),p=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(b,c){this._handlers[b]===void 0&&(this._handlers[b]=[]);const r=this._handlers[b];return r.push(c),{dispose:()=>{const h=r.indexOf(c);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=p,this._ident=0}hook(b,c){if(this.reset(),this._ident=b,this._active=this._handlers[b]||p,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(c);else this._handlerFb(this._ident,"HOOK",c)}put(b,c,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(b,c,r);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(b,c,r))}unhook(b,c=!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=c,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=p,this._ident=0}};const w=new v.Params;w.addParam(0),n.DcsHandler=class{constructor(b){this._handler=b,this._data="",this._params=w,this._hitLimit=!1}hook(b){this._params=b.length>1||b.params[0]?b.clone():w,this._data="",this._hitLimit=!1}put(b,c,r){this._hitLimit||(this._data+=(0,f.utf32ToString)(b,c,r),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(b){let c=!1;if(this._hitLimit)c=!1;else if(b&&(c=this._handler(this._data,this._params),c instanceof Promise))return c.then((r=>(this._params=w,this._data="",this._hitLimit=!1,r)));return this._params=w,this._data="",this._hitLimit=!1,c}}},2015:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const f=u(844),v=u(8742),a=u(6242),p=u(6351);class w{constructor(h){this.table=new Uint8Array(h)}setDefault(h,o){this.table.fill(h<<4|o)}add(h,o,l,S){this.table[o<<8|h]=l<<4|S}addMany(h,o,l,S){for(let x=0;x<h.length;x++)this.table[o<<8|h[x]]=l<<4|S}}n.TransitionTable=w;const b=160;n.VT500_TRANSITION_TABLE=(function(){const r=new w(4095),h=Array.apply(null,Array(256)).map(((C,m)=>m)),o=(C,m)=>h.slice(C,m),l=o(32,127),S=o(0,24);S.push(25),S.push.apply(S,o(28,32));const x=o(0,14);let _;for(_ in r.setDefault(1,0),r.addMany(l,0,2,0),x)r.addMany([24,26,153,154],_,3,0),r.addMany(o(128,144),_,3,0),r.addMany(o(144,152),_,3,0),r.add(156,_,0,0),r.add(27,_,11,1),r.add(157,_,4,8),r.addMany([152,158,159],_,0,7),r.add(155,_,11,3),r.add(144,_,11,9);return r.addMany(S,0,3,0),r.addMany(S,1,3,1),r.add(127,1,0,1),r.addMany(S,8,0,8),r.addMany(S,3,3,3),r.add(127,3,0,3),r.addMany(S,4,3,4),r.add(127,4,0,4),r.addMany(S,6,3,6),r.addMany(S,5,3,5),r.add(127,5,0,5),r.addMany(S,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(l,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(l,7,0,7),r.addMany(S,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(S,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(S,11,0,11),r.addMany(o(32,128),11,0,11),r.addMany(o(28,32),11,0,11),r.addMany(S,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(S,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(S,13,13,13),r.addMany(l,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 c extends f.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,l,S)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,l)=>{},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,f.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new a.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,o=[64,126]){let l=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=h.prefix.charCodeAt(0),l&&60>l||l>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 x=0;x<h.intermediates.length;++x){const _=h.intermediates.charCodeAt(x);if(32>_||_>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=_}}if(h.final.length!==1)throw new Error("final must be a single byte");const S=h.final.charCodeAt(0);if(o[0]>S||S>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return l<<=8,l|=S,l}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 l=this._identifier(h,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const S=this._escHandlers[l];return S.push(o),{dispose:()=>{const x=S.indexOf(o);x!==-1&&S.splice(x,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 l=this._identifier(h);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const S=this._csiHandlers[l];return S.push(o),{dispose:()=>{const x=S.indexOf(o);x!==-1&&S.splice(x,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,l,S,x){this._parseStack.state=h,this._parseStack.handlers=o,this._parseStack.handlerPos=l,this._parseStack.transition=S,this._parseStack.chunkPos=x}parse(h,o,l){let S,x=0,_=0,C=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,C=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const m=this._parseStack.handlers;let y=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&y>-1){for(;y>=0&&(S=m[y](this._params),S!==!0);y--)if(S instanceof Promise)return this._parseStack.handlerPos=y,S}this._parseStack.handlers=[];break;case 4:if(l===!1&&y>-1){for(;y>=0&&(S=m[y](),S!==!0);y--)if(S instanceof Promise)return this._parseStack.handlerPos=y,S}this._parseStack.handlers=[];break;case 6:if(x=h[this._parseStack.chunkPos],S=this._dcsParser.unhook(x!==24&&x!==26,l),S)return S;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(x=h[this._parseStack.chunkPos],S=this._oscParser.end(x!==24&&x!==26,l),S)return S;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,C=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let m=C;m<o;++m){switch(x=h[m],_=this._transitions.table[this.currentState<<8|(x<160?x:b)],_>>4){case 2:for(let D=m+1;;++D){if(D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,m,D),m=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,m,D),m=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,m,D),m=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,m,D),m=D-1;break}}break;case 3:this._executeHandlers[x]?this._executeHandlers[x]():this._executeHandlerFb(x),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:m,code:x,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const y=this._csiHandlers[this._collect<<8|x];let E=y?y.length-1:-1;for(;E>=0&&(S=y[E](this._params),S!==!0);E--)if(S instanceof Promise)return this._preserveStack(3,y,E,_,m),S;E<0&&this._csiHandlerFb(this._collect<<8|x,this._params),this.precedingJoinState=0;break;case 8:do switch(x){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(x-48)}while(++m<o&&(x=h[m])>47&&x<60);m--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:const A=this._escHandlers[this._collect<<8|x];let L=A?A.length-1:-1;for(;L>=0&&(S=A[L](),S!==!0);L--)if(S instanceof Promise)return this._preserveStack(4,A,L,_,m),S;L<0&&this._escHandlerFb(this._collect<<8|x),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|x,this._params);break;case 13:for(let D=m+1;;++D)if(D>=o||(x=h[D])===24||x===26||x===27||x>127&&x<b){this._dcsParser.put(h,m,D),m=D-1;break}break;case 14:if(S=this._dcsParser.unhook(x!==24&&x!==26),S)return this._preserveStack(6,[],0,_,m),S;x===27&&(_|=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 D=m+1;;D++)if(D>=o||(x=h[D])<32||x>127&&x<b){this._oscParser.put(h,m,D),m=D-1;break}break;case 6:if(S=this._oscParser.end(x!==24&&x!==26),S)return this._preserveStack(5,[],0,_,m),S;x===27&&(_|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&_}}}n.EscapeSequenceParser=c},6242:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const f=u(5770),v=u(482),a=[];n.OscParser=class{constructor(){this._state=0,this._active=a,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,w){this._handlers[p]===void 0&&(this._handlers[p]=[]);const b=this._handlers[p];return b.push(w),{dispose:()=>{const c=b.indexOf(w);c!==-1&&b.splice(c,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=a}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=a,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||a,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,w,b){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(p,w,b);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(p,w,b))}start(){this.reset(),this._state=1}put(p,w,b){if(this._state!==3){if(this._state===1)for(;w<b;){const c=p[w++];if(c===59){this._state=2,this._start();break}if(c<48||57<c)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+c-48}this._state===2&&b-w>0&&this._put(p,w,b)}}end(p,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let b=!1,c=this._active.length-1,r=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,b=w,r=this._stack.fallThrough,this._stack.paused=!1),!r&&b===!1){for(;c>=0&&(b=this._active[c].end(p),b!==!0);c--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,b;c--}for(;c>=0;c--)if(b=this._active[c].end(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,b}else this._handlerFb(this._id,"END",p);this._active=a,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,w,b){this._hitLimit||(this._data+=(0,v.utf32ToString)(p,w,b),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let w=!1;if(this._hitLimit)w=!1;else if(p&&(w=this._handler(this._data),w instanceof Promise))return w.then((b=>(this._data="",this._hitLimit=!1,b)));return this._data="",this._hitLimit=!1,w}}},8742:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const u=2147483647;class f{static fromArray(a){const p=new f;if(!a.length)return p;for(let w=Array.isArray(a[0])?1:0;w<a.length;++w){const b=a[w];if(Array.isArray(b))for(let c=0;c<b.length;++c)p.addSubParam(b[c]);else p.addParam(b)}return p}constructor(a=32,p=32){if(this.maxLength=a,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(a),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(a),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const a=new f(this.maxLength,this.maxSubParamsLength);return a.params.set(this.params),a.length=this.length,a._subParams.set(this._subParams),a._subParamsLength=this._subParamsLength,a._subParamsIdx.set(this._subParamsIdx),a._rejectDigits=this._rejectDigits,a._rejectSubDigits=this._rejectSubDigits,a._digitIsSub=this._digitIsSub,a}toArray(){const a=[];for(let p=0;p<this.length;++p){a.push(this.params[p]);const w=this._subParamsIdx[p]>>8,b=255&this._subParamsIdx[p];b-w>0&&a.push(Array.prototype.slice.call(this._subParams,w,b))}return a}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(a){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=a>u?u:a}}addSubParam(a){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=a>u?u:a,this._subParamsIdx[this.length-1]++}}hasSubParams(a){return(255&this._subParamsIdx[a])-(this._subParamsIdx[a]>>8)>0}getSubParams(a){const p=this._subParamsIdx[a]>>8,w=255&this._subParamsIdx[a];return w-p>0?this._subParams.subarray(p,w):null}getSubParamsAll(){const a={};for(let p=0;p<this.length;++p){const w=this._subParamsIdx[p]>>8,b=255&this._subParamsIdx[p];b-w>0&&(a[p]=this._subParams.slice(w,b))}return a}addDigit(a){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,b=w[p-1];w[p-1]=~b?Math.min(10*b+a,u):a}}n.Params=f},5741:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,f){const v={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(v),f.dispose=()=>this._wrappedAddonDispose(v),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===u){f=v;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}}},8771:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const f=u(3785),v=u(511);n.BufferApiView=class{constructor(a,p){this._buffer=a,this.type=p}init(a){return this._buffer=a,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(a){const p=this._buffer.lines.get(a);if(p)return new f.BufferLineApiView(p)}getNullCell(){return new v.CellData}}},3785:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const f=u(511);n.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,a){if(!(v<0||v>=this._line.length))return a?(this._line.loadCell(v,a),a):this._line.loadCell(v,new f.CellData)}translateToString(v,a,p){return this._line.translateToString(v,a,p)}}},8285:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const f=u(8771),v=u(8460),a=u(844);class p extends a.Disposable{constructor(b){super(),this._core=b,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.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=p},7975:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,f){return this._core.registerCsiHandler(u,(v=>f(v.toArray())))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,((v,a)=>f(v,a.toArray())))}addDcsHandler(u,f){return this.registerDcsHandler(u,f)}registerEscHandler(u,f){return this._core.registerEscHandler(u,f)}addEscHandler(u,f){return this.registerEscHandler(u,f)}registerOscHandler(u,f){return this._core.registerOscHandler(u,f)}addOscHandler(u,f){return this.registerOscHandler(u,f)}}},7090:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(F,n,u){var f=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,_=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(r,h,o,l);else for(var C=r.length-1;C>=0;C--)(S=r[C])&&(_=(x<3?S(_):x>3?S(h,o,_):S(h,o))||_);return x>3&&_&&Object.defineProperty(h,o,_),_},v=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const a=u(8460),p=u(844),w=u(5295),b=u(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let c=n.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(r){super(),this.isUserScrolling=!1,this._onResize=this.register(new a.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new a.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 w.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 l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===r.fg&&l.getBg(0)===r.bg||(l=o.getBlankLine(r,h),this._cachedBlankLine=l),l.isWrapped=h;const S=o.ybase+o.scrollTop,x=o.ybase+o.scrollBottom;if(o.scrollTop===0){const _=o.lines.isFull;x===o.lines.length-1?_?o.lines.recycle().copyFrom(l):o.lines.push(l.clone()):o.lines.splice(x+1,0,l.clone()),_?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const _=x-S+1;o.lines.shiftElements(S+1,_-1,-1),o.lines.set(x,l.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(r,h,o){const l=this.buffer;if(r<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else r+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const S=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+r,l.ybase),0),S!==l.ydisp&&(h||this._onScroll.fire(l.ydisp))}};n.BufferService=c=f([v(0,b.IOptionsService)],c)},7994:(F,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(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)}}},1753:function(F,n,u){var f=this&&this.__decorate||function(l,S,x,_){var C,m=arguments.length,y=m<3?S:_===null?_=Object.getOwnPropertyDescriptor(S,x):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(l,S,x,_);else for(var E=l.length-1;E>=0;E--)(C=l[E])&&(y=(m<3?C(y):m>3?C(S,x,y):C(S,x))||y);return m>3&&y&&Object.defineProperty(S,x,y),y},v=this&&this.__param||function(l,S){return function(x,_){S(x,_,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const a=u(2585),p=u(8460),w=u(844),b={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function c(l,S){let x=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(x|=64,x|=l.action):(x|=3&l.button,4&l.button&&(x|=64),8&l.button&&(x|=128),l.action===32?x|=32:l.action!==0||S||(x|=3)),x}const r=String.fromCharCode,h={DEFAULT:l=>{const S=[c(l,!1)+32,l.col+32,l.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${r(S[0])}${r(S[1])}${r(S[2])}`},SGR:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${c(l,!0)};${l.col};${l.row}${S}`},SGR_PIXELS:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${c(l,!0)};${l.x};${l.y}${S}`}};let o=n.CoreMouseService=class extends w.Disposable{constructor(l,S){super(),this._bufferService=l,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const x of Object.keys(b))this.addProtocol(x,b[x]);for(const x of Object.keys(h))this.addEncoding(x,h[x]);this.reset()}addProtocol(l,S){this._protocols[l]=S}addEncoding(l,S){this._encodings[l]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const S=this._encodings[this._activeEncoding](l);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,S,x){if(x){if(l.x!==S.x||l.y!==S.y)return!1}else if(l.col!==S.col||l.row!==S.row)return!1;return l.button===S.button&&l.action===S.action&&l.ctrl===S.ctrl&&l.alt===S.alt&&l.shift===S.shift}};n.CoreMouseService=o=f([v(0,a.IBufferService),v(1,a.ICoreService)],o)},6975:function(F,n,u){var f=this&&this.__decorate||function(o,l,S,x){var _,C=arguments.length,m=C<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var y=o.length-1;y>=0;y--)(_=o[y])&&(m=(C<3?_(m):C>3?_(l,S,m):_(l,S))||m);return C>3&&m&&Object.defineProperty(l,S,m),m},v=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const a=u(1439),p=u(8460),w=u(844),b=u(2585),c=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 w.Disposable{constructor(o,l,S){super(),this._bufferService=o,this._logService=l,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}reset(){this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}triggerDataEvent(o,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((x=>x.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(o))}};n.CoreService=h=f([v(0,b.IBufferService),v(1,b.ILogService),v(2,b.IOptionsService)],h)},9074:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const f=u(8055),v=u(8460),a=u(844),p=u(6106);let w=0,b=0;class c extends a.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.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,a.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const l=new r(o);if(l){const S=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),S.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,l,S){let x=0,_=0;for(const C of this._decorations.getKeyIterator(l))x=C.options.x??0,_=x+(C.options.width??1),o>=x&&o<_&&(!S||(C.options.layer??"bottom")===S)&&(yield C)}forEachDecorationAtCell(o,l,S,x){this._decorations.forEachByKey(l,(_=>{w=_.options.x??0,b=w+(_.options.width??1),o>=w&&o<b&&(!S||(_.options.layer??"bottom")===S)&&x(_)}))}}n.DecorationService=c;class r extends a.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.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:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const f=u(2585),v=u(8343);class a{constructor(...w){this._entries=new Map;for(const[b,c]of w)this.set(b,c)}set(w,b){const c=this._entries.get(w);return this._entries.set(w,b),c}forEach(w){for(const[b,c]of this._entries.entries())w(b,c)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}n.ServiceCollection=a,n.InstantiationService=class{constructor(){this._services=new a,this._services.set(f.IInstantiationService,this)}setService(p,w){this._services.set(p,w)}getService(p){return this._services.get(p)}createInstance(p,...w){const b=(0,v.getServiceDependencies)(p).sort(((h,o)=>h.index-o.index)),c=[];for(const h of b){const o=this._services.get(h.id);if(!o)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${h.id}.`);c.push(o)}const r=b.length>0?b[0].index:w.length;if(w.length!==r)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${r+1} conflicts with ${w.length} static arguments`);return new p(...w,...c)}}},7866:function(F,n,u){var f=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,_=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(r,h,o,l);else for(var C=r.length-1;C>=0;C--)(S=r[C])&&(_=(x<3?S(_):x>3?S(h,o,_):S(h,o))||_);return x>3&&_&&Object.defineProperty(h,o,_),_},v=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(844),p=u(2585),w={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let b,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=w[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<=p.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<=p.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<=p.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<=p.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<=p.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=c=f([v(0,p.IOptionsService)],c),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(b.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);b.trace(`GlyphRenderer#${l.name}(${S.map((_=>JSON.stringify(_))).join(", ")})`);const x=l.apply(this,S);return b.trace(`GlyphRenderer#${l.name} return`,x),x}}},7302:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const f=u(8460),v=u(844),a=u(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:a.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends v.Disposable{constructor(c){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...n.DEFAULT_OPTIONS};for(const h in c)if(h in r)try{const o=c[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(c,r){return this.onOptionChange((h=>{h===c&&r(this.rawOptions[c])}))}onMultipleOptionChange(c,r){return this.onOptionChange((h=>{c.indexOf(h)!==-1&&r()}))}_setupOptions(){const c=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:c.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,o)}}_sanitizeAndValidateOption(c,r){switch(c){case"cursorStyle":if(r||(r=n.DEFAULT_OPTIONS[c]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${c}`);break;case"wordSeparator":r||(r=n.DEFAULT_OPTIONS[c]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=p.includes(r)?r:n.DEFAULT_OPTIONS[c];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${c} 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(`${c} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${c} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${c} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}n.OptionsService=w},2660:function(F,n,u){var f=this&&this.__decorate||function(w,b,c,r){var h,o=arguments.length,l=o<3?b:r===null?r=Object.getOwnPropertyDescriptor(b,c):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(w,b,c,r);else for(var S=w.length-1;S>=0;S--)(h=w[S])&&(l=(o<3?h(l):o>3?h(b,c,l):h(b,c))||l);return o>3&&l&&Object.defineProperty(b,c,l),l},v=this&&this.__param||function(w,b){return function(c,r){b(c,r,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const a=u(2585);let p=n.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const b=this._bufferService.buffer;if(w.id===void 0){const S=b.addMarker(b.ybase+b.y),x={data:w,id:this._nextId++,lines:[S]};return S.onDispose((()=>this._removeMarkerFromLink(x,S))),this._dataByLinkId.set(x.id,x),x.id}const c=w,r=this._getEntryIdKey(c),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),l={id:this._nextId++,key:this._getEntryIdKey(c),data:c,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(l,o))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(w,b){const c=this._dataByLinkId.get(w);if(c&&c.lines.every((r=>r.line!==b))){const r=this._bufferService.buffer.addMarker(b);c.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(c,r)))}}getLinkData(w){var b;return(b=this._dataByLinkId.get(w))==null?void 0:b.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,b){const c=w.lines.indexOf(b);c!==-1&&(w.lines.splice(c,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};n.OscLinkService=p=f([v(0,a.IBufferService)],p)},8343:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[f]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const a=function(p,w,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[f].push({id:c,index:h}):(r[f]=[{id:c,index:h}],r[u]=r)})(a,p,b)};return a.toString=()=>v,n.serviceRegistry.set(v,a),a}},2585:(F,n,u)=>{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 f=u(8343);var v;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const f=u(8460),v=u(225);class a{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,b,c=!1){return(16777215&w)<<3|(3&b)<<1|(c?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const w=new v.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let b=0,c=0;const r=w.length;for(let h=0;h<r;++h){let o=w.charCodeAt(h);if(55296<=o&&o<=56319){if(++h>=r)return b+this.wcwidth(o);const x=w.charCodeAt(h);56320<=x&&x<=57343?o=1024*(o-55296)+x-56320+65536:b+=this.wcwidth(x)}const l=this.charProperties(o,c);let S=a.extractWidth(l);a.extractShouldJoin(l)&&(S-=a.extractWidth(c)),b+=S,c=l}return b}charProperties(w,b){return this._activeProvider.charProperties(w,b)}}n.UnicodeService=a}},P={};function ee(F){var n=P[F];if(n!==void 0)return n.exports;var u=P[F]={exports:{}};return Y[F].call(u.exports,u,u.exports,ee),u.exports}var ne={};return(()=>{var F=ne;Object.defineProperty(F,"__esModule",{value:!0}),F.Terminal=void 0;const n=ee(9042),u=ee(3236),f=ee(844),v=ee(5741),a=ee(8285),p=ee(7975),w=ee(7090),b=["cols","rows"];class c extends f.Disposable{constructor(h){super(),this._core=this.register(new u.Terminal(h)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const o=S=>this._core.options[S],l=(S,x)=>{this._checkReadonlyOptions(S),this._core.options[S]=x};for(const S in this._core.options){const x={get:o.bind(this,S),set:l.bind(this,S)};Object.defineProperty(this._publicOptions,S,x)}}_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 p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new a.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,l){this._verifyIntegers(h,o,l),this._core.select(h,o,l)}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")}}F.Terminal=c})(),ne})()))})(Bo)),Bo.exports}var Xv=Gv(),Oo={exports:{}},Yd;function Vv(){return Yd||(Yd=1,(function(j,K){(function(Y,P){j.exports=P()})(self,(()=>(()=>{var Y={};return(()=>{var P=Y;Object.defineProperty(P,"__esModule",{value:!0}),P.FitAddon=void 0,P.FitAddon=class{activate(ee){this._terminal=ee}dispose(){}fit(){const ee=this.proposeDimensions();if(!ee||!this._terminal||isNaN(ee.cols)||isNaN(ee.rows))return;const ne=this._terminal._core;this._terminal.rows===ee.rows&&this._terminal.cols===ee.cols||(ne._renderService.clear(),this._terminal.resize(ee.cols,ee.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ee=this._terminal._core,ne=ee._renderService.dimensions;if(ne.css.cell.width===0||ne.css.cell.height===0)return;const F=this._terminal.options.scrollback===0?0:ee.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(n.getPropertyValue("height")),f=Math.max(0,parseInt(n.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),a=u-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),p=f-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-F;return{cols:Math.max(2,Math.floor(p/ne.css.cell.width)),rows:Math.max(1,Math.floor(a/ne.css.cell.height))}}}})(),Y})()))})(Oo)),Oo.exports}var Yv=Vv(),ko={exports:{}},Kd;function Kv(){return Kd||(Kd=1,(function(j,K){(function(Y,P){j.exports=P()})(self,(()=>(()=>{var Y={965:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GlyphRenderer=void 0;const f=u(374),v=u(509),a=u(855),p=u(859),w=u(381),b=11,c=b*Float32Array.BYTES_PER_ELEMENT;let r,h=0,o=0,l=0;class S extends p.Disposable{constructor(_,C,m,y){super(),this._terminal=_,this._gl=C,this._dimensions=m,this._optionsService=y,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const E=this._gl;v.TextureAtlas.maxAtlasPages===void 0&&(v.TextureAtlas.maxAtlasPages=Math.min(32,(0,f.throwIfFalsy)(E.getParameter(E.MAX_TEXTURE_IMAGE_UNITS))),v.TextureAtlas.maxTextureSize=(0,f.throwIfFalsy)(E.getParameter(E.MAX_TEXTURE_SIZE))),this._program=(0,f.throwIfFalsy)((0,w.createProgram)(E,`#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;
@@ -88,7 +88,7 @@ void main() {
88
88
  if (v_texpage == 0) {
89
89
  outColor = texture(u_texture[0], v_texcoord);
90
90
  } ${U}
91
- }`})(v.TextureAtlas.maxAtlasPages))),this.register((0,p.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const A=new Float32Array([0,0,1,0,0,1,1,1]),E=L.createBuffer();this.register((0,p.toDisposable)((()=>L.deleteBuffer(E)))),L.bindBuffer(L.ARRAY_BUFFER,E),L.bufferData(L.ARRAY_BUFFER,A,L.STATIC_DRAW),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const D=new Uint8Array([0,1,2,3]),O=L.createBuffer();this.register((0,p.toDisposable)((()=>L.deleteBuffer(O)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,O),L.bufferData(L.ELEMENT_ARRAY_BUFFER,D,L.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(L.createBuffer()),this.register((0,p.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,2,L.FLOAT,!1,c,0),L.vertexAttribDivisor(2,1),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,L.FLOAT,!1,c,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(3,1),L.enableVertexAttribArray(4),L.vertexAttribPointer(4,1,L.FLOAT,!1,c,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(4,1),L.enableVertexAttribArray(5),L.vertexAttribPointer(5,2,L.FLOAT,!1,c,5*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(5,1),L.enableVertexAttribArray(6),L.vertexAttribPointer(6,2,L.FLOAT,!1,c,7*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(6,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,c,9*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.useProgram(this._program);const $=new Int32Array(v.TextureAtlas.maxAtlasPages);for(let N=0;N<v.TextureAtlas.maxAtlasPages;N++)$[N]=N;L.uniform1iv(this._textureLocation,$),L.uniformMatrix4fv(this._projectionLocation,!1,y.PROJECTION_MATRIX),this._atlasTextures=[];for(let N=0;N<v.TextureAtlas.maxAtlasPages;N++){const U=new y.GLTexture((0,f.throwIfFalsy)(L.createTexture()));this.register((0,p.toDisposable)((()=>L.deleteTexture(U.texture)))),L.activeTexture(L.TEXTURE0+N),L.bindTexture(L.TEXTURE_2D,U.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[N]=U}L.enable(L.BLEND),L.blendFunc(L.SRC_ALPHA,L.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(_,w,S,C,L,A,E,D,O){this._updateCell(this._vertices.attributes,_,w,S,C,L,A,E,D,O)}_updateCell(_,w,S,C,L,A,E,D,O,$){h=(S*this._terminal.cols+w)*b,C!==a.NULL_CELL_CODE&&C!==void 0?this._atlas&&(r=D&&D.length>1?this._atlas.getRasterizedGlyphCombinedChar(D,L,A,E,!1):this._atlas.getRasterizedGlyph(C,L,A,E,!1),o=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),L!==$&&r.offset.x>o?(l=r.offset.x-o,_[h]=-(r.offset.x-l)+this._dimensions.device.char.left,_[h+1]=-r.offset.y+this._dimensions.device.char.top,_[h+2]=(r.size.x-l)/this._dimensions.device.canvas.width,_[h+3]=r.size.y/this._dimensions.device.canvas.height,_[h+4]=r.texturePage,_[h+5]=r.texturePositionClipSpace.x+l/this._atlas.pages[r.texturePage].canvas.width,_[h+6]=r.texturePositionClipSpace.y,_[h+7]=r.sizeClipSpace.x-l/this._atlas.pages[r.texturePage].canvas.width,_[h+8]=r.sizeClipSpace.y):(_[h]=-r.offset.x+this._dimensions.device.char.left,_[h+1]=-r.offset.y+this._dimensions.device.char.top,_[h+2]=r.size.x/this._dimensions.device.canvas.width,_[h+3]=r.size.y/this._dimensions.device.canvas.height,_[h+4]=r.texturePage,_[h+5]=r.texturePositionClipSpace.x,_[h+6]=r.texturePositionClipSpace.y,_[h+7]=r.sizeClipSpace.x,_[h+8]=r.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,f.allowRescaling)(C,O,r.size.x,this._dimensions.device.cell.width)&&(_[h+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):_.fill(0,h,h+b-1-2)}clear(){const _=this._terminal,w=_.cols*_.rows*b;this._vertices.count!==w?this._vertices.attributes=new Float32Array(w):this._vertices.attributes.fill(0);let S=0;for(;S<this._vertices.attributesBuffers.length;S++)this._vertices.count!==w?this._vertices.attributesBuffers[S]=new Float32Array(w):this._vertices.attributesBuffers[S].fill(0);this._vertices.count=w,S=0;for(let C=0;C<_.rows;C++)for(let L=0;L<_.cols;L++)this._vertices.attributes[S+9]=L/_.cols,this._vertices.attributes[S+10]=C/_.rows,S+=b}handleResize(){const _=this._gl;_.useProgram(this._program),_.viewport(0,0,_.canvas.width,_.canvas.height),_.uniform2f(this._resolutionLocation,_.canvas.width,_.canvas.height),this.clear()}render(_){if(!this._atlas)return;const w=this._gl;w.useProgram(this._program),w.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const S=this._vertices.attributesBuffers[this._activeBuffer];let C=0;for(let L=0;L<_.lineLengths.length;L++){const A=L*this._terminal.cols*b,E=this._vertices.attributes.subarray(A,A+_.lineLengths[L]*b);S.set(E,C),C+=E.length}w.bindBuffer(w.ARRAY_BUFFER,this._attributesBuffer),w.bufferData(w.ARRAY_BUFFER,S.subarray(0,C),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,C/b)}setAtlas(_){this._atlas=_;for(const w of this._atlasTextures)w.version=-1}_bindAtlasPageTexture(_,w,S){_.activeTexture(_.TEXTURE0+S),_.bindTexture(_.TEXTURE_2D,this._atlasTextures[S].texture),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_S,_.CLAMP_TO_EDGE),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_T,_.CLAMP_TO_EDGE),_.texImage2D(_.TEXTURE_2D,0,_.RGBA,_.RGBA,_.UNSIGNED_BYTE,w.pages[S].canvas),_.generateMipmap(_.TEXTURE_2D),this._atlasTextures[S].version=w.pages[S].version}setDimensions(_){this._dimensions=_}}n.GlyphRenderer=m},742:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RectangleRenderer=void 0;const f=u(374),v=u(859),a=u(310),p=u(381),y=8*Float32Array.BYTES_PER_ELEMENT;class b{constructor(){this.attributes=new Float32Array(160),this.count=0}}let c=0,r=0,h=0,o=0,l=0,m=0,x=0;class _ extends v.Disposable{constructor(S,C,L,A){super(),this._terminal=S,this._gl=C,this._dimensions=L,this._themeService=A,this._vertices=new b,this._verticesCursor=new b;const E=this._gl;this._program=(0,f.throwIfFalsy)((0,p.createProgram)(E,`#version 300 es
91
+ }`})(v.TextureAtlas.maxAtlasPages))),this.register((0,p.toDisposable)((()=>E.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(E.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,f.throwIfFalsy)(E.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,f.throwIfFalsy)(E.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=E.createVertexArray(),E.bindVertexArray(this._vertexArrayObject);const A=new Float32Array([0,0,1,0,0,1,1,1]),L=E.createBuffer();this.register((0,p.toDisposable)((()=>E.deleteBuffer(L)))),E.bindBuffer(E.ARRAY_BUFFER,L),E.bufferData(E.ARRAY_BUFFER,A,E.STATIC_DRAW),E.enableVertexAttribArray(0),E.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const D=new Uint8Array([0,1,2,3]),O=E.createBuffer();this.register((0,p.toDisposable)((()=>E.deleteBuffer(O)))),E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,O),E.bufferData(E.ELEMENT_ARRAY_BUFFER,D,E.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(E.createBuffer()),this.register((0,p.toDisposable)((()=>E.deleteBuffer(this._attributesBuffer)))),E.bindBuffer(E.ARRAY_BUFFER,this._attributesBuffer),E.enableVertexAttribArray(2),E.vertexAttribPointer(2,2,E.FLOAT,!1,c,0),E.vertexAttribDivisor(2,1),E.enableVertexAttribArray(3),E.vertexAttribPointer(3,2,E.FLOAT,!1,c,2*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(3,1),E.enableVertexAttribArray(4),E.vertexAttribPointer(4,1,E.FLOAT,!1,c,4*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(4,1),E.enableVertexAttribArray(5),E.vertexAttribPointer(5,2,E.FLOAT,!1,c,5*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(5,1),E.enableVertexAttribArray(6),E.vertexAttribPointer(6,2,E.FLOAT,!1,c,7*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(6,1),E.enableVertexAttribArray(1),E.vertexAttribPointer(1,2,E.FLOAT,!1,c,9*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(1,1),E.useProgram(this._program);const $=new Int32Array(v.TextureAtlas.maxAtlasPages);for(let N=0;N<v.TextureAtlas.maxAtlasPages;N++)$[N]=N;E.uniform1iv(this._textureLocation,$),E.uniformMatrix4fv(this._projectionLocation,!1,w.PROJECTION_MATRIX),this._atlasTextures=[];for(let N=0;N<v.TextureAtlas.maxAtlasPages;N++){const U=new w.GLTexture((0,f.throwIfFalsy)(E.createTexture()));this.register((0,p.toDisposable)((()=>E.deleteTexture(U.texture)))),E.activeTexture(E.TEXTURE0+N),E.bindTexture(E.TEXTURE_2D,U.texture),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,E.CLAMP_TO_EDGE),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,E.CLAMP_TO_EDGE),E.texImage2D(E.TEXTURE_2D,0,E.RGBA,1,1,0,E.RGBA,E.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[N]=U}E.enable(E.BLEND),E.blendFunc(E.SRC_ALPHA,E.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(_,C,m,y,E,A,L,D,O){this._updateCell(this._vertices.attributes,_,C,m,y,E,A,L,D,O)}_updateCell(_,C,m,y,E,A,L,D,O,$){h=(m*this._terminal.cols+C)*b,y!==a.NULL_CELL_CODE&&y!==void 0?this._atlas&&(r=D&&D.length>1?this._atlas.getRasterizedGlyphCombinedChar(D,E,A,L,!1):this._atlas.getRasterizedGlyph(y,E,A,L,!1),o=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),E!==$&&r.offset.x>o?(l=r.offset.x-o,_[h]=-(r.offset.x-l)+this._dimensions.device.char.left,_[h+1]=-r.offset.y+this._dimensions.device.char.top,_[h+2]=(r.size.x-l)/this._dimensions.device.canvas.width,_[h+3]=r.size.y/this._dimensions.device.canvas.height,_[h+4]=r.texturePage,_[h+5]=r.texturePositionClipSpace.x+l/this._atlas.pages[r.texturePage].canvas.width,_[h+6]=r.texturePositionClipSpace.y,_[h+7]=r.sizeClipSpace.x-l/this._atlas.pages[r.texturePage].canvas.width,_[h+8]=r.sizeClipSpace.y):(_[h]=-r.offset.x+this._dimensions.device.char.left,_[h+1]=-r.offset.y+this._dimensions.device.char.top,_[h+2]=r.size.x/this._dimensions.device.canvas.width,_[h+3]=r.size.y/this._dimensions.device.canvas.height,_[h+4]=r.texturePage,_[h+5]=r.texturePositionClipSpace.x,_[h+6]=r.texturePositionClipSpace.y,_[h+7]=r.sizeClipSpace.x,_[h+8]=r.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,f.allowRescaling)(y,O,r.size.x,this._dimensions.device.cell.width)&&(_[h+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):_.fill(0,h,h+b-1-2)}clear(){const _=this._terminal,C=_.cols*_.rows*b;this._vertices.count!==C?this._vertices.attributes=new Float32Array(C):this._vertices.attributes.fill(0);let m=0;for(;m<this._vertices.attributesBuffers.length;m++)this._vertices.count!==C?this._vertices.attributesBuffers[m]=new Float32Array(C):this._vertices.attributesBuffers[m].fill(0);this._vertices.count=C,m=0;for(let y=0;y<_.rows;y++)for(let E=0;E<_.cols;E++)this._vertices.attributes[m+9]=E/_.cols,this._vertices.attributes[m+10]=y/_.rows,m+=b}handleResize(){const _=this._gl;_.useProgram(this._program),_.viewport(0,0,_.canvas.width,_.canvas.height),_.uniform2f(this._resolutionLocation,_.canvas.width,_.canvas.height),this.clear()}render(_){if(!this._atlas)return;const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const m=this._vertices.attributesBuffers[this._activeBuffer];let y=0;for(let E=0;E<_.lineLengths.length;E++){const A=E*this._terminal.cols*b,L=this._vertices.attributes.subarray(A,A+_.lineLengths[E]*b);m.set(L,y),y+=L.length}C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,m.subarray(0,y),C.STREAM_DRAW);for(let E=0;E<this._atlas.pages.length;E++)this._atlas.pages[E].version!==this._atlasTextures[E].version&&this._bindAtlasPageTexture(C,this._atlas,E);C.drawElementsInstanced(C.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,y/b)}setAtlas(_){this._atlas=_;for(const C of this._atlasTextures)C.version=-1}_bindAtlasPageTexture(_,C,m){_.activeTexture(_.TEXTURE0+m),_.bindTexture(_.TEXTURE_2D,this._atlasTextures[m].texture),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_S,_.CLAMP_TO_EDGE),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_T,_.CLAMP_TO_EDGE),_.texImage2D(_.TEXTURE_2D,0,_.RGBA,_.RGBA,_.UNSIGNED_BYTE,C.pages[m].canvas),_.generateMipmap(_.TEXTURE_2D),this._atlasTextures[m].version=C.pages[m].version}setDimensions(_){this._dimensions=_}}n.GlyphRenderer=S},742:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RectangleRenderer=void 0;const f=u(374),v=u(859),a=u(310),p=u(381),w=8*Float32Array.BYTES_PER_ELEMENT;class b{constructor(){this.attributes=new Float32Array(160),this.count=0}}let c=0,r=0,h=0,o=0,l=0,S=0,x=0;class _ extends v.Disposable{constructor(m,y,E,A){super(),this._terminal=m,this._gl=y,this._dimensions=E,this._themeService=A,this._vertices=new b,this._verticesCursor=new b;const L=this._gl;this._program=(0,f.throwIfFalsy)((0,p.createProgram)(L,`#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)((()=>E.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(E.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=E.createVertexArray(),E.bindVertexArray(this._vertexArrayObject);const D=new Float32Array([0,0,1,0,0,1,1,1]),O=E.createBuffer();this.register((0,v.toDisposable)((()=>E.deleteBuffer(O)))),E.bindBuffer(E.ARRAY_BUFFER,O),E.bufferData(E.ARRAY_BUFFER,D,E.STATIC_DRAW),E.enableVertexAttribArray(3),E.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const $=new Uint8Array([0,1,2,3]),N=E.createBuffer();this.register((0,v.toDisposable)((()=>E.deleteBuffer(N)))),E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,N),E.bufferData(E.ELEMENT_ARRAY_BUFFER,$,E.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(E.createBuffer()),this.register((0,v.toDisposable)((()=>E.deleteBuffer(this._attributesBuffer)))),E.bindBuffer(E.ARRAY_BUFFER,this._attributesBuffer),E.enableVertexAttribArray(0),E.vertexAttribPointer(0,2,E.FLOAT,!1,y,0),E.vertexAttribDivisor(0,1),E.enableVertexAttribArray(1),E.vertexAttribPointer(1,2,E.FLOAT,!1,y,2*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(1,1),E.enableVertexAttribArray(2),E.vertexAttribPointer(2,4,E.FLOAT,!1,y,4*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(2,1),this._updateCachedColors(A.colors),this.register(this._themeService.onChangeColors((U=>{this._updateCachedColors(U),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(S){const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),C.uniformMatrix4fv(this._projectionLocation,!1,p.PROJECTION_MATRIX),C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,S.attributes,C.DYNAMIC_DRAW),C.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,S.count)}handleResize(){this._updateViewportRectangle()}setDimensions(S){this._dimensions=S}_updateCachedColors(S){this._bgFloat=this._colorToFloat32Array(S.background),this._cursorFloat=this._colorToFloat32Array(S.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(S){const C=this._terminal,L=this._vertices;let A,E,D,O,$,N,U,I,R,B,T,H=1;for(A=0;A<C.rows;A++){for(D=-1,O=0,$=0,N=!1,E=0;E<C.cols;E++)U=(A*C.cols+E)*a.RENDER_MODEL_INDICIES_PER_CELL,I=S.cells[U+a.RENDER_MODEL_BG_OFFSET],R=S.cells[U+a.RENDER_MODEL_FG_OFFSET],B=!!(67108864&R),(I!==O||R!==$&&(N||B))&&((O!==0||N&&$!==0)&&(T=8*H++,this._updateRectangle(L,T,$,O,D,E,A)),D=E,O=I,$=R,N=B);(O!==0||N&&$!==0)&&(T=8*H++,this._updateRectangle(L,T,$,O,D,C.cols,A))}L.count=H}updateCursor(S){const C=this._verticesCursor,L=S.cursor;if(!L||L.style==="block")return void(C.count=0);let A,E=0;L.style!=="bar"&&L.style!=="outline"||(A=8*E++,this._addRectangleFloat(C.attributes,A,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"||(A=8*E++,this._addRectangleFloat(C.attributes,A,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"&&(A=8*E++,this._addRectangleFloat(C.attributes,A,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),A=8*E++,this._addRectangleFloat(C.attributes,A,(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)),C.count=E}_updateRectangle(S,C,L,A,E,D,O){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:c=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:c=(16777215&L)<<8;break;default:c=this._themeService.colors.foreground.rgba}else switch(50331648&A){case 16777216:case 33554432:c=this._themeService.colors.ansi[255&A].rgba;break;case 50331648:c=(16777215&A)<<8;break;default:c=this._themeService.colors.background.rgba}S.attributes.length<C+4&&(S.attributes=(0,p.expandFloat32Array)(S.attributes,this._terminal.rows*this._terminal.cols*8)),r=E*this._dimensions.device.cell.width,h=O*this._dimensions.device.cell.height,o=(c>>24&255)/255,l=(c>>16&255)/255,m=(c>>8&255)/255,x=1,this._addRectangle(S.attributes,C,r,h,(D-E)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,o,l,m,x)}_addRectangle(S,C,L,A,E,D,O,$,N,U){S[C]=L/this._dimensions.device.canvas.width,S[C+1]=A/this._dimensions.device.canvas.height,S[C+2]=E/this._dimensions.device.canvas.width,S[C+3]=D/this._dimensions.device.canvas.height,S[C+4]=O,S[C+5]=$,S[C+6]=N,S[C+7]=U}_addRectangleFloat(S,C,L,A,E,D,O){S[C]=L/this._dimensions.device.canvas.width,S[C+1]=A/this._dimensions.device.canvas.height,S[C+2]=E/this._dimensions.device.canvas.width,S[C+3]=D/this._dimensions.device.canvas.height,S[C+4]=O[0],S[C+5]=O[1],S[C+6]=O[2],S[C+7]=O[3]}_colorToFloat32Array(S){return new Float32Array([(S.rgba>>24&255)/255,(S.rgba>>16&255)/255,(S.rgba>>8&255)/255,(255&S.rgba)/255])}}n.RectangleRenderer=_},310:(F,n,u)=>{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 f=u(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,f.createSelectionRenderModel)()}resize(v,a){const p=v*a*n.RENDER_MODEL_INDICIES_PER_CELL;p!==this.cells.length&&(this.cells=new Uint32Array(p),this.lineLengths=new Uint32Array(a))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;const f=u(820),v=u(274),a=u(627),p=u(457),y=u(56),b=u(374),c=u(345),r=u(859),h=u(147),o=u(782),l=u(855),m=u(965),x=u(742),_=u(310),w=u(733);class S extends r.Disposable{constructor(E,D,O,$,N,U,I,R,B){super(),this._terminal=E,this._characterJoinerService=D,this._charSizeService=O,this._coreBrowserService=$,this._coreService=N,this._decorationService=U,this._optionsService=I,this._themeService=R,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new _.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 c.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new c.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new c.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new c.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,I,this._themeService)],this.dimensions=(0,b.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(I.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const T={antialias:!1,depth:!1,preserveDrawingBuffer:B};if(this._gl=this._canvas.getContext("webgl2",T),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextlost",(H=>{console.log("webglcontextlost event received"),H.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(H)}),3e3)}))),this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextrestored",(H=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,a.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((H,G)=>this._setCanvasDevicePixelDimensions(H,G))),this.register(this._coreBrowserService.onWindowChange((H=>{this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,H,((G,V)=>this._setCanvasDevicePixelDimensions(G,V)))}))),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 H;for(const G of this._renderLayers)G.dispose();(H=this._canvas.parentElement)==null||H.removeChild(this._canvas),(0,a.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var E;return(E=this._charAtlas)==null?void 0:E.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(E,D){var O,$,N,U;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const I of this._renderLayers)I.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`,(O=this._rectangleRenderer.value)==null||O.setDimensions(this.dimensions),($=this._rectangleRenderer.value)==null||$.handleResize(),(N=this._glyphRenderer.value)==null||N.setDimensions(this.dimensions),(U=this._glyphRenderer.value)==null||U.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var E;for(const D of this._renderLayers)D.handleBlur(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.pause(),this._requestRedrawViewport()}handleFocus(){var E;for(const D of this._renderLayers)D.handleFocus(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.resume(),this._requestRedrawViewport()}handleSelectionChanged(E,D,O){for(const $ of this._renderLayers)$.handleSelectionChanged(this._terminal,E,D,O);this._model.selection.update(this._core,E,D,O),this._requestRedrawViewport()}handleCursorMove(){var E;for(const D of this._renderLayers)D.handleCursorMove(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new x.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new m.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var D;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const E=(0,a.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!==E&&(this._onChangeTextureAtlas.fire(E.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,c.forwardEvent)(E.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,c.forwardEvent)(E.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=E,this._charAtlas.warmUp(),(D=this._glyphRenderer.value)==null||D.setAtlas(this._charAtlas)}_clearModel(E){var D;this._model.clear(),E&&((D=this._glyphRenderer.value)==null||D.clear())}clearTextureAtlas(){var E;(E=this._charAtlas)==null||E.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var E;this._clearModel(!0);for(const D of this._renderLayers)D.reset(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(E){return-1}deregisterCharacterJoiner(E){return!1}renderRows(E,D){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 O of this._renderLayers)O.handleGridChanged(this._terminal,E,D);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(E,D),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 p.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(E,D){const O=this._core;let $,N,U,I,R,B,T,H,G,V,ue,de,q,z,se=this._workCell;E=L(E,O.rows-1,0),D=L(D,O.rows-1,0);const ie=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,ve=ie-O.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,O.cols-1);let Ee=-1;const _e=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Oe=!1;for(N=E;N<=D;N++)for(U=N+O.buffer.ydisp,I=O.buffer.lines.get(U),this._model.lineLengths[N]=0,R=this._characterJoinerService.getJoinedCharacters(U),q=0;q<O.cols;q++)if($=this._cellColorResolver.result.bg,I.loadCell(q,se),q===0&&($=this._cellColorResolver.result.bg),B=!1,T=q,R.length>0&&q===R[0][0]&&(B=!0,H=R.shift(),se=new C(se,I.translateToString(!0,H[0],H[1]),H[1]-H[0]),T=H[1]-1),G=se.getChars(),V=se.getCode(),de=(N*O.cols+q)*_.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(se,q,U,this.dimensions.device.cell.width),_e&&U===ie&&(q===fe&&(this._model.cursor={x:fe,y:ve,width:se.getWidth(),style:this._coreBrowserService.isFocused?O.options.cursorStyle||"block":O.options.cursorInactiveStyle,cursorWidth:O.options.cursorWidth,dpr:this._devicePixelRatio},Ee=fe+se.getWidth()-1),q>=fe&&q<=Ee&&(this._coreBrowserService.isFocused&&(O.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&O.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)),V!==l.NULL_CELL_CODE&&(this._model.lineLengths[N]=q+1),(this._model.cells[de]!==V||this._model.cells[de+_.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[de+_.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[de+_.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Oe=!0,G.length>1&&(V|=_.COMBINED_CHAR_BIT_MASK),this._model.cells[de]=V,this._model.cells[de+_.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[de+_.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[de+_.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,ue=se.getWidth(),this._glyphRenderer.value.updateCell(q,N,V,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,G,ue,$),B))for(se=this._workCell,q++;q<T;q++)z=(N*O.cols+q)*_.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(q,N,l.NULL_CELL_CODE,0,0,0,l.NULL_CELL_CHAR,0,0),this._model.cells[z]=l.NULL_CELL_CODE,this._model.cells[z+_.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[z+_.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[z+_.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Oe&&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(E,D){this._canvas.width===E&&this._canvas.height===D||(this._canvas.width=E,this._canvas.height=D,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const E=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:E,end:E})}}n.WebglRenderer=S;class C extends h.AttributeData{constructor(E,D,O){super(),this.content=0,this.combinedData="",this.fg=E.fg,this.bg=E.bg,this.combinedData=D,this._width=O}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(E){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(A,E,D=0){return Math.max(Math.min(A,E),D)}n.JoinedCellData=C},381:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;const f=u(374);function v(a,p,y){const b=(0,f.throwIfFalsy)(a.createShader(p));if(a.shaderSource(b,y),a.compileShader(b),a.getShaderParameter(b,a.COMPILE_STATUS))return b;console.error(a.getShaderInfoLog(b)),a.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(a,p,y){const b=(0,f.throwIfFalsy)(a.createProgram());if(a.attachShader(b,(0,f.throwIfFalsy)(v(a,a.VERTEX_SHADER,p))),a.attachShader(b,(0,f.throwIfFalsy)(v(a,a.FRAGMENT_SHADER,y))),a.linkProgram(b),a.getProgramParameter(b,a.LINK_STATUS))return b;console.error(a.getProgramInfoLog(b)),a.deleteProgram(b)},n.createShader=v,n.expandFloat32Array=function(a,p){const y=Math.min(2*a.length,p),b=new Float32Array(y);for(let c=0;c<a.length;c++)b[c]=a[c];return b},n.GLTexture=class{constructor(a){this.texture=a,this.version=-1}}},592:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const f=u(627),v=u(237),a=u(374),p=u(859);class y extends p.Disposable{constructor(c,r,h,o,l,m,x,_){super(),this._container=r,this._alpha=l,this._coreBrowserService=m,this._optionsService=x,this._themeService=_,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(c,w),this.reset(c)}))),this.register((0,p.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,a.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(c){}handleFocus(c){}handleCursorMove(c){}handleGridChanged(c,r,h){}handleSelectionChanged(c,r,h,o=!1){}_setTransparency(c,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(c,this._themeService.colors),this.handleGridChanged(c,0,c.rows-1)}_refreshCharAtlas(c,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,f.acquireTextureAtlas)(c,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(c,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(c,this._themeService.colors)}_fillBottomLineAtCells(c,r,h=1){this._ctx.fillRect(c*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(c,r,h,o){this._alpha?this._ctx.clearRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(c,r,h,o){this._ctx.font=this._getFont(c,!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(c,r,h){this._ctx.beginPath(),this._ctx.rect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(c,r,h){return`${h?"italic":""} ${r?c.options.fontWeightBold:c.options.fontWeight} ${c.options.fontSize*this._coreBrowserService.dpr}px ${c.options.fontFamily}`}}n.BaseRenderLayer=y},733:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const f=u(197),v=u(237),a=u(592);class p extends a.BaseRenderLayer{constructor(b,c,r,h,o,l,m){super(r,b,"link",c,!0,o,l,m),this.register(h.onShowLinkUnderline((x=>this._handleShowLinkUnderline(x)))),this.register(h.onHideLinkUnderline((x=>this._handleHideLinkUnderline(x))))}resize(b,c){super.resize(b,c),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,f.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 c=b.y1+1;c<b.y2;c++)this._fillBottomLineAtCells(0,c,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}n.LinkRenderLayer=p},820:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,v,a){u.addEventListener(f,v,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,v,a))}}}},274:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const f=u(855),v=u(160),a=u(374);let p,y=0,b=0,c=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(l,m,x,_,w,S){this._terminal=l,this._optionService=m,this._selectionRenderModel=x,this._decorationService=_,this._coreBrowserService=w,this._themeService=S,this.result={fg:0,bg:0,ext:0}}resolve(l,m,x,_){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,b=0,y=0,r=!1,c=!1,h=!1,p=this._themeService.colors,o=0,l.getCode()!==f.NULL_CELL_CODE&&l.extended.underlineStyle===4){const w=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=m*_%(2*Math.round(w))}if(this._decorationService.forEachDecorationAtCell(m,x,"bottom",(w=>{w.backgroundColorRGB&&(b=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,m,x),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?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(y=p.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)y=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.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?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(m,x,"top",(w=>{w.backgroundColorRGB&&(b=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(b=h?-16777216&l.bg&-134217729|b|50331648:-16777216&l.bg|b|50331648),c&&(y=-16777216&l.fg&-67108865|y|50331648),67108864&this.result.fg&&(r&&!c&&(y=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=c?y:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const f=u(509),v=u(197),a=[];n.acquireTextureAtlas=function(p,y,b,c,r,h,o,l){const m=(0,v.generateConfig)(c,r,h,o,y,b,l);for(let w=0;w<a.length;w++){const S=a[w],C=S.ownedBy.indexOf(p);if(C>=0){if((0,v.configEquals)(S.config,m))return S.atlas;S.ownedBy.length===1?(S.atlas.dispose(),a.splice(w,1)):S.ownedBy.splice(C,1);break}}for(let w=0;w<a.length;w++){const S=a[w];if((0,v.configEquals)(S.config,m))return S.ownedBy.push(p),S.atlas}const x=p._core,_={atlas:new f.TextureAtlas(document,m,x.unicodeService),config:m,ownedBy:[p]};return a.push(_),_.atlas},n.removeTerminalFromCache=function(p){for(let y=0;y<a.length;y++){const b=a[y].ownedBy.indexOf(p);if(b!==-1){a[y].ownedBy.length===1?(a[y].atlas.dispose(),a.splice(y,1)):a[y].ownedBy.splice(b,1);break}}}},197:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const f=u(160);n.generateConfig=function(v,a,p,y,b,c,r){const h={foreground:c.foreground,background:c.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:c.ansi.slice(),contrastCache:c.contrastCache,halfContrastCache:c.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:v,deviceCellHeight:a,deviceCharWidth:p,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,a){for(let p=0;p<v.colors.ansi.length;p++)if(v.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return v.devicePixelRatio===a.devicePixelRatio&&v.customGlyphs===a.customGlyphs&&v.lineHeight===a.lineHeight&&v.letterSpacing===a.letterSpacing&&v.fontFamily===a.fontFamily&&v.fontSize===a.fontSize&&v.fontWeight===a.fontWeight&&v.fontWeightBold===a.fontWeightBold&&v.allowTransparency===a.allowTransparency&&v.deviceCharWidth===a.deviceCharWidth&&v.deviceCharHeight===a.deviceCharHeight&&v.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&v.minimumContrastRatio===a.minimumContrastRatio&&v.colors.foreground.rgba===a.colors.foreground.rgba&&v.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}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 f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}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:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const f=u(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:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╒":{1:(c,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(c,r)=>`M${.5-c},1 L${.5-c},.5 L1,.5 M${.5+c},.5 L${.5+c},1`},"╔":{1:(c,r)=>`M1,${.5-r} L${.5-c},${.5-r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╕":{1:(c,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(c,r)=>`M${.5+c},1 L${.5+c},.5 L0,.5 M${.5-c},.5 L${.5-c},1`},"╗":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5+c},${.5-r} L${.5+c},1`},"╘":{1:(c,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(c,r)=>`M1,.5 L${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╚":{1:(c,r)=>`M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0 M1,${.5+r} L${.5-c},${.5+r} L${.5-c},0`},"╛":{1:(c,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(c,r)=>`M0,.5 L${.5+c},.5 L${.5+c},0 M${.5-c},.5 L${.5-c},0`},"╝":{1:(c,r)=>`M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M0,${.5+r} L${.5+c},${.5+r} L${.5+c},0`},"╞":{1:(c,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1 M${.5+c},.5 L1,.5`},"╠":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╡":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(c,r)=>`M0,.5 L${.5-c},.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╣":{1:(c,r)=>`M${.5+c},0 L${.5+c},1 M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0`},"╤":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},1 M${.5+c},.5 L${.5+c},1`},"╦":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╧":{1:(c,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╩":{1:(c,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╪":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╬":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},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:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(c,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(c,r,h,o,l,m,x,_){const w=n.blockElementDefinitions[r];if(w)return(function(A,E,D,O,$,N){for(let U=0;U<E.length;U++){const I=E[U],R=$/8,B=N/8;A.fillRect(D+I.x*R,O+I.y*B,I.w*R,I.h*B)}})(c,w,h,o,l,m),!0;const S=v[r];if(S)return(function(A,E,D,O,$,N){let U=a.get(E);U||(U=new Map,a.set(E,U));const I=A.fillStyle;if(typeof I!="string")throw new Error(`Unexpected fillStyle type "${I}"`);let R=U.get(I);if(!R){const B=E[0].length,T=E.length,H=A.canvas.ownerDocument.createElement("canvas");H.width=B,H.height=T;const G=(0,f.throwIfFalsy)(H.getContext("2d")),V=new ImageData(B,T);let ue,de,q,z;if(I.startsWith("#"))ue=parseInt(I.slice(1,3),16),de=parseInt(I.slice(3,5),16),q=parseInt(I.slice(5,7),16),z=I.length>7&&parseInt(I.slice(7,9),16)||1;else{if(!I.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${I}" when drawing pattern glyph`);[ue,de,q,z]=I.substring(5,I.length-1).split(",").map((se=>parseFloat(se)))}for(let se=0;se<T;se++)for(let ie=0;ie<B;ie++)V.data[4*(se*B+ie)]=ue,V.data[4*(se*B+ie)+1]=de,V.data[4*(se*B+ie)+2]=q,V.data[4*(se*B+ie)+3]=E[se][ie]*(255*z);G.putImageData(V,0,0),R=(0,f.throwIfFalsy)(A.createPattern(H,null)),U.set(I,R)}A.fillStyle=R,A.fillRect(D,O,$,N)})(c,S,h,o,l,m),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(A,E,D,O,$,N,U){A.strokeStyle=A.fillStyle;for(const[I,R]of Object.entries(E)){let B;A.beginPath(),A.lineWidth=U*Number.parseInt(I),B=typeof R=="function"?R(.15,.15/N*$):R;for(const T of B.split(" ")){const H=T[0],G=y[H];if(!G){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=T.substring(1).split(",");V[0]&&V[1]&&G(A,b(V,$,N,D,O,!0,U))}A.stroke(),A.closePath()}})(c,C,h,o,l,m,_),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(A,E,D,O,$,N,U,I){const R=new Path2D;R.rect(D,O,$,N),A.clip(R),A.beginPath();const B=U/12;A.lineWidth=I*B;for(const T of E.d.split(" ")){const H=T[0],G=y[H];if(!G){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=T.substring(1).split(",");V[0]&&V[1]&&G(A,b(V,$,N,D,O,!1,I,(E.leftPadding??0)*(B/2),(E.rightPadding??0)*(B/2)))}E.type===1?(A.strokeStyle=A.fillStyle,A.stroke()):A.fill(),A.closePath()})(c,L,h,o,l,m,x,_),!0)};const a=new Map;function p(c,r,h=0){return Math.max(Math.min(c,r),h)}const y={C:(c,r)=>c.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(c,r)=>c.lineTo(r[0],r[1]),M:(c,r)=>c.moveTo(r[0],r[1])};function b(c,r,h,o,l,m,x,_=0,w=0){const S=c.map((C=>parseFloat(C)||parseInt(C)));if(S.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<S.length;C+=2)S[C]*=r-_*x-w*x,m&&S[C]!==0&&(S[C]=p(Math.round(S[C]+.5)-.5,r,0)),S[C]+=o+_*x;for(let C=1;C<S.length;C+=2)S[C]*=h,m&&S[C]!==0&&(S[C]=p(Math.round(S[C]+.5)-.5,h,0)),S[C]+=l;return S}},56:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(v,a,p){let y=new a.ResizeObserver((b=>{const c=b.find((o=>o.target===v));if(!c)return;if(!("devicePixelContentBoxSize"in c))return y==null||y.disconnect(),void(y=void 0);const r=c.devicePixelContentBoxSize[0].inlineSize,h=c.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{y.observe(v,{box:["device-pixel-content-box"]})}catch{y.disconnect(),y=void 0}return(0,f.toDisposable)((()=>y==null?void 0:y.disconnect()))}},374:(F,n)=>{function u(v){return 57508<=v&&v<=57558}function f(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=u,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=f,n.allowRescaling=function(v,a,p,y){return a===1&&p>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!f(v)&&!u(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(a){return 9472<=a&&a<=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,a,p=0){return(v-(2*Math.round(a)-p))%(2*Math.round(a))}},296:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,a,p,y=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const b=v.buffers.active.ydisp,c=a[1]-b,r=p[1]-b,h=Math.max(c,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(v,a,p){return!!this.hasSelection&&(p-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const f=u(237),v=u(860),a=u(374),p=u(160),y=u(345),b=u(485),c=u(385),r=u(147),h=u(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 l;class m{get pages(){return this._pages}constructor(C,L,A){this._document=C,this._config=L,this._unicodeService=A,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(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new c.IdleTaskQueue;for(let L=33;L<126;L++)C.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const A=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,A)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(m.maxAtlasPages&&this._pages.length>=Math.max(4,m.maxAtlasPages)){const L=this._pages.filter((U=>2*U.canvas.width<=(m.maxTextureSize||4096))).sort(((U,I)=>I.canvas.width!==U.canvas.width?I.canvas.width-U.canvas.width:I.percentageUsed-U.percentageUsed));let A=-1,E=0;for(let U=0;U<L.length;U++)if(L[U].canvas.width!==E)A=U,E=L[U].canvas.width;else if(U-A==3)break;const D=L.slice(A,A+4),O=D.map((U=>U.glyphs[0].texturePage)).sort(((U,I)=>U>I?1:-1)),$=this.pages.length-D.length,N=this._mergePages(D,$);N.version++;for(let U=O.length-1;U>=0;U--)this._deletePage(O[U]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const C=new x(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,L){const A=2*C[0].canvas.width,E=new x(this._document,A,C);for(const[D,O]of C.entries()){const $=D*O.canvas.width%A,N=Math.floor(D/2)*O.canvas.height;E.ctx.drawImage(O.canvas,$,N);for(const I of O.glyphs)I.texturePage=L,I.sizeClipSpace.x=I.size.x/A,I.sizeClipSpace.y=I.size.y/A,I.texturePosition.x+=$,I.texturePosition.y+=N,I.texturePositionClipSpace.x=I.texturePosition.x/A,I.texturePositionClipSpace.y=I.texturePosition.y/A;this._onRemoveTextureAtlasCanvas.fire(O.canvas);const U=this._activePages.indexOf(O);U!==-1&&this._activePages.splice(U,1)}return E}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const A=this._pages[L];for(const E of A.glyphs)E.texturePage--;A.version++}}getRasterizedGlyphCombinedChar(C,L,A,E,D){return this._getFromCacheMap(this._cacheMapCombined,C,L,A,E,D)}getRasterizedGlyph(C,L,A,E,D){return this._getFromCacheMap(this._cacheMap,C,L,A,E,D)}_getFromCacheMap(C,L,A,E,D,O=!1){return l=C.get(L,A,E,D),l||(l=this._drawToCache(L,A,E,D,O),C.set(L,A,E,D,l)),l}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,L,A,E){if(this._config.allowTransparency)return p.NULL_COLOR;let D;switch(C){case 16777216:case 33554432:D=this._getColorFromAnsiIndex(L);break;case 50331648:const O=r.AttributeData.toColorRGB(L);D=p.channels.toColor(O[0],O[1],O[2]);break;default:D=A?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return D}_getForegroundColor(C,L,A,E,D,O,$,N,U,I){const R=this._getMinimumContrastColor(C,L,A,E,D,O,$,U,N,I);if(R)return R;let B;switch(D){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&U&&O<8&&(O+=8),B=this._getColorFromAnsiIndex(O);break;case 50331648:const T=r.AttributeData.toColorRGB(O);B=p.channels.toColor(T[0],T[1],T[2]);break;default:B=$?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(B=p.color.opaque(B)),N&&(B=p.color.multiplyOpacity(B,f.DIM_OPACITY)),B}_resolveBackgroundRgba(C,L,A){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return A?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,A,E){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&E&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return A?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,A,E,D,O,$,N,U,I){if(this._config.minimumContrastRatio===1||I)return;const R=this._getContrastCache(U),B=R.getColor(C,E);if(B!==void 0)return B||void 0;const T=this._resolveBackgroundRgba(L,A,$),H=this._resolveForegroundRgba(D,O,$,N),G=p.rgba.ensureContrastRatio(T,H,this._config.minimumContrastRatio/(U?2:1));if(!G)return void R.setColor(C,E,null);const V=p.channels.toColor(G>>24&255,G>>16&255,G>>8&255);return R.setColor(C,E,V),V}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,A,E,D=!1){const O=typeof C=="number"?String.fromCharCode(C):C,$=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<$&&(this._tmpCanvas.width=$);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=A,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=E,this._workAttributeData.isInvisible())return o;const U=!!this._workAttributeData.isBold(),I=!!this._workAttributeData.isInverse(),R=!!this._workAttributeData.isDim(),B=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),G=!!this._workAttributeData.isOverline();let V=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),de=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(I){const ce=V;V=de,de=ce;const ge=ue;ue=q,q=ge}const z=this._getBackgroundColor(q,de,I,R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const se=U?this._config.fontWeightBold:this._config.fontWeight,ie=B?"italic":"";this._tmpCtx.font=`${ie} ${se} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ve=O.length===1&&(0,a.isPowerlineGlyph)(O.charCodeAt(0)),fe=O.length===1&&(0,a.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),Ee=this._getForegroundColor(L,q,de,A,ue,V,I,R,U,(0,a.treatGlyphAsBackgroundColor)(O.charCodeAt(0)));this._tmpCtx.fillStyle=Ee.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,v.tryDrawCustomChar)(this._tmpCtx,O,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,be=!ve;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),T){this._tmpCtx.save();const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;if(this._tmpCtx.lineWidth=ce,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Ae=Math.ceil(_e+this._config.deviceCharHeight)-ge-(D?2*ce:0),_t=Ae+ce,Qe=Ae+2*ce;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Me=ze+Ie*this._config.deviceCellWidth,xe=ze+(Ie+1)*this._config.deviceCellWidth,xt=Me+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Me,Ae),this._tmpCtx.lineTo(xe,Ae),this._tmpCtx.moveTo(Me,Qe),this._tmpCtx.lineTo(xe,Qe);break;case 3:const tt=ce<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-ce/2)-ge,vt=ce<=1?Ae:Math.ceil(_e+this._config.deviceCharHeight+ce/2)-ge,ut=new Path2D;ut.rect(Me,Ae,this._config.deviceCellWidth,Qe-Ae),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Me-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Me-this._config.deviceCellWidth/2,vt,Me,vt,Me,_t),this._tmpCtx.bezierCurveTo(Me,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,xe,vt,xe,_t),this._tmpCtx.bezierCurveTo(xe,tt,xe+this._config.deviceCellWidth/2,tt,xe+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=ce?2*ce-it:ce-it;it>=ce||Zt===0?(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Me+Zt,Ae),this._tmpCtx.lineTo(xe,Ae)):(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Me,Ae),this._tmpCtx.lineTo(Me+Zt,Ae),this._tmpCtx.moveTo(Me+Zt+ce,Ae),this._tmpCtx.lineTo(xe,Ae)),it=(0,a.computeNextVariantOffset)(xe-Me,ce,it);break;case 5:const tr=.6,ir=.3,Ft=xe-Me,si=Math.floor(tr*Ft),ri=Math.floor(ir*Ft),Jt=Ft-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Me,Ae),this._tmpCtx.lineTo(xe,Ae);break;default:this._tmpCtx.moveTo(Me,Ae),this._tmpCtx.lineTo(xe,Ae)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Me=new Path2D;Me.rect(ze,Ae-Math.ceil(ce/2),this._config.deviceCellWidth*qe,Qe-Ae+Math.ceil(ce/2)),this._tmpCtx.clip(Me),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(O,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(G){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let ce=_(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Ee,be);if(ce)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight-ge),ce=_(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Ee,be),ce);ge++);}if(H){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(ce){for(let ge=0;ge<ce.data.length;ge+=4)if(ce.data[ge+3]>0)return!1;return!0})(ft):_(ft,z,Ee,be),Ot)return o;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,$,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const ce=this._createNewPage();pe=ce,me=ce.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ce of this._activePages)Se.size.y<=ce.currentRow.height&&(pe=ce,me=ce.currentRow);for(let ce=this._activePages.length-1;ce>=0;ce--)for(const ge of this._activePages[ce].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ce],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ce=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(m.maxAtlasPages&&this._pages.length>=m.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ce=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,ce=!0}}ce||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(C,L,A,E,D,O){L.top=0;const $=E?this._config.deviceCellHeight:this._tmpCanvas.height,N=E?this._config.deviceCellWidth:A;let U=!1;for(let I=0;I<$;I++){for(let R=0;R<N;R++){const B=I*this._tmpCanvas.width*4+4*R+3;if(C.data[B]!==0){L.top=I,U=!0;break}}if(U)break}L.left=0,U=!1;for(let I=0;I<O+N;I++){for(let R=0;R<$;R++){const B=R*this._tmpCanvas.width*4+4*I+3;if(C.data[B]!==0){L.left=I,U=!0;break}}if(U)break}L.right=N,U=!1;for(let I=O+N-1;I>=O;I--){for(let R=0;R<$;R++){const B=R*this._tmpCanvas.width*4+4*I+3;if(C.data[B]!==0){L.right=I,U=!0;break}}if(U)break}L.bottom=$,U=!1;for(let I=$-1;I>=0;I--){for(let R=0;R<N;R++){const B=I*this._tmpCanvas.width*4+4*R+3;if(C.data[B]!==0){L.bottom=I,U=!0;break}}if(U)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+O+(E||D?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+O+(E||D?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=m;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,L,A){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],A)for(const E of A)this._glyphs.push(...E.glyphs),this._usedPixels+=E._usedPixels;this.canvas=w(C,L,L),this.ctx=(0,a.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,C,L,A){const E=C.rgba>>>24,D=C.rgba>>>16&255,O=C.rgba>>>8&255,$=L.rgba>>>24,N=L.rgba>>>16&255,U=L.rgba>>>8&255,I=Math.floor((Math.abs(E-$)+Math.abs(D-N)+Math.abs(O-U))/12);let R=!0;for(let B=0;B<S.data.length;B+=4)S.data[B]===E&&S.data[B+1]===D&&S.data[B+2]===O||A&&Math.abs(S.data[B]-E)+Math.abs(S.data[B+1]-D)+Math.abs(S.data[B+2]-O)<I?S.data[B+3]=0:R=!1;return R}function w(S,C,L){const A=S.createElement("canvas");return A.width=C,A.height=L,A}},160:(F,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 u=0,f=0,v=0,a=0;var p,y,b,c,r;function h(l){const m=l.toString(16);return m.length<2?"0"+m:m}function o(l,m){return l<m?(m+.05)/(l+.05):(l+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(m,x,_,w){return w!==void 0?`#${h(m)}${h(x)}${h(_)}${h(w)}`:`#${h(m)}${h(x)}${h(_)}`},l.toRgba=function(m,x,_,w=255){return(m<<24|x<<16|_<<8|w)>>>0},l.toColor=function(m,x,_,w){return{css:l.toCss(m,x,_,w),rgba:l.toRgba(m,x,_,w)}}})(p||(n.channels=p={})),(function(l){function m(x,_){return a=Math.round(255*_),[u,f,v]=r.toChannels(x.rgba),{css:p.toCss(u,f,v,a),rgba:p.toRgba(u,f,v,a)}}l.blend=function(x,_){if(a=(255&_.rgba)/255,a===1)return{css:_.css,rgba:_.rgba};const w=_.rgba>>24&255,S=_.rgba>>16&255,C=_.rgba>>8&255,L=x.rgba>>24&255,A=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((w-L)*a),f=A+Math.round((S-A)*a),v=E+Math.round((C-E)*a),{css:p.toCss(u,f,v),rgba:p.toRgba(u,f,v)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,_,w){const S=r.ensureContrastRatio(x.rgba,_.rgba,w);if(S)return p.toColor(S>>24&255,S>>16&255,S>>8&255)},l.opaque=function(x){const _=(255|x.rgba)>>>0;return[u,f,v]=r.toChannels(_),{css:p.toCss(u,f,v),rgba:_}},l.opacity=m,l.multiplyOpacity=function(x,_){return a=255&x.rgba,m(x,a*_/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(y||(n.color=y={})),(function(l){let m,x;try{const _=document.createElement("canvas");_.width=1,_.height=1;const w=_.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",x=m.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(_){if(_.match(/#[\da-f]{3,8}/i))switch(_.length){case 4:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),p.toColor(u,f,v);case 5:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),a=parseInt(_.slice(4,5).repeat(2),16),p.toColor(u,f,v,a);case 7:return{css:_,rgba:(parseInt(_.slice(1),16)<<8|255)>>>0};case 9:return{css:_,rgba:parseInt(_.slice(1),16)>>>0}}const w=_.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 u=parseInt(w[1]),f=parseInt(w[2]),v=parseInt(w[3]),a=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),p.toColor(u,f,v,a);if(!m||!x)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=x,m.fillStyle=_,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[u,f,v,a]=m.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,v,a),css:_}}})(b||(n.css=b={})),(function(l){function m(x,_,w){const S=x/255,C=_/255,L=w/255;return .2126*(S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}l.relativeLuminance=function(x){return m(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=m})(c||(n.rgb=c={})),(function(l){function m(_,w,S){const C=_>>24&255,L=_>>16&255,A=_>>8&255;let E=w>>24&255,D=w>>16&255,O=w>>8&255,$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;$<S&&(E>0||D>0||O>0);)E-=Math.max(0,Math.ceil(.1*E)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}function x(_,w,S){const C=_>>24&255,L=_>>16&255,A=_>>8&255;let E=w>>24&255,D=w>>16&255,O=w>>8&255,$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;$<S&&(E<255||D<255||O<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}l.blend=function(_,w){if(a=(255&w)/255,a===1)return w;const S=w>>24&255,C=w>>16&255,L=w>>8&255,A=_>>24&255,E=_>>16&255,D=_>>8&255;return u=A+Math.round((S-A)*a),f=E+Math.round((C-E)*a),v=D+Math.round((L-D)*a),p.toRgba(u,f,v)},l.ensureContrastRatio=function(_,w,S){const C=c.relativeLuminance(_>>8),L=c.relativeLuminance(w>>8);if(o(C,L)<S){if(L<C){const D=m(_,w,S),O=o(C,c.relativeLuminance(D>>8));if(O<S){const $=x(_,w,S);return O>o(C,c.relativeLuminance($>>8))?D:$}return D}const A=x(_,w,S),E=o(C,c.relativeLuminance(A>>8));if(E<S){const D=m(_,w,S);return E>o(C,c.relativeLuminance(D>>8))?A:D}return A}},l.reduceLuminance=m,l.increaseLuminance=x,l.toChannels=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:(F,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const v=[];for(let a=0;a<this._listeners.length;a++)v.push(this._listeners[a]);for(let a=0;a<v.length;a++)v[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((v=>f.fire(v)))},n.runAndSubscribe=function(u,f){return f(void 0),u((v=>f(v)))}},859:(F,n)=>{function u(f){for(const v of f)v.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const v=this._disposables.indexOf(f);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(f){var v;this._isDisposed||f===this._value||((v=this._value)==null||v.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,a,p){this._data[v]||(this._data[v]={}),this._data[v][a]=p}get(v,a){return this._data[v]?this._data[v][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,v,a,p,y){this._data.get(f,v)||this._data.set(f,v,new u),this._data.get(f,v).set(a,p,y)}get(f,v,a,p){var y;return(y=this._data.get(f,v))==null?void 0:y.get(a,p)}clear(){this._data.clear()}}},399:(F,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(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,c=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),c=Math.max(b,c),h=y.timeRemaining(),1.5*c>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 a 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=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},782:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(133),v=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const c=new p;return c.setFromCharData(b),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.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 c=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)c=!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:c=!0}else c=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;c&&(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=p},855:(F,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:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,v=u.length){let a="";for(let p=f;p<v;++p){let y=u[p];y>65535?(y-=65536,a+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):a+=String.fromCharCode(y)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const v=u.length;if(!v)return 0;let a=0,p=0;if(this._interim){const y=u.charCodeAt(p++);56320<=y&&y<=57343?f[a++]=1024*(this._interim-55296)+y-56320+65536:(f[a++]=this._interim,f[a++]=y),this._interim=0}for(let y=p;y<v;++y){const b=u.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,a;const c=u.charCodeAt(y);56320<=c&&c<=57343?f[a++]=1024*(b-55296)+c-56320+65536:(f[a++]=b,f[a++]=c)}else b!==65279&&(f[a++]=b)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const v=u.length;if(!v)return 0;let a,p,y,b,c=0,r=0,h=0;if(this.interim[0]){let m=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let _,w=0;for(;(_=63&this.interim[++w])&&w<4;)x<<=6,x|=_;const S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=S-w;for(;h<C;){if(h>=v)return 0;if(_=u[h++],(192&_)!=128){h--,m=!0;break}this.interim[w++]=_,x<<=6,x|=63&_}m||(S===2?x<128?h--:f[c++]=x:S===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const o=v-4;let l=h;for(;l<v;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(y=u[l+2])||128&(b=u[l+3]));)f[c++]=a,f[c++]=p,f[c++]=y,f[c++]=b,l+=4;if(a=u[l++],a<128)f[c++]=a;else if((224&a)==192){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[c++]=r}else if((240&a)==224){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(y=u[l++],(192&y)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(y=u[l++],(192&y)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=y,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;f[c++]=r}}return c}}},776:function(F,n,u){var f=this&&this.__decorate||function(r,h,o,l){var m,x=arguments.length,_=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(r,h,o,l);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(_=(x<3?m(_):x>3?m(h,o,_):m(h,o))||_);return x>3&&_&&Object.defineProperty(h,o,_),_},v=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),y={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let b,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.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<=p.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<=p.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<=p.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<=p.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<=p.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=c=f([v(0,p.IOptionsService)],c),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...m){if(b.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,m);b.trace(`GlyphRenderer#${l.name}(${m.map((_=>JSON.stringify(_))).join(", ")})`);const x=l.apply(this,m);return b.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[f]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const a=function(p,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[f].push({id:c,index:h}):(r[f]=[{id:c,index:h}],r[u]=r)})(a,p,b)};return a.toString=()=>v,n.serviceRegistry.set(v,a),a}},97:(F,n,u)=>{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 f=u(726);var v;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")}},P={};function te(F){var n=P[F];if(n!==void 0)return n.exports;var u=P[F]={exports:{}};return Y[F].call(u.exports,u,u.exports,te),u.exports}var ne={};return(()=>{var F=ne;Object.defineProperty(F,"__esModule",{value:!0}),F.WebglAddon=void 0;const n=te(345),u=te(859),f=te(399),v=te(666),a=te(776);class p extends u.Disposable{constructor(b){if(f.isSafari&&(0,f.getSafariVersion)()<16){const c={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",c))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 c=b._core;if(!b.element)return void this.register(c.onWillOpen((()=>this.activate(b))));this._terminal=b;const r=c.coreService,h=c.optionsService,o=c,l=o._renderService,m=o._characterJoinerService,x=o._charSizeService,_=o._coreBrowserService,w=o._decorationService,S=o._logService,C=o._themeService;(0,a.setTraceLogger)(S),this._renderer=this.register(new v.WebglRenderer(b,m,x,_,r,w,h,C,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)),l.setRenderer(this._renderer),this.register((0,u.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()}}F.WebglAddon=p})(),ne})()))})(ko)),ko.exports}var Kv=Yv(),Ho={exports:{}},Kd;function Qv(){return Kd||(Kd=1,(function(j,K){(function(Y,P){j.exports=P()})(self,(()=>(()=>{var Y={903:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const f=u(274),v=u(627),a=u(237),p=u(860),y=u(374),b=u(296),c=u(345),r=u(859),h=u(399),o=u(855);class l extends r.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var _;return(_=this._charAtlas)==null?void 0:_.pages[0].canvas}constructor(_,w,S,C,L,A,E,D,O,$){super(),this._terminal=_,this._container=w,this._alpha=L,this._themeService=A,this._bufferService=E,this._optionsService=D,this._decorationService=O,this._coreBrowserService=$,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,b.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new r.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new c.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new f.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${S}-layer`),this._canvas.style.zIndex=C.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((N=>{this._refreshCharAtlas(N),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,r.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,y.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(_,w){}handleSelectionChanged(_,w,S=!1){this._selectionModel.update(this._terminal._core,_,w,S)}_setTransparency(_){if(_===this._alpha)return;const w=this._canvas;this._alpha=_,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,w),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(_){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,v.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,_,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,c.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let w=0;w<this._charAtlas.pages.length;w++)this._bitmapGenerator[w]=new m(this._charAtlas.pages[w].canvas)}}resize(_){this._deviceCellWidth=_.device.cell.width,this._deviceCellHeight=_.device.cell.height,this._deviceCharWidth=_.device.char.width,this._deviceCharHeight=_.device.char.height,this._deviceCharLeft=_.device.char.left,this._deviceCharTop=_.device.char.top,this._canvas.width=_.device.canvas.width,this._canvas.height=_.device.canvas.height,this._canvas.style.width=`${_.css.canvas.width}px`,this._canvas.style.height=`${_.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var _;(_=this._charAtlas)==null||_.clearTexture()}_fillCells(_,w,S,C){this._ctx.fillRect(_*this._deviceCellWidth,w*this._deviceCellHeight,S*this._deviceCellWidth,C*this._deviceCellHeight)}_fillMiddleLineAtCells(_,w,S=1){const C=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(_*this._deviceCellWidth,(w+1)*this._deviceCellHeight-C-this._coreBrowserService.dpr,S*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(_,w,S=1,C=0){this._ctx.fillRect(_*this._deviceCellWidth,(w+1)*this._deviceCellHeight+C-this._coreBrowserService.dpr-1,S*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(_,w,S=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C;for(let L=0;L<S;L++){const A=(_+L)*this._deviceCellWidth,E=(_+L+.5)*this._deviceCellWidth,D=(_+L+1)*this._deviceCellWidth,O=(w+1)*this._deviceCellHeight-C-1,$=O-C,N=O+C;this._ctx.moveTo(A,O),this._ctx.bezierCurveTo(A,$,E,$,E,O),this._ctx.bezierCurveTo(E,N,D,N,D,O)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(_,w,S=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C,this._ctx.setLineDash([2*C,C]);const L=_*this._deviceCellWidth,A=(w+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(L,A);for(let E=0;E<S;E++){const D=(_+S+E)*this._deviceCellWidth;this._ctx.lineTo(D,A)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(_,w,S=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C,this._ctx.setLineDash([4*C,3*C]);const L=_*this._deviceCellWidth,A=(_+S)*this._deviceCellWidth,E=(w+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(L,E),this._ctx.lineTo(A,E),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(_,w,S){this._ctx.fillRect(_*this._deviceCellWidth,w*this._deviceCellHeight,this._coreBrowserService.dpr*S,this._deviceCellHeight)}_strokeRectAtCell(_,w,S,C){const L=this._coreBrowserService.dpr;this._ctx.lineWidth=L,this._ctx.strokeRect(_*this._deviceCellWidth+L/2,w*this._deviceCellHeight+L/2,S*this._deviceCellWidth-L,C*this._deviceCellHeight-L)}_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(_,w,S,C){this._alpha?this._ctx.clearRect(_*this._deviceCellWidth,w*this._deviceCellHeight,S*this._deviceCellWidth,C*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(_*this._deviceCellWidth,w*this._deviceCellHeight,S*this._deviceCellWidth,C*this._deviceCellHeight))}_fillCharTrueColor(_,w,S){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=a.TEXT_BASELINE,this._clipRow(S);let C=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(C=(0,p.tryDrawCustomChar)(this._ctx,_.getChars(),w*this._deviceCellWidth,S*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),C||this._ctx.fillText(_.getChars(),w*this._deviceCellWidth+this._deviceCharLeft,S*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(_,w,S){var O,$,N,U;const C=_.getChars(),L=_.getCode(),A=_.getWidth();if(this._cellColorResolver.resolve(_,w,this._bufferService.buffer.ydisp+S,this._deviceCellWidth),!this._charAtlas)return;let E;if(E=C&&C.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(C,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(_.getCode()||o.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!E.size.x||!E.size.y)return;this._ctx.save(),this._clipRow(S),this._bitmapGenerator[E.texturePage]&&this._charAtlas.pages[E.texturePage].canvas!==this._bitmapGenerator[E.texturePage].canvas&&(($=(O=this._bitmapGenerator[E.texturePage])==null?void 0:O.bitmap)==null||$.close(),delete this._bitmapGenerator[E.texturePage]),this._charAtlas.pages[E.texturePage].version!==((N=this._bitmapGenerator[E.texturePage])==null?void 0:N.version)&&(this._bitmapGenerator[E.texturePage]||(this._bitmapGenerator[E.texturePage]=new m(this._charAtlas.pages[E.texturePage].canvas)),this._bitmapGenerator[E.texturePage].refresh(),this._bitmapGenerator[E.texturePage].version=this._charAtlas.pages[E.texturePage].version);let D=E.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,y.allowRescaling)(L,A,E.size.x,this._deviceCellWidth)&&(D=this._deviceCellWidth-1),this._ctx.drawImage(((U=this._bitmapGenerator[E.texturePage])==null?void 0:U.bitmap)||this._charAtlas.pages[E.texturePage].canvas,E.texturePosition.x,E.texturePosition.y,E.size.x,E.size.y,w*this._deviceCellWidth+this._deviceCharLeft-E.offset.x,S*this._deviceCellHeight+this._deviceCharTop-E.offset.y,D,E.size.y),this._ctx.restore()}_clipRow(_){this._ctx.beginPath(),this._ctx.rect(0,_*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(_,w){return`${w?"italic":""} ${_?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}n.BaseRenderLayer=l;class m{get bitmap(){return this._bitmap}constructor(_){this.canvas=_,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var _;(_=this._bitmap)==null||_.close(),this._bitmap=void 0,h.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var _;this._state===0&&((_=this._bitmap)==null||_.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((w=>{this._state===2?this.refresh():this._bitmap=w,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CanvasRenderer=void 0;const f=u(627),v=u(56),a=u(374),p=u(345),y=u(859),b=u(873),c=u(43),r=u(630),h=u(744);class o extends y.Disposable{constructor(m,x,_,w,S,C,L,A,E,D,O){super(),this._terminal=m,this._screenElement=x,this._bufferService=w,this._charSizeService=S,this._optionsService=C,this._coreBrowserService=E,this._themeService=O,this._observerDisposable=this.register(new y.MutableDisposable),this._onRequestRedraw=this.register(new p.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new p.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new p.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const $=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new h.TextRenderLayer(this._terminal,this._screenElement,0,$,this._bufferService,this._optionsService,L,D,this._coreBrowserService,O),new r.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,D,this._optionsService,O),new c.LinkRenderLayer(this._terminal,this._screenElement,2,_,this._bufferService,this._optionsService,D,this._coreBrowserService,O),new b.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,A,this._coreBrowserService,D,O)];for(const N of this._renderLayers)(0,p.forwardEvent)(N.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,a.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((N,U)=>this._setCanvasDevicePixelDimensions(N,U))),this.register(this._coreBrowserService.onWindowChange((N=>{this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._renderLayers[0].canvas,N,((U,I)=>this._setCanvasDevicePixelDimensions(U,I)))}))),this.register((0,y.toDisposable)((()=>{for(const N of this._renderLayers)N.dispose();(0,f.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(m,x){this._updateDimensions();for(const _ of this._renderLayers)_.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation((m=>m.handleBlur()))}handleFocus(){this._runOperation((m=>m.handleFocus()))}handleSelectionChanged(m,x,_=!1){this._runOperation((w=>w.handleSelectionChanged(m,x,_))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((m=>m.handleCursorMove()))}clear(){this._runOperation((m=>m.reset()))}_runOperation(m){for(const x of this._renderLayers)m(x)}renderRows(m,x){for(const _ of this._renderLayers)_.handleGridChanged(m,x)}clearTextureAtlas(){for(const m of this._renderLayers)m.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const m=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*m),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*m),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/m),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/m),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(m,x){this.dimensions.device.canvas.height=x,this.dimensions.device.canvas.width=m;for(const _ of this._renderLayers)_.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}n.CanvasRenderer=o},873:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;const f=u(457),v=u(859),a=u(399),p=u(782),y=u(903);class b extends y.BaseRenderLayer{constructor(r,h,o,l,m,x,_,w,S,C){super(r,h,"cursor",o,!0,C,m,x,S,w),this._onRequestRedraw=l,this._coreService=_,this._cursorBlinkStateManager=this.register(new v.MutableDisposable),this._cell=new p.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(x.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(r){super.resize(r),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var r;this._clearCursor(),(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var r;(r=this._cursorBlinkStateManager.value)==null||r.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var r;(r=this._cursorBlinkStateManager.value)==null||r.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new f.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var r;(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation()}handleGridChanged(r,h){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(r){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const h=this._bufferService.buffer.ybase+this._bufferService.buffer.y,o=h-this._bufferService.buffer.ydisp;if(o<0||o>=this._bufferService.rows)return void this._clearCursor();const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(h).loadCell(l,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const m=this._optionsService.rawOptions.cursorStyle,x=this._optionsService.rawOptions.cursorInactiveStyle;return x&&x!=="none"&&this._cursorRenderers[x](l,o,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=o,this._state.isFocused=!1,this._state.style=m,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===l&&this._state.y===o&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](l,o,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=o,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(a.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(r,h,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(r,h,o.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(o,r,h),this._ctx.restore()}_renderUnderlineCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(r,h),this._ctx.restore()}_renderOutlineCursor(r,h,o){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(r,h,o.getWidth(),1),this._ctx.restore()}}n.CursorRenderLayer=b},574:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GridCache=void 0,n.GridCache=class{constructor(){this.cache=[]}resize(u,f){for(let v=0;v<u;v++){this.cache.length<=v&&this.cache.push([]);for(let a=this.cache[v].length;a<f;a++)this.cache[v].push(void 0);this.cache[v].length=f}this.cache.length=u}clear(){for(let u=0;u<this.cache.length;u++)for(let f=0;f<this.cache[u].length;f++)this.cache[u][f]=void 0}}},43:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const f=u(197),v=u(237),a=u(903);class p extends a.BaseRenderLayer{constructor(b,c,r,h,o,l,m,x,_){super(b,c,"link",r,!0,_,o,l,m,x),this.register(h.onShowLinkUnderline((w=>this._handleShowLinkUnderline(w)))),this.register(h.onHideLinkUnderline((w=>this._handleHideLinkUnderline(w))))}resize(b){super.resize(b),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const 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&&(0,f.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 c=b.y1+1;c<b.y2;c++)this._fillBottomLineAtCells(0,c,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}n.LinkRenderLayer=p},630:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;const f=u(903);class v extends f.BaseRenderLayer{constructor(p,y,b,c,r,h,o,l){super(p,y,"selection",b,!0,l,c,o,h,r),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(p){super.resize(p),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(p,y,b){super.handleSelectionChanged(p,y,b),this._redrawSelection(p,y,b)}_redrawSelection(p,y,b){if(!this._didStateChange(p,y,b,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!p||!y)return void this._clearState();const c=p[1]-this._bufferService.buffer.ydisp,r=y[1]-this._bufferService.buffer.ydisp,h=Math.max(c,0),o=Math.min(r,this._bufferService.rows-1);if(h>=this._bufferService.rows||o<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,b){const l=p[0],m=y[0]-l,x=o-h+1;this._fillCells(l,h,m,x)}else{const l=c===h?p[0]:0,m=h===r?y[0]:this._bufferService.cols;this._fillCells(l,h,m-l,1);const x=Math.max(o-h-1,0);if(this._fillCells(0,h+1,this._bufferService.cols,x),h!==o){const _=r===o?y[0]:this._bufferService.cols;this._fillCells(0,o,_,1)}}this._state.start=[p[0],p[1]],this._state.end=[y[0],y[1]],this._state.columnSelectMode=b,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(p,y,b,c){return!this._areCoordinatesEqual(p,this._state.start)||!this._areCoordinatesEqual(y,this._state.end)||b!==this._state.columnSelectMode||c!==this._state.ydisp}_areCoordinatesEqual(p,y){return!(!p||!y)&&p[0]===y[0]&&p[1]===y[1]}}n.SelectionRenderLayer=v},744:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderLayer=void 0;const f=u(577),v=u(147),a=u(782),p=u(855),y=u(903),b=u(574);class c extends y.BaseRenderLayer{constructor(h,o,l,m,x,_,w,S,C,L){super(h,o,"text",l,m,L,x,_,S,C),this._characterJoinerService=w,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new a.CellData,this._state=new b.GridCache,this.register(_.onSpecificOptionChange("allowTransparency",(A=>this._setTransparency(A))))}resize(h){super.resize(h);const o=this._getFont(!1,!1);this._characterWidth===h.device.char.width&&this._characterFont===o||(this._characterWidth=h.device.char.width,this._characterFont=o,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(h,o,l){for(let m=h;m<=o;m++){const x=m+this._bufferService.buffer.ydisp,_=this._bufferService.buffer.lines.get(x),w=this._characterJoinerService.getJoinedCharacters(x);for(let S=0;S<this._bufferService.cols;S++){_.loadCell(S,this._workCell);let C=this._workCell,L=!1,A=S;if(C.getWidth()!==0){if(w.length>0&&S===w[0][0]){L=!0;const E=w.shift();C=new f.JoinedCellData(this._workCell,_.translateToString(!0,E[0],E[1]),E[1]-E[0]),A=E[1]-1}!L&&this._isOverlapping(C)&&A<_.length-1&&_.getCodePoint(A+1)===p.NULL_CELL_CODE&&(C.content&=-12582913,C.content|=8388608),l(C,S,m),S=A}}}}_drawBackground(h,o){const l=this._ctx,m=this._bufferService.cols;let x=0,_=0,w=null;l.save(),this._forEachCell(h,o,((S,C,L)=>{let A=null;S.isInverse()?A=S.isFgDefault()?this._themeService.colors.foreground.css:S.isFgRGB()?`rgb(${v.AttributeData.toColorRGB(S.getFgColor()).join(",")})`:this._themeService.colors.ansi[S.getFgColor()].css:S.isBgRGB()?A=`rgb(${v.AttributeData.toColorRGB(S.getBgColor()).join(",")})`:S.isBgPalette()&&(A=this._themeService.colors.ansi[S.getBgColor()].css);let E=!1;this._decorationService.forEachDecorationAtCell(C,this._bufferService.buffer.ydisp+L,void 0,(D=>{D.options.layer!=="top"&&E||(D.backgroundColorRGB&&(A=D.backgroundColorRGB.css),E=D.options.layer==="top")})),w===null&&(x=C,_=L),L!==_?(l.fillStyle=w||"",this._fillCells(x,_,m-x,1),x=C,_=L):w!==A&&(l.fillStyle=w||"",this._fillCells(x,_,C-x,1),x=C,_=L),w=A})),w!==null&&(l.fillStyle=w,this._fillCells(x,_,m-x,1)),l.restore()}_drawForeground(h,o){this._forEachCell(h,o,((l,m,x)=>this._drawChars(l,m,x)))}handleGridChanged(h,o){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,h,this._bufferService.cols,o-h+1),this._drawBackground(h,o),this._drawForeground(h,o))}_isOverlapping(h){if(h.getWidth()!==1||h.getCode()<256)return!1;const o=h.getChars();if(this._characterOverlapCache.hasOwnProperty(o))return this._characterOverlapCache[o];this._ctx.save(),this._ctx.font=this._characterFont;const l=Math.floor(this._ctx.measureText(o).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[o]=l,l}}n.TextRenderLayer=c},274:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const f=u(855),v=u(160),a=u(374);let p,y=0,b=0,c=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(l,m,x,_,w,S){this._terminal=l,this._optionService=m,this._selectionRenderModel=x,this._decorationService=_,this._coreBrowserService=w,this._themeService=S,this.result={fg:0,bg:0,ext:0}}resolve(l,m,x,_){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,b=0,y=0,r=!1,c=!1,h=!1,p=this._themeService.colors,o=0,l.getCode()!==f.NULL_CELL_CODE&&l.extended.underlineStyle===4){const w=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=m*_%(2*Math.round(w))}if(this._decorationService.forEachDecorationAtCell(m,x,"bottom",(w=>{w.backgroundColorRGB&&(b=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,m,x),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?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(y=p.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)y=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.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?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(m,x,"top",(w=>{w.backgroundColorRGB&&(b=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(y=w.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(b=h?-16777216&l.bg&-134217729|b|50331648:-16777216&l.bg|b|50331648),c&&(y=-16777216&l.fg&-67108865|y|50331648),67108864&this.result.fg&&(r&&!c&&(y=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=c?y:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const f=u(509),v=u(197),a=[];n.acquireTextureAtlas=function(p,y,b,c,r,h,o,l){const m=(0,v.generateConfig)(c,r,h,o,y,b,l);for(let w=0;w<a.length;w++){const S=a[w],C=S.ownedBy.indexOf(p);if(C>=0){if((0,v.configEquals)(S.config,m))return S.atlas;S.ownedBy.length===1?(S.atlas.dispose(),a.splice(w,1)):S.ownedBy.splice(C,1);break}}for(let w=0;w<a.length;w++){const S=a[w];if((0,v.configEquals)(S.config,m))return S.ownedBy.push(p),S.atlas}const x=p._core,_={atlas:new f.TextureAtlas(document,m,x.unicodeService),config:m,ownedBy:[p]};return a.push(_),_.atlas},n.removeTerminalFromCache=function(p){for(let y=0;y<a.length;y++){const b=a[y].ownedBy.indexOf(p);if(b!==-1){a[y].ownedBy.length===1?(a[y].atlas.dispose(),a.splice(y,1)):a[y].ownedBy.splice(b,1);break}}}},197:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const f=u(160);n.generateConfig=function(v,a,p,y,b,c,r){const h={foreground:c.foreground,background:c.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:c.ansi.slice(),contrastCache:c.contrastCache,halfContrastCache:c.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:v,deviceCellHeight:a,deviceCharWidth:p,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,a){for(let p=0;p<v.colors.ansi.length;p++)if(v.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return v.devicePixelRatio===a.devicePixelRatio&&v.customGlyphs===a.customGlyphs&&v.lineHeight===a.lineHeight&&v.letterSpacing===a.letterSpacing&&v.fontFamily===a.fontFamily&&v.fontSize===a.fontSize&&v.fontWeight===a.fontWeight&&v.fontWeightBold===a.fontWeightBold&&v.allowTransparency===a.allowTransparency&&v.deviceCharWidth===a.deviceCharWidth&&v.deviceCharHeight===a.deviceCharHeight&&v.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&v.minimumContrastRatio===a.minimumContrastRatio&&v.colors.foreground.rgba===a.colors.foreground.rgba&&v.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}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 f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}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:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const f=u(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:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╒":{1:(c,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(c,r)=>`M${.5-c},1 L${.5-c},.5 L1,.5 M${.5+c},.5 L${.5+c},1`},"╔":{1:(c,r)=>`M1,${.5-r} L${.5-c},${.5-r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╕":{1:(c,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(c,r)=>`M${.5+c},1 L${.5+c},.5 L0,.5 M${.5-c},.5 L${.5-c},1`},"╗":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5+c},${.5-r} L${.5+c},1`},"╘":{1:(c,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(c,r)=>`M1,.5 L${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╚":{1:(c,r)=>`M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0 M1,${.5+r} L${.5-c},${.5+r} L${.5-c},0`},"╛":{1:(c,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(c,r)=>`M0,.5 L${.5+c},.5 L${.5+c},0 M${.5-c},.5 L${.5-c},0`},"╝":{1:(c,r)=>`M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M0,${.5+r} L${.5+c},${.5+r} L${.5+c},0`},"╞":{1:(c,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1 M${.5+c},.5 L1,.5`},"╠":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╡":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(c,r)=>`M0,.5 L${.5-c},.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╣":{1:(c,r)=>`M${.5+c},0 L${.5+c},1 M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0`},"╤":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},1 M${.5+c},.5 L${.5+c},1`},"╦":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╧":{1:(c,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╩":{1:(c,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╪":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╬":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},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:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(c,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(c,r,h,o,l,m,x,_){const w=n.blockElementDefinitions[r];if(w)return(function(A,E,D,O,$,N){for(let U=0;U<E.length;U++){const I=E[U],R=$/8,B=N/8;A.fillRect(D+I.x*R,O+I.y*B,I.w*R,I.h*B)}})(c,w,h,o,l,m),!0;const S=v[r];if(S)return(function(A,E,D,O,$,N){let U=a.get(E);U||(U=new Map,a.set(E,U));const I=A.fillStyle;if(typeof I!="string")throw new Error(`Unexpected fillStyle type "${I}"`);let R=U.get(I);if(!R){const B=E[0].length,T=E.length,H=A.canvas.ownerDocument.createElement("canvas");H.width=B,H.height=T;const G=(0,f.throwIfFalsy)(H.getContext("2d")),V=new ImageData(B,T);let ue,de,q,z;if(I.startsWith("#"))ue=parseInt(I.slice(1,3),16),de=parseInt(I.slice(3,5),16),q=parseInt(I.slice(5,7),16),z=I.length>7&&parseInt(I.slice(7,9),16)||1;else{if(!I.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${I}" when drawing pattern glyph`);[ue,de,q,z]=I.substring(5,I.length-1).split(",").map((se=>parseFloat(se)))}for(let se=0;se<T;se++)for(let ie=0;ie<B;ie++)V.data[4*(se*B+ie)]=ue,V.data[4*(se*B+ie)+1]=de,V.data[4*(se*B+ie)+2]=q,V.data[4*(se*B+ie)+3]=E[se][ie]*(255*z);G.putImageData(V,0,0),R=(0,f.throwIfFalsy)(A.createPattern(H,null)),U.set(I,R)}A.fillStyle=R,A.fillRect(D,O,$,N)})(c,S,h,o,l,m),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(A,E,D,O,$,N,U){A.strokeStyle=A.fillStyle;for(const[I,R]of Object.entries(E)){let B;A.beginPath(),A.lineWidth=U*Number.parseInt(I),B=typeof R=="function"?R(.15,.15/N*$):R;for(const T of B.split(" ")){const H=T[0],G=y[H];if(!G){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=T.substring(1).split(",");V[0]&&V[1]&&G(A,b(V,$,N,D,O,!0,U))}A.stroke(),A.closePath()}})(c,C,h,o,l,m,_),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(A,E,D,O,$,N,U,I){const R=new Path2D;R.rect(D,O,$,N),A.clip(R),A.beginPath();const B=U/12;A.lineWidth=I*B;for(const T of E.d.split(" ")){const H=T[0],G=y[H];if(!G){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=T.substring(1).split(",");V[0]&&V[1]&&G(A,b(V,$,N,D,O,!1,I,(E.leftPadding??0)*(B/2),(E.rightPadding??0)*(B/2)))}E.type===1?(A.strokeStyle=A.fillStyle,A.stroke()):A.fill(),A.closePath()})(c,L,h,o,l,m,x,_),!0)};const a=new Map;function p(c,r,h=0){return Math.max(Math.min(c,r),h)}const y={C:(c,r)=>c.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(c,r)=>c.lineTo(r[0],r[1]),M:(c,r)=>c.moveTo(r[0],r[1])};function b(c,r,h,o,l,m,x,_=0,w=0){const S=c.map((C=>parseFloat(C)||parseInt(C)));if(S.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<S.length;C+=2)S[C]*=r-_*x-w*x,m&&S[C]!==0&&(S[C]=p(Math.round(S[C]+.5)-.5,r,0)),S[C]+=o+_*x;for(let C=1;C<S.length;C+=2)S[C]*=h,m&&S[C]!==0&&(S[C]=p(Math.round(S[C]+.5)-.5,h,0)),S[C]+=l;return S}},56:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(v,a,p){let y=new a.ResizeObserver((b=>{const c=b.find((o=>o.target===v));if(!c)return;if(!("devicePixelContentBoxSize"in c))return y==null||y.disconnect(),void(y=void 0);const r=c.devicePixelContentBoxSize[0].inlineSize,h=c.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{y.observe(v,{box:["device-pixel-content-box"]})}catch{y.disconnect(),y=void 0}return(0,f.toDisposable)((()=>y==null?void 0:y.disconnect()))}},374:(F,n)=>{function u(v){return 57508<=v&&v<=57558}function f(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=u,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=f,n.allowRescaling=function(v,a,p,y){return a===1&&p>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!f(v)&&!u(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(a){return 9472<=a&&a<=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,a,p=0){return(v-(2*Math.round(a)-p))%(2*Math.round(a))}},296:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,a,p,y=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const b=v.buffers.active.ydisp,c=a[1]-b,r=p[1]-b,h=Math.max(c,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(v,a,p){return!!this.hasSelection&&(p-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const f=u(237),v=u(860),a=u(374),p=u(160),y=u(345),b=u(485),c=u(385),r=u(147),h=u(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 l;class m{get pages(){return this._pages}constructor(C,L,A){this._document=C,this._config=L,this._unicodeService=A,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(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new c.IdleTaskQueue;for(let L=33;L<126;L++)C.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const A=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,A)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(m.maxAtlasPages&&this._pages.length>=Math.max(4,m.maxAtlasPages)){const L=this._pages.filter((U=>2*U.canvas.width<=(m.maxTextureSize||4096))).sort(((U,I)=>I.canvas.width!==U.canvas.width?I.canvas.width-U.canvas.width:I.percentageUsed-U.percentageUsed));let A=-1,E=0;for(let U=0;U<L.length;U++)if(L[U].canvas.width!==E)A=U,E=L[U].canvas.width;else if(U-A==3)break;const D=L.slice(A,A+4),O=D.map((U=>U.glyphs[0].texturePage)).sort(((U,I)=>U>I?1:-1)),$=this.pages.length-D.length,N=this._mergePages(D,$);N.version++;for(let U=O.length-1;U>=0;U--)this._deletePage(O[U]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const C=new x(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,L){const A=2*C[0].canvas.width,E=new x(this._document,A,C);for(const[D,O]of C.entries()){const $=D*O.canvas.width%A,N=Math.floor(D/2)*O.canvas.height;E.ctx.drawImage(O.canvas,$,N);for(const I of O.glyphs)I.texturePage=L,I.sizeClipSpace.x=I.size.x/A,I.sizeClipSpace.y=I.size.y/A,I.texturePosition.x+=$,I.texturePosition.y+=N,I.texturePositionClipSpace.x=I.texturePosition.x/A,I.texturePositionClipSpace.y=I.texturePosition.y/A;this._onRemoveTextureAtlasCanvas.fire(O.canvas);const U=this._activePages.indexOf(O);U!==-1&&this._activePages.splice(U,1)}return E}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const A=this._pages[L];for(const E of A.glyphs)E.texturePage--;A.version++}}getRasterizedGlyphCombinedChar(C,L,A,E,D){return this._getFromCacheMap(this._cacheMapCombined,C,L,A,E,D)}getRasterizedGlyph(C,L,A,E,D){return this._getFromCacheMap(this._cacheMap,C,L,A,E,D)}_getFromCacheMap(C,L,A,E,D,O=!1){return l=C.get(L,A,E,D),l||(l=this._drawToCache(L,A,E,D,O),C.set(L,A,E,D,l)),l}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,L,A,E){if(this._config.allowTransparency)return p.NULL_COLOR;let D;switch(C){case 16777216:case 33554432:D=this._getColorFromAnsiIndex(L);break;case 50331648:const O=r.AttributeData.toColorRGB(L);D=p.channels.toColor(O[0],O[1],O[2]);break;default:D=A?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return D}_getForegroundColor(C,L,A,E,D,O,$,N,U,I){const R=this._getMinimumContrastColor(C,L,A,E,D,O,$,U,N,I);if(R)return R;let B;switch(D){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&U&&O<8&&(O+=8),B=this._getColorFromAnsiIndex(O);break;case 50331648:const T=r.AttributeData.toColorRGB(O);B=p.channels.toColor(T[0],T[1],T[2]);break;default:B=$?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(B=p.color.opaque(B)),N&&(B=p.color.multiplyOpacity(B,f.DIM_OPACITY)),B}_resolveBackgroundRgba(C,L,A){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return A?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,A,E){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&E&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return A?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,A,E,D,O,$,N,U,I){if(this._config.minimumContrastRatio===1||I)return;const R=this._getContrastCache(U),B=R.getColor(C,E);if(B!==void 0)return B||void 0;const T=this._resolveBackgroundRgba(L,A,$),H=this._resolveForegroundRgba(D,O,$,N),G=p.rgba.ensureContrastRatio(T,H,this._config.minimumContrastRatio/(U?2:1));if(!G)return void R.setColor(C,E,null);const V=p.channels.toColor(G>>24&255,G>>16&255,G>>8&255);return R.setColor(C,E,V),V}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,A,E,D=!1){const O=typeof C=="number"?String.fromCharCode(C):C,$=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<$&&(this._tmpCanvas.width=$);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=A,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=E,this._workAttributeData.isInvisible())return o;const U=!!this._workAttributeData.isBold(),I=!!this._workAttributeData.isInverse(),R=!!this._workAttributeData.isDim(),B=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),G=!!this._workAttributeData.isOverline();let V=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),de=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(I){const ce=V;V=de,de=ce;const ge=ue;ue=q,q=ge}const z=this._getBackgroundColor(q,de,I,R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const se=U?this._config.fontWeightBold:this._config.fontWeight,ie=B?"italic":"";this._tmpCtx.font=`${ie} ${se} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ve=O.length===1&&(0,a.isPowerlineGlyph)(O.charCodeAt(0)),fe=O.length===1&&(0,a.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),Ee=this._getForegroundColor(L,q,de,A,ue,V,I,R,U,(0,a.treatGlyphAsBackgroundColor)(O.charCodeAt(0)));this._tmpCtx.fillStyle=Ee.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,v.tryDrawCustomChar)(this._tmpCtx,O,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,be=!ve;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),T){this._tmpCtx.save();const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;if(this._tmpCtx.lineWidth=ce,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Ae=Math.ceil(_e+this._config.deviceCharHeight)-ge-(D?2*ce:0),_t=Ae+ce,Qe=Ae+2*ce;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Me=ze+Ie*this._config.deviceCellWidth,xe=ze+(Ie+1)*this._config.deviceCellWidth,xt=Me+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Me,Ae),this._tmpCtx.lineTo(xe,Ae),this._tmpCtx.moveTo(Me,Qe),this._tmpCtx.lineTo(xe,Qe);break;case 3:const tt=ce<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-ce/2)-ge,vt=ce<=1?Ae:Math.ceil(_e+this._config.deviceCharHeight+ce/2)-ge,ut=new Path2D;ut.rect(Me,Ae,this._config.deviceCellWidth,Qe-Ae),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Me-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Me-this._config.deviceCellWidth/2,vt,Me,vt,Me,_t),this._tmpCtx.bezierCurveTo(Me,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,xe,vt,xe,_t),this._tmpCtx.bezierCurveTo(xe,tt,xe+this._config.deviceCellWidth/2,tt,xe+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=ce?2*ce-it:ce-it;it>=ce||Zt===0?(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Me+Zt,Ae),this._tmpCtx.lineTo(xe,Ae)):(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Me,Ae),this._tmpCtx.lineTo(Me+Zt,Ae),this._tmpCtx.moveTo(Me+Zt+ce,Ae),this._tmpCtx.lineTo(xe,Ae)),it=(0,a.computeNextVariantOffset)(xe-Me,ce,it);break;case 5:const tr=.6,ir=.3,Ft=xe-Me,si=Math.floor(tr*Ft),ri=Math.floor(ir*Ft),Jt=Ft-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Me,Ae),this._tmpCtx.lineTo(xe,Ae);break;default:this._tmpCtx.moveTo(Me,Ae),this._tmpCtx.lineTo(xe,Ae)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Me=new Path2D;Me.rect(ze,Ae-Math.ceil(ce/2),this._config.deviceCellWidth*qe,Qe-Ae+Math.ceil(ce/2)),this._tmpCtx.clip(Me),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(O,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(G){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let ce=_(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Ee,be);if(ce)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight-ge),ce=_(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Ee,be),ce);ge++);}if(H){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(ce){for(let ge=0;ge<ce.data.length;ge+=4)if(ce.data[ge+3]>0)return!1;return!0})(ft):_(ft,z,Ee,be),Ot)return o;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,$,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const ce=this._createNewPage();pe=ce,me=ce.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ce of this._activePages)Se.size.y<=ce.currentRow.height&&(pe=ce,me=ce.currentRow);for(let ce=this._activePages.length-1;ce>=0;ce--)for(const ge of this._activePages[ce].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ce],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ce=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(m.maxAtlasPages&&this._pages.length>=m.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ce=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,ce=!0}}ce||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(C,L,A,E,D,O){L.top=0;const $=E?this._config.deviceCellHeight:this._tmpCanvas.height,N=E?this._config.deviceCellWidth:A;let U=!1;for(let I=0;I<$;I++){for(let R=0;R<N;R++){const B=I*this._tmpCanvas.width*4+4*R+3;if(C.data[B]!==0){L.top=I,U=!0;break}}if(U)break}L.left=0,U=!1;for(let I=0;I<O+N;I++){for(let R=0;R<$;R++){const B=R*this._tmpCanvas.width*4+4*I+3;if(C.data[B]!==0){L.left=I,U=!0;break}}if(U)break}L.right=N,U=!1;for(let I=O+N-1;I>=O;I--){for(let R=0;R<$;R++){const B=R*this._tmpCanvas.width*4+4*I+3;if(C.data[B]!==0){L.right=I,U=!0;break}}if(U)break}L.bottom=$,U=!1;for(let I=$-1;I>=0;I--){for(let R=0;R<N;R++){const B=I*this._tmpCanvas.width*4+4*R+3;if(C.data[B]!==0){L.bottom=I,U=!0;break}}if(U)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+O+(E||D?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+O+(E||D?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=m;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,L,A){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],A)for(const E of A)this._glyphs.push(...E.glyphs),this._usedPixels+=E._usedPixels;this.canvas=w(C,L,L),this.ctx=(0,a.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,C,L,A){const E=C.rgba>>>24,D=C.rgba>>>16&255,O=C.rgba>>>8&255,$=L.rgba>>>24,N=L.rgba>>>16&255,U=L.rgba>>>8&255,I=Math.floor((Math.abs(E-$)+Math.abs(D-N)+Math.abs(O-U))/12);let R=!0;for(let B=0;B<S.data.length;B+=4)S.data[B]===E&&S.data[B+1]===D&&S.data[B+2]===O||A&&Math.abs(S.data[B]-E)+Math.abs(S.data[B+1]-D)+Math.abs(S.data[B+2]-O)<I?S.data[B+3]=0:R=!1;return R}function w(S,C,L){const A=S.createElement("canvas");return A.width=C,A.height=L,A}},577:function(F,n,u){var f=this&&this.__decorate||function(h,o,l,m){var x,_=arguments.length,w=_<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,l):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,l,m);else for(var S=h.length-1;S>=0;S--)(x=h[S])&&(w=(_<3?x(w):_>3?x(o,l,w):x(o,l))||w);return _>3&&w&&Object.defineProperty(o,l,w),w},v=this&&this.__param||function(h,o){return function(l,m){o(l,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(147),p=u(855),y=u(782),b=u(97);class c extends a.AttributeData{constructor(o,l,m){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=m}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=c;let r=n.CharacterJoinerService=class sf{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const m=[],x=l.translateToString(!0);let _=0,w=0,S=0,C=l.getFg(0),L=l.getBg(0);for(let A=0;A<l.getTrimmedLength();A++)if(l.loadCell(A,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(A-_>1){const E=this._getJoinedRanges(x,S,w,l,_);for(let D=0;D<E.length;D++)m.push(E[D])}_=A,S=w,C=this._workCell.fg,L=this._workCell.bg}w+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-_>1){const A=this._getJoinedRanges(x,S,w,l,_);for(let E=0;E<A.length;E++)m.push(A[E])}return m}_getJoinedRanges(o,l,m,x,_){const w=o.substring(l,m);let S=[];try{S=this._characterJoiners[0].handler(w)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(w);for(let A=0;A<L.length;A++)sf._mergeRanges(S,L[A])}catch(L){console.error(L)}return this._stringRangesToCellRanges(S,x,_),S}_stringRangesToCellRanges(o,l,m){let x=0,_=!1,w=0,S=o[x];if(S){for(let C=m;C<this._bufferService.cols;C++){const L=l.getWidth(C),A=l.getString(C).length||p.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!_&&S[0]<=w&&(S[0]=C,_=!0),S[1]<=w){if(S[1]=C,S=o[++x],!S)break;S[0]<=w?(S[0]=C,_=!0):_=!1}w+=A}}S&&(S[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let m=!1;for(let x=0;x<o.length;x++){const _=o[x];if(m){if(l[1]<=_[0])return o[x-1][1]=l[1],o;if(l[1]<=_[1])return o[x-1][1]=Math.max(l[1],_[1]),o.splice(x,1),o;o.splice(x,1),x--}else{if(l[1]<=_[0])return o.splice(x,0,l),o;if(l[1]<=_[1])return _[0]=Math.min(l[0],_[0]),o;l[0]<_[1]&&(_[0]=Math.min(l[0],_[0]),m=!0)}}return m?o[o.length-1][1]=l[1]:o.push(l),o}};n.CharacterJoinerService=r=f([v(0,b.IBufferService)],r)},160:(F,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 u=0,f=0,v=0,a=0;var p,y,b,c,r;function h(l){const m=l.toString(16);return m.length<2?"0"+m:m}function o(l,m){return l<m?(m+.05)/(l+.05):(l+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(m,x,_,w){return w!==void 0?`#${h(m)}${h(x)}${h(_)}${h(w)}`:`#${h(m)}${h(x)}${h(_)}`},l.toRgba=function(m,x,_,w=255){return(m<<24|x<<16|_<<8|w)>>>0},l.toColor=function(m,x,_,w){return{css:l.toCss(m,x,_,w),rgba:l.toRgba(m,x,_,w)}}})(p||(n.channels=p={})),(function(l){function m(x,_){return a=Math.round(255*_),[u,f,v]=r.toChannels(x.rgba),{css:p.toCss(u,f,v,a),rgba:p.toRgba(u,f,v,a)}}l.blend=function(x,_){if(a=(255&_.rgba)/255,a===1)return{css:_.css,rgba:_.rgba};const w=_.rgba>>24&255,S=_.rgba>>16&255,C=_.rgba>>8&255,L=x.rgba>>24&255,A=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((w-L)*a),f=A+Math.round((S-A)*a),v=E+Math.round((C-E)*a),{css:p.toCss(u,f,v),rgba:p.toRgba(u,f,v)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,_,w){const S=r.ensureContrastRatio(x.rgba,_.rgba,w);if(S)return p.toColor(S>>24&255,S>>16&255,S>>8&255)},l.opaque=function(x){const _=(255|x.rgba)>>>0;return[u,f,v]=r.toChannels(_),{css:p.toCss(u,f,v),rgba:_}},l.opacity=m,l.multiplyOpacity=function(x,_){return a=255&x.rgba,m(x,a*_/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(y||(n.color=y={})),(function(l){let m,x;try{const _=document.createElement("canvas");_.width=1,_.height=1;const w=_.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",x=m.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(_){if(_.match(/#[\da-f]{3,8}/i))switch(_.length){case 4:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),p.toColor(u,f,v);case 5:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),a=parseInt(_.slice(4,5).repeat(2),16),p.toColor(u,f,v,a);case 7:return{css:_,rgba:(parseInt(_.slice(1),16)<<8|255)>>>0};case 9:return{css:_,rgba:parseInt(_.slice(1),16)>>>0}}const w=_.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 u=parseInt(w[1]),f=parseInt(w[2]),v=parseInt(w[3]),a=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),p.toColor(u,f,v,a);if(!m||!x)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=x,m.fillStyle=_,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[u,f,v,a]=m.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,v,a),css:_}}})(b||(n.css=b={})),(function(l){function m(x,_,w){const S=x/255,C=_/255,L=w/255;return .2126*(S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}l.relativeLuminance=function(x){return m(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=m})(c||(n.rgb=c={})),(function(l){function m(_,w,S){const C=_>>24&255,L=_>>16&255,A=_>>8&255;let E=w>>24&255,D=w>>16&255,O=w>>8&255,$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;$<S&&(E>0||D>0||O>0);)E-=Math.max(0,Math.ceil(.1*E)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}function x(_,w,S){const C=_>>24&255,L=_>>16&255,A=_>>8&255;let E=w>>24&255,D=w>>16&255,O=w>>8&255,$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;$<S&&(E<255||D<255||O<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),$=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}l.blend=function(_,w){if(a=(255&w)/255,a===1)return w;const S=w>>24&255,C=w>>16&255,L=w>>8&255,A=_>>24&255,E=_>>16&255,D=_>>8&255;return u=A+Math.round((S-A)*a),f=E+Math.round((C-E)*a),v=D+Math.round((L-D)*a),p.toRgba(u,f,v)},l.ensureContrastRatio=function(_,w,S){const C=c.relativeLuminance(_>>8),L=c.relativeLuminance(w>>8);if(o(C,L)<S){if(L<C){const D=m(_,w,S),O=o(C,c.relativeLuminance(D>>8));if(O<S){const $=x(_,w,S);return O>o(C,c.relativeLuminance($>>8))?D:$}return D}const A=x(_,w,S),E=o(C,c.relativeLuminance(A>>8));if(E<S){const D=m(_,w,S);return E>o(C,c.relativeLuminance(D>>8))?A:D}return A}},l.reduceLuminance=m,l.increaseLuminance=x,l.toChannels=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:(F,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const v=[];for(let a=0;a<this._listeners.length;a++)v.push(this._listeners[a]);for(let a=0;a<v.length;a++)v[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((v=>f.fire(v)))},n.runAndSubscribe=function(u,f){return f(void 0),u((v=>f(v)))}},859:(F,n)=>{function u(f){for(const v of f)v.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const v=this._disposables.indexOf(f);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(f){var v;this._isDisposed||f===this._value||((v=this._value)==null||v.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,a,p){this._data[v]||(this._data[v]={}),this._data[v][a]=p}get(v,a){return this._data[v]?this._data[v][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,v,a,p,y){this._data.get(f,v)||this._data.set(f,v,new u),this._data.get(f,v).set(a,p,y)}get(f,v,a,p){var y;return(y=this._data.get(f,v))==null?void 0:y.get(a,p)}clear(){this._data.clear()}}},399:(F,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(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,c=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),c=Math.max(b,c),h=y.timeRemaining(),1.5*c>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 a 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=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},782:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(133),v=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const c=new p;return c.setFromCharData(b),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.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 c=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)c=!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:c=!0}else c=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;c&&(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=p},855:(F,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:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,v=u.length){let a="";for(let p=f;p<v;++p){let y=u[p];y>65535?(y-=65536,a+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):a+=String.fromCharCode(y)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const v=u.length;if(!v)return 0;let a=0,p=0;if(this._interim){const y=u.charCodeAt(p++);56320<=y&&y<=57343?f[a++]=1024*(this._interim-55296)+y-56320+65536:(f[a++]=this._interim,f[a++]=y),this._interim=0}for(let y=p;y<v;++y){const b=u.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,a;const c=u.charCodeAt(y);56320<=c&&c<=57343?f[a++]=1024*(b-55296)+c-56320+65536:(f[a++]=b,f[a++]=c)}else b!==65279&&(f[a++]=b)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const v=u.length;if(!v)return 0;let a,p,y,b,c=0,r=0,h=0;if(this.interim[0]){let m=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let _,w=0;for(;(_=63&this.interim[++w])&&w<4;)x<<=6,x|=_;const S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=S-w;for(;h<C;){if(h>=v)return 0;if(_=u[h++],(192&_)!=128){h--,m=!0;break}this.interim[w++]=_,x<<=6,x|=63&_}m||(S===2?x<128?h--:f[c++]=x:S===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const o=v-4;let l=h;for(;l<v;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(y=u[l+2])||128&(b=u[l+3]));)f[c++]=a,f[c++]=p,f[c++]=y,f[c++]=b,l+=4;if(a=u[l++],a<128)f[c++]=a;else if((224&a)==192){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[c++]=r}else if((240&a)==224){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(y=u[l++],(192&y)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(y=u[l++],(192&y)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=y,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;f[c++]=r}}return c}}},776:function(F,n,u){var f=this&&this.__decorate||function(r,h,o,l){var m,x=arguments.length,_=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(r,h,o,l);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(_=(x<3?m(_):x>3?m(h,o,_):m(h,o))||_);return x>3&&_&&Object.defineProperty(h,o,_),_},v=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),y={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let b,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.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<=p.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<=p.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<=p.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<=p.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<=p.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=c=f([v(0,p.IOptionsService)],c),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...m){if(b.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,m);b.trace(`GlyphRenderer#${l.name}(${m.map((_=>JSON.stringify(_))).join(", ")})`);const x=l.apply(this,m);return b.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[f]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const a=function(p,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[f].push({id:c,index:h}):(r[f]=[{id:c,index:h}],r[u]=r)})(a,p,b)};return a.toString=()=>v,n.serviceRegistry.set(v,a),a}},97:(F,n,u)=>{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 f=u(726);var v;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")}},P={};function te(F){var n=P[F];if(n!==void 0)return n.exports;var u=P[F]={exports:{}};return Y[F].call(u.exports,u,u.exports,te),u.exports}var ne={};return(()=>{var F=ne;Object.defineProperty(F,"__esModule",{value:!0}),F.CanvasAddon=void 0;const n=te(345),u=te(859),f=te(776),v=te(949);class a extends u.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var y;return(y=this._renderer)==null?void 0:y.textureAtlas}activate(y){const b=y._core;if(!y.element)return void this.register(b.onWillOpen((()=>this.activate(y))));this._terminal=y;const c=b.coreService,r=b.optionsService,h=b.screenElement,o=b.linkifier,l=b,m=l._bufferService,x=l._renderService,_=l._characterJoinerService,w=l._charSizeService,S=l._coreBrowserService,C=l._decorationService,L=l._logService,A=l._themeService;(0,f.setTraceLogger)(L),this._renderer=new v.CanvasRenderer(y,h,o,m,w,r,_,c,S,C,A),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),x.setRenderer(this._renderer),x.handleResize(m.cols,m.rows),this.register((0,u.toDisposable)((()=>{var E;x.setRenderer(this._terminal._core._createRenderer()),x.handleResize(y.cols,y.rows),(E=this._renderer)==null||E.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var y;(y=this._renderer)==null||y.clearTextureAtlas()}}F.CanvasAddon=a})(),ne})()))})(Ho)),Ho.exports}var Zv=Qv();/**
114
+ }`)),this.register((0,v.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const D=new Float32Array([0,0,1,0,0,1,1,1]),O=L.createBuffer();this.register((0,v.toDisposable)((()=>L.deleteBuffer(O)))),L.bindBuffer(L.ARRAY_BUFFER,O),L.bufferData(L.ARRAY_BUFFER,D,L.STATIC_DRAW),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const $=new Uint8Array([0,1,2,3]),N=L.createBuffer();this.register((0,v.toDisposable)((()=>L.deleteBuffer(N)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,N),L.bufferData(L.ELEMENT_ARRAY_BUFFER,$,L.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(L.createBuffer()),this.register((0,v.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,L.FLOAT,!1,w,0),L.vertexAttribDivisor(0,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,w,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,4,L.FLOAT,!1,w,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(2,1),this._updateCachedColors(A.colors),this.register(this._themeService.onChangeColors((U=>{this._updateCachedColors(U),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(m){const y=this._gl;y.useProgram(this._program),y.bindVertexArray(this._vertexArrayObject),y.uniformMatrix4fv(this._projectionLocation,!1,p.PROJECTION_MATRIX),y.bindBuffer(y.ARRAY_BUFFER,this._attributesBuffer),y.bufferData(y.ARRAY_BUFFER,m.attributes,y.DYNAMIC_DRAW),y.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,y.UNSIGNED_BYTE,0,m.count)}handleResize(){this._updateViewportRectangle()}setDimensions(m){this._dimensions=m}_updateCachedColors(m){this._bgFloat=this._colorToFloat32Array(m.background),this._cursorFloat=this._colorToFloat32Array(m.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(m){const y=this._terminal,E=this._vertices;let A,L,D,O,$,N,U,I,R,B,T,H=1;for(A=0;A<y.rows;A++){for(D=-1,O=0,$=0,N=!1,L=0;L<y.cols;L++)U=(A*y.cols+L)*a.RENDER_MODEL_INDICIES_PER_CELL,I=m.cells[U+a.RENDER_MODEL_BG_OFFSET],R=m.cells[U+a.RENDER_MODEL_FG_OFFSET],B=!!(67108864&R),(I!==O||R!==$&&(N||B))&&((O!==0||N&&$!==0)&&(T=8*H++,this._updateRectangle(E,T,$,O,D,L,A)),D=L,O=I,$=R,N=B);(O!==0||N&&$!==0)&&(T=8*H++,this._updateRectangle(E,T,$,O,D,y.cols,A))}E.count=H}updateCursor(m){const y=this._verticesCursor,E=m.cursor;if(!E||E.style==="block")return void(y.count=0);let A,L=0;E.style!=="bar"&&E.style!=="outline"||(A=8*L++,this._addRectangleFloat(y.attributes,A,E.x*this._dimensions.device.cell.width,E.y*this._dimensions.device.cell.height,E.style==="bar"?E.dpr*E.cursorWidth:E.dpr,this._dimensions.device.cell.height,this._cursorFloat)),E.style!=="underline"&&E.style!=="outline"||(A=8*L++,this._addRectangleFloat(y.attributes,A,E.x*this._dimensions.device.cell.width,(E.y+1)*this._dimensions.device.cell.height-E.dpr,E.width*this._dimensions.device.cell.width,E.dpr,this._cursorFloat)),E.style==="outline"&&(A=8*L++,this._addRectangleFloat(y.attributes,A,E.x*this._dimensions.device.cell.width,E.y*this._dimensions.device.cell.height,E.width*this._dimensions.device.cell.width,E.dpr,this._cursorFloat),A=8*L++,this._addRectangleFloat(y.attributes,A,(E.x+E.width)*this._dimensions.device.cell.width-E.dpr,E.y*this._dimensions.device.cell.height,E.dpr,this._dimensions.device.cell.height,this._cursorFloat)),y.count=L}_updateRectangle(m,y,E,A,L,D,O){if(67108864&E)switch(50331648&E){case 16777216:case 33554432:c=this._themeService.colors.ansi[255&E].rgba;break;case 50331648:c=(16777215&E)<<8;break;default:c=this._themeService.colors.foreground.rgba}else switch(50331648&A){case 16777216:case 33554432:c=this._themeService.colors.ansi[255&A].rgba;break;case 50331648:c=(16777215&A)<<8;break;default:c=this._themeService.colors.background.rgba}m.attributes.length<y+4&&(m.attributes=(0,p.expandFloat32Array)(m.attributes,this._terminal.rows*this._terminal.cols*8)),r=L*this._dimensions.device.cell.width,h=O*this._dimensions.device.cell.height,o=(c>>24&255)/255,l=(c>>16&255)/255,S=(c>>8&255)/255,x=1,this._addRectangle(m.attributes,y,r,h,(D-L)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,o,l,S,x)}_addRectangle(m,y,E,A,L,D,O,$,N,U){m[y]=E/this._dimensions.device.canvas.width,m[y+1]=A/this._dimensions.device.canvas.height,m[y+2]=L/this._dimensions.device.canvas.width,m[y+3]=D/this._dimensions.device.canvas.height,m[y+4]=O,m[y+5]=$,m[y+6]=N,m[y+7]=U}_addRectangleFloat(m,y,E,A,L,D,O){m[y]=E/this._dimensions.device.canvas.width,m[y+1]=A/this._dimensions.device.canvas.height,m[y+2]=L/this._dimensions.device.canvas.width,m[y+3]=D/this._dimensions.device.canvas.height,m[y+4]=O[0],m[y+5]=O[1],m[y+6]=O[2],m[y+7]=O[3]}_colorToFloat32Array(m){return new Float32Array([(m.rgba>>24&255)/255,(m.rgba>>16&255)/255,(m.rgba>>8&255)/255,(255&m.rgba)/255])}}n.RectangleRenderer=_},310:(F,n,u)=>{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 f=u(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,f.createSelectionRenderModel)()}resize(v,a){const p=v*a*n.RENDER_MODEL_INDICIES_PER_CELL;p!==this.cells.length&&(this.cells=new Uint32Array(p),this.lineLengths=new Uint32Array(a))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;const f=u(820),v=u(274),a=u(627),p=u(457),w=u(56),b=u(374),c=u(345),r=u(859),h=u(147),o=u(782),l=u(855),S=u(965),x=u(742),_=u(310),C=u(733);class m extends r.Disposable{constructor(L,D,O,$,N,U,I,R,B){super(),this._terminal=L,this._characterJoinerService=D,this._charSizeService=O,this._coreBrowserService=$,this._coreService=N,this._decorationService=U,this._optionsService=I,this._themeService=R,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new _.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 c.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new c.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new c.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new c.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 C.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,I,this._themeService)],this.dimensions=(0,b.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(I.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const T={antialias:!1,depth:!1,preserveDrawingBuffer:B};if(this._gl=this._canvas.getContext("webgl2",T),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextlost",(H=>{console.log("webglcontextlost event received"),H.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(H)}),3e3)}))),this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextrestored",(H=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,a.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,w.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((H,G)=>this._setCanvasDevicePixelDimensions(H,G))),this.register(this._coreBrowserService.onWindowChange((H=>{this._observerDisposable.value=(0,w.observeDevicePixelDimensions)(this._canvas,H,((G,V)=>this._setCanvasDevicePixelDimensions(G,V)))}))),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 H;for(const G of this._renderLayers)G.dispose();(H=this._canvas.parentElement)==null||H.removeChild(this._canvas),(0,a.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var L;return(L=this._charAtlas)==null?void 0:L.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(L,D){var O,$,N,U;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const I of this._renderLayers)I.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`,(O=this._rectangleRenderer.value)==null||O.setDimensions(this.dimensions),($=this._rectangleRenderer.value)==null||$.handleResize(),(N=this._glyphRenderer.value)==null||N.setDimensions(this.dimensions),(U=this._glyphRenderer.value)==null||U.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var L;for(const D of this._renderLayers)D.handleBlur(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.pause(),this._requestRedrawViewport()}handleFocus(){var L;for(const D of this._renderLayers)D.handleFocus(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.resume(),this._requestRedrawViewport()}handleSelectionChanged(L,D,O){for(const $ of this._renderLayers)$.handleSelectionChanged(this._terminal,L,D,O);this._model.selection.update(this._core,L,D,O),this._requestRedrawViewport()}handleCursorMove(){var L;for(const D of this._renderLayers)D.handleCursorMove(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new x.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new S.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var D;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const L=(0,a.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!==L&&(this._onChangeTextureAtlas.fire(L.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,c.forwardEvent)(L.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,c.forwardEvent)(L.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=L,this._charAtlas.warmUp(),(D=this._glyphRenderer.value)==null||D.setAtlas(this._charAtlas)}_clearModel(L){var D;this._model.clear(),L&&((D=this._glyphRenderer.value)==null||D.clear())}clearTextureAtlas(){var L;(L=this._charAtlas)==null||L.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var L;this._clearModel(!0);for(const D of this._renderLayers)D.reset(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(L){return-1}deregisterCharacterJoiner(L){return!1}renderRows(L,D){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 O of this._renderLayers)O.handleGridChanged(this._terminal,L,D);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(L,D),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 p.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(L,D){const O=this._core;let $,N,U,I,R,B,T,H,G,V,ue,de,q,z,se=this._workCell;L=E(L,O.rows-1,0),D=E(D,O.rows-1,0);const ie=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,ve=ie-O.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,O.cols-1);let Le=-1;const _e=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Oe=!1;for(N=L;N<=D;N++)for(U=N+O.buffer.ydisp,I=O.buffer.lines.get(U),this._model.lineLengths[N]=0,R=this._characterJoinerService.getJoinedCharacters(U),q=0;q<O.cols;q++)if($=this._cellColorResolver.result.bg,I.loadCell(q,se),q===0&&($=this._cellColorResolver.result.bg),B=!1,T=q,R.length>0&&q===R[0][0]&&(B=!0,H=R.shift(),se=new y(se,I.translateToString(!0,H[0],H[1]),H[1]-H[0]),T=H[1]-1),G=se.getChars(),V=se.getCode(),de=(N*O.cols+q)*_.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(se,q,U,this.dimensions.device.cell.width),_e&&U===ie&&(q===fe&&(this._model.cursor={x:fe,y:ve,width:se.getWidth(),style:this._coreBrowserService.isFocused?O.options.cursorStyle||"block":O.options.cursorInactiveStyle,cursorWidth:O.options.cursorWidth,dpr:this._devicePixelRatio},Le=fe+se.getWidth()-1),q>=fe&&q<=Le&&(this._coreBrowserService.isFocused&&(O.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&O.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)),V!==l.NULL_CELL_CODE&&(this._model.lineLengths[N]=q+1),(this._model.cells[de]!==V||this._model.cells[de+_.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[de+_.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[de+_.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Oe=!0,G.length>1&&(V|=_.COMBINED_CHAR_BIT_MASK),this._model.cells[de]=V,this._model.cells[de+_.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[de+_.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[de+_.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,ue=se.getWidth(),this._glyphRenderer.value.updateCell(q,N,V,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,G,ue,$),B))for(se=this._workCell,q++;q<T;q++)z=(N*O.cols+q)*_.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(q,N,l.NULL_CELL_CODE,0,0,0,l.NULL_CELL_CHAR,0,0),this._model.cells[z]=l.NULL_CELL_CODE,this._model.cells[z+_.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[z+_.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[z+_.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Oe&&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(L,D){this._canvas.width===L&&this._canvas.height===D||(this._canvas.width=L,this._canvas.height=D,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const L=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:L,end:L})}}n.WebglRenderer=m;class y extends h.AttributeData{constructor(L,D,O){super(),this.content=0,this.combinedData="",this.fg=L.fg,this.bg=L.bg,this.combinedData=D,this._width=O}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()]}}function E(A,L,D=0){return Math.max(Math.min(A,L),D)}n.JoinedCellData=y},381:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;const f=u(374);function v(a,p,w){const b=(0,f.throwIfFalsy)(a.createShader(p));if(a.shaderSource(b,w),a.compileShader(b),a.getShaderParameter(b,a.COMPILE_STATUS))return b;console.error(a.getShaderInfoLog(b)),a.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(a,p,w){const b=(0,f.throwIfFalsy)(a.createProgram());if(a.attachShader(b,(0,f.throwIfFalsy)(v(a,a.VERTEX_SHADER,p))),a.attachShader(b,(0,f.throwIfFalsy)(v(a,a.FRAGMENT_SHADER,w))),a.linkProgram(b),a.getProgramParameter(b,a.LINK_STATUS))return b;console.error(a.getProgramInfoLog(b)),a.deleteProgram(b)},n.createShader=v,n.expandFloat32Array=function(a,p){const w=Math.min(2*a.length,p),b=new Float32Array(w);for(let c=0;c<a.length;c++)b[c]=a[c];return b},n.GLTexture=class{constructor(a){this.texture=a,this.version=-1}}},592:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const f=u(627),v=u(237),a=u(374),p=u(859);class w extends p.Disposable{constructor(c,r,h,o,l,S,x,_){super(),this._container=r,this._alpha=l,this._coreBrowserService=S,this._optionsService=x,this._themeService=_,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((C=>{this._refreshCharAtlas(c,C),this.reset(c)}))),this.register((0,p.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,a.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(c){}handleFocus(c){}handleCursorMove(c){}handleGridChanged(c,r,h){}handleSelectionChanged(c,r,h,o=!1){}_setTransparency(c,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(c,this._themeService.colors),this.handleGridChanged(c,0,c.rows-1)}_refreshCharAtlas(c,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,f.acquireTextureAtlas)(c,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(c,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(c,this._themeService.colors)}_fillBottomLineAtCells(c,r,h=1){this._ctx.fillRect(c*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(c,r,h,o){this._alpha?this._ctx.clearRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(c,r,h,o){this._ctx.font=this._getFont(c,!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(c,r,h){this._ctx.beginPath(),this._ctx.rect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(c,r,h){return`${h?"italic":""} ${r?c.options.fontWeightBold:c.options.fontWeight} ${c.options.fontSize*this._coreBrowserService.dpr}px ${c.options.fontFamily}`}}n.BaseRenderLayer=w},733:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const f=u(197),v=u(237),a=u(592);class p extends a.BaseRenderLayer{constructor(b,c,r,h,o,l,S){super(r,b,"link",c,!0,o,l,S),this.register(h.onShowLinkUnderline((x=>this._handleShowLinkUnderline(x)))),this.register(h.onHideLinkUnderline((x=>this._handleHideLinkUnderline(x))))}resize(b,c){super.resize(b,c),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,f.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 c=b.y1+1;c<b.y2;c++)this._fillBottomLineAtCells(0,c,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}n.LinkRenderLayer=p},820:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,v,a){u.addEventListener(f,v,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,v,a))}}}},274:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const f=u(855),v=u(160),a=u(374);let p,w=0,b=0,c=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(l,S,x,_,C,m){this._terminal=l,this._optionService=S,this._selectionRenderModel=x,this._decorationService=_,this._coreBrowserService=C,this._themeService=m,this.result={fg:0,bg:0,ext:0}}resolve(l,S,x,_){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,b=0,w=0,r=!1,c=!1,h=!1,p=this._themeService.colors,o=0,l.getCode()!==f.NULL_CELL_CODE&&l.extended.underlineStyle===4){const C=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=S*_%(2*Math.round(C))}if(this._decorationService.forEachDecorationAtCell(S,x,"bottom",(C=>{C.backgroundColorRGB&&(b=C.backgroundColorRGB.rgba>>8&16777215,r=!0),C.foregroundColorRGB&&(w=C.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,S,x),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?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(w=p.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)w=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}w=v.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(S,x,"top",(C=>{C.backgroundColorRGB&&(b=C.backgroundColorRGB.rgba>>8&16777215,r=!0),C.foregroundColorRGB&&(w=C.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(b=h?-16777216&l.bg&-134217729|b|50331648:-16777216&l.bg|b|50331648),c&&(w=-16777216&l.fg&-67108865|w|50331648),67108864&this.result.fg&&(r&&!c&&(w=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=c?w:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const f=u(509),v=u(197),a=[];n.acquireTextureAtlas=function(p,w,b,c,r,h,o,l){const S=(0,v.generateConfig)(c,r,h,o,w,b,l);for(let C=0;C<a.length;C++){const m=a[C],y=m.ownedBy.indexOf(p);if(y>=0){if((0,v.configEquals)(m.config,S))return m.atlas;m.ownedBy.length===1?(m.atlas.dispose(),a.splice(C,1)):m.ownedBy.splice(y,1);break}}for(let C=0;C<a.length;C++){const m=a[C];if((0,v.configEquals)(m.config,S))return m.ownedBy.push(p),m.atlas}const x=p._core,_={atlas:new f.TextureAtlas(document,S,x.unicodeService),config:S,ownedBy:[p]};return a.push(_),_.atlas},n.removeTerminalFromCache=function(p){for(let w=0;w<a.length;w++){const b=a[w].ownedBy.indexOf(p);if(b!==-1){a[w].ownedBy.length===1?(a[w].atlas.dispose(),a.splice(w,1)):a[w].ownedBy.splice(b,1);break}}}},197:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const f=u(160);n.generateConfig=function(v,a,p,w,b,c,r){const h={foreground:c.foreground,background:c.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:c.ansi.slice(),contrastCache:c.contrastCache,halfContrastCache:c.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:v,deviceCellHeight:a,deviceCharWidth:p,deviceCharHeight:w,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,a){for(let p=0;p<v.colors.ansi.length;p++)if(v.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return v.devicePixelRatio===a.devicePixelRatio&&v.customGlyphs===a.customGlyphs&&v.lineHeight===a.lineHeight&&v.letterSpacing===a.letterSpacing&&v.fontFamily===a.fontFamily&&v.fontSize===a.fontSize&&v.fontWeight===a.fontWeight&&v.fontWeightBold===a.fontWeightBold&&v.allowTransparency===a.allowTransparency&&v.deviceCharWidth===a.deviceCharWidth&&v.deviceCharHeight===a.deviceCharHeight&&v.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&v.minimumContrastRatio===a.minimumContrastRatio&&v.colors.foreground.rgba===a.colors.foreground.rgba&&v.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}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 f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}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:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const f=u(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:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╒":{1:(c,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(c,r)=>`M${.5-c},1 L${.5-c},.5 L1,.5 M${.5+c},.5 L${.5+c},1`},"╔":{1:(c,r)=>`M1,${.5-r} L${.5-c},${.5-r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╕":{1:(c,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(c,r)=>`M${.5+c},1 L${.5+c},.5 L0,.5 M${.5-c},.5 L${.5-c},1`},"╗":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5+c},${.5-r} L${.5+c},1`},"╘":{1:(c,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(c,r)=>`M1,.5 L${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╚":{1:(c,r)=>`M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0 M1,${.5+r} L${.5-c},${.5+r} L${.5-c},0`},"╛":{1:(c,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(c,r)=>`M0,.5 L${.5+c},.5 L${.5+c},0 M${.5-c},.5 L${.5-c},0`},"╝":{1:(c,r)=>`M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M0,${.5+r} L${.5+c},${.5+r} L${.5+c},0`},"╞":{1:(c,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1 M${.5+c},.5 L1,.5`},"╠":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╡":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(c,r)=>`M0,.5 L${.5-c},.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╣":{1:(c,r)=>`M${.5+c},0 L${.5+c},1 M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0`},"╤":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},1 M${.5+c},.5 L${.5+c},1`},"╦":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╧":{1:(c,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╩":{1:(c,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╪":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╬":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},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:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(c,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(c,r,h,o,l,S,x,_){const C=n.blockElementDefinitions[r];if(C)return(function(A,L,D,O,$,N){for(let U=0;U<L.length;U++){const I=L[U],R=$/8,B=N/8;A.fillRect(D+I.x*R,O+I.y*B,I.w*R,I.h*B)}})(c,C,h,o,l,S),!0;const m=v[r];if(m)return(function(A,L,D,O,$,N){let U=a.get(L);U||(U=new Map,a.set(L,U));const I=A.fillStyle;if(typeof I!="string")throw new Error(`Unexpected fillStyle type "${I}"`);let R=U.get(I);if(!R){const B=L[0].length,T=L.length,H=A.canvas.ownerDocument.createElement("canvas");H.width=B,H.height=T;const G=(0,f.throwIfFalsy)(H.getContext("2d")),V=new ImageData(B,T);let ue,de,q,z;if(I.startsWith("#"))ue=parseInt(I.slice(1,3),16),de=parseInt(I.slice(3,5),16),q=parseInt(I.slice(5,7),16),z=I.length>7&&parseInt(I.slice(7,9),16)||1;else{if(!I.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${I}" when drawing pattern glyph`);[ue,de,q,z]=I.substring(5,I.length-1).split(",").map((se=>parseFloat(se)))}for(let se=0;se<T;se++)for(let ie=0;ie<B;ie++)V.data[4*(se*B+ie)]=ue,V.data[4*(se*B+ie)+1]=de,V.data[4*(se*B+ie)+2]=q,V.data[4*(se*B+ie)+3]=L[se][ie]*(255*z);G.putImageData(V,0,0),R=(0,f.throwIfFalsy)(A.createPattern(H,null)),U.set(I,R)}A.fillStyle=R,A.fillRect(D,O,$,N)})(c,m,h,o,l,S),!0;const y=n.boxDrawingDefinitions[r];if(y)return(function(A,L,D,O,$,N,U){A.strokeStyle=A.fillStyle;for(const[I,R]of Object.entries(L)){let B;A.beginPath(),A.lineWidth=U*Number.parseInt(I),B=typeof R=="function"?R(.15,.15/N*$):R;for(const T of B.split(" ")){const H=T[0],G=w[H];if(!G){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=T.substring(1).split(",");V[0]&&V[1]&&G(A,b(V,$,N,D,O,!0,U))}A.stroke(),A.closePath()}})(c,y,h,o,l,S,_),!0;const E=n.powerlineDefinitions[r];return!!E&&((function(A,L,D,O,$,N,U,I){const R=new Path2D;R.rect(D,O,$,N),A.clip(R),A.beginPath();const B=U/12;A.lineWidth=I*B;for(const T of L.d.split(" ")){const H=T[0],G=w[H];if(!G){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=T.substring(1).split(",");V[0]&&V[1]&&G(A,b(V,$,N,D,O,!1,I,(L.leftPadding??0)*(B/2),(L.rightPadding??0)*(B/2)))}L.type===1?(A.strokeStyle=A.fillStyle,A.stroke()):A.fill(),A.closePath()})(c,E,h,o,l,S,x,_),!0)};const a=new Map;function p(c,r,h=0){return Math.max(Math.min(c,r),h)}const w={C:(c,r)=>c.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(c,r)=>c.lineTo(r[0],r[1]),M:(c,r)=>c.moveTo(r[0],r[1])};function b(c,r,h,o,l,S,x,_=0,C=0){const m=c.map((y=>parseFloat(y)||parseInt(y)));if(m.length<2)throw new Error("Too few arguments for instruction");for(let y=0;y<m.length;y+=2)m[y]*=r-_*x-C*x,S&&m[y]!==0&&(m[y]=p(Math.round(m[y]+.5)-.5,r,0)),m[y]+=o+_*x;for(let y=1;y<m.length;y+=2)m[y]*=h,S&&m[y]!==0&&(m[y]=p(Math.round(m[y]+.5)-.5,h,0)),m[y]+=l;return m}},56:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(v,a,p){let w=new a.ResizeObserver((b=>{const c=b.find((o=>o.target===v));if(!c)return;if(!("devicePixelContentBoxSize"in c))return w==null||w.disconnect(),void(w=void 0);const r=c.devicePixelContentBoxSize[0].inlineSize,h=c.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{w.observe(v,{box:["device-pixel-content-box"]})}catch{w.disconnect(),w=void 0}return(0,f.toDisposable)((()=>w==null?void 0:w.disconnect()))}},374:(F,n)=>{function u(v){return 57508<=v&&v<=57558}function f(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=u,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=f,n.allowRescaling=function(v,a,p,w){return a===1&&p>Math.ceil(1.5*w)&&v!==void 0&&v>255&&!f(v)&&!u(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(a){return 9472<=a&&a<=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,a,p=0){return(v-(2*Math.round(a)-p))%(2*Math.round(a))}},296:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,a,p,w=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const b=v.buffers.active.ydisp,c=a[1]-b,r=p[1]-b,h=Math.max(c,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(v,a,p){return!!this.hasSelection&&(p-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const f=u(237),v=u(860),a=u(374),p=u(160),w=u(345),b=u(485),c=u(385),r=u(147),h=u(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 l;class S{get pages(){return this._pages}constructor(y,E,A){this._document=y,this._config=E,this._unicodeService=A,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 w.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new w.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=C(y,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const y of this.pages)y.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const y=new c.IdleTaskQueue;for(let E=33;E<126;E++)y.enqueue((()=>{if(!this._cacheMap.get(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const A=this._drawToCache(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,A)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const y of this._pages)y.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const E=this._pages.filter((U=>2*U.canvas.width<=(S.maxTextureSize||4096))).sort(((U,I)=>I.canvas.width!==U.canvas.width?I.canvas.width-U.canvas.width:I.percentageUsed-U.percentageUsed));let A=-1,L=0;for(let U=0;U<E.length;U++)if(E[U].canvas.width!==L)A=U,L=E[U].canvas.width;else if(U-A==3)break;const D=E.slice(A,A+4),O=D.map((U=>U.glyphs[0].texturePage)).sort(((U,I)=>U>I?1:-1)),$=this.pages.length-D.length,N=this._mergePages(D,$);N.version++;for(let U=O.length-1;U>=0;U--)this._deletePage(O[U]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const y=new x(this._document,this._textureSize);return this._pages.push(y),this._activePages.push(y),this._onAddTextureAtlasCanvas.fire(y.canvas),y}_mergePages(y,E){const A=2*y[0].canvas.width,L=new x(this._document,A,y);for(const[D,O]of y.entries()){const $=D*O.canvas.width%A,N=Math.floor(D/2)*O.canvas.height;L.ctx.drawImage(O.canvas,$,N);for(const I of O.glyphs)I.texturePage=E,I.sizeClipSpace.x=I.size.x/A,I.sizeClipSpace.y=I.size.y/A,I.texturePosition.x+=$,I.texturePosition.y+=N,I.texturePositionClipSpace.x=I.texturePosition.x/A,I.texturePositionClipSpace.y=I.texturePosition.y/A;this._onRemoveTextureAtlasCanvas.fire(O.canvas);const U=this._activePages.indexOf(O);U!==-1&&this._activePages.splice(U,1)}return L}_deletePage(y){this._pages.splice(y,1);for(let E=y;E<this._pages.length;E++){const A=this._pages[E];for(const L of A.glyphs)L.texturePage--;A.version++}}getRasterizedGlyphCombinedChar(y,E,A,L,D){return this._getFromCacheMap(this._cacheMapCombined,y,E,A,L,D)}getRasterizedGlyph(y,E,A,L,D){return this._getFromCacheMap(this._cacheMap,y,E,A,L,D)}_getFromCacheMap(y,E,A,L,D,O=!1){return l=y.get(E,A,L,D),l||(l=this._drawToCache(E,A,L,D,O),y.set(E,A,L,D,l)),l}_getColorFromAnsiIndex(y){if(y>=this._config.colors.ansi.length)throw new Error("No color found for idx "+y);return this._config.colors.ansi[y]}_getBackgroundColor(y,E,A,L){if(this._config.allowTransparency)return p.NULL_COLOR;let D;switch(y){case 16777216:case 33554432:D=this._getColorFromAnsiIndex(E);break;case 50331648:const O=r.AttributeData.toColorRGB(E);D=p.channels.toColor(O[0],O[1],O[2]);break;default:D=A?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return D}_getForegroundColor(y,E,A,L,D,O,$,N,U,I){const R=this._getMinimumContrastColor(y,E,A,L,D,O,$,U,N,I);if(R)return R;let B;switch(D){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&U&&O<8&&(O+=8),B=this._getColorFromAnsiIndex(O);break;case 50331648:const T=r.AttributeData.toColorRGB(O);B=p.channels.toColor(T[0],T[1],T[2]);break;default:B=$?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(B=p.color.opaque(B)),N&&(B=p.color.multiplyOpacity(B,f.DIM_OPACITY)),B}_resolveBackgroundRgba(y,E,A){switch(y){case 16777216:case 33554432:return this._getColorFromAnsiIndex(E).rgba;case 50331648:return E<<8;default:return A?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(y,E,A,L){switch(y){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&L&&E<8&&(E+=8),this._getColorFromAnsiIndex(E).rgba;case 50331648:return E<<8;default:return A?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(y,E,A,L,D,O,$,N,U,I){if(this._config.minimumContrastRatio===1||I)return;const R=this._getContrastCache(U),B=R.getColor(y,L);if(B!==void 0)return B||void 0;const T=this._resolveBackgroundRgba(E,A,$),H=this._resolveForegroundRgba(D,O,$,N),G=p.rgba.ensureContrastRatio(T,H,this._config.minimumContrastRatio/(U?2:1));if(!G)return void R.setColor(y,L,null);const V=p.channels.toColor(G>>24&255,G>>16&255,G>>8&255);return R.setColor(y,L,V),V}_getContrastCache(y){return y?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(y,E,A,L,D=!1){const O=typeof y=="number"?String.fromCharCode(y):y,$=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<$&&(this._tmpCanvas.width=$);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=A,this._workAttributeData.bg=E,this._workAttributeData.extended.ext=L,this._workAttributeData.isInvisible())return o;const U=!!this._workAttributeData.isBold(),I=!!this._workAttributeData.isInverse(),R=!!this._workAttributeData.isDim(),B=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),G=!!this._workAttributeData.isOverline();let V=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),de=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(I){const ce=V;V=de,de=ce;const ge=ue;ue=q,q=ge}const z=this._getBackgroundColor(q,de,I,R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const se=U?this._config.fontWeightBold:this._config.fontWeight,ie=B?"italic":"";this._tmpCtx.font=`${ie} ${se} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ve=O.length===1&&(0,a.isPowerlineGlyph)(O.charCodeAt(0)),fe=O.length===1&&(0,a.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),Le=this._getForegroundColor(E,q,de,A,ue,V,I,R,U,(0,a.treatGlyphAsBackgroundColor)(O.charCodeAt(0)));this._tmpCtx.fillStyle=Le.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,v.tryDrawCustomChar)(this._tmpCtx,O,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,be=!ve;if(qe=typeof y=="number"?this._unicodeService.wcwidth(y):this._unicodeService.getStringCellWidth(y),T){this._tmpCtx.save();const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;if(this._tmpCtx.lineWidth=ce,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Re=Math.ceil(_e+this._config.deviceCharHeight)-ge-(D?2*ce:0),_t=Re+ce,Qe=Re+2*ce;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Me=ze+Ie*this._config.deviceCellWidth,xe=ze+(Ie+1)*this._config.deviceCellWidth,xt=Me+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Me,Re),this._tmpCtx.lineTo(xe,Re),this._tmpCtx.moveTo(Me,Qe),this._tmpCtx.lineTo(xe,Qe);break;case 3:const tt=ce<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-ce/2)-ge,vt=ce<=1?Re:Math.ceil(_e+this._config.deviceCharHeight+ce/2)-ge,ut=new Path2D;ut.rect(Me,Re,this._config.deviceCellWidth,Qe-Re),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Me-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Me-this._config.deviceCellWidth/2,vt,Me,vt,Me,_t),this._tmpCtx.bezierCurveTo(Me,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,xe,vt,xe,_t),this._tmpCtx.bezierCurveTo(xe,tt,xe+this._config.deviceCellWidth/2,tt,xe+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=ce?2*ce-it:ce-it;it>=ce||Zt===0?(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Me+Zt,Re),this._tmpCtx.lineTo(xe,Re)):(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Me,Re),this._tmpCtx.lineTo(Me+Zt,Re),this._tmpCtx.moveTo(Me+Zt+ce,Re),this._tmpCtx.lineTo(xe,Re)),it=(0,a.computeNextVariantOffset)(xe-Me,ce,it);break;case 5:const tr=.6,ir=.3,Ft=xe-Me,si=Math.floor(tr*Ft),ri=Math.floor(ir*Ft),Jt=Ft-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Me,Re),this._tmpCtx.lineTo(xe,Re);break;default:this._tmpCtx.moveTo(Me,Re),this._tmpCtx.lineTo(xe,Re)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Me=new Path2D;Me.rect(ze,Re-Math.ceil(ce/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(ce/2)),this._tmpCtx.clip(Me),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(O,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(G){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let ce=_(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Le,be);if(ce)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight-ge),ce=_(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Le,be),ce);ge++);}if(H){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(ce){for(let ge=0;ge<ce.data.length;ge+=4)if(ce.data[ge+3]>0)return!1;return!0})(ft):_(ft,z,Le,be),Ot)return o;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,$,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const ce=this._createNewPage();pe=ce,me=ce.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ce of this._activePages)Se.size.y<=ce.currentRow.height&&(pe=ce,me=ce.currentRow);for(let ce=this._activePages.length-1;ce>=0;ce--)for(const ge of this._activePages[ce].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ce],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ce=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ce=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,ce=!0}}ce||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(y,E,A,L,D,O){E.top=0;const $=L?this._config.deviceCellHeight:this._tmpCanvas.height,N=L?this._config.deviceCellWidth:A;let U=!1;for(let I=0;I<$;I++){for(let R=0;R<N;R++){const B=I*this._tmpCanvas.width*4+4*R+3;if(y.data[B]!==0){E.top=I,U=!0;break}}if(U)break}E.left=0,U=!1;for(let I=0;I<O+N;I++){for(let R=0;R<$;R++){const B=R*this._tmpCanvas.width*4+4*I+3;if(y.data[B]!==0){E.left=I,U=!0;break}}if(U)break}E.right=N,U=!1;for(let I=O+N-1;I>=O;I--){for(let R=0;R<$;R++){const B=R*this._tmpCanvas.width*4+4*I+3;if(y.data[B]!==0){E.right=I,U=!0;break}}if(U)break}E.bottom=$,U=!1;for(let I=$-1;I>=0;I--){for(let R=0;R<N;R++){const B=I*this._tmpCanvas.width*4+4*R+3;if(y.data[B]!==0){E.bottom=I,U=!0;break}}if(U)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:E.right-E.left+1,y:E.bottom-E.top+1},sizeClipSpace:{x:E.right-E.left+1,y:E.bottom-E.top+1},offset:{x:-E.left+O+(L||D?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-E.top+O+(L||D?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=S;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(y){this._glyphs.push(y),this._usedPixels+=y.size.x*y.size.y}constructor(y,E,A){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],A)for(const L of A)this._glyphs.push(...L.glyphs),this._usedPixels+=L._usedPixels;this.canvas=C(y,E,E),this.ctx=(0,a.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 _(m,y,E,A){const L=y.rgba>>>24,D=y.rgba>>>16&255,O=y.rgba>>>8&255,$=E.rgba>>>24,N=E.rgba>>>16&255,U=E.rgba>>>8&255,I=Math.floor((Math.abs(L-$)+Math.abs(D-N)+Math.abs(O-U))/12);let R=!0;for(let B=0;B<m.data.length;B+=4)m.data[B]===L&&m.data[B+1]===D&&m.data[B+2]===O||A&&Math.abs(m.data[B]-L)+Math.abs(m.data[B+1]-D)+Math.abs(m.data[B+2]-O)<I?m.data[B+3]=0:R=!1;return R}function C(m,y,E){const A=m.createElement("canvas");return A.width=y,A.height=E,A}},160:(F,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 u=0,f=0,v=0,a=0;var p,w,b,c,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,_,C){return C!==void 0?`#${h(S)}${h(x)}${h(_)}${h(C)}`:`#${h(S)}${h(x)}${h(_)}`},l.toRgba=function(S,x,_,C=255){return(S<<24|x<<16|_<<8|C)>>>0},l.toColor=function(S,x,_,C){return{css:l.toCss(S,x,_,C),rgba:l.toRgba(S,x,_,C)}}})(p||(n.channels=p={})),(function(l){function S(x,_){return a=Math.round(255*_),[u,f,v]=r.toChannels(x.rgba),{css:p.toCss(u,f,v,a),rgba:p.toRgba(u,f,v,a)}}l.blend=function(x,_){if(a=(255&_.rgba)/255,a===1)return{css:_.css,rgba:_.rgba};const C=_.rgba>>24&255,m=_.rgba>>16&255,y=_.rgba>>8&255,E=x.rgba>>24&255,A=x.rgba>>16&255,L=x.rgba>>8&255;return u=E+Math.round((C-E)*a),f=A+Math.round((m-A)*a),v=L+Math.round((y-L)*a),{css:p.toCss(u,f,v),rgba:p.toRgba(u,f,v)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,_,C){const m=r.ensureContrastRatio(x.rgba,_.rgba,C);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const _=(255|x.rgba)>>>0;return[u,f,v]=r.toChannels(_),{css:p.toCss(u,f,v),rgba:_}},l.opacity=S,l.multiplyOpacity=function(x,_){return a=255&x.rgba,S(x,a*_/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(n.color=w={})),(function(l){let S,x;try{const _=document.createElement("canvas");_.width=1,_.height=1;const C=_.getContext("2d",{willReadFrequently:!0});C&&(S=C,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(_){if(_.match(/#[\da-f]{3,8}/i))switch(_.length){case 4:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),p.toColor(u,f,v);case 5:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),a=parseInt(_.slice(4,5).repeat(2),16),p.toColor(u,f,v,a);case 7:return{css:_,rgba:(parseInt(_.slice(1),16)<<8|255)>>>0};case 9:return{css:_,rgba:parseInt(_.slice(1),16)>>>0}}const C=_.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(C)return u=parseInt(C[1]),f=parseInt(C[2]),v=parseInt(C[3]),a=Math.round(255*(C[5]===void 0?1:parseFloat(C[5]))),p.toColor(u,f,v,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=_,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,f,v,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,v,a),css:_}}})(b||(n.css=b={})),(function(l){function S(x,_,C){const m=x/255,y=_/255,E=C/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.0722*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(c||(n.rgb=c={})),(function(l){function S(_,C,m){const y=_>>24&255,E=_>>16&255,A=_>>8&255;let L=C>>24&255,D=C>>16&255,O=C>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));for(;$<m&&(L>0||D>0||O>0);)L-=Math.max(0,Math.ceil(.1*L)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));return(L<<24|D<<16|O<<8|255)>>>0}function x(_,C,m){const y=_>>24&255,E=_>>16&255,A=_>>8&255;let L=C>>24&255,D=C>>16&255,O=C>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));for(;$<m&&(L<255||D<255||O<255);)L=Math.min(255,L+Math.ceil(.1*(255-L))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));return(L<<24|D<<16|O<<8|255)>>>0}l.blend=function(_,C){if(a=(255&C)/255,a===1)return C;const m=C>>24&255,y=C>>16&255,E=C>>8&255,A=_>>24&255,L=_>>16&255,D=_>>8&255;return u=A+Math.round((m-A)*a),f=L+Math.round((y-L)*a),v=D+Math.round((E-D)*a),p.toRgba(u,f,v)},l.ensureContrastRatio=function(_,C,m){const y=c.relativeLuminance(_>>8),E=c.relativeLuminance(C>>8);if(o(y,E)<m){if(E<y){const D=S(_,C,m),O=o(y,c.relativeLuminance(D>>8));if(O<m){const $=x(_,C,m);return O>o(y,c.relativeLuminance($>>8))?D:$}return D}const A=x(_,C,m),L=o(y,c.relativeLuminance(A>>8));if(L<m){const D=S(_,C,m);return L>o(y,c.relativeLuminance(D>>8))?A:D}return A}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:(F,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const v=[];for(let a=0;a<this._listeners.length;a++)v.push(this._listeners[a]);for(let a=0;a<v.length;a++)v[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((v=>f.fire(v)))},n.runAndSubscribe=function(u,f){return f(void 0),u((v=>f(v)))}},859:(F,n)=>{function u(f){for(const v of f)v.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const v=this._disposables.indexOf(f);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(f){var v;this._isDisposed||f===this._value||((v=this._value)==null||v.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,a,p){this._data[v]||(this._data[v]={}),this._data[v][a]=p}get(v,a){return this._data[v]?this._data[v][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,v,a,p,w){this._data.get(f,v)||this._data.set(f,v,new u),this._data.get(f,v).set(a,p,w)}get(f,v,a,p){var w;return(w=this._data.get(f,v))==null?void 0:w.get(a,p)}clear(){this._data.clear()}}},399:(F,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(399);class v{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(w){this._idleCallback=void 0;let b=0,c=0,r=w.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),c=Math.max(b,c),h=w.timeRemaining(),1.5*c>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 a extends v{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const b=Date.now()+w;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},782:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(133),v=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const c=new p;return c.setFromCharData(b),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.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 c=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)c=!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:c=!0}else c=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;c&&(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=p},855:(F,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:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,v=u.length){let a="";for(let p=f;p<v;++p){let w=u[p];w>65535?(w-=65536,a+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):a+=String.fromCharCode(w)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const v=u.length;if(!v)return 0;let a=0,p=0;if(this._interim){const w=u.charCodeAt(p++);56320<=w&&w<=57343?f[a++]=1024*(this._interim-55296)+w-56320+65536:(f[a++]=this._interim,f[a++]=w),this._interim=0}for(let w=p;w<v;++w){const b=u.charCodeAt(w);if(55296<=b&&b<=56319){if(++w>=v)return this._interim=b,a;const c=u.charCodeAt(w);56320<=c&&c<=57343?f[a++]=1024*(b-55296)+c-56320+65536:(f[a++]=b,f[a++]=c)}else b!==65279&&(f[a++]=b)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const v=u.length;if(!v)return 0;let a,p,w,b,c=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let _,C=0;for(;(_=63&this.interim[++C])&&C<4;)x<<=6,x|=_;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,y=m-C;for(;h<y;){if(h>=v)return 0;if(_=u[h++],(192&_)!=128){h--,S=!0;break}this.interim[C++]=_,x<<=6,x|=63&_}S||(m===2?x<128?h--:f[c++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const o=v-4;let l=h;for(;l<v;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(w=u[l+2])||128&(b=u[l+3]));)f[c++]=a,f[c++]=p,f[c++]=w,f[c++]=b,l+=4;if(a=u[l++],a<128)f[c++]=a;else if((224&a)==192){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[c++]=r}else if((240&a)==224){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&w,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=w,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&w)<<6|63&b,r<65536||r>1114111)continue;f[c++]=r}}return c}}},776:function(F,n,u){var f=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,_=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(r,h,o,l);else for(var C=r.length-1;C>=0;C--)(S=r[C])&&(_=(x<3?S(_):x>3?S(h,o,_):S(h,o))||_);return x>3&&_&&Object.defineProperty(h,o,_),_},v=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),w={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let b,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=w[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<=p.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<=p.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<=p.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<=p.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<=p.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=c=f([v(0,p.IOptionsService)],c),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(b.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);b.trace(`GlyphRenderer#${l.name}(${S.map((_=>JSON.stringify(_))).join(", ")})`);const x=l.apply(this,S);return b.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[f]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const a=function(p,w,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[f].push({id:c,index:h}):(r[f]=[{id:c,index:h}],r[u]=r)})(a,p,b)};return a.toString=()=>v,n.serviceRegistry.set(v,a),a}},97:(F,n,u)=>{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 f=u(726);var v;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")}},P={};function ee(F){var n=P[F];if(n!==void 0)return n.exports;var u=P[F]={exports:{}};return Y[F].call(u.exports,u,u.exports,ee),u.exports}var ne={};return(()=>{var F=ne;Object.defineProperty(F,"__esModule",{value:!0}),F.WebglAddon=void 0;const n=ee(345),u=ee(859),f=ee(399),v=ee(666),a=ee(776);class p extends u.Disposable{constructor(b){if(f.isSafari&&(0,f.getSafariVersion)()<16){const c={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",c))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 c=b._core;if(!b.element)return void this.register(c.onWillOpen((()=>this.activate(b))));this._terminal=b;const r=c.coreService,h=c.optionsService,o=c,l=o._renderService,S=o._characterJoinerService,x=o._charSizeService,_=o._coreBrowserService,C=o._decorationService,m=o._logService,y=o._themeService;(0,a.setTraceLogger)(m),this._renderer=this.register(new v.WebglRenderer(b,S,x,_,r,C,h,y,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)),l.setRenderer(this._renderer),this.register((0,u.toDisposable)((()=>{const E=this._terminal._core._renderService;E.setRenderer(this._terminal._core._createRenderer()),E.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()}}F.WebglAddon=p})(),ne})()))})(ko)),ko.exports}var Qv=Kv(),Ho={exports:{}},Qd;function Zv(){return Qd||(Qd=1,(function(j,K){(function(Y,P){j.exports=P()})(self,(()=>(()=>{var Y={903:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const f=u(274),v=u(627),a=u(237),p=u(860),w=u(374),b=u(296),c=u(345),r=u(859),h=u(399),o=u(855);class l extends r.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var _;return(_=this._charAtlas)==null?void 0:_.pages[0].canvas}constructor(_,C,m,y,E,A,L,D,O,$){super(),this._terminal=_,this._container=C,this._alpha=E,this._themeService=A,this._bufferService=L,this._optionsService=D,this._decorationService=O,this._coreBrowserService=$,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,b.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new r.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new c.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new f.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${m}-layer`),this._canvas.style.zIndex=y.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((N=>{this._refreshCharAtlas(N),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,r.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,w.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(_,C){}handleSelectionChanged(_,C,m=!1){this._selectionModel.update(this._terminal._core,_,C,m)}_setTransparency(_){if(_===this._alpha)return;const C=this._canvas;this._alpha=_,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,C),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(_){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,v.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,_,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,c.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let C=0;C<this._charAtlas.pages.length;C++)this._bitmapGenerator[C]=new S(this._charAtlas.pages[C].canvas)}}resize(_){this._deviceCellWidth=_.device.cell.width,this._deviceCellHeight=_.device.cell.height,this._deviceCharWidth=_.device.char.width,this._deviceCharHeight=_.device.char.height,this._deviceCharLeft=_.device.char.left,this._deviceCharTop=_.device.char.top,this._canvas.width=_.device.canvas.width,this._canvas.height=_.device.canvas.height,this._canvas.style.width=`${_.css.canvas.width}px`,this._canvas.style.height=`${_.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var _;(_=this._charAtlas)==null||_.clearTexture()}_fillCells(_,C,m,y){this._ctx.fillRect(_*this._deviceCellWidth,C*this._deviceCellHeight,m*this._deviceCellWidth,y*this._deviceCellHeight)}_fillMiddleLineAtCells(_,C,m=1){const y=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(_*this._deviceCellWidth,(C+1)*this._deviceCellHeight-y-this._coreBrowserService.dpr,m*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(_,C,m=1,y=0){this._ctx.fillRect(_*this._deviceCellWidth,(C+1)*this._deviceCellHeight+y-this._coreBrowserService.dpr-1,m*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(_,C,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const y=this._coreBrowserService.dpr;this._ctx.lineWidth=y;for(let E=0;E<m;E++){const A=(_+E)*this._deviceCellWidth,L=(_+E+.5)*this._deviceCellWidth,D=(_+E+1)*this._deviceCellWidth,O=(C+1)*this._deviceCellHeight-y-1,$=O-y,N=O+y;this._ctx.moveTo(A,O),this._ctx.bezierCurveTo(A,$,L,$,L,O),this._ctx.bezierCurveTo(L,N,D,N,D,O)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(_,C,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const y=this._coreBrowserService.dpr;this._ctx.lineWidth=y,this._ctx.setLineDash([2*y,y]);const E=_*this._deviceCellWidth,A=(C+1)*this._deviceCellHeight-y-1;this._ctx.moveTo(E,A);for(let L=0;L<m;L++){const D=(_+m+L)*this._deviceCellWidth;this._ctx.lineTo(D,A)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(_,C,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const y=this._coreBrowserService.dpr;this._ctx.lineWidth=y,this._ctx.setLineDash([4*y,3*y]);const E=_*this._deviceCellWidth,A=(_+m)*this._deviceCellWidth,L=(C+1)*this._deviceCellHeight-y-1;this._ctx.moveTo(E,L),this._ctx.lineTo(A,L),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(_,C,m){this._ctx.fillRect(_*this._deviceCellWidth,C*this._deviceCellHeight,this._coreBrowserService.dpr*m,this._deviceCellHeight)}_strokeRectAtCell(_,C,m,y){const E=this._coreBrowserService.dpr;this._ctx.lineWidth=E,this._ctx.strokeRect(_*this._deviceCellWidth+E/2,C*this._deviceCellHeight+E/2,m*this._deviceCellWidth-E,y*this._deviceCellHeight-E)}_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(_,C,m,y){this._alpha?this._ctx.clearRect(_*this._deviceCellWidth,C*this._deviceCellHeight,m*this._deviceCellWidth,y*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(_*this._deviceCellWidth,C*this._deviceCellHeight,m*this._deviceCellWidth,y*this._deviceCellHeight))}_fillCharTrueColor(_,C,m){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=a.TEXT_BASELINE,this._clipRow(m);let y=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(y=(0,p.tryDrawCustomChar)(this._ctx,_.getChars(),C*this._deviceCellWidth,m*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),y||this._ctx.fillText(_.getChars(),C*this._deviceCellWidth+this._deviceCharLeft,m*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(_,C,m){var O,$,N,U;const y=_.getChars(),E=_.getCode(),A=_.getWidth();if(this._cellColorResolver.resolve(_,C,this._bufferService.buffer.ydisp+m,this._deviceCellWidth),!this._charAtlas)return;let L;if(L=y&&y.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(y,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(_.getCode()||o.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!L.size.x||!L.size.y)return;this._ctx.save(),this._clipRow(m),this._bitmapGenerator[L.texturePage]&&this._charAtlas.pages[L.texturePage].canvas!==this._bitmapGenerator[L.texturePage].canvas&&(($=(O=this._bitmapGenerator[L.texturePage])==null?void 0:O.bitmap)==null||$.close(),delete this._bitmapGenerator[L.texturePage]),this._charAtlas.pages[L.texturePage].version!==((N=this._bitmapGenerator[L.texturePage])==null?void 0:N.version)&&(this._bitmapGenerator[L.texturePage]||(this._bitmapGenerator[L.texturePage]=new S(this._charAtlas.pages[L.texturePage].canvas)),this._bitmapGenerator[L.texturePage].refresh(),this._bitmapGenerator[L.texturePage].version=this._charAtlas.pages[L.texturePage].version);let D=L.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,w.allowRescaling)(E,A,L.size.x,this._deviceCellWidth)&&(D=this._deviceCellWidth-1),this._ctx.drawImage(((U=this._bitmapGenerator[L.texturePage])==null?void 0:U.bitmap)||this._charAtlas.pages[L.texturePage].canvas,L.texturePosition.x,L.texturePosition.y,L.size.x,L.size.y,C*this._deviceCellWidth+this._deviceCharLeft-L.offset.x,m*this._deviceCellHeight+this._deviceCharTop-L.offset.y,D,L.size.y),this._ctx.restore()}_clipRow(_){this._ctx.beginPath(),this._ctx.rect(0,_*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(_,C){return`${C?"italic":""} ${_?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}n.BaseRenderLayer=l;class S{get bitmap(){return this._bitmap}constructor(_){this.canvas=_,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var _;(_=this._bitmap)==null||_.close(),this._bitmap=void 0,h.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var _;this._state===0&&((_=this._bitmap)==null||_.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((C=>{this._state===2?this.refresh():this._bitmap=C,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CanvasRenderer=void 0;const f=u(627),v=u(56),a=u(374),p=u(345),w=u(859),b=u(873),c=u(43),r=u(630),h=u(744);class o extends w.Disposable{constructor(S,x,_,C,m,y,E,A,L,D,O){super(),this._terminal=S,this._screenElement=x,this._bufferService=C,this._charSizeService=m,this._optionsService=y,this._coreBrowserService=L,this._themeService=O,this._observerDisposable=this.register(new w.MutableDisposable),this._onRequestRedraw=this.register(new p.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new p.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new p.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const $=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new h.TextRenderLayer(this._terminal,this._screenElement,0,$,this._bufferService,this._optionsService,E,D,this._coreBrowserService,O),new r.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,D,this._optionsService,O),new c.LinkRenderLayer(this._terminal,this._screenElement,2,_,this._bufferService,this._optionsService,D,this._coreBrowserService,O),new b.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,A,this._coreBrowserService,D,O)];for(const N of this._renderLayers)(0,p.forwardEvent)(N.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,a.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((N,U)=>this._setCanvasDevicePixelDimensions(N,U))),this.register(this._coreBrowserService.onWindowChange((N=>{this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._renderLayers[0].canvas,N,((U,I)=>this._setCanvasDevicePixelDimensions(U,I)))}))),this.register((0,w.toDisposable)((()=>{for(const N of this._renderLayers)N.dispose();(0,f.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(S,x){this._updateDimensions();for(const _ of this._renderLayers)_.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation((S=>S.handleBlur()))}handleFocus(){this._runOperation((S=>S.handleFocus()))}handleSelectionChanged(S,x,_=!1){this._runOperation((C=>C.handleSelectionChanged(S,x,_))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((S=>S.handleCursorMove()))}clear(){this._runOperation((S=>S.reset()))}_runOperation(S){for(const x of this._renderLayers)S(x)}renderRows(S,x){for(const _ of this._renderLayers)_.handleGridChanged(S,x)}clearTextureAtlas(){for(const S of this._renderLayers)S.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const S=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*S),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*S),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/S),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/S),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(S,x){this.dimensions.device.canvas.height=x,this.dimensions.device.canvas.width=S;for(const _ of this._renderLayers)_.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}n.CanvasRenderer=o},873:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;const f=u(457),v=u(859),a=u(399),p=u(782),w=u(903);class b extends w.BaseRenderLayer{constructor(r,h,o,l,S,x,_,C,m,y){super(r,h,"cursor",o,!0,y,S,x,m,C),this._onRequestRedraw=l,this._coreService=_,this._cursorBlinkStateManager=this.register(new v.MutableDisposable),this._cell=new p.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(x.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(r){super.resize(r),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var r;this._clearCursor(),(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var r;(r=this._cursorBlinkStateManager.value)==null||r.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var r;(r=this._cursorBlinkStateManager.value)==null||r.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new f.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var r;(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation()}handleGridChanged(r,h){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(r){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const h=this._bufferService.buffer.ybase+this._bufferService.buffer.y,o=h-this._bufferService.buffer.ydisp;if(o<0||o>=this._bufferService.rows)return void this._clearCursor();const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(h).loadCell(l,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const S=this._optionsService.rawOptions.cursorStyle,x=this._optionsService.rawOptions.cursorInactiveStyle;return x&&x!=="none"&&this._cursorRenderers[x](l,o,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=o,this._state.isFocused=!1,this._state.style=S,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===l&&this._state.y===o&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](l,o,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=o,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(a.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(r,h,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(r,h,o.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(o,r,h),this._ctx.restore()}_renderUnderlineCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(r,h),this._ctx.restore()}_renderOutlineCursor(r,h,o){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(r,h,o.getWidth(),1),this._ctx.restore()}}n.CursorRenderLayer=b},574:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GridCache=void 0,n.GridCache=class{constructor(){this.cache=[]}resize(u,f){for(let v=0;v<u;v++){this.cache.length<=v&&this.cache.push([]);for(let a=this.cache[v].length;a<f;a++)this.cache[v].push(void 0);this.cache[v].length=f}this.cache.length=u}clear(){for(let u=0;u<this.cache.length;u++)for(let f=0;f<this.cache[u].length;f++)this.cache[u][f]=void 0}}},43:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const f=u(197),v=u(237),a=u(903);class p extends a.BaseRenderLayer{constructor(b,c,r,h,o,l,S,x,_){super(b,c,"link",r,!0,_,o,l,S,x),this.register(h.onShowLinkUnderline((C=>this._handleShowLinkUnderline(C)))),this.register(h.onHideLinkUnderline((C=>this._handleHideLinkUnderline(C))))}resize(b){super.resize(b),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const 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&&(0,f.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 c=b.y1+1;c<b.y2;c++)this._fillBottomLineAtCells(0,c,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}n.LinkRenderLayer=p},630:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;const f=u(903);class v extends f.BaseRenderLayer{constructor(p,w,b,c,r,h,o,l){super(p,w,"selection",b,!0,l,c,o,h,r),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(p){super.resize(p),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(p,w,b){super.handleSelectionChanged(p,w,b),this._redrawSelection(p,w,b)}_redrawSelection(p,w,b){if(!this._didStateChange(p,w,b,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!p||!w)return void this._clearState();const c=p[1]-this._bufferService.buffer.ydisp,r=w[1]-this._bufferService.buffer.ydisp,h=Math.max(c,0),o=Math.min(r,this._bufferService.rows-1);if(h>=this._bufferService.rows||o<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,b){const l=p[0],S=w[0]-l,x=o-h+1;this._fillCells(l,h,S,x)}else{const l=c===h?p[0]:0,S=h===r?w[0]:this._bufferService.cols;this._fillCells(l,h,S-l,1);const x=Math.max(o-h-1,0);if(this._fillCells(0,h+1,this._bufferService.cols,x),h!==o){const _=r===o?w[0]:this._bufferService.cols;this._fillCells(0,o,_,1)}}this._state.start=[p[0],p[1]],this._state.end=[w[0],w[1]],this._state.columnSelectMode=b,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(p,w,b,c){return!this._areCoordinatesEqual(p,this._state.start)||!this._areCoordinatesEqual(w,this._state.end)||b!==this._state.columnSelectMode||c!==this._state.ydisp}_areCoordinatesEqual(p,w){return!(!p||!w)&&p[0]===w[0]&&p[1]===w[1]}}n.SelectionRenderLayer=v},744:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderLayer=void 0;const f=u(577),v=u(147),a=u(782),p=u(855),w=u(903),b=u(574);class c extends w.BaseRenderLayer{constructor(h,o,l,S,x,_,C,m,y,E){super(h,o,"text",l,S,E,x,_,m,y),this._characterJoinerService=C,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new a.CellData,this._state=new b.GridCache,this.register(_.onSpecificOptionChange("allowTransparency",(A=>this._setTransparency(A))))}resize(h){super.resize(h);const o=this._getFont(!1,!1);this._characterWidth===h.device.char.width&&this._characterFont===o||(this._characterWidth=h.device.char.width,this._characterFont=o,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(h,o,l){for(let S=h;S<=o;S++){const x=S+this._bufferService.buffer.ydisp,_=this._bufferService.buffer.lines.get(x),C=this._characterJoinerService.getJoinedCharacters(x);for(let m=0;m<this._bufferService.cols;m++){_.loadCell(m,this._workCell);let y=this._workCell,E=!1,A=m;if(y.getWidth()!==0){if(C.length>0&&m===C[0][0]){E=!0;const L=C.shift();y=new f.JoinedCellData(this._workCell,_.translateToString(!0,L[0],L[1]),L[1]-L[0]),A=L[1]-1}!E&&this._isOverlapping(y)&&A<_.length-1&&_.getCodePoint(A+1)===p.NULL_CELL_CODE&&(y.content&=-12582913,y.content|=8388608),l(y,m,S),m=A}}}}_drawBackground(h,o){const l=this._ctx,S=this._bufferService.cols;let x=0,_=0,C=null;l.save(),this._forEachCell(h,o,((m,y,E)=>{let A=null;m.isInverse()?A=m.isFgDefault()?this._themeService.colors.foreground.css:m.isFgRGB()?`rgb(${v.AttributeData.toColorRGB(m.getFgColor()).join(",")})`:this._themeService.colors.ansi[m.getFgColor()].css:m.isBgRGB()?A=`rgb(${v.AttributeData.toColorRGB(m.getBgColor()).join(",")})`:m.isBgPalette()&&(A=this._themeService.colors.ansi[m.getBgColor()].css);let L=!1;this._decorationService.forEachDecorationAtCell(y,this._bufferService.buffer.ydisp+E,void 0,(D=>{D.options.layer!=="top"&&L||(D.backgroundColorRGB&&(A=D.backgroundColorRGB.css),L=D.options.layer==="top")})),C===null&&(x=y,_=E),E!==_?(l.fillStyle=C||"",this._fillCells(x,_,S-x,1),x=y,_=E):C!==A&&(l.fillStyle=C||"",this._fillCells(x,_,y-x,1),x=y,_=E),C=A})),C!==null&&(l.fillStyle=C,this._fillCells(x,_,S-x,1)),l.restore()}_drawForeground(h,o){this._forEachCell(h,o,((l,S,x)=>this._drawChars(l,S,x)))}handleGridChanged(h,o){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,h,this._bufferService.cols,o-h+1),this._drawBackground(h,o),this._drawForeground(h,o))}_isOverlapping(h){if(h.getWidth()!==1||h.getCode()<256)return!1;const o=h.getChars();if(this._characterOverlapCache.hasOwnProperty(o))return this._characterOverlapCache[o];this._ctx.save(),this._ctx.font=this._characterFont;const l=Math.floor(this._ctx.measureText(o).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[o]=l,l}}n.TextRenderLayer=c},274:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const f=u(855),v=u(160),a=u(374);let p,w=0,b=0,c=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(l,S,x,_,C,m){this._terminal=l,this._optionService=S,this._selectionRenderModel=x,this._decorationService=_,this._coreBrowserService=C,this._themeService=m,this.result={fg:0,bg:0,ext:0}}resolve(l,S,x,_){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,b=0,w=0,r=!1,c=!1,h=!1,p=this._themeService.colors,o=0,l.getCode()!==f.NULL_CELL_CODE&&l.extended.underlineStyle===4){const C=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=S*_%(2*Math.round(C))}if(this._decorationService.forEachDecorationAtCell(S,x,"bottom",(C=>{C.backgroundColorRGB&&(b=C.backgroundColorRGB.rgba>>8&16777215,r=!0),C.foregroundColorRGB&&(w=C.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,S,x),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?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(w=p.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)w=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}w=v.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(S,x,"top",(C=>{C.backgroundColorRGB&&(b=C.backgroundColorRGB.rgba>>8&16777215,r=!0),C.foregroundColorRGB&&(w=C.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(b=h?-16777216&l.bg&-134217729|b|50331648:-16777216&l.bg|b|50331648),c&&(w=-16777216&l.fg&-67108865|w|50331648),67108864&this.result.fg&&(r&&!c&&(w=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=c?w:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const f=u(509),v=u(197),a=[];n.acquireTextureAtlas=function(p,w,b,c,r,h,o,l){const S=(0,v.generateConfig)(c,r,h,o,w,b,l);for(let C=0;C<a.length;C++){const m=a[C],y=m.ownedBy.indexOf(p);if(y>=0){if((0,v.configEquals)(m.config,S))return m.atlas;m.ownedBy.length===1?(m.atlas.dispose(),a.splice(C,1)):m.ownedBy.splice(y,1);break}}for(let C=0;C<a.length;C++){const m=a[C];if((0,v.configEquals)(m.config,S))return m.ownedBy.push(p),m.atlas}const x=p._core,_={atlas:new f.TextureAtlas(document,S,x.unicodeService),config:S,ownedBy:[p]};return a.push(_),_.atlas},n.removeTerminalFromCache=function(p){for(let w=0;w<a.length;w++){const b=a[w].ownedBy.indexOf(p);if(b!==-1){a[w].ownedBy.length===1?(a[w].atlas.dispose(),a.splice(w,1)):a[w].ownedBy.splice(b,1);break}}}},197:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const f=u(160);n.generateConfig=function(v,a,p,w,b,c,r){const h={foreground:c.foreground,background:c.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:c.ansi.slice(),contrastCache:c.contrastCache,halfContrastCache:c.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:v,deviceCellHeight:a,deviceCharWidth:p,deviceCharHeight:w,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,a){for(let p=0;p<v.colors.ansi.length;p++)if(v.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return v.devicePixelRatio===a.devicePixelRatio&&v.customGlyphs===a.customGlyphs&&v.lineHeight===a.lineHeight&&v.letterSpacing===a.letterSpacing&&v.fontFamily===a.fontFamily&&v.fontSize===a.fontSize&&v.fontWeight===a.fontWeight&&v.fontWeightBold===a.fontWeightBold&&v.allowTransparency===a.allowTransparency&&v.deviceCharWidth===a.deviceCharWidth&&v.deviceCharHeight===a.deviceCharHeight&&v.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&v.minimumContrastRatio===a.minimumContrastRatio&&v.colors.foreground.rgba===a.colors.foreground.rgba&&v.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}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 f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}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:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const f=u(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:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╒":{1:(c,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(c,r)=>`M${.5-c},1 L${.5-c},.5 L1,.5 M${.5+c},.5 L${.5+c},1`},"╔":{1:(c,r)=>`M1,${.5-r} L${.5-c},${.5-r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╕":{1:(c,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(c,r)=>`M${.5+c},1 L${.5+c},.5 L0,.5 M${.5-c},.5 L${.5-c},1`},"╗":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5+c},${.5-r} L${.5+c},1`},"╘":{1:(c,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(c,r)=>`M1,.5 L${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╚":{1:(c,r)=>`M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0 M1,${.5+r} L${.5-c},${.5+r} L${.5-c},0`},"╛":{1:(c,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(c,r)=>`M0,.5 L${.5+c},.5 L${.5+c},0 M${.5-c},.5 L${.5-c},0`},"╝":{1:(c,r)=>`M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M0,${.5+r} L${.5+c},${.5+r} L${.5+c},0`},"╞":{1:(c,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1 M${.5+c},.5 L1,.5`},"╠":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╡":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(c,r)=>`M0,.5 L${.5-c},.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╣":{1:(c,r)=>`M${.5+c},0 L${.5+c},1 M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0`},"╤":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},1 M${.5+c},.5 L${.5+c},1`},"╦":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╧":{1:(c,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╩":{1:(c,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╪":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╬":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},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:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(c,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(c,r,h,o,l,S,x,_){const C=n.blockElementDefinitions[r];if(C)return(function(A,L,D,O,$,N){for(let U=0;U<L.length;U++){const I=L[U],R=$/8,B=N/8;A.fillRect(D+I.x*R,O+I.y*B,I.w*R,I.h*B)}})(c,C,h,o,l,S),!0;const m=v[r];if(m)return(function(A,L,D,O,$,N){let U=a.get(L);U||(U=new Map,a.set(L,U));const I=A.fillStyle;if(typeof I!="string")throw new Error(`Unexpected fillStyle type "${I}"`);let R=U.get(I);if(!R){const B=L[0].length,T=L.length,H=A.canvas.ownerDocument.createElement("canvas");H.width=B,H.height=T;const G=(0,f.throwIfFalsy)(H.getContext("2d")),V=new ImageData(B,T);let ue,de,q,z;if(I.startsWith("#"))ue=parseInt(I.slice(1,3),16),de=parseInt(I.slice(3,5),16),q=parseInt(I.slice(5,7),16),z=I.length>7&&parseInt(I.slice(7,9),16)||1;else{if(!I.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${I}" when drawing pattern glyph`);[ue,de,q,z]=I.substring(5,I.length-1).split(",").map((se=>parseFloat(se)))}for(let se=0;se<T;se++)for(let ie=0;ie<B;ie++)V.data[4*(se*B+ie)]=ue,V.data[4*(se*B+ie)+1]=de,V.data[4*(se*B+ie)+2]=q,V.data[4*(se*B+ie)+3]=L[se][ie]*(255*z);G.putImageData(V,0,0),R=(0,f.throwIfFalsy)(A.createPattern(H,null)),U.set(I,R)}A.fillStyle=R,A.fillRect(D,O,$,N)})(c,m,h,o,l,S),!0;const y=n.boxDrawingDefinitions[r];if(y)return(function(A,L,D,O,$,N,U){A.strokeStyle=A.fillStyle;for(const[I,R]of Object.entries(L)){let B;A.beginPath(),A.lineWidth=U*Number.parseInt(I),B=typeof R=="function"?R(.15,.15/N*$):R;for(const T of B.split(" ")){const H=T[0],G=w[H];if(!G){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=T.substring(1).split(",");V[0]&&V[1]&&G(A,b(V,$,N,D,O,!0,U))}A.stroke(),A.closePath()}})(c,y,h,o,l,S,_),!0;const E=n.powerlineDefinitions[r];return!!E&&((function(A,L,D,O,$,N,U,I){const R=new Path2D;R.rect(D,O,$,N),A.clip(R),A.beginPath();const B=U/12;A.lineWidth=I*B;for(const T of L.d.split(" ")){const H=T[0],G=w[H];if(!G){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=T.substring(1).split(",");V[0]&&V[1]&&G(A,b(V,$,N,D,O,!1,I,(L.leftPadding??0)*(B/2),(L.rightPadding??0)*(B/2)))}L.type===1?(A.strokeStyle=A.fillStyle,A.stroke()):A.fill(),A.closePath()})(c,E,h,o,l,S,x,_),!0)};const a=new Map;function p(c,r,h=0){return Math.max(Math.min(c,r),h)}const w={C:(c,r)=>c.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(c,r)=>c.lineTo(r[0],r[1]),M:(c,r)=>c.moveTo(r[0],r[1])};function b(c,r,h,o,l,S,x,_=0,C=0){const m=c.map((y=>parseFloat(y)||parseInt(y)));if(m.length<2)throw new Error("Too few arguments for instruction");for(let y=0;y<m.length;y+=2)m[y]*=r-_*x-C*x,S&&m[y]!==0&&(m[y]=p(Math.round(m[y]+.5)-.5,r,0)),m[y]+=o+_*x;for(let y=1;y<m.length;y+=2)m[y]*=h,S&&m[y]!==0&&(m[y]=p(Math.round(m[y]+.5)-.5,h,0)),m[y]+=l;return m}},56:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(v,a,p){let w=new a.ResizeObserver((b=>{const c=b.find((o=>o.target===v));if(!c)return;if(!("devicePixelContentBoxSize"in c))return w==null||w.disconnect(),void(w=void 0);const r=c.devicePixelContentBoxSize[0].inlineSize,h=c.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{w.observe(v,{box:["device-pixel-content-box"]})}catch{w.disconnect(),w=void 0}return(0,f.toDisposable)((()=>w==null?void 0:w.disconnect()))}},374:(F,n)=>{function u(v){return 57508<=v&&v<=57558}function f(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=u,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=f,n.allowRescaling=function(v,a,p,w){return a===1&&p>Math.ceil(1.5*w)&&v!==void 0&&v>255&&!f(v)&&!u(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(a){return 9472<=a&&a<=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,a,p=0){return(v-(2*Math.round(a)-p))%(2*Math.round(a))}},296:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,a,p,w=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const b=v.buffers.active.ydisp,c=a[1]-b,r=p[1]-b,h=Math.max(c,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(v,a,p){return!!this.hasSelection&&(p-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const f=u(237),v=u(860),a=u(374),p=u(160),w=u(345),b=u(485),c=u(385),r=u(147),h=u(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 l;class S{get pages(){return this._pages}constructor(y,E,A){this._document=y,this._config=E,this._unicodeService=A,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 w.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new w.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=C(y,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const y of this.pages)y.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const y=new c.IdleTaskQueue;for(let E=33;E<126;E++)y.enqueue((()=>{if(!this._cacheMap.get(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const A=this._drawToCache(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,A)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const y of this._pages)y.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const E=this._pages.filter((U=>2*U.canvas.width<=(S.maxTextureSize||4096))).sort(((U,I)=>I.canvas.width!==U.canvas.width?I.canvas.width-U.canvas.width:I.percentageUsed-U.percentageUsed));let A=-1,L=0;for(let U=0;U<E.length;U++)if(E[U].canvas.width!==L)A=U,L=E[U].canvas.width;else if(U-A==3)break;const D=E.slice(A,A+4),O=D.map((U=>U.glyphs[0].texturePage)).sort(((U,I)=>U>I?1:-1)),$=this.pages.length-D.length,N=this._mergePages(D,$);N.version++;for(let U=O.length-1;U>=0;U--)this._deletePage(O[U]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const y=new x(this._document,this._textureSize);return this._pages.push(y),this._activePages.push(y),this._onAddTextureAtlasCanvas.fire(y.canvas),y}_mergePages(y,E){const A=2*y[0].canvas.width,L=new x(this._document,A,y);for(const[D,O]of y.entries()){const $=D*O.canvas.width%A,N=Math.floor(D/2)*O.canvas.height;L.ctx.drawImage(O.canvas,$,N);for(const I of O.glyphs)I.texturePage=E,I.sizeClipSpace.x=I.size.x/A,I.sizeClipSpace.y=I.size.y/A,I.texturePosition.x+=$,I.texturePosition.y+=N,I.texturePositionClipSpace.x=I.texturePosition.x/A,I.texturePositionClipSpace.y=I.texturePosition.y/A;this._onRemoveTextureAtlasCanvas.fire(O.canvas);const U=this._activePages.indexOf(O);U!==-1&&this._activePages.splice(U,1)}return L}_deletePage(y){this._pages.splice(y,1);for(let E=y;E<this._pages.length;E++){const A=this._pages[E];for(const L of A.glyphs)L.texturePage--;A.version++}}getRasterizedGlyphCombinedChar(y,E,A,L,D){return this._getFromCacheMap(this._cacheMapCombined,y,E,A,L,D)}getRasterizedGlyph(y,E,A,L,D){return this._getFromCacheMap(this._cacheMap,y,E,A,L,D)}_getFromCacheMap(y,E,A,L,D,O=!1){return l=y.get(E,A,L,D),l||(l=this._drawToCache(E,A,L,D,O),y.set(E,A,L,D,l)),l}_getColorFromAnsiIndex(y){if(y>=this._config.colors.ansi.length)throw new Error("No color found for idx "+y);return this._config.colors.ansi[y]}_getBackgroundColor(y,E,A,L){if(this._config.allowTransparency)return p.NULL_COLOR;let D;switch(y){case 16777216:case 33554432:D=this._getColorFromAnsiIndex(E);break;case 50331648:const O=r.AttributeData.toColorRGB(E);D=p.channels.toColor(O[0],O[1],O[2]);break;default:D=A?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return D}_getForegroundColor(y,E,A,L,D,O,$,N,U,I){const R=this._getMinimumContrastColor(y,E,A,L,D,O,$,U,N,I);if(R)return R;let B;switch(D){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&U&&O<8&&(O+=8),B=this._getColorFromAnsiIndex(O);break;case 50331648:const T=r.AttributeData.toColorRGB(O);B=p.channels.toColor(T[0],T[1],T[2]);break;default:B=$?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(B=p.color.opaque(B)),N&&(B=p.color.multiplyOpacity(B,f.DIM_OPACITY)),B}_resolveBackgroundRgba(y,E,A){switch(y){case 16777216:case 33554432:return this._getColorFromAnsiIndex(E).rgba;case 50331648:return E<<8;default:return A?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(y,E,A,L){switch(y){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&L&&E<8&&(E+=8),this._getColorFromAnsiIndex(E).rgba;case 50331648:return E<<8;default:return A?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(y,E,A,L,D,O,$,N,U,I){if(this._config.minimumContrastRatio===1||I)return;const R=this._getContrastCache(U),B=R.getColor(y,L);if(B!==void 0)return B||void 0;const T=this._resolveBackgroundRgba(E,A,$),H=this._resolveForegroundRgba(D,O,$,N),G=p.rgba.ensureContrastRatio(T,H,this._config.minimumContrastRatio/(U?2:1));if(!G)return void R.setColor(y,L,null);const V=p.channels.toColor(G>>24&255,G>>16&255,G>>8&255);return R.setColor(y,L,V),V}_getContrastCache(y){return y?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(y,E,A,L,D=!1){const O=typeof y=="number"?String.fromCharCode(y):y,$=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<$&&(this._tmpCanvas.width=$);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=A,this._workAttributeData.bg=E,this._workAttributeData.extended.ext=L,this._workAttributeData.isInvisible())return o;const U=!!this._workAttributeData.isBold(),I=!!this._workAttributeData.isInverse(),R=!!this._workAttributeData.isDim(),B=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),G=!!this._workAttributeData.isOverline();let V=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),de=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(I){const ce=V;V=de,de=ce;const ge=ue;ue=q,q=ge}const z=this._getBackgroundColor(q,de,I,R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const se=U?this._config.fontWeightBold:this._config.fontWeight,ie=B?"italic":"";this._tmpCtx.font=`${ie} ${se} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ve=O.length===1&&(0,a.isPowerlineGlyph)(O.charCodeAt(0)),fe=O.length===1&&(0,a.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),Le=this._getForegroundColor(E,q,de,A,ue,V,I,R,U,(0,a.treatGlyphAsBackgroundColor)(O.charCodeAt(0)));this._tmpCtx.fillStyle=Le.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,v.tryDrawCustomChar)(this._tmpCtx,O,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,be=!ve;if(qe=typeof y=="number"?this._unicodeService.wcwidth(y):this._unicodeService.getStringCellWidth(y),T){this._tmpCtx.save();const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;if(this._tmpCtx.lineWidth=ce,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Re=Math.ceil(_e+this._config.deviceCharHeight)-ge-(D?2*ce:0),_t=Re+ce,Qe=Re+2*ce;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Me=ze+Ie*this._config.deviceCellWidth,xe=ze+(Ie+1)*this._config.deviceCellWidth,xt=Me+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Me,Re),this._tmpCtx.lineTo(xe,Re),this._tmpCtx.moveTo(Me,Qe),this._tmpCtx.lineTo(xe,Qe);break;case 3:const tt=ce<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-ce/2)-ge,vt=ce<=1?Re:Math.ceil(_e+this._config.deviceCharHeight+ce/2)-ge,ut=new Path2D;ut.rect(Me,Re,this._config.deviceCellWidth,Qe-Re),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Me-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Me-this._config.deviceCellWidth/2,vt,Me,vt,Me,_t),this._tmpCtx.bezierCurveTo(Me,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,xe,vt,xe,_t),this._tmpCtx.bezierCurveTo(xe,tt,xe+this._config.deviceCellWidth/2,tt,xe+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=ce?2*ce-it:ce-it;it>=ce||Zt===0?(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Me+Zt,Re),this._tmpCtx.lineTo(xe,Re)):(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Me,Re),this._tmpCtx.lineTo(Me+Zt,Re),this._tmpCtx.moveTo(Me+Zt+ce,Re),this._tmpCtx.lineTo(xe,Re)),it=(0,a.computeNextVariantOffset)(xe-Me,ce,it);break;case 5:const tr=.6,ir=.3,Ft=xe-Me,si=Math.floor(tr*Ft),ri=Math.floor(ir*Ft),Jt=Ft-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Me,Re),this._tmpCtx.lineTo(xe,Re);break;default:this._tmpCtx.moveTo(Me,Re),this._tmpCtx.lineTo(xe,Re)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Me=new Path2D;Me.rect(ze,Re-Math.ceil(ce/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(ce/2)),this._tmpCtx.clip(Me),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(O,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(G){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let ce=_(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Le,be);if(ce)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight-ge),ce=_(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Le,be),ce);ge++);}if(H){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(ce){for(let ge=0;ge<ce.data.length;ge+=4)if(ce.data[ge+3]>0)return!1;return!0})(ft):_(ft,z,Le,be),Ot)return o;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,$,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const ce=this._createNewPage();pe=ce,me=ce.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ce of this._activePages)Se.size.y<=ce.currentRow.height&&(pe=ce,me=ce.currentRow);for(let ce=this._activePages.length-1;ce>=0;ce--)for(const ge of this._activePages[ce].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ce],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ce=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ce=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,ce=!0}}ce||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(y,E,A,L,D,O){E.top=0;const $=L?this._config.deviceCellHeight:this._tmpCanvas.height,N=L?this._config.deviceCellWidth:A;let U=!1;for(let I=0;I<$;I++){for(let R=0;R<N;R++){const B=I*this._tmpCanvas.width*4+4*R+3;if(y.data[B]!==0){E.top=I,U=!0;break}}if(U)break}E.left=0,U=!1;for(let I=0;I<O+N;I++){for(let R=0;R<$;R++){const B=R*this._tmpCanvas.width*4+4*I+3;if(y.data[B]!==0){E.left=I,U=!0;break}}if(U)break}E.right=N,U=!1;for(let I=O+N-1;I>=O;I--){for(let R=0;R<$;R++){const B=R*this._tmpCanvas.width*4+4*I+3;if(y.data[B]!==0){E.right=I,U=!0;break}}if(U)break}E.bottom=$,U=!1;for(let I=$-1;I>=0;I--){for(let R=0;R<N;R++){const B=I*this._tmpCanvas.width*4+4*R+3;if(y.data[B]!==0){E.bottom=I,U=!0;break}}if(U)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:E.right-E.left+1,y:E.bottom-E.top+1},sizeClipSpace:{x:E.right-E.left+1,y:E.bottom-E.top+1},offset:{x:-E.left+O+(L||D?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-E.top+O+(L||D?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=S;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(y){this._glyphs.push(y),this._usedPixels+=y.size.x*y.size.y}constructor(y,E,A){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],A)for(const L of A)this._glyphs.push(...L.glyphs),this._usedPixels+=L._usedPixels;this.canvas=C(y,E,E),this.ctx=(0,a.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 _(m,y,E,A){const L=y.rgba>>>24,D=y.rgba>>>16&255,O=y.rgba>>>8&255,$=E.rgba>>>24,N=E.rgba>>>16&255,U=E.rgba>>>8&255,I=Math.floor((Math.abs(L-$)+Math.abs(D-N)+Math.abs(O-U))/12);let R=!0;for(let B=0;B<m.data.length;B+=4)m.data[B]===L&&m.data[B+1]===D&&m.data[B+2]===O||A&&Math.abs(m.data[B]-L)+Math.abs(m.data[B+1]-D)+Math.abs(m.data[B+2]-O)<I?m.data[B+3]=0:R=!1;return R}function C(m,y,E){const A=m.createElement("canvas");return A.width=y,A.height=E,A}},577:function(F,n,u){var f=this&&this.__decorate||function(h,o,l,S){var x,_=arguments.length,C=_<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(C=(_<3?x(C):_>3?x(o,l,C):x(o,l))||C);return _>3&&C&&Object.defineProperty(o,l,C),C},v=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(147),p=u(855),w=u(782),b=u(97);class c extends a.AttributeData{constructor(o,l,S){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=c;let r=n.CharacterJoinerService=class nf{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const S=[],x=l.translateToString(!0);let _=0,C=0,m=0,y=l.getFg(0),E=l.getBg(0);for(let A=0;A<l.getTrimmedLength();A++)if(l.loadCell(A,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==y||this._workCell.bg!==E){if(A-_>1){const L=this._getJoinedRanges(x,m,C,l,_);for(let D=0;D<L.length;D++)S.push(L[D])}_=A,m=C,y=this._workCell.fg,E=this._workCell.bg}C+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-_>1){const A=this._getJoinedRanges(x,m,C,l,_);for(let L=0;L<A.length;L++)S.push(A[L])}return S}_getJoinedRanges(o,l,S,x,_){const C=o.substring(l,S);let m=[];try{m=this._characterJoiners[0].handler(C)}catch(y){console.error(y)}for(let y=1;y<this._characterJoiners.length;y++)try{const E=this._characterJoiners[y].handler(C);for(let A=0;A<E.length;A++)nf._mergeRanges(m,E[A])}catch(E){console.error(E)}return this._stringRangesToCellRanges(m,x,_),m}_stringRangesToCellRanges(o,l,S){let x=0,_=!1,C=0,m=o[x];if(m){for(let y=S;y<this._bufferService.cols;y++){const E=l.getWidth(y),A=l.getString(y).length||p.WHITESPACE_CELL_CHAR.length;if(E!==0){if(!_&&m[0]<=C&&(m[0]=y,_=!0),m[1]<=C){if(m[1]=y,m=o[++x],!m)break;m[0]<=C?(m[0]=y,_=!0):_=!1}C+=A}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let S=!1;for(let x=0;x<o.length;x++){const _=o[x];if(S){if(l[1]<=_[0])return o[x-1][1]=l[1],o;if(l[1]<=_[1])return o[x-1][1]=Math.max(l[1],_[1]),o.splice(x,1),o;o.splice(x,1),x--}else{if(l[1]<=_[0])return o.splice(x,0,l),o;if(l[1]<=_[1])return _[0]=Math.min(l[0],_[0]),o;l[0]<_[1]&&(_[0]=Math.min(l[0],_[0]),S=!0)}}return S?o[o.length-1][1]=l[1]:o.push(l),o}};n.CharacterJoinerService=r=f([v(0,b.IBufferService)],r)},160:(F,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 u=0,f=0,v=0,a=0;var p,w,b,c,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,_,C){return C!==void 0?`#${h(S)}${h(x)}${h(_)}${h(C)}`:`#${h(S)}${h(x)}${h(_)}`},l.toRgba=function(S,x,_,C=255){return(S<<24|x<<16|_<<8|C)>>>0},l.toColor=function(S,x,_,C){return{css:l.toCss(S,x,_,C),rgba:l.toRgba(S,x,_,C)}}})(p||(n.channels=p={})),(function(l){function S(x,_){return a=Math.round(255*_),[u,f,v]=r.toChannels(x.rgba),{css:p.toCss(u,f,v,a),rgba:p.toRgba(u,f,v,a)}}l.blend=function(x,_){if(a=(255&_.rgba)/255,a===1)return{css:_.css,rgba:_.rgba};const C=_.rgba>>24&255,m=_.rgba>>16&255,y=_.rgba>>8&255,E=x.rgba>>24&255,A=x.rgba>>16&255,L=x.rgba>>8&255;return u=E+Math.round((C-E)*a),f=A+Math.round((m-A)*a),v=L+Math.round((y-L)*a),{css:p.toCss(u,f,v),rgba:p.toRgba(u,f,v)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,_,C){const m=r.ensureContrastRatio(x.rgba,_.rgba,C);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const _=(255|x.rgba)>>>0;return[u,f,v]=r.toChannels(_),{css:p.toCss(u,f,v),rgba:_}},l.opacity=S,l.multiplyOpacity=function(x,_){return a=255&x.rgba,S(x,a*_/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(n.color=w={})),(function(l){let S,x;try{const _=document.createElement("canvas");_.width=1,_.height=1;const C=_.getContext("2d",{willReadFrequently:!0});C&&(S=C,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(_){if(_.match(/#[\da-f]{3,8}/i))switch(_.length){case 4:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),p.toColor(u,f,v);case 5:return u=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),v=parseInt(_.slice(3,4).repeat(2),16),a=parseInt(_.slice(4,5).repeat(2),16),p.toColor(u,f,v,a);case 7:return{css:_,rgba:(parseInt(_.slice(1),16)<<8|255)>>>0};case 9:return{css:_,rgba:parseInt(_.slice(1),16)>>>0}}const C=_.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(C)return u=parseInt(C[1]),f=parseInt(C[2]),v=parseInt(C[3]),a=Math.round(255*(C[5]===void 0?1:parseFloat(C[5]))),p.toColor(u,f,v,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=_,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,f,v,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,v,a),css:_}}})(b||(n.css=b={})),(function(l){function S(x,_,C){const m=x/255,y=_/255,E=C/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.0722*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(c||(n.rgb=c={})),(function(l){function S(_,C,m){const y=_>>24&255,E=_>>16&255,A=_>>8&255;let L=C>>24&255,D=C>>16&255,O=C>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));for(;$<m&&(L>0||D>0||O>0);)L-=Math.max(0,Math.ceil(.1*L)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));return(L<<24|D<<16|O<<8|255)>>>0}function x(_,C,m){const y=_>>24&255,E=_>>16&255,A=_>>8&255;let L=C>>24&255,D=C>>16&255,O=C>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));for(;$<m&&(L<255||D<255||O<255);)L=Math.min(255,L+Math.ceil(.1*(255-L))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(y,E,A));return(L<<24|D<<16|O<<8|255)>>>0}l.blend=function(_,C){if(a=(255&C)/255,a===1)return C;const m=C>>24&255,y=C>>16&255,E=C>>8&255,A=_>>24&255,L=_>>16&255,D=_>>8&255;return u=A+Math.round((m-A)*a),f=L+Math.round((y-L)*a),v=D+Math.round((E-D)*a),p.toRgba(u,f,v)},l.ensureContrastRatio=function(_,C,m){const y=c.relativeLuminance(_>>8),E=c.relativeLuminance(C>>8);if(o(y,E)<m){if(E<y){const D=S(_,C,m),O=o(y,c.relativeLuminance(D>>8));if(O<m){const $=x(_,C,m);return O>o(y,c.relativeLuminance($>>8))?D:$}return D}const A=x(_,C,m),L=o(y,c.relativeLuminance(A>>8));if(L<m){const D=S(_,C,m);return L>o(y,c.relativeLuminance(D>>8))?A:D}return A}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:(F,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const v=[];for(let a=0;a<this._listeners.length;a++)v.push(this._listeners[a]);for(let a=0;a<v.length;a++)v[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((v=>f.fire(v)))},n.runAndSubscribe=function(u,f){return f(void 0),u((v=>f(v)))}},859:(F,n)=>{function u(f){for(const v of f)v.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const v=this._disposables.indexOf(f);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(f){var v;this._isDisposed||f===this._value||((v=this._value)==null||v.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,a,p){this._data[v]||(this._data[v]={}),this._data[v][a]=p}get(v,a){return this._data[v]?this._data[v][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,v,a,p,w){this._data.get(f,v)||this._data.set(f,v,new u),this._data.get(f,v).set(a,p,w)}get(f,v,a,p){var w;return(w=this._data.get(f,v))==null?void 0:w.get(a,p)}clear(){this._data.clear()}}},399:(F,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(399);class v{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(w){this._idleCallback=void 0;let b=0,c=0,r=w.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),c=Math.max(b,c),h=w.timeRemaining(),1.5*c>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 a extends v{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const b=Date.now()+w;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},782:(F,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(133),v=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const c=new p;return c.setFromCharData(b),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.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 c=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)c=!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:c=!0}else c=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;c&&(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=p},855:(F,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:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,v=u.length){let a="";for(let p=f;p<v;++p){let w=u[p];w>65535?(w-=65536,a+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):a+=String.fromCharCode(w)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const v=u.length;if(!v)return 0;let a=0,p=0;if(this._interim){const w=u.charCodeAt(p++);56320<=w&&w<=57343?f[a++]=1024*(this._interim-55296)+w-56320+65536:(f[a++]=this._interim,f[a++]=w),this._interim=0}for(let w=p;w<v;++w){const b=u.charCodeAt(w);if(55296<=b&&b<=56319){if(++w>=v)return this._interim=b,a;const c=u.charCodeAt(w);56320<=c&&c<=57343?f[a++]=1024*(b-55296)+c-56320+65536:(f[a++]=b,f[a++]=c)}else b!==65279&&(f[a++]=b)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const v=u.length;if(!v)return 0;let a,p,w,b,c=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let _,C=0;for(;(_=63&this.interim[++C])&&C<4;)x<<=6,x|=_;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,y=m-C;for(;h<y;){if(h>=v)return 0;if(_=u[h++],(192&_)!=128){h--,S=!0;break}this.interim[C++]=_,x<<=6,x|=63&_}S||(m===2?x<128?h--:f[c++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const o=v-4;let l=h;for(;l<v;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(w=u[l+2])||128&(b=u[l+3]));)f[c++]=a,f[c++]=p,f[c++]=w,f[c++]=b,l+=4;if(a=u[l++],a<128)f[c++]=a;else if((224&a)==192){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[c++]=r}else if((240&a)==224){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&w,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(l>=v)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(l>=v)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=w,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&w)<<6|63&b,r<65536||r>1114111)continue;f[c++]=r}}return c}}},776:function(F,n,u){var f=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,_=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(r,h,o,l);else for(var C=r.length-1;C>=0;C--)(S=r[C])&&(_=(x<3?S(_):x>3?S(h,o,_):S(h,o))||_);return x>3&&_&&Object.defineProperty(h,o,_),_},v=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),w={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let b,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=w[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<=p.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<=p.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<=p.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<=p.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<=p.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=c=f([v(0,p.IOptionsService)],c),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(b.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);b.trace(`GlyphRenderer#${l.name}(${S.map((_=>JSON.stringify(_))).join(", ")})`);const x=l.apply(this,S);return b.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[f]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const a=function(p,w,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[f].push({id:c,index:h}):(r[f]=[{id:c,index:h}],r[u]=r)})(a,p,b)};return a.toString=()=>v,n.serviceRegistry.set(v,a),a}},97:(F,n,u)=>{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 f=u(726);var v;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")}},P={};function ee(F){var n=P[F];if(n!==void 0)return n.exports;var u=P[F]={exports:{}};return Y[F].call(u.exports,u,u.exports,ee),u.exports}var ne={};return(()=>{var F=ne;Object.defineProperty(F,"__esModule",{value:!0}),F.CanvasAddon=void 0;const n=ee(345),u=ee(859),f=ee(776),v=ee(949);class a extends u.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var w;return(w=this._renderer)==null?void 0:w.textureAtlas}activate(w){const b=w._core;if(!w.element)return void this.register(b.onWillOpen((()=>this.activate(w))));this._terminal=w;const c=b.coreService,r=b.optionsService,h=b.screenElement,o=b.linkifier,l=b,S=l._bufferService,x=l._renderService,_=l._characterJoinerService,C=l._charSizeService,m=l._coreBrowserService,y=l._decorationService,E=l._logService,A=l._themeService;(0,f.setTraceLogger)(E),this._renderer=new v.CanvasRenderer(w,h,o,S,C,r,_,c,m,y,A),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),x.setRenderer(this._renderer),x.handleResize(S.cols,S.rows),this.register((0,u.toDisposable)((()=>{var L;x.setRenderer(this._terminal._core._createRenderer()),x.handleResize(w.cols,w.rows),(L=this._renderer)==null||L.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var w;(w=this._renderer)==null||w.clearTextureAtlas()}}F.CanvasAddon=a})(),ne})()))})(Ho)),Ho.exports}var Jv=Zv();/**
115
115
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
116
116
  * @license MIT
117
117
  *
@@ -122,10 +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 Jv=class{constructor(j,K,Y,P={}){this._terminal=j,this._regex=K,this._handler=Y,this._options=P}provideLinks(j,K){let Y=tg.computeLink(j,this._regex,this._terminal,this._handler);K(this._addCallbacks(Y))}_addCallbacks(j){return j.map(K=>(K.leave=this._options.leave,K.hover=(Y,P)=>{if(this._options.hover){let{range:te}=K;this._options.hover(Y,P,te)}},K))}};function eg(j){try{let K=new URL(j),Y=K.password&&K.username?`${K.protocol}//${K.username}:${K.password}@${K.host}`:K.username?`${K.protocol}//${K.username}@${K.host}`:`${K.protocol}//${K.host}`;return j.toLocaleLowerCase().startsWith(Y.toLocaleLowerCase())}catch{return!1}}var tg=class ua{static computeLink(K,Y,P,te){let ne=new RegExp(Y.source,(Y.flags||"")+"g"),[F,n]=ua._getWindowedLineStrings(K-1,P),u=F.join(""),f,v=[];for(;f=ne.exec(u);){let a=f[0];if(!eg(a))continue;let[p,y]=ua._mapStrIdx(P,n,0,f.index),[b,c]=ua._mapStrIdx(P,p,y,a.length);if(p===-1||y===-1||b===-1||c===-1)continue;let r={start:{x:y+1,y:p+1},end:{x:c,y:b+1}};v.push({range:r,text:a,activate:te})}return v}static _getWindowedLineStrings(K,Y){let P,te=K,ne=K,F=0,n="",u=[];if(P=Y.buffer.active.getLine(K)){let f=P.translateToString(!0);if(P.isWrapped&&f[0]!==" "){for(F=0;(P=Y.buffer.active.getLine(--te))&&F<2048&&(n=P.translateToString(!0),F+=n.length,u.push(n),!(!P.isWrapped||n.indexOf(" ")!==-1)););u.reverse()}for(u.push(f),F=0;(P=Y.buffer.active.getLine(++ne))&&P.isWrapped&&F<2048&&(n=P.translateToString(!0),F+=n.length,u.push(n),n.indexOf(" ")===-1););}return[u,te]}static _mapStrIdx(K,Y,P,te){let ne=K.buffer.active,F=ne.getNullCell(),n=P;for(;te;){let u=ne.getLine(Y);if(!u)return[-1,-1];for(let f=n;f<u.length;++f){u.getCell(f,F);let v=F.getChars();if(F.getWidth()&&(te-=v.length||1,f===u.length-1&&v==="")){let a=ne.getLine(Y+1);a&&a.isWrapped&&(a.getCell(0,F),F.getWidth()===2&&(te+=1))}if(te<0)return[Y,f]}Y++,n=0}return[Y,n]}},ig=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function sg(j,K){let Y=window.open();if(Y){try{Y.opener=null}catch{}Y.location.href=K}else console.warn("Opening link blocked as opener could not be cleared")}var rg=class{constructor(j=sg,K={}){this._handler=j,this._options=K}activate(j){this._terminal=j;let K=this._options,Y=K.urlRegex||ig;this._linkProvider=this._terminal.registerLinkProvider(new Jv(this._terminal,Y,this._handler,K))}dispose(){var j;(j=this._linkProvider)==null||j.dispose()}};function ng(j){const K=j.match(/^(.+?):(\d+)(?::(\d+))?$/);if(K)return{path:K[1],line:parseInt(K[2],10),column:K[3]?parseInt(K[3],10):void 0};const Y=j.match(/^(.+?)\((\d+),(\d+)\)$/);return Y?{path:Y[1],line:parseInt(Y[2],10),column:parseInt(Y[3],10)}:{path:j}}function ag(j){return!(!/\.[a-zA-Z]{1,10}(?::\d+(?::\d+)?|\(\d+,\d+\))?$/.test(j)||/^https?:\/\//i.test(j)||/^[a-z0-9-]+\.(com|org|net|io|dev|app|co)$/i.test(j))}const lg=0,rf=1;function og({wsPath:j,onFileOpen:K}){const Y=Re.useRef(null),P=Re.useRef(null),te=Re.useRef(null),ne=Re.useRef(null);return Re.useEffect(()=>{if(!Y.current)return;const F=new Gv.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0});P.current=F;const n=new Vv.FitAddon;ne.current=n,F.loadAddon(n),F.open(Y.current);const u=()=>{try{F.loadAddon(new Zv.CanvasAddon)}catch{}};try{const _=new Kv.WebglAddon;_.onContextLoss(()=>{_.dispose(),u()}),F.loadAddon(_)}catch{u()}if(K){const _=new rg((w,S)=>{if(w.preventDefault(),ag(S)){const C=ng(S);K(C.path,C.line,C.column)}else window.open(S,"_blank")},{urlRegex:void 0});F.loadAddon(_)}n.fit();const f=setTimeout(()=>n.fit(),100),v=setTimeout(()=>n.fit(),300),p=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${j}`,y=new WebSocket(p);y.binaryType="arraybuffer",te.current=y;let b="",c=!0,r=null;const h=_=>(_=_.replace(/\x1b\[[\?>][\d;]*c/g,""),_=_.replace(/\[[\?>][\d;]*c/g,""),_),o=()=>{if(c=!1,r=null,b){const _=h(b);_&&F.write(_),b=""}};y.onopen=()=>{Qd(y,"resize",{cols:F.cols,rows:F.rows})},y.onmessage=_=>{const w=new Uint8Array(_.data);if(w.length===0)return;const S=w[0],C=w.subarray(1);if(S===rf){const L=new TextDecoder().decode(C);if(c)b+=L,r||(r=setTimeout(o,500));else{const A=h(L);A&&F.write(A)}}},y.onclose=()=>{F.write(`\r
125
+ */var eg=class{constructor(j,K,Y,P={}){this._terminal=j,this._regex=K,this._handler=Y,this._options=P}provideLinks(j,K){let Y=ig.computeLink(j,this._regex,this._terminal,this._handler);K(this._addCallbacks(Y))}_addCallbacks(j){return j.map(K=>(K.leave=this._options.leave,K.hover=(Y,P)=>{if(this._options.hover){let{range:ee}=K;this._options.hover(Y,P,ee)}},K))}};function tg(j){try{let K=new URL(j),Y=K.password&&K.username?`${K.protocol}//${K.username}:${K.password}@${K.host}`:K.username?`${K.protocol}//${K.username}@${K.host}`:`${K.protocol}//${K.host}`;return j.toLocaleLowerCase().startsWith(Y.toLocaleLowerCase())}catch{return!1}}var ig=class ua{static computeLink(K,Y,P,ee){let ne=new RegExp(Y.source,(Y.flags||"")+"g"),[F,n]=ua._getWindowedLineStrings(K-1,P),u=F.join(""),f,v=[];for(;f=ne.exec(u);){let a=f[0];if(!tg(a))continue;let[p,w]=ua._mapStrIdx(P,n,0,f.index),[b,c]=ua._mapStrIdx(P,p,w,a.length);if(p===-1||w===-1||b===-1||c===-1)continue;let r={start:{x:w+1,y:p+1},end:{x:c,y:b+1}};v.push({range:r,text:a,activate:ee})}return v}static _getWindowedLineStrings(K,Y){let P,ee=K,ne=K,F=0,n="",u=[];if(P=Y.buffer.active.getLine(K)){let f=P.translateToString(!0);if(P.isWrapped&&f[0]!==" "){for(F=0;(P=Y.buffer.active.getLine(--ee))&&F<2048&&(n=P.translateToString(!0),F+=n.length,u.push(n),!(!P.isWrapped||n.indexOf(" ")!==-1)););u.reverse()}for(u.push(f),F=0;(P=Y.buffer.active.getLine(++ne))&&P.isWrapped&&F<2048&&(n=P.translateToString(!0),F+=n.length,u.push(n),n.indexOf(" ")===-1););}return[u,ee]}static _mapStrIdx(K,Y,P,ee){let ne=K.buffer.active,F=ne.getNullCell(),n=P;for(;ee;){let u=ne.getLine(Y);if(!u)return[-1,-1];for(let f=n;f<u.length;++f){u.getCell(f,F);let v=F.getChars();if(F.getWidth()&&(ee-=v.length||1,f===u.length-1&&v==="")){let a=ne.getLine(Y+1);a&&a.isWrapped&&(a.getCell(0,F),F.getWidth()===2&&(ee+=1))}if(ee<0)return[Y,f]}Y++,n=0}return[Y,n]}},sg=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function rg(j,K){let Y=window.open();if(Y){try{Y.opener=null}catch{}Y.location.href=K}else console.warn("Opening link blocked as opener could not be cleared")}var ng=class{constructor(j=rg,K={}){this._handler=j,this._options=K}activate(j){this._terminal=j;let K=this._options,Y=K.urlRegex||sg;this._linkProvider=this._terminal.registerLinkProvider(new eg(this._terminal,Y,this._handler,K))}dispose(){var j;(j=this._linkProvider)==null||j.dispose()}};function ag(j){const K=j.match(/^(.+?):(\d+)(?::(\d+))?$/);if(K)return{path:K[1],line:parseInt(K[2],10),column:K[3]?parseInt(K[3],10):void 0};const Y=j.match(/^(.+?)\((\d+),(\d+)\)$/);return Y?{path:Y[1],line:parseInt(Y[2],10),column:parseInt(Y[3],10)}:{path:j}}function lg(j){return!(!/\.[a-zA-Z]{1,10}(?::\d+(?::\d+)?|\(\d+,\d+\))?$/.test(j)||/^https?:\/\//i.test(j)||/^[a-z0-9-]+\.(com|org|net|io|dev|app|co)$/i.test(j))}const og=0,af=1;function Zd({wsPath:j,onFileOpen:K}){const Y=Ae.useRef(null),P=Ae.useRef(null),ee=Ae.useRef(null),ne=Ae.useRef(null);return Ae.useEffect(()=>{if(!Y.current)return;const F=new Xv.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0});P.current=F;const n=new Yv.FitAddon;ne.current=n,F.loadAddon(n),F.open(Y.current);const u=()=>{try{F.loadAddon(new Jv.CanvasAddon)}catch{}};try{const C=new Qv.WebglAddon;C.onContextLoss(()=>{C.dispose(),u()}),F.loadAddon(C)}catch{u()}if(K){const C=new ng((m,y)=>{if(m.preventDefault(),lg(y)){const E=ag(y);K(E.path,E.line,E.column)}else window.open(y,"_blank")},{urlRegex:void 0});F.loadAddon(C)}const f=navigator.platform.toUpperCase().includes("MAC");F.attachCustomKeyEventHandler(C=>{if(C.type!=="keydown"||!navigator.clipboard||!(f?C.metaKey:C.ctrlKey&&C.shiftKey))return!0;if(C.key==="v"||C.key==="V")return navigator.clipboard.readText().then(y=>{y&&F.paste(y)}).catch(()=>{}),!1;if(C.key==="c"||C.key==="C"){const y=F.getSelection();return y?(navigator.clipboard.writeText(y).catch(()=>{}),!1):!0}return!0}),n.fit();const v=setTimeout(()=>n.fit(),100),a=setTimeout(()=>n.fit(),300),w=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${j}`,b=new WebSocket(w);b.binaryType="arraybuffer",ee.current=b;let c="",r=!0,h=null;const o=C=>(C=C.replace(/\x1b\[[\?>][\d;]*c/g,""),C=C.replace(/\[[\?>][\d;]*c/g,""),C),l=()=>{if(r=!1,h=null,c){const C=o(c);C&&F.write(C),c=""}};b.onopen=()=>{Jd(b,"resize",{cols:F.cols,rows:F.rows})},b.onmessage=C=>{const m=new Uint8Array(C.data);if(m.length===0)return;const y=m[0],E=m.subarray(1);if(y===af){const A=new TextDecoder().decode(E);if(r)c+=A,h||(h=setTimeout(l,500));else{const L=o(A);L&&F.write(L)}}},b.onclose=()=>{F.write(`\r
126
126
  \x1B[90m[Terminal disconnected]\x1B[0m\r
127
- `)},y.onerror=()=>{F.write(`\r
127
+ `)},b.onerror=()=>{F.write(`\r
128
128
  \x1B[31m[WebSocket error]\x1B[0m\r
129
- `)},F.onData(_=>{y.readyState===WebSocket.OPEN&&cg(y,_)}),F.onResize(({cols:_,rows:w})=>{y.readyState===WebSocket.OPEN&&Qd(y,"resize",{cols:_,rows:w})});const l=()=>n.fit(),m=new ResizeObserver(l);m.observe(Y.current);const x=()=>{document.hidden||n.fit()};return document.addEventListener("visibilitychange",x),()=>{clearTimeout(f),clearTimeout(v),r&&clearTimeout(r),m.disconnect(),document.removeEventListener("visibilitychange",x),y.close(),F.dispose(),P.current=null,te.current=null,ne.current=null}},[j]),Z.jsx("div",{ref:Y,className:"terminal-container",style:{width:"100%",height:"100%",backgroundColor:"#1a1a1a"}})}function cg(j,K){const Y=new TextEncoder().encode(K),P=new Uint8Array(1+Y.length);P[0]=rf,P.set(Y,1),j.send(P.buffer)}function Qd(j,K,Y){const P=JSON.stringify({type:K,payload:Y}),te=new TextEncoder().encode(P),ne=new Uint8Array(1+te.length);ne[0]=lg,ne.set(te,1),j.send(ne.buffer)}function hg(j,K){const Y=j.replace(/^\//,"");return K.staged.some(P=>Y.endsWith(P)||P.endsWith(Y))?{indicator:"A",className:"git-staged"}:K.modified.some(P=>Y.endsWith(P)||P.endsWith(Y))?{indicator:"M",className:"git-modified"}:K.untracked.some(P=>Y.endsWith(P)||P.endsWith(Y))?{indicator:"?",className:"git-untracked"}:null}function nf({entry:j,expanded:K,gitStatus:Y,onToggle:P,onOpen:te,depth:ne=0}){var f;const F=j.type==="directory",n=K.has(j.path),u=F?null:hg(j.path,Y);return Z.jsxs(Z.Fragment,{children:[Z.jsxs("div",{className:`file-node ${F?"directory":"file"}`,style:{paddingLeft:`${ne*16+8}px`},onClick:()=>F?P(j.path):te(j.path),role:"treeitem","aria-expanded":F?n:void 0,tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),F?P(j.path):te(j.path))},children:[Z.jsx("span",{className:"file-icon",children:F?n?"📂":"📁":"📄"}),Z.jsx("span",{className:"file-name",children:j.name}),u&&Z.jsx("span",{className:`git-indicator ${u.className}`,children:u.indicator})]}),F&&n&&((f=j.children)==null?void 0:f.map(v=>Z.jsx(nf,{entry:v,expanded:K,gitStatus:Y,onToggle:P,onOpen:te,depth:ne+1},v.path)))]})}function af(j,K=[]){for(const Y of j)Y.type==="file"&&K.push(Y),Y.children&&af(Y.children,K);return K}function ug({onRefresh:j}){const[K,Y]=Re.useState([]),[P,te]=Re.useState(new Set),[ne,F]=Re.useState(null),[n,u]=Re.useState(!1),[f,v]=Re.useState({modified:[],staged:[],untracked:[]}),[a,p]=Re.useState([]),[y,b]=Re.useState(""),[c,r]=Re.useState(!1),h=Re.useRef(null),o=Re.useCallback(async()=>{try{const E=await zv();Y(E),F(null),u(!0)}catch(E){F(E.message)}},[]),l=Re.useCallback(async()=>{try{const E=await Uv();v(E)}catch(E){console.error("Failed to load git status:",E)}},[]),m=Re.useCallback(async()=>{try{const E=await Iv();p(E)}catch(E){console.error("Failed to load recent files:",E)}},[]);Re.useEffect(()=>{n||(o(),l(),m())},[n,o,l,m]),Re.useEffect(()=>{const E=setInterval(()=>{o(),l()},5e3);return()=>clearInterval(E)},[o,l]);const x=E=>{te(D=>{const O=new Set(D);return O.has(E)?O.delete(E):O.add(E),O})},_=async E=>{try{await Jd(E),j(),m()}catch(D){console.error("Failed to open file:",D)}},w=Re.useMemo(()=>af(K),[K]),S=Re.useMemo(()=>{if(!y.trim())return[];const E=y.toLowerCase();return w.filter(D=>D.name.toLowerCase().includes(E)||D.path.toLowerCase().includes(E)).slice(0,10)},[w,y]),C=E=>{b(E.target.value),r(!0)},L=E=>{E.key==="Escape"?(r(!1),b("")):E.key==="Enter"&&S.length>0&&(_(S[0].path),b(""),r(!1))},A=E=>{_(E),b(""),r(!1)};return ne?Z.jsxs("div",{className:"file-tree-error",children:["Error: ",ne]}):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:C,onKeyDown:L,onFocus:()=>r(!0),onBlur:()=>setTimeout(()=>r(!1),200)}),c&&S.length>0&&Z.jsx("div",{className:"file-search-suggestions",children:S.map(E=>Z.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>A(E.path),children:[Z.jsx("span",{className:"suggestion-name",children:E.name}),Z.jsx("span",{className:"suggestion-path",children:E.path})]},E.path))})]}),a.length>0&&Z.jsxs("div",{className:"file-tree-section",children:[Z.jsx("div",{className:"file-tree-section-header",children:"Recent"}),a.map(E=>Z.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>_(E.path),role:"treeitem",tabIndex:0,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),_(E.path))},children:[Z.jsx("span",{className:"file-icon",children:"🕐"}),Z.jsx("span",{className:"file-name",children:E.name}),Z.jsx("span",{className:"file-path-hint",children:E.relativePath})]},E.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:K.map(E=>Z.jsx(nf,{entry:E,expanded:P,gitStatus:f,onToggle:x,onOpen:_},E.path))})]})]}):Z.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function zo({title:j,className:K,defaultOpen:Y=!0,actions:P,children:te}){const[ne,F]=Re.useState(Y);return Z.jsxs("div",{className:`dashboard-section${ne?"":" collapsed"}${K?" "+K:""}`,children:[Z.jsxs("div",{className:"dashboard-section-header",onClick:()=>F(!ne),children:[Z.jsxs("h3",{children:[Z.jsx("span",{className:"collapse-icon",children:"▼"})," ",j]}),P&&Z.jsx("div",{className:"header-actions",onClick:n=>n.stopPropagation(),children:P})]}),ne&&Z.jsx("div",{className:"dashboard-section-content",children:te})]})}function dg(j){const K={},Y=j.split(`
130
- `);for(const P of Y){const te=P.match(/^\s*-?\s*(\w+):\s*(.*)$/);if(!te)continue;const[,ne,F]=te;let n=F.trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),ne==="files"){K.files={};continue}if(ne==="spec"||ne==="plan"||ne==="review"){K.files||(K.files={}),K.files[ne]=n==="null"?null:n;continue}if(ne==="timestamps"){K.timestamps={};continue}if(["conceived_at","specified_at","planned_at","implementing_at","implemented_at","committed_at","integrated_at"].includes(ne)){K.timestamps||(K.timestamps={}),K.timestamps[ne]=n==="null"?null:n;continue}if(ne==="dependencies"||ne==="tags"||ne==="ticks"){if(n.startsWith("[")&&n.endsWith("]")){const f=n.slice(1,-1).trim();K[ne]=f===""?[]:f.split(",").map(v=>v.trim().replace(/^["']|["']$/g,""))}else K[ne]=[];continue}n!=="null"&&(K[ne]=n)}return K}const fg=new Set(["conceived","specified","planned","implementing","implemented","committed","integrated","abandoned","on-hold"]);function _g(j){return!(!j.id||j.id==="NNNN"||!/^\d{4}$/.test(j.id)||!j.status||!fg.has(j.status)||!j.title||j.tags&&j.tags.includes("example"))}function vg(j){const K=[],Y=/```yaml\n([\s\S]*?)```/g;let P;for(;(P=Y.exec(j))!==null;){const ne=P[1].split(/\n(?=\s*- id:)/);for(const F of ne){if(!F.trim()||!F.includes("id:"))continue;const n=dg(F);n&&_g(n)&&K.push(n)}}return K}const Uo=["conceived","specified","planned","implementing","implemented","committed","integrated"],gg=["CONC'D","SPEC'D","PLANNED","IMPL'ING","IMPL'D","CMTD","INTGR'D"],pg=new Set(["conceived","specified","planned","implementing","implemented","committed"]),lf=new Set(["abandoned","on-hold"]);function Io(j){var P;if(j.status!=="integrated")return!1;const K=(P=j.timestamps)==null?void 0:P.integrated_at;if(!K)return!1;const Y=new Date(K);return isNaN(Y.getTime())?!1:(Date.now()-Y.getTime())/(1e3*60*60)<=72}function da(j){const K=Uo.indexOf(j);return K>=0?K:-1}function Zd(j,K){var Y,P,te;switch(K){case"specified":return(Y=j.files)!=null&&Y.spec?{label:"Spec",link:j.files.spec}:{label:"",link:null};case"planned":return(P=j.files)!=null&&P.plan?{label:"Plan",link:j.files.plan}:{label:"",link:null};case"implemented":return(te=j.files)!=null&&te.review?{label:"Revw",link:j.files.review}:{label:"",link:null};case"committed":{if(j.notes){const ne=j.notes.match(/PR\s*#?(\d+)/i);if(ne)return{label:"PR",link:`https://github.com/cluesmith/codev/pull/${ne[1]}`,external:!0}}return{label:"",link:null}}default:return{label:"",link:null}}}function mg({project:j,stage:K}){const Y=da(j.status),P=da(K);if(P<Y){const te=Zd(j,K);return Z.jsxs("td",{className:"project-stage",children:[Z.jsx("span",{className:"checkmark",children:"✓"}),te.label&&te.link&&(te.external?Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:te.link,target:"_blank",rel:"noreferrer",children:te.label})]}):Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:"#",onClick:ne=>{ne.preventDefault(),er(te.link)},children:te.label})]}))]})}if(P===Y){if(K==="integrated"&&Io(j))return Z.jsx("td",{className:"project-stage",children:Z.jsx("span",{className:"celebration",children:"🎉"})});const te=Zd(j,K);return Z.jsxs("td",{className:"project-stage",children:[Z.jsx("span",{className:"current-indicator"}),te.label&&te.link&&(te.external?Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:te.link,target:"_blank",rel:"noreferrer",children:te.label})]}):Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:"#",onClick:ne=>{ne.preventDefault(),er(te.link)},children:te.label})]}))]})}return Z.jsx("td",{className:"project-stage"})}async function er(j){try{const K=Kr();await fetch(`${K}api/tabs/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:j})})}catch{}}function Sg({project:j}){const K=lf.has(j.status);return Z.jsxs("tr",{className:`project-row status-${j.status}`,children:[Z.jsxs("td",{className:"project-cell",children:[Z.jsx("span",{className:"project-id",children:j.id}),Z.jsxs("span",{className:"project-title",children:[j.title,K&&Z.jsxs("span",{className:"project-terminal-status",children:[" (",j.status,")"]})]})]}),K?Uo.map(Y=>Z.jsx("td",{className:"project-stage"},Y)):Uo.map(Y=>Z.jsx(mg,{project:j,stage:Y},Y))]})}function No({projects:j}){return j.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"}),gg.map(K=>Z.jsx("th",{className:"stage-header",children:K},K))]})}),Z.jsx("tbody",{children:j.map(K=>Z.jsx(Sg,{project:K},K.id))})]})}function Cg({projects:j}){const K=j.filter(te=>pg.has(te.status)||Io(te));K.sort((te,ne)=>{const F=da(te.status),n=da(ne.status);return n!==F?n-F:te.id.localeCompare(ne.id)});const Y=j.filter(te=>te.status==="integrated"&&!Io(te)),P=j.filter(te=>lf.has(te.status));return Z.jsxs(Z.Fragment,{children:[(K.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:["(",K.length,")"]})]}),Z.jsx(No,{projects:K})]}),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(No,{projects:Y})]}),P.length>0&&Z.jsxs("details",{className:"project-section",children:[Z.jsxs("summary",{children:["Terminal ",Z.jsxs("span",{className:"section-count",children:["(",P.length,")"]})]}),Z.jsx(No,{projects:P})]})]})}function yg({state:j,onRefresh:K,onSelectTab:Y}){const[P,te]=Re.useState([]),[ne,F]=Re.useState(null);if(Re.useEffect(()=>{let a="";const p=()=>{const b=Kr();fetch(`${b}file?path=codev/projectlist.md`).then(async c=>{if(!c.ok){if(c.status===404){te([]);return}throw new Error(`HTTP ${c.status}`)}const r=await c.text(),h=r.length+":"+r.slice(0,100);h!==a&&(a=h,te(vg(r)),F(null))}).catch(c=>F(c.message))};p();const y=setInterval(p,5e3);return()=>clearInterval(y)},[]),!j)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 kv(),K()}catch(a){console.error("Failed to create shell:",a)}},u=j.builders??[],f=(j.utils??[]).filter(a=>a.terminalId||a.pid&&a.pid!==0),v=j.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:a=>{a.preventDefault(),er("codev/resources/cheatsheet.md")},children:"Cheatsheet"})," ·"," ",Z.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/lifecycle.md")},children:"Lifecycle"})," ·"," ",Z.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/commands/overview.md")},children:"CLI Reference"})," ·"," ",Z.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/protocols/spir/protocol.md")},children:"SPIR 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(zo,{title:"Tabs",className:"section-tabs",actions:Z.jsx("button",{onClick:n,children:"+ Shell"}),children:Z.jsxs("div",{className:"dashboard-tabs-list",children:[j.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"})]}),u.map(a=>Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y(a.id),children:[Z.jsx("span",{className:"tab-icon",children:"🔨"}),Z.jsx("span",{className:"tab-name",children:a.name}),Z.jsx("span",{className:`status-dot status-${a.status}`})]},a.id)),f.map(a=>Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y(a.id),children:[Z.jsx("span",{className:"tab-icon",children:"💻"}),Z.jsx("span",{className:"tab-name",children:a.name})]},a.id)),v.map(a=>Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y(a.id),children:[Z.jsx("span",{className:"tab-icon",children:"📄"}),Z.jsx("span",{className:"tab-name",children:a.file.split("/").pop()})]},a.id)),!j.architect&&u.length===0&&f.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(zo,{title:"Files",className:"section-files",children:Z.jsx(ug,{onRefresh:K})})]}),Z.jsx(zo,{title:"Projects",className:"section-projects",children:ne?Z.jsxs("div",{className:"projects-error",children:[Z.jsx("span",{children:ne}),Z.jsx("button",{onClick:()=>window.location.reload(),children:"Retry"})]}):P.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(Cg,{projects:P})})]})}function bg({tabs:j,activeTabId:K,onSelectTab:Y,onRefresh:P,children:te}){return Z.jsxs("div",{className:"mobile-layout",children:[Z.jsx(ef,{tabs:j,activeTabId:K,onSelectTab:Y,onRefresh:P}),Z.jsx("div",{className:"mobile-content",children:te})]})}function wg({tabId:j,initialLine:K}){let P=`${Kr()}api/annotate/${j}/`;return K&&(P+=`?line=${K}`),Z.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:Z.jsx("iframe",{src:P,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function xg(){var r,h,o,l;const{state:j,refresh:K}=Pv(),{tabs:Y,activeTab:P,activeTabId:te,selectTab:ne}=jv(j),F=$v(`(max-width: ${Tv}px)`),n=Re.useRef(new Map),u=Re.useCallback(async(m,x,_)=>{try{const w=await Jd(m,x);x&&x>0&&n.current.set(w.id,x),K()}catch(w){console.error("Failed to open file:",w)}},[K]);Re.useEffect(()=>{j!=null&&j.projectName?document.title=`${j.projectName} Agent Farm`:document.title="Agent Farm"},[j==null?void 0:j.projectName]);const[f,v]=Re.useState(!1);Re.useEffect(()=>{const m=new URLSearchParams(window.location.search);v(m.get("fullscreen")==="1")},[]);const a=m=>{const x=Nv(m);return x?Z.jsx(og,{wsPath:x,onFileOpen:u}):Z.jsx("div",{className:"no-terminal",children:"No terminal session"})},p=m=>{if(!m.annotationId||!j)return Z.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!j.annotations.find(w=>w.id===m.annotationId))return Z.jsx("div",{className:"no-terminal",children:"Annotation not found"});const _=n.current.get(m.annotationId);return _!==void 0&&n.current.delete(m.annotationId),Z.jsx(wg,{tabId:m.annotationId,initialLine:_??m.initialLine})},y=()=>{if(!P)return null;switch(P.type){case"dashboard":return Z.jsx(yg,{state:j,onRefresh:K,onSelectTab:ne});case"architect":case"builder":case"shell":return a(P);case"file":return p(P);default:return Z.jsx("div",{children:"Unknown tab type"})}};if(f&&P&&(P.type==="architect"||P.type==="builder"||P.type==="shell"))return Z.jsx("div",{className:"fullscreen-terminal",children:a(P)});if(F)return Z.jsx(bg,{tabs:Y,activeTabId:te,onSelectTab:ne,onRefresh:K,children:y()});const b=Y.find(m=>m.type==="architect"),c=b?a(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=j==null?void 0:j.builders)==null?void 0:r.length)??0," builder(s)"]})})]}),Z.jsx("div",{className:"app-body",children:Z.jsx(qv,{left:c,right:Z.jsxs("div",{className:"right-panel",children:[Z.jsx(ef,{tabs:Y.filter(m=>m.type!=="architect"),activeTabId:te,onSelectTab:ne,onRefresh:K}),Z.jsx("div",{className:"tab-content",role:"tabpanel",children:y()})]})})}),Z.jsxs("footer",{className:"status-bar",children:[Z.jsxs("span",{children:[((h=j==null?void 0:j.builders)==null?void 0:h.length)??0," builders"]}),Z.jsxs("span",{children:[((o=j==null?void 0:j.utils)==null?void 0:o.length)??0," shells"]}),Z.jsxs("span",{children:[((l=j==null?void 0:j.annotations)==null?void 0:l.length)??0," files"]})]})]})}Dv.createRoot(document.getElementById("root")).render(Z.jsx(Re.StrictMode,{children:Z.jsx(xg,{})}));
131
- //# sourceMappingURL=index-BEs2fHhy.js.map
129
+ `)},F.onData(C=>{b.readyState===WebSocket.OPEN&&cg(b,C)}),F.onResize(({cols:C,rows:m})=>{b.readyState===WebSocket.OPEN&&Jd(b,"resize",{cols:C,rows:m})});const S=()=>n.fit(),x=new ResizeObserver(S);x.observe(Y.current);const _=()=>{document.hidden||n.fit()};return document.addEventListener("visibilitychange",_),()=>{clearTimeout(v),clearTimeout(a),h&&clearTimeout(h),x.disconnect(),document.removeEventListener("visibilitychange",_),b.close(),F.dispose(),P.current=null,ee.current=null,ne.current=null}},[j]),Z.jsx("div",{ref:Y,className:"terminal-container",style:{width:"100%",height:"100%",backgroundColor:"#1a1a1a"}})}function cg(j,K){const Y=new TextEncoder().encode(K),P=new Uint8Array(1+Y.length);P[0]=af,P.set(Y,1),j.send(P.buffer)}function Jd(j,K,Y){const P=JSON.stringify({type:K,payload:Y}),ee=new TextEncoder().encode(P),ne=new Uint8Array(1+ee.length);ne[0]=og,ne.set(ee,1),j.send(ne.buffer)}function hg(j,K){const Y=j.replace(/^\//,"");return K.staged.some(P=>Y.endsWith(P)||P.endsWith(Y))?{indicator:"A",className:"git-staged"}:K.modified.some(P=>Y.endsWith(P)||P.endsWith(Y))?{indicator:"M",className:"git-modified"}:K.untracked.some(P=>Y.endsWith(P)||P.endsWith(Y))?{indicator:"?",className:"git-untracked"}:null}function lf({entry:j,expanded:K,gitStatus:Y,onToggle:P,onOpen:ee,depth:ne=0}){var f;const F=j.type==="directory",n=K.has(j.path),u=F?null:hg(j.path,Y);return Z.jsxs(Z.Fragment,{children:[Z.jsxs("div",{className:`file-node ${F?"directory":"file"}`,style:{paddingLeft:`${ne*16+8}px`},onClick:()=>F?P(j.path):ee(j.path),role:"treeitem","aria-expanded":F?n:void 0,tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),F?P(j.path):ee(j.path))},children:[Z.jsx("span",{className:"file-icon",children:F?n?"📂":"📁":"📄"}),Z.jsx("span",{className:"file-name",children:j.name}),u&&Z.jsx("span",{className:`git-indicator ${u.className}`,children:u.indicator})]}),F&&n&&((f=j.children)==null?void 0:f.map(v=>Z.jsx(lf,{entry:v,expanded:K,gitStatus:Y,onToggle:P,onOpen:ee,depth:ne+1},v.path)))]})}function of(j,K=[]){for(const Y of j)Y.type==="file"&&K.push(Y),Y.children&&of(Y.children,K);return K}function ug({onRefresh:j}){const[K,Y]=Ae.useState([]),[P,ee]=Ae.useState(new Set),[ne,F]=Ae.useState(null),[n,u]=Ae.useState(!1),[f,v]=Ae.useState({modified:[],staged:[],untracked:[]}),[a,p]=Ae.useState([]),[w,b]=Ae.useState(""),[c,r]=Ae.useState(!1),h=Ae.useRef(null),o=Ae.useCallback(async()=>{try{const L=await Uv();Y(L),F(null),u(!0)}catch(L){F(L.message)}},[]),l=Ae.useCallback(async()=>{try{const L=await Iv();v(L)}catch(L){console.error("Failed to load git status:",L)}},[]),S=Ae.useCallback(async()=>{try{const L=await Pv();p(L)}catch(L){console.error("Failed to load recent files:",L)}},[]);Ae.useEffect(()=>{n||(o(),l(),S())},[n,o,l,S]),Ae.useEffect(()=>{const L=setInterval(()=>{o(),l()},5e3);return()=>clearInterval(L)},[o,l]);const x=L=>{ee(D=>{const O=new Set(D);return O.has(L)?O.delete(L):O.add(L),O})},_=async L=>{try{await tf(L),j(),S()}catch(D){console.error("Failed to open file:",D)}},C=Ae.useMemo(()=>of(K),[K]),m=Ae.useMemo(()=>{if(!w.trim())return[];const L=w.toLowerCase();return C.filter(D=>D.name.toLowerCase().includes(L)||D.path.toLowerCase().includes(L)).slice(0,10)},[C,w]),y=L=>{b(L.target.value),r(!0)},E=L=>{L.key==="Escape"?(r(!1),b("")):L.key==="Enter"&&m.length>0&&(_(m[0].path),b(""),r(!1))},A=L=>{_(L),b(""),r(!1)};return ne?Z.jsxs("div",{className:"file-tree-error",children:["Error: ",ne]}):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:w,onChange:y,onKeyDown:E,onFocus:()=>r(!0),onBlur:()=>setTimeout(()=>r(!1),200)}),c&&m.length>0&&Z.jsx("div",{className:"file-search-suggestions",children:m.map(L=>Z.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>A(L.path),children:[Z.jsx("span",{className:"suggestion-name",children:L.name}),Z.jsx("span",{className:"suggestion-path",children:L.path})]},L.path))})]}),a.length>0&&Z.jsxs("div",{className:"file-tree-section",children:[Z.jsx("div",{className:"file-tree-section-header",children:"Recent"}),a.map(L=>Z.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>_(L.path),role:"treeitem",tabIndex:0,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),_(L.path))},children:[Z.jsx("span",{className:"file-icon",children:"🕐"}),Z.jsx("span",{className:"file-name",children:L.name}),Z.jsx("span",{className:"file-path-hint",children:L.relativePath})]},L.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:K.map(L=>Z.jsx(lf,{entry:L,expanded:P,gitStatus:f,onToggle:x,onOpen:_},L.path))})]})]}):Z.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function zo({title:j,className:K,defaultOpen:Y=!0,actions:P,children:ee}){const[ne,F]=Ae.useState(Y);return Z.jsxs("div",{className:`dashboard-section${ne?"":" collapsed"}${K?" "+K:""}`,children:[Z.jsxs("div",{className:"dashboard-section-header",onClick:()=>F(!ne),children:[Z.jsxs("h3",{children:[Z.jsx("span",{className:"collapse-icon",children:"▼"})," ",j]}),P&&Z.jsx("div",{className:"header-actions",onClick:n=>n.stopPropagation(),children:P})]}),ne&&Z.jsx("div",{className:"dashboard-section-content",children:ee})]})}function dg(j){const K={},Y=j.split(`
130
+ `);for(const P of Y){const ee=P.match(/^\s*-?\s*(\w+):\s*(.*)$/);if(!ee)continue;const[,ne,F]=ee;let n=F.trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),ne==="files"){K.files={};continue}if(ne==="spec"||ne==="plan"||ne==="review"){K.files||(K.files={}),K.files[ne]=n==="null"?null:n;continue}if(ne==="timestamps"){K.timestamps={};continue}if(["conceived_at","specified_at","planned_at","implementing_at","implemented_at","committed_at","integrated_at"].includes(ne)){K.timestamps||(K.timestamps={}),K.timestamps[ne]=n==="null"?null:n;continue}if(ne==="dependencies"||ne==="tags"||ne==="ticks"){if(n.startsWith("[")&&n.endsWith("]")){const f=n.slice(1,-1).trim();K[ne]=f===""?[]:f.split(",").map(v=>v.trim().replace(/^["']|["']$/g,""))}else K[ne]=[];continue}n!=="null"&&(K[ne]=n)}return K}const fg=new Set(["conceived","specified","planned","implementing","implemented","committed","integrated","abandoned","on-hold"]);function _g(j){return!(!j.id||j.id==="NNNN"||!/^\d{4}$/.test(j.id)||!j.status||!fg.has(j.status)||!j.title||j.tags&&j.tags.includes("example"))}function vg(j){const K=[],Y=/```yaml\n([\s\S]*?)```/g;let P;for(;(P=Y.exec(j))!==null;){const ne=P[1].split(/\n(?=\s*- id:)/);for(const F of ne){if(!F.trim()||!F.includes("id:"))continue;const n=dg(F);n&&_g(n)&&K.push(n)}}return K}const Uo=["conceived","specified","planned","implementing","implemented","committed","integrated"],gg=["CONC'D","SPEC'D","PLANNED","IMPL'ING","IMPL'D","CMTD","INTGR'D"],pg=new Set(["conceived","specified","planned","implementing","implemented","committed"]),cf=new Set(["abandoned","on-hold"]);function Io(j){var P;if(j.status!=="integrated")return!1;const K=(P=j.timestamps)==null?void 0:P.integrated_at;if(!K)return!1;const Y=new Date(K);return isNaN(Y.getTime())?!1:(Date.now()-Y.getTime())/(1e3*60*60)<=72}function da(j){const K=Uo.indexOf(j);return K>=0?K:-1}function ef(j,K){var Y,P,ee;switch(K){case"specified":return(Y=j.files)!=null&&Y.spec?{label:"Spec",link:j.files.spec}:{label:"",link:null};case"planned":return(P=j.files)!=null&&P.plan?{label:"Plan",link:j.files.plan}:{label:"",link:null};case"implemented":return(ee=j.files)!=null&&ee.review?{label:"Revw",link:j.files.review}:{label:"",link:null};case"committed":{if(j.notes){const ne=j.notes.match(/PR\s*#?(\d+)/i);if(ne)return{label:"PR",link:`https://github.com/cluesmith/codev/pull/${ne[1]}`,external:!0}}return{label:"",link:null}}default:return{label:"",link:null}}}function mg({project:j,stage:K}){const Y=da(j.status),P=da(K);if(P<Y){const ee=ef(j,K);return Z.jsxs("td",{className:"project-stage",children:[Z.jsx("span",{className:"checkmark",children:"✓"}),ee.label&&ee.link&&(ee.external?Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:ee.link,target:"_blank",rel:"noreferrer",children:ee.label})]}):Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:"#",onClick:ne=>{ne.preventDefault(),er(ee.link)},children:ee.label})]}))]})}if(P===Y){if(K==="integrated"&&Io(j))return Z.jsx("td",{className:"project-stage",children:Z.jsx("span",{className:"celebration",children:"🎉"})});const ee=ef(j,K);return Z.jsxs("td",{className:"project-stage",children:[Z.jsx("span",{className:"current-indicator"}),ee.label&&ee.link&&(ee.external?Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:ee.link,target:"_blank",rel:"noreferrer",children:ee.label})]}):Z.jsxs(Z.Fragment,{children:[" ",Z.jsx("a",{href:"#",onClick:ne=>{ne.preventDefault(),er(ee.link)},children:ee.label})]}))]})}return Z.jsx("td",{className:"project-stage"})}async function er(j){try{const K=Kr();await fetch(`${K}api/tabs/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:j})})}catch{}}function Sg({project:j}){const K=cf.has(j.status);return Z.jsxs("tr",{className:`project-row status-${j.status}`,children:[Z.jsxs("td",{className:"project-cell",children:[Z.jsx("span",{className:"project-id",children:j.id}),Z.jsxs("span",{className:"project-title",children:[j.title,K&&Z.jsxs("span",{className:"project-terminal-status",children:[" (",j.status,")"]})]})]}),K?Uo.map(Y=>Z.jsx("td",{className:"project-stage"},Y)):Uo.map(Y=>Z.jsx(mg,{project:j,stage:Y},Y))]})}function No({projects:j}){return j.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"}),gg.map(K=>Z.jsx("th",{className:"stage-header",children:K},K))]})}),Z.jsx("tbody",{children:j.map(K=>Z.jsx(Sg,{project:K},K.id))})]})}function Cg({projects:j}){const K=j.filter(ee=>pg.has(ee.status)||Io(ee));K.sort((ee,ne)=>{const F=da(ee.status),n=da(ne.status);return n!==F?n-F:ee.id.localeCompare(ne.id)});const Y=j.filter(ee=>ee.status==="integrated"&&!Io(ee)),P=j.filter(ee=>cf.has(ee.status));return Z.jsxs(Z.Fragment,{children:[(K.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:["(",K.length,")"]})]}),Z.jsx(No,{projects:K})]}),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(No,{projects:Y})]}),P.length>0&&Z.jsxs("details",{className:"project-section",children:[Z.jsxs("summary",{children:["Terminal ",Z.jsxs("span",{className:"section-count",children:["(",P.length,")"]})]}),Z.jsx(No,{projects:P})]})]})}function yg({state:j,onRefresh:K,onSelectTab:Y}){const[P,ee]=Ae.useState([]),[ne,F]=Ae.useState(null);if(Ae.useEffect(()=>{let a="";const p=()=>{const b=Kr();fetch(`${b}file?path=codev/projectlist.md`).then(async c=>{if(!c.ok){if(c.status===404){ee([]);return}throw new Error(`HTTP ${c.status}`)}const r=await c.text(),h=r.length+":"+r.slice(0,100);h!==a&&(a=h,ee(vg(r)),F(null))}).catch(c=>F(c.message))};p();const w=setInterval(p,5e3);return()=>clearInterval(w)},[]),!j)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 zv(),K()}catch(a){console.error("Failed to create shell:",a)}},u=j.builders??[],f=(j.utils??[]).filter(a=>a.terminalId||a.pid&&a.pid!==0),v=j.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:a=>{a.preventDefault(),er("codev/resources/cheatsheet.md")},children:"Cheatsheet"})," ·"," ",Z.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/lifecycle.md")},children:"Lifecycle"})," ·"," ",Z.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/commands/overview.md")},children:"CLI Reference"})," ·"," ",Z.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/protocols/spir/protocol.md")},children:"SPIR 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(zo,{title:"Tabs",className:"section-tabs",actions:Z.jsx("button",{onClick:n,children:"+ Shell"}),children:Z.jsxs("div",{className:"dashboard-tabs-list",children:[j.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"})]}),u.map(a=>Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y(a.id),children:[Z.jsx("span",{className:"tab-icon",children:"🔨"}),Z.jsx("span",{className:"tab-name",children:a.name}),Z.jsx("span",{className:`status-dot status-${a.status}`})]},a.id)),f.map(a=>Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y(a.id),children:[Z.jsx("span",{className:"tab-icon",children:"💻"}),Z.jsx("span",{className:"tab-name",children:a.name})]},a.id)),v.map(a=>Z.jsxs("div",{className:"dashboard-tab-item",onClick:()=>Y==null?void 0:Y(a.id),children:[Z.jsx("span",{className:"tab-icon",children:"📄"}),Z.jsx("span",{className:"tab-name",children:a.file.split("/").pop()})]},a.id)),!j.architect&&u.length===0&&f.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(zo,{title:"Files",className:"section-files",children:Z.jsx(ug,{onRefresh:K})})]}),Z.jsx(zo,{title:"Projects",className:"section-projects",children:ne?Z.jsxs("div",{className:"projects-error",children:[Z.jsx("span",{children:ne}),Z.jsx("button",{onClick:()=>window.location.reload(),children:"Retry"})]}):P.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(Cg,{projects:P})})]})}function bg({tabs:j,activeTabId:K,onSelectTab:Y,onRefresh:P,children:ee}){return Z.jsxs("div",{className:"mobile-layout",children:[Z.jsx(sf,{tabs:j,activeTabId:K,onSelectTab:Y,onRefresh:P}),Z.jsx("div",{className:"mobile-content",children:ee})]})}function wg({tabId:j,initialLine:K}){let P=`${Kr()}api/annotate/${j}/`;return K&&(P+=`?line=${K}`),Z.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:Z.jsx("iframe",{src:P,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function xg(){var o,l,S,x;const{state:j,refresh:K}=Fv(),{tabs:Y,activeTab:P,activeTabId:ee,selectTab:ne}=$v(j),F=qv(`(max-width: ${Ov}px)`),[n,u]=Ae.useState(new Set),f=Ae.useRef(new Map),v=Ae.useCallback(async(_,C,m)=>{try{const y=await tf(_,C);C&&C>0&&f.current.set(y.id,C),K()}catch(y){console.error("Failed to open file:",y)}},[K]);Ae.useEffect(()=>{j!=null&&j.projectName?document.title=`${j.projectName} Agent Farm`:document.title="Agent Farm"},[j==null?void 0:j.projectName]);const[a,p]=Ae.useState(!1);Ae.useEffect(()=>{const _=new URLSearchParams(window.location.search);p(_.get("fullscreen")==="1")},[]),Ae.useEffect(()=>{if(!P)return;(P.type==="architect"||P.type==="builder"||P.type==="shell")&&u(C=>{if(C.has(P.id))return C;const m=new Set(C);return m.add(P.id),m})},[P==null?void 0:P.id,P==null?void 0:P.type]);const w=_=>{const C=Xd(_);return C?Z.jsx(Zd,{wsPath:C,onFileOpen:v}):Z.jsx("div",{className:"no-terminal",children:"No terminal session"})},b=_=>{if(!_.annotationId||!j)return Z.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!j.annotations.find(y=>y.id===_.annotationId))return Z.jsx("div",{className:"no-terminal",children:"Annotation not found"});const m=f.current.get(_.annotationId);return m!==void 0&&f.current.delete(_.annotationId),Z.jsx(wg,{tabId:_.annotationId,initialLine:m??_.initialLine})},c=_=>{const C=Y.filter(m=>_.includes(m.type)&&n.has(m.id));return Z.jsxs(Z.Fragment,{children:[C.map(m=>{const y=Xd(m);return Z.jsx("div",{className:"terminal-tab-pane",style:{display:ee===m.id?void 0:"none"},children:y?Z.jsx(Zd,{wsPath:y,onFileOpen:v}):Z.jsx("div",{className:"no-terminal",children:"No terminal session"})},m.id)}),(P==null?void 0:P.type)==="dashboard"&&Z.jsx(yg,{state:j,onRefresh:K,onSelectTab:ne}),(P==null?void 0:P.type)==="file"&&b(P)]})};if(a&&P&&(P.type==="architect"||P.type==="builder"||P.type==="shell"))return Z.jsx("div",{className:"fullscreen-terminal",children:w(P)});if(F)return Z.jsx(bg,{tabs:Y,activeTabId:ee,onSelectTab:ne,onRefresh:K,children:c(["architect","builder","shell"])});const r=Y.find(_=>_.type==="architect"),h=r?w(r):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:[((o=j==null?void 0:j.builders)==null?void 0:o.length)??0," builder(s)"]})})]}),Z.jsx("div",{className:"app-body",children:Z.jsx(Wv,{left:h,right:Z.jsxs("div",{className:"right-panel",children:[Z.jsx(sf,{tabs:Y.filter(_=>_.type!=="architect"),activeTabId:ee,onSelectTab:ne,onRefresh:K}),Z.jsx("div",{className:"tab-content",role:"tabpanel",children:c(["builder","shell"])})]})})}),Z.jsxs("footer",{className:"status-bar",children:[Z.jsxs("span",{children:[((l=j==null?void 0:j.builders)==null?void 0:l.length)??0," builders"]}),Z.jsxs("span",{children:[((S=j==null?void 0:j.utils)==null?void 0:S.length)??0," shells"]}),Z.jsxs("span",{children:[((x=j==null?void 0:j.annotations)==null?void 0:x.length)??0," files"]})]})]})}Bv.createRoot(document.getElementById("root")).render(Z.jsx(Ae.StrictMode,{children:Z.jsx(xg,{})}));
131
+ //# sourceMappingURL=index-Ca2fjOJf.js.map