monorepotime 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +106 -0
- package/dist/routes/_temp.js +9 -0
- package/dist/routes/interactiveTerminal.js +145 -0
- package/dist/routes/listworkspacedirs.js +107 -0
- package/dist/routes/newworkspace.js +43 -0
- package/dist/routes/rootPath.js +36 -0
- package/dist/routes/runcmddev.js +61 -0
- package/dist/routes/scafoldrepo.js +156 -0
- package/dist/routes/scanworkspace.js +167 -0
- package/dist/routes/stopcmd.js +203 -0
- package/dist/routes/turborepoexist.js +31 -0
- package/dist/routes/updateworkspace.js +50 -0
- package/dist/routes/vscodeHideShow.js +129 -0
- package/package.json +47 -0
- package/public/assets/index-DjKHu3u0.css +1 -0
- package/public/assets/index-L0znsqFE.js +100 -0
- package/public/index.html +30 -0
- package/public/og-image.png +0 -0
- package/public/vite.svg +1 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const M of document.querySelectorAll('link[rel="modulepreload"]'))m(M);new MutationObserver(M=>{for(const K of M)if(K.type==="childList")for(const z of K.addedNodes)z.tagName==="LINK"&&z.rel==="modulepreload"&&m(z)}).observe(document,{childList:!0,subtree:!0});function v(M){const K={};return M.integrity&&(K.integrity=M.integrity),M.referrerPolicy&&(K.referrerPolicy=M.referrerPolicy),M.crossOrigin==="use-credentials"?K.credentials="include":M.crossOrigin==="anonymous"?K.credentials="omit":K.credentials="same-origin",K}function m(M){if(M.ep)return;M.ep=!0;const K=v(M);fetch(M.href,K)}})();function Fd(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var Xo={exports:{}},tn={};var Sd;function kp(){if(Sd)return tn;Sd=1;var p=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function v(m,M,K){var z=null;if(K!==void 0&&(z=""+K),M.key!==void 0&&(z=""+M.key),"key"in M){K={};for(var u in M)u!=="key"&&(K[u]=M[u])}else K=M;return M=K.ref,{$$typeof:p,type:m,key:z,ref:M!==void 0?M:null,props:K}}return tn.Fragment=f,tn.jsx=v,tn.jsxs=v,tn}var yd;function Lp(){return yd||(yd=1,Xo.exports=kp()),Xo.exports}var j=Lp(),Go={exports:{}},Se={};var bd;function Op(){if(bd)return Se;bd=1;var p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),z=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),y=Symbol.iterator;function x(k){return k===null||typeof k!="object"?null:(k=y&&k[y]||k["@@iterator"],typeof k=="function"?k:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,a={};function c(k,Y,ee){this.props=k,this.context=Y,this.refs=a,this.updater=ee||A}c.prototype.isReactComponent={},c.prototype.setState=function(k,Y){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,Y,"setState")},c.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function l(){}l.prototype=c.prototype;function o(k,Y,ee){this.props=k,this.context=Y,this.refs=a,this.updater=ee||A}var g=o.prototype=new l;g.constructor=o,E(g,c.prototype),g.isPureReactComponent=!0;var w=Array.isArray;function T(){}var D={H:null,A:null,T:null,S:null},b=Object.prototype.hasOwnProperty;function R(k,Y,ee){var oe=ee.ref;return{$$typeof:p,type:k,key:Y,ref:oe!==void 0?oe:null,props:ee}}function U(k,Y){return R(k.type,Y,k.props)}function W(k){return typeof k=="object"&&k!==null&&k.$$typeof===p}function H(k){var Y={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ee){return Y[ee]})}var V=/\/+/g;function se(k,Y){return typeof k=="object"&&k!==null&&k.key!=null?H(""+k.key):Y.toString(36)}function ae(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(T,T):(k.status="pending",k.then(function(Y){k.status==="pending"&&(k.status="fulfilled",k.value=Y)},function(Y){k.status==="pending"&&(k.status="rejected",k.reason=Y)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function P(k,Y,ee,oe,ue){var de=typeof k;(de==="undefined"||de==="boolean")&&(k=null);var O=!1;if(k===null)O=!0;else switch(de){case"bigint":case"string":case"number":O=!0;break;case"object":switch(k.$$typeof){case p:case f:O=!0;break;case S:return O=k._init,P(O(k._payload),Y,ee,oe,ue)}}if(O)return ue=ue(k),O=oe===""?"."+se(k,0):oe,w(ue)?(ee="",O!=null&&(ee=O.replace(V,"$&/")+"/"),P(ue,Y,ee,"",function(ne){return ne})):ue!=null&&(W(ue)&&(ue=U(ue,ee+(ue.key==null||k&&k.key===ue.key?"":(""+ue.key).replace(V,"$&/")+"/")+O)),Y.push(ue)),1;O=0;var Q=oe===""?".":oe+":";if(w(k))for(var ie=0;ie<k.length;ie++)oe=k[ie],de=Q+se(oe,ie),O+=P(oe,Y,ee,de,ue);else if(ie=x(k),typeof ie=="function")for(k=ie.call(k),ie=0;!(oe=k.next()).done;)oe=oe.value,de=Q+se(oe,ie++),O+=P(oe,Y,ee,de,ue);else if(de==="object"){if(typeof k.then=="function")return P(ae(k),Y,ee,oe,ue);throw Y=String(k),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return O}function G(k,Y,ee){if(k==null)return k;var oe=[],ue=0;return P(k,oe,"","",function(de){return Y.call(ee,de,ue++)}),oe}function L(k){if(k._status===-1){var Y=k._result;Y=Y(),Y.then(function(ee){(k._status===0||k._status===-1)&&(k._status=1,k._result=ee)},function(ee){(k._status===0||k._status===-1)&&(k._status=2,k._result=ee)}),k._status===-1&&(k._status=0,k._result=Y)}if(k._status===1)return k._result.default;throw k._result}var N=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},q={map:G,forEach:function(k,Y,ee){G(k,function(){Y.apply(this,arguments)},ee)},count:function(k){var Y=0;return G(k,function(){Y++}),Y},toArray:function(k){return G(k,function(Y){return Y})||[]},only:function(k){if(!W(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Se.Activity=h,Se.Children=q,Se.Component=c,Se.Fragment=v,Se.Profiler=M,Se.PureComponent=o,Se.StrictMode=m,Se.Suspense=d,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Se.__COMPILER_RUNTIME={__proto__:null,c:function(k){return D.H.useMemoCache(k)}},Se.cache=function(k){return function(){return k.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(k,Y,ee){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var oe=E({},k.props),ue=k.key;if(Y!=null)for(de in Y.key!==void 0&&(ue=""+Y.key),Y)!b.call(Y,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&Y.ref===void 0||(oe[de]=Y[de]);var de=arguments.length-2;if(de===1)oe.children=ee;else if(1<de){for(var O=Array(de),Q=0;Q<de;Q++)O[Q]=arguments[Q+2];oe.children=O}return R(k.type,ue,oe)},Se.createContext=function(k){return k={$$typeof:z,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:K,_context:k},k},Se.createElement=function(k,Y,ee){var oe,ue={},de=null;if(Y!=null)for(oe in Y.key!==void 0&&(de=""+Y.key),Y)b.call(Y,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(ue[oe]=Y[oe]);var O=arguments.length-2;if(O===1)ue.children=ee;else if(1<O){for(var Q=Array(O),ie=0;ie<O;ie++)Q[ie]=arguments[ie+2];ue.children=Q}if(k&&k.defaultProps)for(oe in O=k.defaultProps,O)ue[oe]===void 0&&(ue[oe]=O[oe]);return R(k,de,ue)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(k){return{$$typeof:u,render:k}},Se.isValidElement=W,Se.lazy=function(k){return{$$typeof:S,_payload:{_status:-1,_result:k},_init:L}},Se.memo=function(k,Y){return{$$typeof:_,type:k,compare:Y===void 0?null:Y}},Se.startTransition=function(k){var Y=D.T,ee={};D.T=ee;try{var oe=k(),ue=D.S;ue!==null&&ue(ee,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(T,N)}catch(de){N(de)}finally{Y!==null&&ee.types!==null&&(Y.types=ee.types),D.T=Y}},Se.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Se.use=function(k){return D.H.use(k)},Se.useActionState=function(k,Y,ee){return D.H.useActionState(k,Y,ee)},Se.useCallback=function(k,Y){return D.H.useCallback(k,Y)},Se.useContext=function(k){return D.H.useContext(k)},Se.useDebugValue=function(){},Se.useDeferredValue=function(k,Y){return D.H.useDeferredValue(k,Y)},Se.useEffect=function(k,Y){return D.H.useEffect(k,Y)},Se.useEffectEvent=function(k){return D.H.useEffectEvent(k)},Se.useId=function(){return D.H.useId()},Se.useImperativeHandle=function(k,Y,ee){return D.H.useImperativeHandle(k,Y,ee)},Se.useInsertionEffect=function(k,Y){return D.H.useInsertionEffect(k,Y)},Se.useLayoutEffect=function(k,Y){return D.H.useLayoutEffect(k,Y)},Se.useMemo=function(k,Y){return D.H.useMemo(k,Y)},Se.useOptimistic=function(k,Y){return D.H.useOptimistic(k,Y)},Se.useReducer=function(k,Y,ee){return D.H.useReducer(k,Y,ee)},Se.useRef=function(k){return D.H.useRef(k)},Se.useState=function(k){return D.H.useState(k)},Se.useSyncExternalStore=function(k,Y,ee){return D.H.useSyncExternalStore(k,Y,ee)},Se.useTransition=function(){return D.H.useTransition()},Se.version="19.2.3",Se}var Cd;function ln(){return Cd||(Cd=1,Go.exports=Op()),Go.exports}var ve=ln();const Bp=Fd(ve);var Qo={exports:{}},sn={},Zo={exports:{}},Jo={};var wd;function Mp(){return wd||(wd=1,(function(p){function f(P,G){var L=P.length;P.push(G);e:for(;0<L;){var N=L-1>>>1,q=P[N];if(0<M(q,G))P[N]=G,P[L]=q,L=N;else break e}}function v(P){return P.length===0?null:P[0]}function m(P){if(P.length===0)return null;var G=P[0],L=P.pop();if(L!==G){P[0]=L;e:for(var N=0,q=P.length,k=q>>>1;N<k;){var Y=2*(N+1)-1,ee=P[Y],oe=Y+1,ue=P[oe];if(0>M(ee,L))oe<q&&0>M(ue,ee)?(P[N]=ue,P[oe]=L,N=oe):(P[N]=ee,P[Y]=L,N=Y);else if(oe<q&&0>M(ue,L))P[N]=ue,P[oe]=L,N=oe;else break e}}return G}function M(P,G){var L=P.sortIndex-G.sortIndex;return L!==0?L:P.id-G.id}if(p.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var K=performance;p.unstable_now=function(){return K.now()}}else{var z=Date,u=z.now();p.unstable_now=function(){return z.now()-u}}var d=[],_=[],S=1,h=null,y=3,x=!1,A=!1,E=!1,a=!1,c=typeof setTimeout=="function"?setTimeout:null,l=typeof clearTimeout=="function"?clearTimeout:null,o=typeof setImmediate<"u"?setImmediate:null;function g(P){for(var G=v(_);G!==null;){if(G.callback===null)m(_);else if(G.startTime<=P)m(_),G.sortIndex=G.expirationTime,f(d,G);else break;G=v(_)}}function w(P){if(E=!1,g(P),!A)if(v(d)!==null)A=!0,T||(T=!0,H());else{var G=v(_);G!==null&&ae(w,G.startTime-P)}}var T=!1,D=-1,b=5,R=-1;function U(){return a?!0:!(p.unstable_now()-R<b)}function W(){if(a=!1,T){var P=p.unstable_now();R=P;var G=!0;try{e:{A=!1,E&&(E=!1,l(D),D=-1),x=!0;var L=y;try{t:{for(g(P),h=v(d);h!==null&&!(h.expirationTime>P&&U());){var N=h.callback;if(typeof N=="function"){h.callback=null,y=h.priorityLevel;var q=N(h.expirationTime<=P);if(P=p.unstable_now(),typeof q=="function"){h.callback=q,g(P),G=!0;break t}h===v(d)&&m(d),g(P)}else m(d);h=v(d)}if(h!==null)G=!0;else{var k=v(_);k!==null&&ae(w,k.startTime-P),G=!1}}break e}finally{h=null,y=L,x=!1}G=void 0}}finally{G?H():T=!1}}}var H;if(typeof o=="function")H=function(){o(W)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,se=V.port2;V.port1.onmessage=W,H=function(){se.postMessage(null)}}else H=function(){c(W,0)};function ae(P,G){D=c(function(){P(p.unstable_now())},G)}p.unstable_IdlePriority=5,p.unstable_ImmediatePriority=1,p.unstable_LowPriority=4,p.unstable_NormalPriority=3,p.unstable_Profiling=null,p.unstable_UserBlockingPriority=2,p.unstable_cancelCallback=function(P){P.callback=null},p.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<P?Math.floor(1e3/P):5},p.unstable_getCurrentPriorityLevel=function(){return y},p.unstable_next=function(P){switch(y){case 1:case 2:case 3:var G=3;break;default:G=y}var L=y;y=G;try{return P()}finally{y=L}},p.unstable_requestPaint=function(){a=!0},p.unstable_runWithPriority=function(P,G){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var L=y;y=P;try{return G()}finally{y=L}},p.unstable_scheduleCallback=function(P,G,L){var N=p.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?N+L:N):L=N,P){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=L+q,P={id:S++,callback:G,priorityLevel:P,startTime:L,expirationTime:q,sortIndex:-1},L>N?(P.sortIndex=L,f(_,P),v(d)===null&&P===v(_)&&(E?(l(D),D=-1):E=!0,ae(w,L-N))):(P.sortIndex=q,f(d,P),A||x||(A=!0,T||(T=!0,H()))),P},p.unstable_shouldYield=U,p.unstable_wrapCallback=function(P){var G=y;return function(){var L=y;y=G;try{return P.apply(this,arguments)}finally{y=L}}}})(Jo)),Jo}var Ed;function Np(){return Ed||(Ed=1,Zo.exports=Mp()),Zo.exports}var $o={exports:{}},ut={};var xd;function Hp(){if(xd)return ut;xd=1;var p=ln();function f(d){var _="https://react.dev/errors/"+d;if(1<arguments.length){_+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)_+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+d+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function v(){}var m={d:{f:v,r:function(){throw Error(f(522))},D:v,C:v,L:v,m:v,X:v,S:v,M:v},p:0,findDOMNode:null},M=Symbol.for("react.portal");function K(d,_,S){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:h==null?null:""+h,children:d,containerInfo:_,implementation:S}}var z=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,_){if(d==="font")return"";if(typeof _=="string")return _==="use-credentials"?_:""}return ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=m,ut.createPortal=function(d,_){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_||_.nodeType!==1&&_.nodeType!==9&&_.nodeType!==11)throw Error(f(299));return K(d,_,null,S)},ut.flushSync=function(d){var _=z.T,S=m.p;try{if(z.T=null,m.p=2,d)return d()}finally{z.T=_,m.p=S,m.d.f()}},ut.preconnect=function(d,_){typeof d=="string"&&(_?(_=_.crossOrigin,_=typeof _=="string"?_==="use-credentials"?_:"":void 0):_=null,m.d.C(d,_))},ut.prefetchDNS=function(d){typeof d=="string"&&m.d.D(d)},ut.preinit=function(d,_){if(typeof d=="string"&&_&&typeof _.as=="string"){var S=_.as,h=u(S,_.crossOrigin),y=typeof _.integrity=="string"?_.integrity:void 0,x=typeof _.fetchPriority=="string"?_.fetchPriority:void 0;S==="style"?m.d.S(d,typeof _.precedence=="string"?_.precedence:void 0,{crossOrigin:h,integrity:y,fetchPriority:x}):S==="script"&&m.d.X(d,{crossOrigin:h,integrity:y,fetchPriority:x,nonce:typeof _.nonce=="string"?_.nonce:void 0})}},ut.preinitModule=function(d,_){if(typeof d=="string")if(typeof _=="object"&&_!==null){if(_.as==null||_.as==="script"){var S=u(_.as,_.crossOrigin);m.d.M(d,{crossOrigin:S,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0})}}else _==null&&m.d.M(d)},ut.preload=function(d,_){if(typeof d=="string"&&typeof _=="object"&&_!==null&&typeof _.as=="string"){var S=_.as,h=u(S,_.crossOrigin);m.d.L(d,S,{crossOrigin:h,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0,type:typeof _.type=="string"?_.type:void 0,fetchPriority:typeof _.fetchPriority=="string"?_.fetchPriority:void 0,referrerPolicy:typeof _.referrerPolicy=="string"?_.referrerPolicy:void 0,imageSrcSet:typeof _.imageSrcSet=="string"?_.imageSrcSet:void 0,imageSizes:typeof _.imageSizes=="string"?_.imageSizes:void 0,media:typeof _.media=="string"?_.media:void 0})}},ut.preloadModule=function(d,_){if(typeof d=="string")if(_){var S=u(_.as,_.crossOrigin);m.d.m(d,{as:typeof _.as=="string"&&_.as!=="script"?_.as:void 0,crossOrigin:S,integrity:typeof _.integrity=="string"?_.integrity:void 0})}else m.d.m(d)},ut.requestFormReset=function(d){m.d.r(d)},ut.unstable_batchedUpdates=function(d,_){return d(_)},ut.useFormState=function(d,_,S){return z.H.useFormState(d,_,S)},ut.useFormStatus=function(){return z.H.useHostTransitionStatus()},ut.version="19.2.3",ut}var Ad;function zp(){if(Ad)return $o.exports;Ad=1;function p(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p)}catch(f){console.error(f)}}return p(),$o.exports=Hp(),$o.exports}var Td;function jp(){if(Td)return sn;Td=1;var p=Np(),f=ln(),v=zp();function m(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function M(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function K(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 z(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 u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(K(e)!==e)throw Error(m(188))}function _(e){var t=e.alternate;if(!t){if(t=K(e),t===null)throw Error(m(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var n=r.alternate;if(n===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===n.child){for(n=r.child;n;){if(n===i)return d(r),e;if(n===s)return d(r),t;n=n.sibling}throw Error(m(188))}if(i.return!==s.return)i=r,s=n;else{for(var C=!1,B=r.child;B;){if(B===i){C=!0,i=r,s=n;break}if(B===s){C=!0,s=r,i=n;break}B=B.sibling}if(!C){for(B=n.child;B;){if(B===i){C=!0,i=n,s=r;break}if(B===s){C=!0,s=n,i=r;break}B=B.sibling}if(!C)throw Error(m(189))}}if(i.alternate!==s)throw Error(m(190))}if(i.tag!==3)throw Error(m(188));return i.stateNode.current===i?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,y=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function H(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var V=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case c:return"Profiler";case a:return"StrictMode";case w:return"Suspense";case T:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case o:return e.displayName||"Context";case l:return(e._context.displayName||"Context")+".Consumer";case g:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case b:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ae=Array.isArray,P=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=v.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},N=[],q=-1;function k(e){return{current:e}}function Y(e){0>q||(e.current=N[q],N[q]=null,q--)}function ee(e,t){q++,N[q]=e.current,e.current=t}var oe=k(null),ue=k(null),de=k(null),O=k(null);function Q(e,t){switch(ee(de,t),ee(ue,e),ee(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pf(t),e=Wf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(oe),ee(oe,e)}function ie(){Y(oe),Y(ue),Y(de)}function ne(e){e.memoizedState!==null&&ee(O,e);var t=oe.current,i=Wf(t,e.type);t!==i&&(ee(ue,e),ee(oe,i))}function ge(e){ue.current===e&&(Y(oe),Y(ue)),O.current===e&&(Y(O),Zr._currentValue=L)}var he,De;function qe(e){if(he===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||"",De=-1<i.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+he+e+De}var it=!1;function Gt(e,t){if(!e||it)return"";it=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(te){var $=te}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(te){$=te}e.call(ce.prototype)}}else{try{throw Error()}catch(te){$=te}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(te){if(te&&$&&typeof te.stack=="string")return[te.stack,$.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=s.DetermineComponentFrameRoot(),C=n[0],B=n[1];if(C&&B){var I=C.split(`
|
|
4
|
+
`),J=B.split(`
|
|
5
|
+
`);for(r=s=0;s<I.length&&!I[s].includes("DetermineComponentFrameRoot");)s++;for(;r<J.length&&!J[r].includes("DetermineComponentFrameRoot");)r++;if(s===I.length||r===J.length)for(s=I.length-1,r=J.length-1;1<=s&&0<=r&&I[s]!==J[r];)r--;for(;1<=s&&0<=r;s--,r--)if(I[s]!==J[r]){if(s!==1||r!==1)do if(s--,r--,0>r||I[s]!==J[r]){var re=`
|
|
6
|
+
`+I[s].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=s&&0<=r);break}}}finally{it=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?qe(i):""}function we(e,t){switch(e.tag){case 26:case 27:case 5:return qe(e.type);case 16:return qe("Lazy");case 13:return e.child!==t&&t!==null?qe("Suspense Fallback"):qe("Suspense");case 19:return qe("SuspenseList");case 0:case 15:return Gt(e.type,!1);case 11:return Gt(e.type.render,!1);case 1:return Gt(e.type,!0);case 31:return qe("Activity");default:return""}}function bi(e){try{var t="",i=null;do t+=we(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
|
+
Error generating stack: `+s.message+`
|
|
8
|
+
`+s.stack}}var Gi=Object.prototype.hasOwnProperty,Qi=p.unstable_scheduleCallback,Zi=p.unstable_cancelCallback,gs=p.unstable_shouldYield,ft=p.unstable_requestPaint,et=p.unstable_now,kt=p.unstable_getCurrentPriorityLevel,Ci=p.unstable_ImmediatePriority,Ss=p.unstable_UserBlockingPriority,yt=p.unstable_NormalPriority,cr=p.unstable_LowPriority,Wt=p.unstable_IdlePriority,Ji=p.log,Ie=p.unstable_setDisableYieldValue,$i=null,bt=null;function wi(e){if(typeof Ji=="function"&&Ie(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode($i,e)}catch{}}var Ct=Math.clz32?Math.clz32:p_,__=Math.log,v_=Math.LN2;function p_(e){return e>>>=0,e===0?32:31-(__(e)/v_|0)|0}var on=256,cn=262144,un=4194304;function es(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 hn(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,C=e.pingedLanes;e=e.warmLanes;var B=s&134217727;return B!==0?(s=B&~n,s!==0?r=es(s):(C&=B,C!==0?r=es(C):i||(i=B&~e,i!==0&&(r=es(i))))):(B=s&~n,B!==0?r=es(B):C!==0?r=es(C):i||(i=s&~e,i!==0&&(r=es(i)))),r===0?0:t!==0&&t!==r&&(t&n)===0&&(n=r&-r,i=t&-t,n>=i||n===32&&(i&4194048)!==0)?t:r}function ur(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function m_(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 Cc(){var e=un;return un<<=1,(un&62914560)===0&&(un=4194304),e}function Na(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function hr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function g_(e,t,i,s,r,n){var C=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var B=e.entanglements,I=e.expirationTimes,J=e.hiddenUpdates;for(i=C&~i;0<i;){var re=31-Ct(i),ce=1<<re;B[re]=0,I[re]=-1;var $=J[re];if($!==null)for(J[re]=null,re=0;re<$.length;re++){var te=$[re];te!==null&&(te.lane&=-536870913)}i&=~ce}s!==0&&wc(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(C&~t))}function wc(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Ct(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Ec(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Ct(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function xc(e,t){var i=t&-t;return i=(i&42)!==0?1:Ha(i),(i&(e.suspendedLanes|t))!==0?0:i}function Ha(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 za(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ac(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:fd(e.type))}function Tc(e,t){var i=G.p;try{return G.p=e,t()}finally{G.p=i}}var Ei=Math.random().toString(36).slice(2),nt="__reactFiber$"+Ei,dt="__reactProps$"+Ei,ys="__reactContainer$"+Ei,ja="__reactEvents$"+Ei,S_="__reactListeners$"+Ei,y_="__reactHandles$"+Ei,Rc="__reactResources$"+Ei,fr="__reactMarker$"+Ei;function Ua(e){delete e[nt],delete e[dt],delete e[ja],delete e[S_],delete e[y_]}function bs(e){var t=e[nt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ys]||i[nt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Qf(e);e!==null;){if(i=e[nt])return i;e=Qf(e)}return t}e=i,i=e.parentNode}return null}function Cs(e){if(e=e[nt]||e[ys]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function dr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(m(33))}function ws(e){var t=e[Rc];return t||(t=e[Rc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[fr]=!0}var Dc=new Set,kc={};function ts(e,t){Es(e,t),Es(e+"Capture",t)}function Es(e,t){for(kc[e]=t,e=0;e<t.length;e++)Dc.add(t[e])}var b_=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]*$"),Lc={},Oc={};function C_(e){return Gi.call(Oc,e)?!0:Gi.call(Lc,e)?!1:b_.test(e)?Oc[e]=!0:(Lc[e]=!0,!1)}function fn(e,t,i){if(C_(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 dn(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 si(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 Lt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function w_(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 r=s.get,n=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(C){i=""+C,n.call(this,C)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(C){i=""+C},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qa(e){if(!e._valueTracker){var t=Bc(e)?"checked":"value";e._valueTracker=w_(e,t,""+e[t])}}function Mc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Bc(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function _n(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 E_=/[\n"\\]/g;function Ot(e){return e.replace(E_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ia(e,t,i,s,r,n,C,B){e.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.type=C:e.removeAttribute("type"),t!=null?C==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Lt(t)):e.value!==""+Lt(t)&&(e.value=""+Lt(t)):C!=="submit"&&C!=="reset"||e.removeAttribute("value"),t!=null?Pa(e,C,Lt(t)):i!=null?Pa(e,C,Lt(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?e.name=""+Lt(B):e.removeAttribute("name")}function Nc(e,t,i,s,r,n,C,B){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(e.type=n),t!=null||i!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){qa(e);return}i=i!=null?""+Lt(i):"",t=t!=null?""+Lt(t):i,B||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=B?e.checked:!!s,e.defaultChecked=!!s,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(e.name=C),qa(e)}function Pa(e,t,i){t==="number"&&_n(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function xs(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Lt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Hc(e,t,i){if(t!=null&&(t=""+Lt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Lt(i):""}function zc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(m(92));if(ae(s)){if(1<s.length)throw Error(m(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Lt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),qa(e)}function As(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var x_=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 jc(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||x_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Uc(e,t,i){if(t!=null&&typeof t!="object")throw Error(m(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 r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&jc(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&jc(e,n,t[n])}function Wa(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var A_=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"]]),T_=/^[\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 vn(e){return T_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ri(){}var Va=null;function Ya(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ts=null,Rs=null;function qc(e){var t=Cs(e);if(t&&(e=t.stateNode)){var i=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ia(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="'+Ot(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[dt]||null;if(!r)throw Error(m(90));Ia(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Mc(s)}break e;case"textarea":Hc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&xs(e,!!i.multiple,t,!1)}}}var Fa=!1;function Ic(e,t,i){if(Fa)return e(t,i);Fa=!0;try{var s=e(t);return s}finally{if(Fa=!1,(Ts!==null||Rs!==null)&&(ia(),Ts&&(t=Ts,e=Rs,Rs=Ts=null,qc(t),e)))for(t=0;t<e.length;t++)qc(e[t])}}function _r(e,t){var i=e.stateNode;if(i===null)return null;var s=i[dt]||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(m(231,t,typeof i));return i}var ni=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ka=!1;if(ni)try{var vr={};Object.defineProperty(vr,"passive",{get:function(){Ka=!0}}),window.addEventListener("test",vr,vr),window.removeEventListener("test",vr,vr)}catch{Ka=!1}var xi=null,Xa=null,pn=null;function Pc(){if(pn)return pn;var e,t=Xa,i=t.length,s,r="value"in xi?xi.value:xi.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var C=i-e;for(s=1;s<=C&&t[i-s]===r[n-s];s++);return pn=r.slice(e,1<s?1-s:void 0)}function mn(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 gn(){return!0}function Wc(){return!1}function _t(e){function t(i,s,r,n,C){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=C,this.currentTarget=null;for(var B in e)e.hasOwnProperty(B)&&(i=e[B],this[B]=i?i(n):n[B]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?gn:Wc,this.isPropagationStopped=Wc,this}return h(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=gn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=_t(is),pr=h({},is,{view:0,detail:0}),R_=_t(pr),Ga,Qa,mr,yn=h({},pr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ja,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!==mr&&(mr&&e.type==="mousemove"?(Ga=e.screenX-mr.screenX,Qa=e.screenY-mr.screenY):Qa=Ga=0,mr=e),Ga)},movementY:function(e){return"movementY"in e?e.movementY:Qa}}),Vc=_t(yn),D_=h({},yn,{dataTransfer:0}),k_=_t(D_),L_=h({},pr,{relatedTarget:0}),Za=_t(L_),O_=h({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),B_=_t(O_),M_=h({},is,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),N_=_t(M_),H_=h({},is,{data:0}),Yc=_t(H_),z_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},j_={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"},U_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function q_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=U_[e])?!!t[e]:!1}function Ja(){return q_}var I_=h({},pr,{key:function(e){if(e.key){var t=z_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?j_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ja,charCode:function(e){return e.type==="keypress"?mn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),P_=_t(I_),W_=h({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fc=_t(W_),V_=h({},pr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ja}),Y_=_t(V_),F_=h({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),K_=_t(F_),X_=h({},yn,{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}),G_=_t(X_),Q_=h({},is,{newState:0,oldState:0}),Z_=_t(Q_),J_=[9,13,27,32],$a=ni&&"CompositionEvent"in window,gr=null;ni&&"documentMode"in document&&(gr=document.documentMode);var $_=ni&&"TextEvent"in window&&!gr,Kc=ni&&(!$a||gr&&8<gr&&11>=gr),Xc=" ",Gc=!1;function Qc(e,t){switch(e){case"keyup":return J_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ds=!1;function ev(e,t){switch(e){case"compositionend":return Zc(t);case"keypress":return t.which!==32?null:(Gc=!0,Xc);case"textInput":return e=t.data,e===Xc&&Gc?null:e;default:return null}}function tv(e,t){if(Ds)return e==="compositionend"||!$a&&Qc(e,t)?(e=Pc(),pn=Xa=xi=null,Ds=!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 Kc&&t.locale!=="ko"?null:t.data;default:return null}}var iv={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 Jc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!iv[e.type]:t==="textarea"}function $c(e,t,i,s){Ts?Rs?Rs.push(s):Rs=[s]:Ts=s,t=ca(t,"onChange"),0<t.length&&(i=new Sn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Sr=null,yr=null;function sv(e){Hf(e,0)}function bn(e){var t=dr(e);if(Mc(t))return e}function eu(e,t){if(e==="change")return t}var tu=!1;if(ni){var el;if(ni){var tl="oninput"in document;if(!tl){var iu=document.createElement("div");iu.setAttribute("oninput","return;"),tl=typeof iu.oninput=="function"}el=tl}else el=!1;tu=el&&(!document.documentMode||9<document.documentMode)}function su(){Sr&&(Sr.detachEvent("onpropertychange",ru),yr=Sr=null)}function ru(e){if(e.propertyName==="value"&&bn(yr)){var t=[];$c(t,yr,e,Ya(e)),Ic(sv,t)}}function rv(e,t,i){e==="focusin"?(su(),Sr=t,yr=i,Sr.attachEvent("onpropertychange",ru)):e==="focusout"&&su()}function nv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bn(yr)}function av(e,t){if(e==="click")return bn(t)}function lv(e,t){if(e==="input"||e==="change")return bn(t)}function ov(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:ov;function br(e,t){if(wt(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 r=i[s];if(!Gi.call(t,r)||!wt(e[r],t[r]))return!1}return!0}function nu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function au(e,t){var i=nu(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=nu(i)}}function lu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ou(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_n(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=_n(e.document)}return t}function il(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 cv=ni&&"documentMode"in document&&11>=document.documentMode,ks=null,sl=null,Cr=null,rl=!1;function cu(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;rl||ks==null||ks!==_n(s)||(s=ks,"selectionStart"in s&&il(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}),Cr&&br(Cr,s)||(Cr=s,s=ca(sl,"onSelect"),0<s.length&&(t=new Sn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=ks)))}function ss(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ls={animationend:ss("Animation","AnimationEnd"),animationiteration:ss("Animation","AnimationIteration"),animationstart:ss("Animation","AnimationStart"),transitionrun:ss("Transition","TransitionRun"),transitionstart:ss("Transition","TransitionStart"),transitioncancel:ss("Transition","TransitionCancel"),transitionend:ss("Transition","TransitionEnd")},nl={},uu={};ni&&(uu=document.createElement("div").style,"AnimationEvent"in window||(delete Ls.animationend.animation,delete Ls.animationiteration.animation,delete Ls.animationstart.animation),"TransitionEvent"in window||delete Ls.transitionend.transition);function rs(e){if(nl[e])return nl[e];if(!Ls[e])return e;var t=Ls[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in uu)return nl[e]=t[i];return e}var hu=rs("animationend"),fu=rs("animationiteration"),du=rs("animationstart"),uv=rs("transitionrun"),hv=rs("transitionstart"),fv=rs("transitioncancel"),_u=rs("transitionend"),vu=new Map,al="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(" ");al.push("scrollEnd");function Vt(e,t){vu.set(e,t),ts(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)},Bt=[],Os=0,ll=0;function wn(){for(var e=Os,t=ll=Os=0;t<e;){var i=Bt[t];Bt[t++]=null;var s=Bt[t];Bt[t++]=null;var r=Bt[t];Bt[t++]=null;var n=Bt[t];if(Bt[t++]=null,s!==null&&r!==null){var C=s.pending;C===null?r.next=r:(r.next=C.next,C.next=r),s.pending=r}n!==0&&pu(i,r,n)}}function En(e,t,i,s){Bt[Os++]=e,Bt[Os++]=t,Bt[Os++]=i,Bt[Os++]=s,ll|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ol(e,t,i,s){return En(e,t,i,s),xn(e)}function ns(e,t){return En(e,null,null,t),xn(e)}function pu(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,n=e.return;n!==null;)n.childLanes|=i,s=n.alternate,s!==null&&(s.childLanes|=i),n.tag===22&&(e=n.stateNode,e===null||e._visibility&1||(r=!0)),e=n,n=n.return;return e.tag===3?(n=e.stateNode,r&&t!==null&&(r=31-Ct(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function xn(e){if(50<Vr)throw Vr=0,go=null,Error(m(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Bs={};function dv(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 Et(e,t,i,s){return new dv(e,t,i,s)}function cl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ai(e,t){var i=e.alternate;return i===null?(i=Et(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 mu(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 An(e,t,i,s,r,n){var C=0;if(s=e,typeof e=="function")cl(e)&&(C=1);else if(typeof e=="string")C=gp(e,i,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=Et(31,i,t,r),e.elementType=R,e.lanes=n,e;case E:return as(i.children,r,n,t);case a:C=8,r|=24;break;case c:return e=Et(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case w:return e=Et(13,i,t,r),e.elementType=w,e.lanes=n,e;case T:return e=Et(19,i,t,r),e.elementType=T,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case o:C=10;break e;case l:C=9;break e;case g:C=11;break e;case D:C=14;break e;case b:C=16,s=null;break e}C=29,i=Error(m(130,e===null?"null":typeof e,"")),s=null}return t=Et(C,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function as(e,t,i,s){return e=Et(7,e,s,t),e.lanes=i,e}function ul(e,t,i){return e=Et(6,e,null,t),e.lanes=i,e}function gu(e){var t=Et(18,null,null,0);return t.stateNode=e,t}function hl(e,t,i){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Su=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var i=Su.get(e);return i!==void 0?i:(t={value:e,source:t,stack:bi(t)},Su.set(e,t),t)}return{value:e,source:t,stack:bi(t)}}var Ms=[],Ns=0,Tn=null,wr=0,Nt=[],Ht=0,Ai=null,Qt=1,Zt="";function li(e,t){Ms[Ns++]=wr,Ms[Ns++]=Tn,Tn=e,wr=t}function yu(e,t,i){Nt[Ht++]=Qt,Nt[Ht++]=Zt,Nt[Ht++]=Ai,Ai=e;var s=Qt;e=Zt;var r=32-Ct(s)-1;s&=~(1<<r),i+=1;var n=32-Ct(t)+r;if(30<n){var C=r-r%5;n=(s&(1<<C)-1).toString(32),s>>=C,r-=C,Qt=1<<32-Ct(t)+r|i<<r|s,Zt=n+e}else Qt=1<<n|i<<r|s,Zt=e}function fl(e){e.return!==null&&(li(e,1),yu(e,1,0))}function dl(e){for(;e===Tn;)Tn=Ms[--Ns],Ms[Ns]=null,wr=Ms[--Ns],Ms[Ns]=null;for(;e===Ai;)Ai=Nt[--Ht],Nt[Ht]=null,Zt=Nt[--Ht],Nt[Ht]=null,Qt=Nt[--Ht],Nt[Ht]=null}function bu(e,t){Nt[Ht++]=Qt,Nt[Ht++]=Zt,Nt[Ht++]=Ai,Qt=t.id,Zt=t.overflow,Ai=e}var at=null,Pe=null,Re=!1,Ti=null,zt=!1,_l=Error(m(519));function Ri(e){var t=Error(m(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Er(Mt(t,e)),_l}function Cu(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[nt]=e,t[dt]=s,i){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(i=0;i<Fr.length;i++)xe(Fr[i],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),Nc(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),zc(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||qf(t.textContent,i)?(s.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),s.onScroll!=null&&xe("scroll",t),s.onScrollEnd!=null&&xe("scrollend",t),s.onClick!=null&&(t.onclick=ri),t=!0):t=!1,t||Ri(e,!0)}function wu(e){for(at=e.return;at;)switch(at.tag){case 5:case 31:case 13:zt=!1;return;case 27:case 3:zt=!0;return;default:at=at.return}}function Hs(e){if(e!==at)return!1;if(!Re)return wu(e),Re=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Bo(e.type,e.memoizedProps)),i=!i),i&&Pe&&Ri(e),wu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(317));Pe=Gf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(317));Pe=Gf(e)}else t===27?(t=Pe,Pi(e.type)?(e=jo,jo=null,Pe=e):Pe=t):Pe=at?Ut(e.stateNode.nextSibling):null;return!0}function ls(){Pe=at=null,Re=!1}function vl(){var e=Ti;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),Ti=null),e}function Er(e){Ti===null?Ti=[e]:Ti.push(e)}var pl=k(null),os=null,oi=null;function Di(e,t,i){ee(pl,t._currentValue),t._currentValue=i}function ci(e){e._currentValue=pl.current,Y(pl)}function ml(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 gl(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var C=r.child;n=n.firstContext;e:for(;n!==null;){var B=n;n=r;for(var I=0;I<t.length;I++)if(B.context===t[I]){n.lanes|=i,B=n.alternate,B!==null&&(B.lanes|=i),ml(n.return,i,e),s||(C=null);break e}n=B.next}}else if(r.tag===18){if(C=r.return,C===null)throw Error(m(341));C.lanes|=i,n=C.alternate,n!==null&&(n.lanes|=i),ml(C,i,e),C=null}else C=r.child;if(C!==null)C.return=r;else for(C=r;C!==null;){if(C===e){C=null;break}if(r=C.sibling,r!==null){r.return=C.return,C=r;break}C=C.return}r=C}}function zs(e,t,i,s){e=null;for(var r=t,n=!1;r!==null;){if(!n){if((r.flags&524288)!==0)n=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var C=r.alternate;if(C===null)throw Error(m(387));if(C=C.memoizedProps,C!==null){var B=r.type;wt(r.pendingProps.value,C.value)||(e!==null?e.push(B):e=[B])}}else if(r===O.current){if(C=r.alternate,C===null)throw Error(m(387));C.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Zr):e=[Zr])}r=r.return}e!==null&&gl(t,e,i,s),t.flags|=262144}function Rn(e){for(e=e.firstContext;e!==null;){if(!wt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function cs(e){os=e,oi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function lt(e){return Eu(os,e)}function Dn(e,t){return os===null&&cs(e),Eu(e,t)}function Eu(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},oi===null){if(e===null)throw Error(m(308));oi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else oi=oi.next=t;return i}var _v=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()})}},vv=p.unstable_scheduleCallback,pv=p.unstable_NormalPriority,Ge={$$typeof:o,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sl(){return{controller:new _v,data:new Map,refCount:0}}function xr(e){e.refCount--,e.refCount===0&&vv(pv,function(){e.controller.abort()})}var Ar=null,yl=0,js=0,Us=null;function mv(e,t){if(Ar===null){var i=Ar=[];yl=0,js=Eo(),Us={status:"pending",value:void 0,then:function(s){i.push(s)}}}return yl++,t.then(xu,xu),t}function xu(){if(--yl===0&&Ar!==null){Us!==null&&(Us.status="fulfilled");var e=Ar;Ar=null,js=0,Us=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gv(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var Au=P.S;P.S=function(e,t){uf=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&mv(e,t),Au!==null&&Au(e,t)};var us=k(null);function bl(){var e=us.current;return e!==null?e:Ue.pooledCache}function kn(e,t){t===null?ee(us,us.current):ee(us,t.pool)}function Tu(){var e=bl();return e===null?null:{parent:Ge._currentValue,pool:e}}var qs=Error(m(460)),Cl=Error(m(474)),Ln=Error(m(542)),On={then:function(){}};function Ru(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Du(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ri,ri),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lu(e),e;default:if(typeof t.status=="string")t.then(ri,ri);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(m(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lu(e),e}throw fs=t,qs}}function hs(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(fs=i,qs):i}}var fs=null;function ku(){if(fs===null)throw Error(m(459));var e=fs;return fs=null,e}function Lu(e){if(e===qs||e===Ln)throw Error(m(483))}var Is=null,Tr=0;function Bn(e){var t=Tr;return Tr+=1,Is===null&&(Is=[]),Du(Is,e,t)}function Rr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Mn(e,t){throw t.$$typeof===y?Error(m(525)):(e=Object.prototype.toString.call(t),Error(m(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ou(e){function t(X,F){if(e){var Z=X.deletions;Z===null?(X.deletions=[F],X.flags|=16):Z.push(F)}}function i(X,F){if(!e)return null;for(;F!==null;)t(X,F),F=F.sibling;return null}function s(X){for(var F=new Map;X!==null;)X.key!==null?F.set(X.key,X):F.set(X.index,X),X=X.sibling;return F}function r(X,F){return X=ai(X,F),X.index=0,X.sibling=null,X}function n(X,F,Z){return X.index=Z,e?(Z=X.alternate,Z!==null?(Z=Z.index,Z<F?(X.flags|=67108866,F):Z):(X.flags|=67108866,F)):(X.flags|=1048576,F)}function C(X){return e&&X.alternate===null&&(X.flags|=67108866),X}function B(X,F,Z,le){return F===null||F.tag!==6?(F=ul(Z,X.mode,le),F.return=X,F):(F=r(F,Z),F.return=X,F)}function I(X,F,Z,le){var pe=Z.type;return pe===E?re(X,F,Z.props.children,le,Z.key):F!==null&&(F.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===b&&hs(pe)===F.type)?(F=r(F,Z.props),Rr(F,Z),F.return=X,F):(F=An(Z.type,Z.key,Z.props,null,X.mode,le),Rr(F,Z),F.return=X,F)}function J(X,F,Z,le){return F===null||F.tag!==4||F.stateNode.containerInfo!==Z.containerInfo||F.stateNode.implementation!==Z.implementation?(F=hl(Z,X.mode,le),F.return=X,F):(F=r(F,Z.children||[]),F.return=X,F)}function re(X,F,Z,le,pe){return F===null||F.tag!==7?(F=as(Z,X.mode,le,pe),F.return=X,F):(F=r(F,Z),F.return=X,F)}function ce(X,F,Z){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=ul(""+F,X.mode,Z),F.return=X,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case x:return Z=An(F.type,F.key,F.props,null,X.mode,Z),Rr(Z,F),Z.return=X,Z;case A:return F=hl(F,X.mode,Z),F.return=X,F;case b:return F=hs(F),ce(X,F,Z)}if(ae(F)||H(F))return F=as(F,X.mode,Z,null),F.return=X,F;if(typeof F.then=="function")return ce(X,Bn(F),Z);if(F.$$typeof===o)return ce(X,Dn(X,F),Z);Mn(X,F)}return null}function $(X,F,Z,le){var pe=F!==null?F.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return pe!==null?null:B(X,F,""+Z,le);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case x:return Z.key===pe?I(X,F,Z,le):null;case A:return Z.key===pe?J(X,F,Z,le):null;case b:return Z=hs(Z),$(X,F,Z,le)}if(ae(Z)||H(Z))return pe!==null?null:re(X,F,Z,le,null);if(typeof Z.then=="function")return $(X,F,Bn(Z),le);if(Z.$$typeof===o)return $(X,F,Dn(X,Z),le);Mn(X,Z)}return null}function te(X,F,Z,le,pe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return X=X.get(Z)||null,B(F,X,""+le,pe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case x:return X=X.get(le.key===null?Z:le.key)||null,I(F,X,le,pe);case A:return X=X.get(le.key===null?Z:le.key)||null,J(F,X,le,pe);case b:return le=hs(le),te(X,F,Z,le,pe)}if(ae(le)||H(le))return X=X.get(Z)||null,re(F,X,le,pe,null);if(typeof le.then=="function")return te(X,F,Z,Bn(le),pe);if(le.$$typeof===o)return te(X,F,Z,Dn(F,le),pe);Mn(F,le)}return null}function fe(X,F,Z,le){for(var pe=null,ke=null,_e=F,be=F=0,Te=null;_e!==null&&be<Z.length;be++){_e.index>be?(Te=_e,_e=null):Te=_e.sibling;var Le=$(X,_e,Z[be],le);if(Le===null){_e===null&&(_e=Te);break}e&&_e&&Le.alternate===null&&t(X,_e),F=n(Le,F,be),ke===null?pe=Le:ke.sibling=Le,ke=Le,_e=Te}if(be===Z.length)return i(X,_e),Re&&li(X,be),pe;if(_e===null){for(;be<Z.length;be++)_e=ce(X,Z[be],le),_e!==null&&(F=n(_e,F,be),ke===null?pe=_e:ke.sibling=_e,ke=_e);return Re&&li(X,be),pe}for(_e=s(_e);be<Z.length;be++)Te=te(_e,X,be,Z[be],le),Te!==null&&(e&&Te.alternate!==null&&_e.delete(Te.key===null?be:Te.key),F=n(Te,F,be),ke===null?pe=Te:ke.sibling=Te,ke=Te);return e&&_e.forEach(function(Ki){return t(X,Ki)}),Re&&li(X,be),pe}function me(X,F,Z,le){if(Z==null)throw Error(m(151));for(var pe=null,ke=null,_e=F,be=F=0,Te=null,Le=Z.next();_e!==null&&!Le.done;be++,Le=Z.next()){_e.index>be?(Te=_e,_e=null):Te=_e.sibling;var Ki=$(X,_e,Le.value,le);if(Ki===null){_e===null&&(_e=Te);break}e&&_e&&Ki.alternate===null&&t(X,_e),F=n(Ki,F,be),ke===null?pe=Ki:ke.sibling=Ki,ke=Ki,_e=Te}if(Le.done)return i(X,_e),Re&&li(X,be),pe;if(_e===null){for(;!Le.done;be++,Le=Z.next())Le=ce(X,Le.value,le),Le!==null&&(F=n(Le,F,be),ke===null?pe=Le:ke.sibling=Le,ke=Le);return Re&&li(X,be),pe}for(_e=s(_e);!Le.done;be++,Le=Z.next())Le=te(_e,X,be,Le.value,le),Le!==null&&(e&&Le.alternate!==null&&_e.delete(Le.key===null?be:Le.key),F=n(Le,F,be),ke===null?pe=Le:ke.sibling=Le,ke=Le);return e&&_e.forEach(function(Dp){return t(X,Dp)}),Re&&li(X,be),pe}function je(X,F,Z,le){if(typeof Z=="object"&&Z!==null&&Z.type===E&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case x:e:{for(var pe=Z.key;F!==null;){if(F.key===pe){if(pe=Z.type,pe===E){if(F.tag===7){i(X,F.sibling),le=r(F,Z.props.children),le.return=X,X=le;break e}}else if(F.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===b&&hs(pe)===F.type){i(X,F.sibling),le=r(F,Z.props),Rr(le,Z),le.return=X,X=le;break e}i(X,F);break}else t(X,F);F=F.sibling}Z.type===E?(le=as(Z.props.children,X.mode,le,Z.key),le.return=X,X=le):(le=An(Z.type,Z.key,Z.props,null,X.mode,le),Rr(le,Z),le.return=X,X=le)}return C(X);case A:e:{for(pe=Z.key;F!==null;){if(F.key===pe)if(F.tag===4&&F.stateNode.containerInfo===Z.containerInfo&&F.stateNode.implementation===Z.implementation){i(X,F.sibling),le=r(F,Z.children||[]),le.return=X,X=le;break e}else{i(X,F);break}else t(X,F);F=F.sibling}le=hl(Z,X.mode,le),le.return=X,X=le}return C(X);case b:return Z=hs(Z),je(X,F,Z,le)}if(ae(Z))return fe(X,F,Z,le);if(H(Z)){if(pe=H(Z),typeof pe!="function")throw Error(m(150));return Z=pe.call(Z),me(X,F,Z,le)}if(typeof Z.then=="function")return je(X,F,Bn(Z),le);if(Z.$$typeof===o)return je(X,F,Dn(X,Z),le);Mn(X,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,F!==null&&F.tag===6?(i(X,F.sibling),le=r(F,Z),le.return=X,X=le):(i(X,F),le=ul(Z,X.mode,le),le.return=X,X=le),C(X)):i(X,F)}return function(X,F,Z,le){try{Tr=0;var pe=je(X,F,Z,le);return Is=null,pe}catch(_e){if(_e===qs||_e===Ln)throw _e;var ke=Et(29,_e,null,X.mode);return ke.lanes=le,ke.return=X,ke}}}var ds=Ou(!0),Bu=Ou(!1),ki=!1;function wl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function El(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 Li(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Oi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Oe&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=xn(e),pu(e,null,i),t}return En(e,s,t,i),xn(e)}function Dr(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,Ec(e,i)}}function xl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,n=null;if(i=i.firstBaseUpdate,i!==null){do{var C={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=C:n=n.next=C,i=i.next}while(i!==null);n===null?r=n=t:n=n.next=t}else r=n=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:n,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 Al=!1;function kr(){if(Al){var e=Us;if(e!==null)throw e}}function Lr(e,t,i,s){Al=!1;var r=e.updateQueue;ki=!1;var n=r.firstBaseUpdate,C=r.lastBaseUpdate,B=r.shared.pending;if(B!==null){r.shared.pending=null;var I=B,J=I.next;I.next=null,C===null?n=J:C.next=J,C=I;var re=e.alternate;re!==null&&(re=re.updateQueue,B=re.lastBaseUpdate,B!==C&&(B===null?re.firstBaseUpdate=J:B.next=J,re.lastBaseUpdate=I))}if(n!==null){var ce=r.baseState;C=0,re=J=I=null,B=n;do{var $=B.lane&-536870913,te=$!==B.lane;if(te?(Ae&$)===$:(s&$)===$){$!==0&&$===js&&(Al=!0),re!==null&&(re=re.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var fe=e,me=B;$=t;var je=i;switch(me.tag){case 1:if(fe=me.payload,typeof fe=="function"){ce=fe.call(je,ce,$);break e}ce=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=me.payload,$=typeof fe=="function"?fe.call(je,ce,$):fe,$==null)break e;ce=h({},ce,$);break e;case 2:ki=!0}}$=B.callback,$!==null&&(e.flags|=64,te&&(e.flags|=8192),te=r.callbacks,te===null?r.callbacks=[$]:te.push($))}else te={lane:$,tag:B.tag,payload:B.payload,callback:B.callback,next:null},re===null?(J=re=te,I=ce):re=re.next=te,C|=$;if(B=B.next,B===null){if(B=r.shared.pending,B===null)break;te=B,B=te.next,te.next=null,r.lastBaseUpdate=te,r.shared.pending=null}}while(!0);re===null&&(I=ce),r.baseState=I,r.firstBaseUpdate=J,r.lastBaseUpdate=re,n===null&&(r.shared.lanes=0),zi|=C,e.lanes=C,e.memoizedState=ce}}function Mu(e,t){if(typeof e!="function")throw Error(m(191,e));e.call(t)}function Nu(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Mu(i[e],t)}var Ps=k(null),Nn=k(0);function Hu(e,t){e=gi,ee(Nn,e),ee(Ps,t),gi=e|t.baseLanes}function Tl(){ee(Nn,gi),ee(Ps,Ps.current)}function Rl(){gi=Nn.current,Y(Ps),Y(Nn)}var xt=k(null),jt=null;function Bi(e){var t=e.alternate;ee(Ke,Ke.current&1),ee(xt,e),jt===null&&(t===null||Ps.current!==null||t.memoizedState!==null)&&(jt=e)}function Dl(e){ee(Ke,Ke.current),ee(xt,e),jt===null&&(jt=e)}function zu(e){e.tag===22?(ee(Ke,Ke.current),ee(xt,e),jt===null&&(jt=e)):Mi()}function Mi(){ee(Ke,Ke.current),ee(xt,xt.current)}function At(e){Y(xt),jt===e&&(jt=null),Y(Ke)}var Ke=k(0);function Hn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Ho(i)||zo(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 ui=0,ye=null,He=null,Qe=null,zn=!1,Ws=!1,_s=!1,jn=0,Or=0,Vs=null,Sv=0;function Ye(){throw Error(m(321))}function kl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!wt(e[i],t[i]))return!1;return!0}function Ll(e,t,i,s,r,n){return ui=n,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?yh:Fl,_s=!1,n=i(s,r),_s=!1,Ws&&(n=Uu(t,i,s,r)),ju(e),n}function ju(e){P.H=Nr;var t=He!==null&&He.next!==null;if(ui=0,Qe=He=ye=null,zn=!1,Or=0,Vs=null,t)throw Error(m(300));e===null||Ze||(e=e.dependencies,e!==null&&Rn(e)&&(Ze=!0))}function Uu(e,t,i,s){ye=e;var r=0;do{if(Ws&&(Vs=null),Or=0,Ws=!1,25<=r)throw Error(m(301));if(r+=1,Qe=He=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}P.H=bh,n=t(i,s)}while(Ws);return n}function yv(){var e=P.H,t=e.useState()[0];return t=typeof t.then=="function"?Br(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(ye.flags|=1024),t}function Ol(){var e=jn!==0;return jn=0,e}function Bl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Ml(e){if(zn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zn=!1}ui=0,Qe=He=ye=null,Ws=!1,Or=jn=0,Vs=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?ye.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function Xe(){if(He===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=Qe===null?ye.memoizedState:Qe.next;if(t!==null)Qe=t,He=e;else{if(e===null)throw ye.alternate===null?Error(m(467)):Error(m(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},Qe===null?ye.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function Un(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Br(e){var t=Or;return Or+=1,Vs===null&&(Vs=[]),e=Du(Vs,e,t),t=ye,(Qe===null?t.memoizedState:Qe.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?yh:Fl),e}function qn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Br(e);if(e.$$typeof===o)return lt(e)}throw Error(m(438,String(e)))}function Nl(e){var t=null,i=ye.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=ye.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Un(),ye.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]=U;return t.index++,i}function hi(e,t){return typeof t=="function"?t(e):t}function In(e){var t=Xe();return Hl(t,He,e)}function Hl(e,t,i){var s=e.queue;if(s===null)throw Error(m(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var C=r.next;r.next=n.next,n.next=C}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var B=C=null,I=null,J=t,re=!1;do{var ce=J.lane&-536870913;if(ce!==J.lane?(Ae&ce)===ce:(ui&ce)===ce){var $=J.revertLane;if($===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),ce===js&&(re=!0);else if((ui&$)===$){J=J.next,$===js&&(re=!0);continue}else ce={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},I===null?(B=I=ce,C=n):I=I.next=ce,ye.lanes|=$,zi|=$;ce=J.action,_s&&i(n,ce),n=J.hasEagerState?J.eagerState:i(n,ce)}else $={lane:ce,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},I===null?(B=I=$,C=n):I=I.next=$,ye.lanes|=ce,zi|=ce;J=J.next}while(J!==null&&J!==t);if(I===null?C=n:I.next=B,!wt(n,e.memoizedState)&&(Ze=!0,re&&(i=Us,i!==null)))throw i;e.memoizedState=n,e.baseState=C,e.baseQueue=I,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function zl(e){var t=Xe(),i=t.queue;if(i===null)throw Error(m(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var C=r=r.next;do n=e(n,C.action),C=C.next;while(C!==r);wt(n,t.memoizedState)||(Ze=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function qu(e,t,i){var s=ye,r=Xe(),n=Re;if(n){if(i===void 0)throw Error(m(407));i=i()}else i=t();var C=!wt((He||r).memoizedState,i);if(C&&(r.memoizedState=i,Ze=!0),r=r.queue,ql(Wu.bind(null,s,r,e),[e]),r.getSnapshot!==t||C||Qe!==null&&Qe.memoizedState.tag&1){if(s.flags|=2048,Ys(9,{destroy:void 0},Pu.bind(null,s,r,i,t),null),Ue===null)throw Error(m(349));n||(ui&127)!==0||Iu(s,t,i)}return i}function Iu(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=ye.updateQueue,t===null?(t=Un(),ye.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Pu(e,t,i,s){t.value=i,t.getSnapshot=s,Vu(t)&&Yu(e)}function Wu(e,t,i){return i(function(){Vu(t)&&Yu(e)})}function Vu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!wt(e,i)}catch{return!0}}function Yu(e){var t=ns(e,2);t!==null&&St(t,e,2)}function jl(e){var t=ht();if(typeof e=="function"){var i=e;if(e=i(),_s){wi(!0);try{i()}finally{wi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:e},t}function Fu(e,t,i,s){return e.baseState=i,Hl(e,He,typeof s=="function"?s:hi)}function bv(e,t,i,s,r){if(Vn(e))throw Error(m(485));if(e=t.action,e!==null){var n={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){n.listeners.push(C)}};P.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,Ku(t,n)):(n.next=i.next,t.pending=i.next=n)}}function Ku(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=P.T,C={};P.T=C;try{var B=i(r,s),I=P.S;I!==null&&I(C,B),Xu(e,t,B)}catch(J){Ul(e,t,J)}finally{n!==null&&C.types!==null&&(n.types=C.types),P.T=n}}else try{n=i(r,s),Xu(e,t,n)}catch(J){Ul(e,t,J)}}function Xu(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Gu(e,t,s)},function(s){return Ul(e,t,s)}):Gu(e,t,i)}function Gu(e,t,i){t.status="fulfilled",t.value=i,Qu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Ku(e,i)))}function Ul(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Qu(t),t=t.next;while(t!==s)}e.action=null}function Qu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zu(e,t){return t}function Ju(e,t){if(Re){var i=Ue.formState;if(i!==null){e:{var s=ye;if(Re){if(Pe){t:{for(var r=Pe,n=zt;r.nodeType!==8;){if(!n){r=null;break t}if(r=Ut(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){Pe=Ut(r.nextSibling),s=r.data==="F!";break e}}Ri(s)}s=!1}s&&(t=i[0])}}return i=ht(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zu,lastRenderedState:t},i.queue=s,i=mh.bind(null,ye,s),s.dispatch=i,s=jl(!1),n=Yl.bind(null,ye,!1,s.queue),s=ht(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=bv.bind(null,ye,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function $u(e){var t=Xe();return eh(t,He,e)}function eh(e,t,i){if(t=Hl(e,t,Zu)[0],e=In(hi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Br(t)}catch(C){throw C===qs?Ln:C}else s=t;t=Xe();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(ye.flags|=2048,Ys(9,{destroy:void 0},Cv.bind(null,r,i),null)),[s,n,e]}function Cv(e,t){e.action=t}function th(e){var t=Xe(),i=He;if(i!==null)return eh(t,i,e);Xe(),t=t.memoizedState,i=Xe();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ys(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=ye.updateQueue,t===null&&(t=Un(),ye.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 ih(){return Xe().memoizedState}function Pn(e,t,i,s){var r=ht();ye.flags|=e,r.memoizedState=Ys(1|t,{destroy:void 0},i,s===void 0?null:s)}function Wn(e,t,i,s){var r=Xe();s=s===void 0?null:s;var n=r.memoizedState.inst;He!==null&&s!==null&&kl(s,He.memoizedState.deps)?r.memoizedState=Ys(t,n,i,s):(ye.flags|=e,r.memoizedState=Ys(1|t,n,i,s))}function sh(e,t){Pn(8390656,8,e,t)}function ql(e,t){Wn(2048,8,e,t)}function wv(e){ye.flags|=4;var t=ye.updateQueue;if(t===null)t=Un(),ye.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function rh(e){var t=Xe().memoizedState;return wv({ref:t,nextImpl:e}),function(){if((Oe&2)!==0)throw Error(m(440));return t.impl.apply(void 0,arguments)}}function nh(e,t){return Wn(4,2,e,t)}function ah(e,t){return Wn(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 oh(e,t,i){i=i!=null?i.concat([e]):null,Wn(4,4,lh.bind(null,t,e),i)}function Il(){}function ch(e,t){var i=Xe();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&kl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function uh(e,t){var i=Xe();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&kl(t,s[1]))return s[0];if(s=e(),_s){wi(!0);try{e()}finally{wi(!1)}}return i.memoizedState=[s,t],s}function Pl(e,t,i){return i===void 0||(ui&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=ff(),ye.lanes|=e,zi|=e,i)}function hh(e,t,i,s){return wt(i,t)?i:Ps.current!==null?(e=Pl(e,i,s),wt(e,t)||(Ze=!0),e):(ui&42)===0||(ui&1073741824)!==0&&(Ae&261930)===0?(Ze=!0,e.memoizedState=i):(e=ff(),ye.lanes|=e,zi|=e,t)}function fh(e,t,i,s,r){var n=G.p;G.p=n!==0&&8>n?n:8;var C=P.T,B={};P.T=B,Yl(e,!1,t,i);try{var I=r(),J=P.S;if(J!==null&&J(B,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var re=gv(I,s);Mr(e,t,re,Dt(e))}else Mr(e,t,s,Dt(e))}catch(ce){Mr(e,t,{then:function(){},status:"rejected",reason:ce},Dt())}finally{G.p=n,C!==null&&B.types!==null&&(C.types=B.types),P.T=C}}function Ev(){}function Wl(e,t,i,s){if(e.tag!==5)throw Error(m(476));var r=dh(e).queue;fh(e,r,t,L,i===null?Ev:function(){return _h(e),i(s)})}function dh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:L},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _h(e){var t=dh(e);t.next===null&&(t=e.alternate.memoizedState),Mr(e,t.next.queue,{},Dt())}function Vl(){return lt(Zr)}function vh(){return Xe().memoizedState}function ph(){return Xe().memoizedState}function xv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Dt();e=Li(i);var s=Oi(t,e,i);s!==null&&(St(s,t,i),Dr(s,t,i)),t={cache:Sl()},e.payload=t;return}t=t.return}}function Av(e,t,i){var s=Dt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Vn(e)?gh(t,i):(i=ol(e,t,i,s),i!==null&&(St(i,e,s),Sh(i,t,s)))}function mh(e,t,i){var s=Dt();Mr(e,t,i,s)}function Mr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Vn(e))gh(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var C=t.lastRenderedState,B=n(C,i);if(r.hasEagerState=!0,r.eagerState=B,wt(B,C))return En(e,t,r,0),Ue===null&&wn(),!1}catch{}if(i=ol(e,t,r,s),i!==null)return St(i,e,s),Sh(i,t,s),!0}return!1}function Yl(e,t,i,s){if(s={lane:2,revertLane:Eo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Vn(e)){if(t)throw Error(m(479))}else t=ol(e,i,s,2),t!==null&&St(t,e,2)}function Vn(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function gh(e,t){Ws=zn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Sh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Ec(e,i)}}var Nr={readContext:lt,use:qn,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Nr.useEffectEvent=Ye;var yh={readContext:lt,use:qn,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:sh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Pn(4194308,4,lh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Pn(4194308,4,e,t)},useInsertionEffect:function(e,t){Pn(4,2,e,t)},useMemo:function(e,t){var i=ht();t=t===void 0?null:t;var s=e();if(_s){wi(!0);try{e()}finally{wi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=ht();if(i!==void 0){var r=i(t);if(_s){wi(!0);try{i(t)}finally{wi(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=Av.bind(null,ye,e),[s.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=jl(e);var t=e.queue,i=mh.bind(null,ye,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Il,useDeferredValue:function(e,t){var i=ht();return Pl(i,e,t)},useTransition:function(){var e=jl(!1);return e=fh.bind(null,ye,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=ye,r=ht();if(Re){if(i===void 0)throw Error(m(407));i=i()}else{if(i=t(),Ue===null)throw Error(m(349));(Ae&127)!==0||Iu(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,sh(Wu.bind(null,s,n,e),[e]),s.flags|=2048,Ys(9,{destroy:void 0},Pu.bind(null,s,n,i,t),null),i},useId:function(){var e=ht(),t=Ue.identifierPrefix;if(Re){var i=Zt,s=Qt;i=(s&~(1<<32-Ct(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=jn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Sv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vl,useFormState:Ju,useActionState:Ju,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Yl.bind(null,ye,!0,i),i.dispatch=t,[e,t]},useMemoCache:Nl,useCacheRefresh:function(){return ht().memoizedState=xv.bind(null,ye)},useEffectEvent:function(e){var t=ht(),i={impl:e};return t.memoizedState=i,function(){if((Oe&2)!==0)throw Error(m(440));return i.impl.apply(void 0,arguments)}}},Fl={readContext:lt,use:qn,useCallback:ch,useContext:lt,useEffect:ql,useImperativeHandle:oh,useInsertionEffect:nh,useLayoutEffect:ah,useMemo:uh,useReducer:In,useRef:ih,useState:function(){return In(hi)},useDebugValue:Il,useDeferredValue:function(e,t){var i=Xe();return hh(i,He.memoizedState,e,t)},useTransition:function(){var e=In(hi)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:Br(e),t]},useSyncExternalStore:qu,useId:vh,useHostTransitionStatus:Vl,useFormState:$u,useActionState:$u,useOptimistic:function(e,t){var i=Xe();return Fu(i,He,e,t)},useMemoCache:Nl,useCacheRefresh:ph};Fl.useEffectEvent=rh;var bh={readContext:lt,use:qn,useCallback:ch,useContext:lt,useEffect:ql,useImperativeHandle:oh,useInsertionEffect:nh,useLayoutEffect:ah,useMemo:uh,useReducer:zl,useRef:ih,useState:function(){return zl(hi)},useDebugValue:Il,useDeferredValue:function(e,t){var i=Xe();return He===null?Pl(i,e,t):hh(i,He.memoizedState,e,t)},useTransition:function(){var e=zl(hi)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:Br(e),t]},useSyncExternalStore:qu,useId:vh,useHostTransitionStatus:Vl,useFormState:th,useActionState:th,useOptimistic:function(e,t){var i=Xe();return He!==null?Fu(i,He,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Nl,useCacheRefresh:ph};bh.useEffectEvent=rh;function Kl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:h({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Xl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Dt(),r=Li(s);r.payload=t,i!=null&&(r.callback=i),t=Oi(e,r,s),t!==null&&(St(t,e,s),Dr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Dt(),r=Li(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Oi(e,r,s),t!==null&&(St(t,e,s),Dr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Dt(),s=Li(i);s.tag=2,t!=null&&(s.callback=t),t=Oi(e,s,i),t!==null&&(St(t,e,i),Dr(t,e,i))}};function Ch(e,t,i,s,r,n,C){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,C):t.prototype&&t.prototype.isPureReactComponent?!br(i,s)||!br(r,n):!0}function wh(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&&Xl.enqueueReplaceState(t,t.state,null)}function vs(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=h({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Eh(e){Cn(e)}function xh(e){console.error(e)}function Ah(e){Cn(e)}function Yn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Th(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Gl(e,t,i){return i=Li(i),i.tag=3,i.payload={element:null},i.callback=function(){Yn(e,t)},i}function Rh(e){return e=Li(e),e.tag=3,e}function Dh(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var n=s.value;e.payload=function(){return r(n)},e.callback=function(){Th(t,i,s)}}var C=i.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){Th(t,i,s),typeof r!="function"&&(ji===null?ji=new Set([this]):ji.add(this));var B=s.stack;this.componentDidCatch(s.value,{componentStack:B!==null?B:""})})}function Tv(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&zs(t,i,r,!0),i=xt.current,i!==null){switch(i.tag){case 31:case 13:return jt===null?sa():i.alternate===null&&Fe===0&&(Fe=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===On?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),bo(e,s,r)),!1;case 22:return i.flags|=65536,s===On?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)),bo(e,s,r)),!1}throw Error(m(435,i.tag))}return bo(e,s,r),sa(),!1}if(Re)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==_l&&(e=Error(m(422),{cause:s}),Er(Mt(e,i)))):(s!==_l&&(t=Error(m(423),{cause:s}),Er(Mt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Mt(s,i),r=Gl(e.stateNode,s,r),xl(e,r),Fe!==4&&(Fe=2)),!1;var n=Error(m(520),{cause:s});if(n=Mt(n,i),Wr===null?Wr=[n]:Wr.push(n),Fe!==4&&(Fe=2),t===null)return!0;s=Mt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=Gl(i.stateNode,s,e),xl(i,e),!1;case 1:if(t=i.type,n=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(ji===null||!ji.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Rh(r),Dh(r,e,i,s),xl(i,r),!1}i=i.return}while(i!==null);return!1}var Ql=Error(m(461)),Ze=!1;function ot(e,t,i,s){t.child=e===null?Bu(t,null,i,s):ds(t,e.child,i,s)}function kh(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var C={};for(var B in s)B!=="ref"&&(C[B]=s[B])}else C=s;return cs(t),s=Ll(e,t,i,C,n,r),B=Ol(),e!==null&&!Ze?(Bl(e,t,r),fi(e,t,r)):(Re&&B&&fl(t),t.flags|=1,ot(e,t,s,r),t.child)}function Lh(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!cl(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Oh(e,t,n,s,r)):(e=An(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!ro(e,r)){var C=n.memoizedProps;if(i=i.compare,i=i!==null?i:br,i(C,s)&&e.ref===t.ref)return fi(e,t,r)}return t.flags|=1,e=ai(n,s),e.ref=t.ref,e.return=t,t.child=e}function Oh(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(br(n,s)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=s=n,ro(e,r))(e.flags&131072)!==0&&(Ze=!0);else return t.lanes=e.lanes,fi(e,t,r)}return Zl(e,t,i,s,r)}function Bh(e,t,i,s){var r=s.children,n=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(n=n!==null?n.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~n}else s=0,t.child=null;return Mh(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&kn(t,n!==null?n.cachePool:null),n!==null?Hu(t,n):Tl(),zu(t);else return s=t.lanes=536870912,Mh(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(kn(t,n.cachePool),Hu(t,n),Mi(),t.memoizedState=null):(e!==null&&kn(t,null),Tl(),Mi());return ot(e,t,r,i),t.child}function Hr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mh(e,t,i,s,r){var n=bl();return n=n===null?null:{parent:Ge._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&kn(t,null),Tl(),zu(t),e!==null&&zs(e,t,s,!0),t.childLanes=r,null}function Fn(e,t){return t=Xn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Nh(e,t,i){return ds(t,e.child,null,i),e=Fn(t,t.pendingProps),e.flags|=2,At(t),t.memoizedState=null,e}function Rv(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Re){if(s.mode==="hidden")return e=Fn(t,s),t.lanes=536870912,Hr(null,e);if(Dl(t),(e=Pe)?(e=Xf(e,zt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ai!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},i=gu(e),i.return=t,t.child=i,at=t,Pe=null)):e=null,e===null)throw Ri(t);return t.lanes=536870912,null}return Fn(t,s)}var n=e.memoizedState;if(n!==null){var C=n.dehydrated;if(Dl(t),r)if(t.flags&256)t.flags&=-257,t=Nh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(m(558));else if(Ze||zs(e,t,i,!1),r=(i&e.childLanes)!==0,Ze||r){if(s=Ue,s!==null&&(C=xc(s,i),C!==0&&C!==n.retryLane))throw n.retryLane=C,ns(e,C),St(s,e,C),Ql;sa(),t=Nh(e,t,i)}else e=n.treeContext,Pe=Ut(C.nextSibling),at=t,Re=!0,Ti=null,zt=!1,e!==null&&bu(t,e),t=Fn(t,s),t.flags|=4096;return t}return e=ai(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(m(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Zl(e,t,i,s,r){return cs(t),i=Ll(e,t,i,s,void 0,r),s=Ol(),e!==null&&!Ze?(Bl(e,t,r),fi(e,t,r)):(Re&&s&&fl(t),t.flags|=1,ot(e,t,i,r),t.child)}function Hh(e,t,i,s,r,n){return cs(t),t.updateQueue=null,i=Uu(t,s,i,r),ju(e),s=Ol(),e!==null&&!Ze?(Bl(e,t,n),fi(e,t,n)):(Re&&s&&fl(t),t.flags|=1,ot(e,t,i,n),t.child)}function zh(e,t,i,s,r){if(cs(t),t.stateNode===null){var n=Bs,C=i.contextType;typeof C=="object"&&C!==null&&(n=lt(C)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Xl,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},wl(t),C=i.contextType,n.context=typeof C=="object"&&C!==null?lt(C):Bs,n.state=t.memoizedState,C=i.getDerivedStateFromProps,typeof C=="function"&&(Kl(t,i,C,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(C=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),C!==n.state&&Xl.enqueueReplaceState(n,n.state,null),Lr(t,s,n,r),kr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var B=t.memoizedProps,I=vs(i,B);n.props=I;var J=n.context,re=i.contextType;C=Bs,typeof re=="object"&&re!==null&&(C=lt(re));var ce=i.getDerivedStateFromProps;re=typeof ce=="function"||typeof n.getSnapshotBeforeUpdate=="function",B=t.pendingProps!==B,re||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(B||J!==C)&&wh(t,n,s,C),ki=!1;var $=t.memoizedState;n.state=$,Lr(t,s,n,r),kr(),J=t.memoizedState,B||$!==J||ki?(typeof ce=="function"&&(Kl(t,i,ce,s),J=t.memoizedState),(I=ki||Ch(t,i,I,s,$,J,C))?(re||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"&&(t.flags|=4194308)):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=J),n.props=s,n.state=J,n.context=C,s=I):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,El(e,t),C=t.memoizedProps,re=vs(i,C),n.props=re,ce=t.pendingProps,$=n.context,J=i.contextType,I=Bs,typeof J=="object"&&J!==null&&(I=lt(J)),B=i.getDerivedStateFromProps,(J=typeof B=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(C!==ce||$!==I)&&wh(t,n,s,I),ki=!1,$=t.memoizedState,n.state=$,Lr(t,s,n,r),kr();var te=t.memoizedState;C!==ce||$!==te||ki||e!==null&&e.dependencies!==null&&Rn(e.dependencies)?(typeof B=="function"&&(Kl(t,i,B,s),te=t.memoizedState),(re=ki||Ch(t,i,re,s,$,te,I)||e!==null&&e.dependencies!==null&&Rn(e.dependencies))?(J||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,te,I),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,te,I)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||C===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=te),n.props=s,n.state=te,n.context=I,s=re):(typeof n.componentDidUpdate!="function"||C===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,Kn(e,t),s=(t.flags&128)!==0,n||s?(n=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:n.render(),t.flags|=1,e!==null&&s?(t.child=ds(t,e.child,null,r),t.child=ds(t,null,i,r)):ot(e,t,i,r),t.memoizedState=n.state,e=t.child):e=fi(e,t,r),e}function jh(e,t,i,s){return ls(),t.flags|=256,ot(e,t,i,s),t.child}var Jl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $l(e){return{baseLanes:e,cachePool:Tu()}}function eo(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Rt),e}function Uh(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,C;if((C=n)||(C=e!==null&&e.memoizedState===null?!1:(Ke.current&2)!==0),C&&(r=!0,t.flags&=-129),C=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(r?Bi(t):Mi(),(e=Pe)?(e=Xf(e,zt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ai!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},i=gu(e),i.return=t,t.child=i,at=t,Pe=null)):e=null,e===null)throw Ri(t);return zo(e)?t.lanes=32:t.lanes=536870912,null}var B=s.children;return s=s.fallback,r?(Mi(),r=t.mode,B=Xn({mode:"hidden",children:B},r),s=as(s,r,i,null),B.return=t,s.return=t,B.sibling=s,t.child=B,s=t.child,s.memoizedState=$l(i),s.childLanes=eo(e,C,i),t.memoizedState=Jl,Hr(null,s)):(Bi(t),to(t,B))}var I=e.memoizedState;if(I!==null&&(B=I.dehydrated,B!==null)){if(n)t.flags&256?(Bi(t),t.flags&=-257,t=io(e,t,i)):t.memoizedState!==null?(Mi(),t.child=e.child,t.flags|=128,t=null):(Mi(),B=s.fallback,r=t.mode,s=Xn({mode:"visible",children:s.children},r),B=as(B,r,i,null),B.flags|=2,s.return=t,B.return=t,s.sibling=B,t.child=s,ds(t,e.child,null,i),s=t.child,s.memoizedState=$l(i),s.childLanes=eo(e,C,i),t.memoizedState=Jl,t=Hr(null,s));else if(Bi(t),zo(B)){if(C=B.nextSibling&&B.nextSibling.dataset,C)var J=C.dgst;C=J,s=Error(m(419)),s.stack="",s.digest=C,Er({value:s,source:null,stack:null}),t=io(e,t,i)}else if(Ze||zs(e,t,i,!1),C=(i&e.childLanes)!==0,Ze||C){if(C=Ue,C!==null&&(s=xc(C,i),s!==0&&s!==I.retryLane))throw I.retryLane=s,ns(e,s),St(C,e,s),Ql;Ho(B)||sa(),t=io(e,t,i)}else Ho(B)?(t.flags|=192,t.child=e.child,t=null):(e=I.treeContext,Pe=Ut(B.nextSibling),at=t,Re=!0,Ti=null,zt=!1,e!==null&&bu(t,e),t=to(t,s.children),t.flags|=4096);return t}return r?(Mi(),B=s.fallback,r=t.mode,I=e.child,J=I.sibling,s=ai(I,{mode:"hidden",children:s.children}),s.subtreeFlags=I.subtreeFlags&65011712,J!==null?B=ai(J,B):(B=as(B,r,i,null),B.flags|=2),B.return=t,s.return=t,s.sibling=B,t.child=s,Hr(null,s),s=t.child,B=e.child.memoizedState,B===null?B=$l(i):(r=B.cachePool,r!==null?(I=Ge._currentValue,r=r.parent!==I?{parent:I,pool:I}:r):r=Tu(),B={baseLanes:B.baseLanes|i,cachePool:r}),s.memoizedState=B,s.childLanes=eo(e,C,i),t.memoizedState=Jl,Hr(e.child,s)):(Bi(t),i=e.child,e=i.sibling,i=ai(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(C=t.deletions,C===null?(t.deletions=[e],t.flags|=16):C.push(e)),t.child=i,t.memoizedState=null,i)}function to(e,t){return t=Xn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Xn(e,t){return e=Et(22,e,null,t),e.lanes=0,e}function io(e,t,i){return ds(t,e.child,null,i),e=to(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qh(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),ml(e.return,t,i)}function so(e,t,i,s,r,n){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(C.isBackwards=t,C.rendering=null,C.renderingStartTime=0,C.last=s,C.tail=i,C.tailMode=r,C.treeForkCount=n)}function Ih(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var C=Ke.current,B=(C&2)!==0;if(B?(C=C&1|2,t.flags|=128):C&=1,ee(Ke,C),ot(e,t,s,i),s=Re?wr:0,!B&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qh(e,i,t);else if(e.tag===19)qh(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(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&Hn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),so(t,!1,r,i,n,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Hn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}so(t,!0,i,null,n,s);break;case"together":so(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function fi(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),zi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(zs(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(m(153));if(t.child!==null){for(e=t.child,i=ai(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=ai(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function ro(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Rn(e)))}function Dv(e,t,i){switch(t.tag){case 3:Q(t,t.stateNode.containerInfo),Di(t,Ge,e.memoizedState.cache),ls();break;case 27:case 5:ne(t);break;case 4:Q(t,t.stateNode.containerInfo);break;case 10:Di(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Dl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Bi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Uh(e,t,i):(Bi(t),e=fi(e,t,i),e!==null?e.sibling:null);Bi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(zs(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return Ih(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),ee(Ke,Ke.current),s)break;return null;case 22:return t.lanes=0,Bh(e,t,i,t.pendingProps);case 24:Di(t,Ge,e.memoizedState.cache)}return fi(e,t,i)}function Ph(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ze=!0;else{if(!ro(e,i)&&(t.flags&128)===0)return Ze=!1,Dv(e,t,i);Ze=(e.flags&131072)!==0}else Ze=!1,Re&&(t.flags&1048576)!==0&&yu(t,wr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=hs(t.elementType),t.type=e,typeof e=="function")cl(e)?(s=vs(e,s),t.tag=1,t=zh(null,t,e,s,i)):(t.tag=0,t=Zl(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===g){t.tag=11,t=kh(null,t,e,s,i);break e}else if(r===D){t.tag=14,t=Lh(null,t,e,s,i);break e}}throw t=se(e)||e,Error(m(306,t,""))}}return t;case 0:return Zl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=vs(s,t.pendingProps),zh(e,t,s,r,i);case 3:e:{if(Q(t,t.stateNode.containerInfo),e===null)throw Error(m(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,El(e,t),Lr(t,s,null,i);var C=t.memoizedState;if(s=C.cache,Di(t,Ge,s),s!==n.cache&&gl(t,[Ge],i,!0),kr(),s=C.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:C.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=jh(e,t,s,i);break e}else if(s!==r){r=Mt(Error(m(424)),t),Er(r),t=jh(e,t,s,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Pe=Ut(e.firstChild),at=t,Re=!0,Ti=null,zt=!0,i=Bu(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ls(),s===r){t=fi(e,t,i);break e}ot(e,t,s,i)}t=t.child}return t;case 26:return Kn(e,t),e===null?(i=ed(t.type,null,t.pendingProps,null))?t.memoizedState=i:Re||(i=t.type,e=t.pendingProps,s=ua(de.current).createElement(i),s[nt]=t,s[dt]=e,ct(s,i,e),st(s),t.stateNode=s):t.memoizedState=ed(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ne(t),e===null&&Re&&(s=t.stateNode=Zf(t.type,t.pendingProps,de.current),at=t,zt=!0,r=Pe,Pi(t.type)?(jo=r,Pe=Ut(s.firstChild)):Pe=r),ot(e,t,t.pendingProps.children,i),Kn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((r=s=Pe)&&(s=np(s,t.type,t.pendingProps,zt),s!==null?(t.stateNode=s,at=t,Pe=Ut(s.firstChild),zt=!1,r=!0):r=!1),r||Ri(t)),ne(t),r=t.type,n=t.pendingProps,C=e!==null?e.memoizedProps:null,s=n.children,Bo(r,n)?s=null:C!==null&&Bo(r,C)&&(t.flags|=32),t.memoizedState!==null&&(r=Ll(e,t,yv,null,null,i),Zr._currentValue=r),Kn(e,t),ot(e,t,s,i),t.child;case 6:return e===null&&Re&&((e=i=Pe)&&(i=ap(i,t.pendingProps,zt),i!==null?(t.stateNode=i,at=t,Pe=null,e=!0):e=!1),e||Ri(t)),null;case 13:return Uh(e,t,i);case 4:return Q(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ds(t,null,s,i):ot(e,t,s,i),t.child;case 11:return kh(e,t,t.type,t.pendingProps,i);case 7:return ot(e,t,t.pendingProps,i),t.child;case 8:return ot(e,t,t.pendingProps.children,i),t.child;case 12:return ot(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Di(t,t.type,s.value),ot(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,cs(t),r=lt(r),s=s(r),t.flags|=1,ot(e,t,s,i),t.child;case 14:return Lh(e,t,t.type,t.pendingProps,i);case 15:return Oh(e,t,t.type,t.pendingProps,i);case 19:return Ih(e,t,i);case 31:return Rv(e,t,i);case 22:return Bh(e,t,i,t.pendingProps);case 24:return cs(t),s=lt(Ge),e===null?(r=bl(),r===null&&(r=Ue,n=Sl(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},wl(t),Di(t,Ge,r)):((e.lanes&i)!==0&&(El(e,t),Lr(t,null,null,i),kr()),r=e.memoizedState,n=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Di(t,Ge,s)):(s=n.cache,Di(t,Ge,s),s!==r.cache&&gl(t,[Ge],i,!0))),ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(m(156,t.tag))}function di(e){e.flags|=4}function no(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(pf())e.flags|=8192;else throw fs=On,Cl}else e.flags&=-16777217}function Wh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!nd(t))if(pf())e.flags|=8192;else throw fs=On,Cl}function Gn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Cc():536870912,e.lanes|=t,Gs|=t)}function zr(e,t){if(!Re)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 We(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function kv(e,t,i){var s=t.pendingProps;switch(dl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return We(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ci(Ge),ie(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Hs(t)?di(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vl())),We(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(di(t),n!==null?(We(t),Wh(t,n)):(We(t),no(t,r,null,s,i))):n?n!==e.memoizedState?(di(t),We(t),Wh(t,n)):(We(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&di(t),We(t),no(t,r,e,s,i)),null;case 27:if(ge(t),i=de.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&di(t);else{if(!s){if(t.stateNode===null)throw Error(m(166));return We(t),null}e=oe.current,Hs(t)?Cu(t):(e=Zf(r,s,i),t.stateNode=e,di(t))}return We(t),null;case 5:if(ge(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&di(t);else{if(!s){if(t.stateNode===null)throw Error(m(166));return We(t),null}if(n=oe.current,Hs(t))Cu(t);else{var C=ua(de.current);switch(n){case 1:n=C.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=C.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=C.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=C.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=C.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?C.createElement("select",{is:s.is}):C.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?C.createElement(r,{is:s.is}):C.createElement(r)}}n[nt]=t,n[dt]=s;e:for(C=t.child;C!==null;){if(C.tag===5||C.tag===6)n.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===t)break e;for(;C.sibling===null;){if(C.return===null||C.return===t)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}t.stateNode=n;e:switch(ct(n,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&di(t)}}return We(t),no(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&di(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(m(166));if(e=de.current,Hs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=at,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[nt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||qf(e.nodeValue,i)),e||Ri(t,!0)}else e=ua(e).createTextNode(s),e[nt]=t,t.stateNode=e}return We(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Hs(t),i!==null){if(e===null){if(!s)throw Error(m(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(557));e[nt]=t}else ls(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),e=!1}else i=vl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(At(t),t):(At(t),null);if((t.flags&128)!==0)throw Error(m(558))}return We(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Hs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(m(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(m(317));r[nt]=t}else ls(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),r=!1}else r=vl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(At(t),t):(At(t),null)}return At(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Gn(t,t.updateQueue),We(t),null);case 4:return ie(),e===null&&Ro(t.stateNode.containerInfo),We(t),null;case 10:return ci(t.type),We(t),null;case 19:if(Y(Ke),s=t.memoizedState,s===null)return We(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)zr(s,!1);else{if(Fe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=Hn(e),n!==null){for(t.flags|=128,zr(s,!1),e=n.updateQueue,t.updateQueue=e,Gn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)mu(i,e),i=i.sibling;return ee(Ke,Ke.current&1|2),Re&&li(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&et()>ea&&(t.flags|=128,r=!0,zr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Hn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Gn(t,e),zr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Re)return We(t),null}else 2*et()-s.renderingStartTime>ea&&i!==536870912&&(t.flags|=128,r=!0,zr(s,!1),t.lanes=4194304);s.isBackwards?(n.sibling=t.child,t.child=n):(e=s.last,e!==null?e.sibling=n:t.child=n,s.last=n)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=et(),e.sibling=null,i=Ke.current,ee(Ke,r?i&1|2:i&1),Re&&li(t,s.treeForkCount),e):(We(t),null);case 22:case 23:return At(t),Rl(),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&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),i=t.updateQueue,i!==null&&Gn(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&&Y(us),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ci(Ge),We(t),null;case 25:return null;case 30:return null}throw Error(m(156,t.tag))}function Lv(e,t){switch(dl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ci(Ge),ie(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ge(t),null;case 31:if(t.memoizedState!==null){if(At(t),t.alternate===null)throw Error(m(340));ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(At(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(m(340));ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Ke),null;case 4:return ie(),null;case 10:return ci(t.type),null;case 22:case 23:return At(t),Rl(),e!==null&&Y(us),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ci(Ge),null;case 25:return null;default:return null}}function Vh(e,t){switch(dl(t),t.tag){case 3:ci(Ge),ie();break;case 26:case 27:case 5:ge(t);break;case 4:ie();break;case 31:t.memoizedState!==null&&At(t);break;case 13:At(t);break;case 19:Y(Ke);break;case 10:ci(t.type);break;case 22:case 23:At(t),Rl(),e!==null&&Y(us);break;case 24:ci(Ge)}}function jr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var n=i.create,C=i.inst;s=n(),C.destroy=s}i=i.next}while(i!==r)}}catch(B){Ne(t,t.return,B)}}function Ni(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var n=r.next;s=n;do{if((s.tag&e)===e){var C=s.inst,B=C.destroy;if(B!==void 0){C.destroy=void 0,r=t;var I=i,J=B;try{J()}catch(re){Ne(r,I,re)}}}s=s.next}while(s!==n)}}catch(re){Ne(t,t.return,re)}}function Yh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Nu(t,i)}catch(s){Ne(e,e.return,s)}}}function Fh(e,t,i){i.props=vs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Ne(e,t,s)}}function Ur(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(r){Ne(e,t,r)}}function Jt(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){Ne(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){Ne(e,t,r)}else i.current=null}function Kh(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(r){Ne(e,e.return,r)}}function ao(e,t,i){try{var s=e.stateNode;$v(s,e.type,i,t),s[dt]=t}catch(r){Ne(e,e.return,r)}}function Xh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pi(e.type)||e.tag===4}function lo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Pi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function oo(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=ri));else if(s!==4&&(s===27&&Pi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(oo(e,t,i),e=e.sibling;e!==null;)oo(e,t,i),e=e.sibling}function Qn(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&Pi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Qn(e,t,i),e=e.sibling;e!==null;)Qn(e,t,i),e=e.sibling}function Gh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ct(t,s,i),t[nt]=e,t[dt]=i}catch(n){Ne(e,e.return,n)}}var _i=!1,Je=!1,co=!1,Qh=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Ov(e,t){if(e=e.containerInfo,Lo=ma,e=ou(e),il(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 r=s.anchorOffset,n=s.focusNode;s=s.focusOffset;try{i.nodeType,n.nodeType}catch{i=null;break e}var C=0,B=-1,I=-1,J=0,re=0,ce=e,$=null;t:for(;;){for(var te;ce!==i||r!==0&&ce.nodeType!==3||(B=C+r),ce!==n||s!==0&&ce.nodeType!==3||(I=C+s),ce.nodeType===3&&(C+=ce.nodeValue.length),(te=ce.firstChild)!==null;)$=ce,ce=te;for(;;){if(ce===e)break t;if($===i&&++J===r&&(B=C),$===n&&++re===s&&(I=C),(te=ce.nextSibling)!==null)break;ce=$,$=ce.parentNode}ce=te}i=B===-1||I===-1?null:{start:B,end:I}}else i=null}i=i||{start:0,end:0}}else i=null;for(Oo={focusedElem:e,selectionRange:i},ma=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){switch(t=rt,n=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++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&n!==null){e=void 0,i=t,r=n.memoizedProps,n=n.memoizedState,s=i.stateNode;try{var fe=vs(i.type,r);e=s.getSnapshotBeforeUpdate(fe,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(me){Ne(i,i.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)No(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":No(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(m(163))}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}}function Zh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:pi(e,i),s&4&&jr(5,i);break;case 1:if(pi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(C){Ne(i,i.return,C)}else{var r=vs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(C){Ne(i,i.return,C)}}s&64&&Yh(i),s&512&&Ur(i,i.return);break;case 3:if(pi(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Nu(e,t)}catch(C){Ne(i,i.return,C)}}break;case 27:t===null&&s&4&&Gh(i);case 26:case 5:pi(e,i),t===null&&s&4&&Kh(i),s&512&&Ur(i,i.return);break;case 12:pi(e,i);break;case 31:pi(e,i),s&4&&ef(e,i);break;case 13:pi(e,i),s&4&&tf(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Iv.bind(null,i),lp(e,i))));break;case 22:if(s=i.memoizedState!==null||_i,!s){t=t!==null&&t.memoizedState!==null||Je,r=_i;var n=Je;_i=s,(Je=t)&&!n?mi(e,i,(i.subtreeFlags&8772)!==0):pi(e,i),_i=r,Je=n}break;case 30:break;default:pi(e,i)}}function Jh(e){var t=e.alternate;t!==null&&(e.alternate=null,Jh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ua(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 Ve=null,vt=!1;function vi(e,t,i){for(i=i.child;i!==null;)$h(e,t,i),i=i.sibling}function $h(e,t,i){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount($i,i)}catch{}switch(i.tag){case 26:Je||Jt(i,t),vi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Je||Jt(i,t);var s=Ve,r=vt;Pi(i.type)&&(Ve=i.stateNode,vt=!1),vi(e,t,i),Xr(i.stateNode),Ve=s,vt=r;break;case 5:Je||Jt(i,t);case 6:if(s=Ve,r=vt,Ve=null,vi(e,t,i),Ve=s,vt=r,Ve!==null)if(vt)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(i.stateNode)}catch(n){Ne(i,t,n)}else try{Ve.removeChild(i.stateNode)}catch(n){Ne(i,t,n)}break;case 18:Ve!==null&&(vt?(e=Ve,Ff(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),sr(e)):Ff(Ve,i.stateNode));break;case 4:s=Ve,r=vt,Ve=i.stateNode.containerInfo,vt=!0,vi(e,t,i),Ve=s,vt=r;break;case 0:case 11:case 14:case 15:Ni(2,i,t),Je||Ni(4,i,t),vi(e,t,i);break;case 1:Je||(Jt(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&Fh(i,t,s)),vi(e,t,i);break;case 21:vi(e,t,i);break;case 22:Je=(s=Je)||i.memoizedState!==null,vi(e,t,i),Je=s;break;default:vi(e,t,i)}}function ef(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{sr(e)}catch(i){Ne(t,t.return,i)}}}function tf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{sr(e)}catch(i){Ne(t,t.return,i)}}function Bv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qh),t;default:throw Error(m(435,e.tag))}}function Zn(e,t){var i=Bv(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=Pv.bind(null,e,s);s.then(r,r)}})}function pt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],n=e,C=t,B=C;e:for(;B!==null;){switch(B.tag){case 27:if(Pi(B.type)){Ve=B.stateNode,vt=!1;break e}break;case 5:Ve=B.stateNode,vt=!1;break e;case 3:case 4:Ve=B.stateNode.containerInfo,vt=!0;break e}B=B.return}if(Ve===null)throw Error(m(160));$h(n,C,r),Ve=null,vt=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)sf(t,e),t=t.sibling}var Yt=null;function sf(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pt(t,e),mt(e),s&4&&(Ni(3,e,e.return),jr(3,e),Ni(5,e,e.return));break;case 1:pt(t,e),mt(e),s&512&&(Je||i===null||Jt(i,i.return)),s&64&&_i&&(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 r=Yt;if(pt(t,e),mt(e),s&512&&(Je||i===null||Jt(i,i.return)),s&4){var n=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,r=r.ownerDocument||r;t:switch(s){case"title":n=r.getElementsByTagName("title")[0],(!n||n[fr]||n[nt]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),ct(n,s,i),n[nt]=e,st(n),s=n;break e;case"link":var C=sd("link","href",r).get(s+(i.href||""));if(C){for(var B=0;B<C.length;B++)if(n=C[B],n.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&n.getAttribute("rel")===(i.rel==null?null:i.rel)&&n.getAttribute("title")===(i.title==null?null:i.title)&&n.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){C.splice(B,1);break t}}n=r.createElement(s),ct(n,s,i),r.head.appendChild(n);break;case"meta":if(C=sd("meta","content",r).get(s+(i.content||""))){for(B=0;B<C.length;B++)if(n=C[B],n.getAttribute("content")===(i.content==null?null:""+i.content)&&n.getAttribute("name")===(i.name==null?null:i.name)&&n.getAttribute("property")===(i.property==null?null:i.property)&&n.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&n.getAttribute("charset")===(i.charSet==null?null:i.charSet)){C.splice(B,1);break t}}n=r.createElement(s),ct(n,s,i),r.head.appendChild(n);break;default:throw Error(m(468,s))}n[nt]=e,st(n),s=n}e.stateNode=s}else rd(r,e.type,e.stateNode);else e.stateNode=id(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?rd(r,e.type,e.stateNode):id(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&ao(e,e.memoizedProps,i.memoizedProps)}break;case 27:pt(t,e),mt(e),s&512&&(Je||i===null||Jt(i,i.return)),i!==null&&s&4&&ao(e,e.memoizedProps,i.memoizedProps);break;case 5:if(pt(t,e),mt(e),s&512&&(Je||i===null||Jt(i,i.return)),e.flags&32){r=e.stateNode;try{As(r,"")}catch(fe){Ne(e,e.return,fe)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,ao(e,r,i!==null?i.memoizedProps:r)),s&1024&&(co=!0);break;case 6:if(pt(t,e),mt(e),s&4){if(e.stateNode===null)throw Error(m(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(fe){Ne(e,e.return,fe)}}break;case 3:if(da=null,r=Yt,Yt=ha(t.containerInfo),pt(t,e),Yt=r,mt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{sr(t.containerInfo)}catch(fe){Ne(e,e.return,fe)}co&&(co=!1,rf(e));break;case 4:s=Yt,Yt=ha(e.stateNode.containerInfo),pt(t,e),mt(e),Yt=s;break;case 12:pt(t,e),mt(e);break;case 31:pt(t,e),mt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Zn(e,s)));break;case 13:pt(t,e),mt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&($n=et()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Zn(e,s)));break;case 22:r=e.memoizedState!==null;var I=i!==null&&i.memoizedState!==null,J=_i,re=Je;if(_i=J||r,Je=re||I,pt(t,e),Je=re,_i=J,mt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||I||_i||Je||ps(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){I=i=t;try{if(n=I.stateNode,r)C=n.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{B=I.stateNode;var ce=I.memoizedProps.style,$=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;B.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(fe){Ne(I,I.return,fe)}}}else if(t.tag===6){if(i===null){I=t;try{I.stateNode.nodeValue=r?"":I.memoizedProps}catch(fe){Ne(I,I.return,fe)}}}else if(t.tag===18){if(i===null){I=t;try{var te=I.stateNode;r?Kf(te,!0):Kf(I.stateNode,!1)}catch(fe){Ne(I,I.return,fe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Zn(e,i))));break;case 19:pt(t,e),mt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Zn(e,s)));break;case 30:break;case 21:break;default:pt(t,e),mt(e)}}function mt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Xh(s)){i=s;break}s=s.return}if(i==null)throw Error(m(160));switch(i.tag){case 27:var r=i.stateNode,n=lo(e);Qn(e,n,r);break;case 5:var C=i.stateNode;i.flags&32&&(As(C,""),i.flags&=-33);var B=lo(e);Qn(e,B,C);break;case 3:case 4:var I=i.stateNode.containerInfo,J=lo(e);oo(e,J,I);break;default:throw Error(m(161))}}catch(re){Ne(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;rf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Zh(e,t.alternate,t),t=t.sibling}function ps(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ni(4,t,t.return),ps(t);break;case 1:Jt(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Fh(t,t.return,i),ps(t);break;case 27:Xr(t.stateNode);case 26:case 5:Jt(t,t.return),ps(t);break;case 22:t.memoizedState===null&&ps(t);break;case 30:ps(t);break;default:ps(t)}e=e.sibling}}function mi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,C=n.flags;switch(n.tag){case 0:case 11:case 15:mi(r,n,i),jr(4,n);break;case 1:if(mi(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(J){Ne(s,s.return,J)}if(s=n,r=s.updateQueue,r!==null){var B=s.stateNode;try{var I=r.shared.hiddenCallbacks;if(I!==null)for(r.shared.hiddenCallbacks=null,r=0;r<I.length;r++)Mu(I[r],B)}catch(J){Ne(s,s.return,J)}}i&&C&64&&Yh(n),Ur(n,n.return);break;case 27:Gh(n);case 26:case 5:mi(r,n,i),i&&s===null&&C&4&&Kh(n),Ur(n,n.return);break;case 12:mi(r,n,i);break;case 31:mi(r,n,i),i&&C&4&&ef(r,n);break;case 13:mi(r,n,i),i&&C&4&&tf(r,n);break;case 22:n.memoizedState===null&&mi(r,n,i),Ur(n,n.return);break;case 30:break;default:mi(r,n,i)}t=t.sibling}}function uo(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&&xr(i))}function ho(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xr(e))}function Ft(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)nf(e,t,i,s),t=t.sibling}function nf(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Ft(e,t,i,s),r&2048&&jr(9,t);break;case 1:Ft(e,t,i,s);break;case 3:Ft(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xr(e)));break;case 12:if(r&2048){Ft(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,C=n.id,B=n.onPostCommit;typeof B=="function"&&B(C,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(I){Ne(t,t.return,I)}}else Ft(e,t,i,s);break;case 31:Ft(e,t,i,s);break;case 13:Ft(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,C=t.alternate,t.memoizedState!==null?n._visibility&2?Ft(e,t,i,s):qr(e,t):n._visibility&2?Ft(e,t,i,s):(n._visibility|=2,Fs(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&uo(C,t);break;case 24:Ft(e,t,i,s),r&2048&&ho(t.alternate,t);break;default:Ft(e,t,i,s)}}function Fs(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,C=t,B=i,I=s,J=C.flags;switch(C.tag){case 0:case 11:case 15:Fs(n,C,B,I,r),jr(8,C);break;case 23:break;case 22:var re=C.stateNode;C.memoizedState!==null?re._visibility&2?Fs(n,C,B,I,r):qr(n,C):(re._visibility|=2,Fs(n,C,B,I,r)),r&&J&2048&&uo(C.alternate,C);break;case 24:Fs(n,C,B,I,r),r&&J&2048&&ho(C.alternate,C);break;default:Fs(n,C,B,I,r)}t=t.sibling}}function qr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:qr(i,s),r&2048&&uo(s.alternate,s);break;case 24:qr(i,s),r&2048&&ho(s.alternate,s);break;default:qr(i,s)}t=t.sibling}}var Ir=8192;function Ks(e,t,i){if(e.subtreeFlags&Ir)for(e=e.child;e!==null;)af(e,t,i),e=e.sibling}function af(e,t,i){switch(e.tag){case 26:Ks(e,t,i),e.flags&Ir&&e.memoizedState!==null&&Sp(i,Yt,e.memoizedState,e.memoizedProps);break;case 5:Ks(e,t,i);break;case 3:case 4:var s=Yt;Yt=ha(e.stateNode.containerInfo),Ks(e,t,i),Yt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Ir,Ir=16777216,Ks(e,t,i),Ir=s):Ks(e,t,i));break;default:Ks(e,t,i)}}function lf(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 Pr(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];rt=s,cf(s,e)}lf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)of(e),e=e.sibling}function of(e){switch(e.tag){case 0:case 11:case 15:Pr(e),e.flags&2048&&Ni(9,e,e.return);break;case 3:Pr(e);break;case 12:Pr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Jn(e)):Pr(e);break;default:Pr(e)}}function Jn(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];rt=s,cf(s,e)}lf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ni(8,t,t.return),Jn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Jn(t));break;default:Jn(t)}e=e.sibling}}function cf(e,t){for(;rt!==null;){var i=rt;switch(i.tag){case 0:case 11:case 15:Ni(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:xr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,rt=s;else e:for(i=e;rt!==null;){s=rt;var r=s.sibling,n=s.return;if(Jh(s),s===i){rt=null;break e}if(r!==null){r.return=n,rt=r;break e}rt=n}}}var Mv={getCacheForType:function(e){var t=lt(Ge),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return lt(Ge).controller.signal}},Nv=typeof WeakMap=="function"?WeakMap:Map,Oe=0,Ue=null,Ee=null,Ae=0,Me=0,Tt=null,Hi=!1,Xs=!1,fo=!1,gi=0,Fe=0,zi=0,ms=0,_o=0,Rt=0,Gs=0,Wr=null,gt=null,vo=!1,$n=0,uf=0,ea=1/0,ta=null,ji=null,tt=0,Ui=null,Qs=null,Si=0,po=0,mo=null,hf=null,Vr=0,go=null;function Dt(){return(Oe&2)!==0&&Ae!==0?Ae&-Ae:P.T!==null?Eo():Ac()}function ff(){if(Rt===0)if((Ae&536870912)===0||Re){var e=cn;cn<<=1,(cn&3932160)===0&&(cn=262144),Rt=e}else Rt=536870912;return e=xt.current,e!==null&&(e.flags|=32),Rt}function St(e,t,i){(e===Ue&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(Zs(e,0),qi(e,Ae,Rt,!1)),hr(e,i),((Oe&2)===0||e!==Ue)&&(e===Ue&&((Oe&2)===0&&(ms|=i),Fe===4&&qi(e,Ae,Rt,!1)),$t(e))}function df(e,t,i){if((Oe&6)!==0)throw Error(m(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||ur(e,t),r=s?jv(e,t):yo(e,t,!0),n=s;do{if(r===0){Xs&&!s&&qi(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!Hv(i)){r=yo(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var C=0;else C=e.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){t=C;e:{var B=e;r=Wr;var I=B.current.memoizedState.isDehydrated;if(I&&(Zs(B,C).flags|=256),C=yo(B,C,!1),C!==2){if(fo&&!I){B.errorRecoveryDisabledLanes|=n,ms|=n,r=4;break e}n=gt,gt=r,n!==null&&(gt===null?gt=n:gt.push.apply(gt,n))}r=C}if(n=!1,r!==2)continue}}if(r===1){Zs(e,0),qi(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(m(345));case 4:if((t&4194048)!==t)break;case 6:qi(s,t,Rt,!Hi);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(m(329))}if((t&62914560)===t&&(r=$n+300-et(),10<r)){if(qi(s,t,Rt,!Hi),hn(s,0,!0)!==0)break e;Si=t,s.timeoutHandle=Vf(_f.bind(null,s,i,gt,ta,vo,t,Rt,ms,Gs,Hi,n,"Throttled",-0,0),r);break e}_f(s,i,gt,ta,vo,t,Rt,ms,Gs,Hi,n,null,-0,0)}}break}while(!0);$t(e)}function _f(e,t,i,s,r,n,C,B,I,J,re,ce,$,te){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ri},af(t,n,ce);var fe=(n&62914560)===n?$n-et():(n&4194048)===n?uf-et():0;if(fe=yp(ce,fe),fe!==null){Si=n,e.cancelPendingCommit=fe(Cf.bind(null,e,t,n,i,s,r,C,B,I,re,ce,null,$,te)),qi(e,n,C,!J);return}}Cf(e,t,n,i,s,r,C,B,I)}function Hv(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 r=i[s],n=r.getSnapshot;r=r.value;try{if(!wt(n(),r))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 qi(e,t,i,s){t&=~_o,t&=~ms,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-Ct(r),C=1<<n;s[n]=-1,r&=~C}i!==0&&wc(e,i,t)}function ia(){return(Oe&6)===0?(Yr(0),!1):!0}function So(){if(Ee!==null){if(Me===0)var e=Ee.return;else e=Ee,oi=os=null,Ml(e),Is=null,Tr=0,e=Ee;for(;e!==null;)Vh(e.alternate,e),e=e.return;Ee=null}}function Zs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,ip(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Si=0,So(),Ue=e,Ee=i=ai(e.current,null),Ae=t,Me=0,Tt=null,Hi=!1,Xs=ur(e,t),fo=!1,Gs=Rt=_o=ms=zi=Fe=0,gt=Wr=null,vo=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-Ct(s),n=1<<r;t|=e[r],s&=~n}return gi=t,wn(),i}function vf(e,t){ye=null,P.H=Nr,t===qs||t===Ln?(t=ku(),Me=3):t===Cl?(t=ku(),Me=4):Me=t===Ql?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tt=t,Ee===null&&(Fe=1,Yn(e,Mt(t,e.current)))}function pf(){var e=xt.current;return e===null?!0:(Ae&4194048)===Ae?jt===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===jt:!1}function mf(){var e=P.H;return P.H=Nr,e===null?Nr:e}function gf(){var e=P.A;return P.A=Mv,e}function sa(){Fe=4,Hi||(Ae&4194048)!==Ae&&xt.current!==null||(Xs=!0),(zi&134217727)===0&&(ms&134217727)===0||Ue===null||qi(Ue,Ae,Rt,!1)}function yo(e,t,i){var s=Oe;Oe|=2;var r=mf(),n=gf();(Ue!==e||Ae!==t)&&(ta=null,Zs(e,t)),t=!1;var C=Fe;e:do try{if(Me!==0&&Ee!==null){var B=Ee,I=Tt;switch(Me){case 8:So(),C=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var J=Me;if(Me=0,Tt=null,Js(e,B,I,J),i&&Xs){C=0;break e}break;default:J=Me,Me=0,Tt=null,Js(e,B,I,J)}}zv(),C=Fe;break}catch(re){vf(e,re)}while(!0);return t&&e.shellSuspendCounter++,oi=os=null,Oe=s,P.H=r,P.A=n,Ee===null&&(Ue=null,Ae=0,wn()),C}function zv(){for(;Ee!==null;)Sf(Ee)}function jv(e,t){var i=Oe;Oe|=2;var s=mf(),r=gf();Ue!==e||Ae!==t?(ta=null,ea=et()+500,Zs(e,t)):Xs=ur(e,t);e:do try{if(Me!==0&&Ee!==null){t=Ee;var n=Tt;t:switch(Me){case 1:Me=0,Tt=null,Js(e,t,n,1);break;case 2:case 9:if(Ru(n)){Me=0,Tt=null,yf(t);break}t=function(){Me!==2&&Me!==9||Ue!==e||(Me=7),$t(e)},n.then(t,t);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:Ru(n)?(Me=0,Tt=null,yf(t)):(Me=0,Tt=null,Js(e,t,n,7));break;case 5:var C=null;switch(Ee.tag){case 26:C=Ee.memoizedState;case 5:case 27:var B=Ee;if(C?nd(C):B.stateNode.complete){Me=0,Tt=null;var I=B.sibling;if(I!==null)Ee=I;else{var J=B.return;J!==null?(Ee=J,ra(J)):Ee=null}break t}}Me=0,Tt=null,Js(e,t,n,5);break;case 6:Me=0,Tt=null,Js(e,t,n,6);break;case 8:So(),Fe=6;break e;default:throw Error(m(462))}}Uv();break}catch(re){vf(e,re)}while(!0);return oi=os=null,P.H=s,P.A=r,Oe=i,Ee!==null?0:(Ue=null,Ae=0,wn(),Fe)}function Uv(){for(;Ee!==null&&!gs();)Sf(Ee)}function Sf(e){var t=Ph(e.alternate,e,gi);e.memoizedProps=e.pendingProps,t===null?ra(e):Ee=t}function yf(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Hh(i,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=Hh(i,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Ml(t);default:Vh(i,t),t=Ee=mu(t,gi),t=Ph(i,t,gi)}e.memoizedProps=e.pendingProps,t===null?ra(e):Ee=t}function Js(e,t,i,s){oi=os=null,Ml(t),Is=null,Tr=0;var r=t.return;try{if(Tv(e,r,t,i,Ae)){Fe=1,Yn(e,Mt(i,e.current)),Ee=null;return}}catch(n){if(r!==null)throw Ee=r,n;Fe=1,Yn(e,Mt(i,e.current)),Ee=null;return}t.flags&32768?(Re||s===1?e=!0:Xs||(Ae&536870912)!==0?e=!1:(Hi=e=!0,(s===2||s===9||s===3||s===6)&&(s=xt.current,s!==null&&s.tag===13&&(s.flags|=16384))),bf(t,e)):ra(t)}function ra(e){var t=e;do{if((t.flags&32768)!==0){bf(t,Hi);return}e=t.return;var i=kv(t.alternate,t,gi);if(i!==null){Ee=i;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);Fe===0&&(Fe=5)}function bf(e,t){do{var i=Lv(e.alternate,e);if(i!==null){i.flags&=32767,Ee=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Ee=e;return}Ee=e=i}while(e!==null);Fe=6,Ee=null}function Cf(e,t,i,s,r,n,C,B,I){e.cancelPendingCommit=null;do na();while(tt!==0);if((Oe&6)!==0)throw Error(m(327));if(t!==null){if(t===e.current)throw Error(m(177));if(n=t.lanes|t.childLanes,n|=ll,g_(e,i,n,C,B,I),e===Ue&&(Ee=Ue=null,Ae=0),Qs=t,Ui=e,Si=i,po=n,mo=r,hf=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wv(yt,function(){return Tf(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=P.T,P.T=null,r=G.p,G.p=2,C=Oe,Oe|=4;try{Ov(e,t,i)}finally{Oe=C,G.p=r,P.T=s}}tt=1,wf(),Ef(),xf()}}function wf(){if(tt===1){tt=0;var e=Ui,t=Qs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=P.T,P.T=null;var s=G.p;G.p=2;var r=Oe;Oe|=4;try{sf(t,e);var n=Oo,C=ou(e.containerInfo),B=n.focusedElem,I=n.selectionRange;if(C!==B&&B&&B.ownerDocument&&lu(B.ownerDocument.documentElement,B)){if(I!==null&&il(B)){var J=I.start,re=I.end;if(re===void 0&&(re=J),"selectionStart"in B)B.selectionStart=J,B.selectionEnd=Math.min(re,B.value.length);else{var ce=B.ownerDocument||document,$=ce&&ce.defaultView||window;if($.getSelection){var te=$.getSelection(),fe=B.textContent.length,me=Math.min(I.start,fe),je=I.end===void 0?me:Math.min(I.end,fe);!te.extend&&me>je&&(C=je,je=me,me=C);var X=au(B,me),F=au(B,je);if(X&&F&&(te.rangeCount!==1||te.anchorNode!==X.node||te.anchorOffset!==X.offset||te.focusNode!==F.node||te.focusOffset!==F.offset)){var Z=ce.createRange();Z.setStart(X.node,X.offset),te.removeAllRanges(),me>je?(te.addRange(Z),te.extend(F.node,F.offset)):(Z.setEnd(F.node,F.offset),te.addRange(Z))}}}}for(ce=[],te=B;te=te.parentNode;)te.nodeType===1&&ce.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<ce.length;B++){var le=ce[B];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}ma=!!Lo,Oo=Lo=null}finally{Oe=r,G.p=s,P.T=i}}e.current=t,tt=2}}function Ef(){if(tt===2){tt=0;var e=Ui,t=Qs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=P.T,P.T=null;var s=G.p;G.p=2;var r=Oe;Oe|=4;try{Zh(e,t.alternate,t)}finally{Oe=r,G.p=s,P.T=i}}tt=3}}function xf(){if(tt===4||tt===3){tt=0,ft();var e=Ui,t=Qs,i=Si,s=hf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?tt=5:(tt=0,Qs=Ui=null,Af(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ji=null),za(i),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot($i,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=P.T,r=G.p,G.p=2,P.T=null;try{for(var n=e.onRecoverableError,C=0;C<s.length;C++){var B=s[C];n(B.value,{componentStack:B.stack})}}finally{P.T=t,G.p=r}}(Si&3)!==0&&na(),$t(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===go?Vr++:(Vr=0,go=e):Vr=0,Yr(0)}}function Af(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xr(t)))}function na(){return wf(),Ef(),xf(),Tf()}function Tf(){if(tt!==5)return!1;var e=Ui,t=po;po=0;var i=za(Si),s=P.T,r=G.p;try{G.p=32>i?32:i,P.T=null,i=mo,mo=null;var n=Ui,C=Si;if(tt=0,Qs=Ui=null,Si=0,(Oe&6)!==0)throw Error(m(331));var B=Oe;if(Oe|=4,of(n.current),nf(n,n.current,C,i),Oe=B,Yr(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot($i,n)}catch{}return!0}finally{G.p=r,P.T=s,Af(e,t)}}function Rf(e,t,i){t=Mt(i,t),t=Gl(e.stateNode,t,2),e=Oi(e,t,2),e!==null&&(hr(e,2),$t(e))}function Ne(e,t,i){if(e.tag===3)Rf(e,e,i);else for(;t!==null;){if(t.tag===3){Rf(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ji===null||!ji.has(s))){e=Mt(i,e),i=Rh(2),s=Oi(t,i,2),s!==null&&(Dh(i,s,t,e),hr(s,2),$t(s));break}}t=t.return}}function bo(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new Nv;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(fo=!0,r.add(i),e=qv.bind(null,e,t,i),t.then(e,e))}function qv(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ue===e&&(Ae&i)===i&&(Fe===4||Fe===3&&(Ae&62914560)===Ae&&300>et()-$n?(Oe&2)===0&&Zs(e,0):_o|=i,Gs===Ae&&(Gs=0)),$t(e)}function Df(e,t){t===0&&(t=Cc()),e=ns(e,t),e!==null&&(hr(e,t),$t(e))}function Iv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Df(e,i)}function Pv(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(m(314))}s!==null&&s.delete(t),Df(e,i)}function Wv(e,t){return Qi(e,t)}var aa=null,$s=null,Co=!1,la=!1,wo=!1,Ii=0;function $t(e){e!==$s&&e.next===null&&($s===null?aa=$s=e:$s=$s.next=e),la=!0,Co||(Co=!0,Yv())}function Yr(e,t){if(!wo&&la){wo=!0;do for(var i=!1,s=aa;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var C=s.suspendedLanes,B=s.pingedLanes;n=(1<<31-Ct(42|e)+1)-1,n&=r&~(C&~B),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Bf(s,n))}else n=Ae,n=hn(s,s===Ue?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||ur(s,n)||(i=!0,Bf(s,n));s=s.next}while(i);wo=!1}}function Vv(){kf()}function kf(){la=Co=!1;var e=0;Ii!==0&&tp()&&(e=Ii);for(var t=et(),i=null,s=aa;s!==null;){var r=s.next,n=Lf(s,t);n===0?(s.next=null,i===null?aa=r:i.next=r,r===null&&($s=i)):(i=s,(e!==0||(n&3)!==0)&&(la=!0)),s=r}tt!==0&&tt!==5||Yr(e),Ii!==0&&(Ii=0)}function Lf(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var C=31-Ct(n),B=1<<C,I=r[C];I===-1?((B&i)===0||(B&s)!==0)&&(r[C]=m_(B,t)):I<=t&&(e.expiredLanes|=B),n&=~B}if(t=Ue,i=Ae,i=hn(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Zi(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||ur(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Zi(s),za(i)){case 2:case 8:i=Ss;break;case 32:i=yt;break;case 268435456:i=Wt;break;default:i=yt}return s=Of.bind(null,e),i=Qi(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Zi(s),e.callbackPriority=2,e.callbackNode=null,2}function Of(e,t){if(tt!==0&&tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(na()&&e.callbackNode!==i)return null;var s=Ae;return s=hn(e,e===Ue?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(df(e,s,t),Lf(e,et()),e.callbackNode!=null&&e.callbackNode===i?Of.bind(null,e):null)}function Bf(e,t){if(na())return null;df(e,t,!0)}function Yv(){sp(function(){(Oe&6)!==0?Qi(Ci,Vv):kf()})}function Eo(){if(Ii===0){var e=js;e===0&&(e=on,on<<=1,(on&261888)===0&&(on=256)),Ii=e}return Ii}function Mf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:vn(""+e)}function Nf(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 Fv(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Mf((r[dt]||null).action),C=s.submitter;C&&(t=(t=C[dt]||null)?Mf(t.formAction):C.getAttribute("formAction"),t!==null&&(n=t,C=null));var B=new Sn("action","action",null,s,r);e.push({event:B,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ii!==0){var I=C?Nf(r,C):new FormData(r);Wl(i,{pending:!0,data:I,method:r.method,action:n},null,I)}}else typeof n=="function"&&(B.preventDefault(),I=C?Nf(r,C):new FormData(r),Wl(i,{pending:!0,data:I,method:r.method,action:n},n,I))},currentTarget:r}]})}}for(var xo=0;xo<al.length;xo++){var Ao=al[xo],Kv=Ao.toLowerCase(),Xv=Ao[0].toUpperCase()+Ao.slice(1);Vt(Kv,"on"+Xv)}Vt(hu,"onAnimationEnd"),Vt(fu,"onAnimationIteration"),Vt(du,"onAnimationStart"),Vt("dblclick","onDoubleClick"),Vt("focusin","onFocus"),Vt("focusout","onBlur"),Vt(uv,"onTransitionRun"),Vt(hv,"onTransitionStart"),Vt(fv,"onTransitionCancel"),Vt(_u,"onTransitionEnd"),Es("onMouseEnter",["mouseout","mouseover"]),Es("onMouseLeave",["mouseout","mouseover"]),Es("onPointerEnter",["pointerout","pointerover"]),Es("onPointerLeave",["pointerout","pointerover"]),ts("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ts("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ts("onBeforeInput",["compositionend","keypress","textInput","paste"]),ts("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ts("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ts("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fr="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(" "),Gv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fr));function Hf(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var n=void 0;if(t)for(var C=s.length-1;0<=C;C--){var B=s[C],I=B.instance,J=B.currentTarget;if(B=B.listener,I!==n&&r.isPropagationStopped())break e;n=B,r.currentTarget=J;try{n(r)}catch(re){Cn(re)}r.currentTarget=null,n=I}else for(C=0;C<s.length;C++){if(B=s[C],I=B.instance,J=B.currentTarget,B=B.listener,I!==n&&r.isPropagationStopped())break e;n=B,r.currentTarget=J;try{n(r)}catch(re){Cn(re)}r.currentTarget=null,n=I}}}}function xe(e,t){var i=t[ja];i===void 0&&(i=t[ja]=new Set);var s=e+"__bubble";i.has(s)||(zf(t,e,2,!1),i.add(s))}function To(e,t,i){var s=0;t&&(s|=4),zf(i,e,s,t)}var oa="_reactListening"+Math.random().toString(36).slice(2);function Ro(e){if(!e[oa]){e[oa]=!0,Dc.forEach(function(i){i!=="selectionchange"&&(Gv.has(i)||To(i,!1,e),To(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[oa]||(t[oa]=!0,To("selectionchange",!1,t))}}function zf(e,t,i,s){switch(fd(t)){case 2:var r=wp;break;case 8:r=Ep;break;default:r=Wo}i=r.bind(null,t,i,e),r=void 0,!Ka||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Do(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var C=s.tag;if(C===3||C===4){var B=s.stateNode.containerInfo;if(B===r)break;if(C===4)for(C=s.return;C!==null;){var I=C.tag;if((I===3||I===4)&&C.stateNode.containerInfo===r)return;C=C.return}for(;B!==null;){if(C=bs(B),C===null)return;if(I=C.tag,I===5||I===6||I===26||I===27){s=n=C;continue e}B=B.parentNode}}s=s.return}Ic(function(){var J=n,re=Ya(i),ce=[];e:{var $=vu.get(e);if($!==void 0){var te=Sn,fe=e;switch(e){case"keypress":if(mn(i)===0)break e;case"keydown":case"keyup":te=P_;break;case"focusin":fe="focus",te=Za;break;case"focusout":fe="blur",te=Za;break;case"beforeblur":case"afterblur":te=Za;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":te=Vc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=k_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=Y_;break;case hu:case fu:case du:te=B_;break;case _u:te=K_;break;case"scroll":case"scrollend":te=R_;break;case"wheel":te=G_;break;case"copy":case"cut":case"paste":te=N_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Fc;break;case"toggle":case"beforetoggle":te=Z_}var me=(t&4)!==0,je=!me&&(e==="scroll"||e==="scrollend"),X=me?$!==null?$+"Capture":null:$;me=[];for(var F=J,Z;F!==null;){var le=F;if(Z=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||Z===null||X===null||(le=_r(F,X),le!=null&&me.push(Kr(F,le,Z))),je)break;F=F.return}0<me.length&&($=new te($,fe,null,i,re),ce.push({event:$,listeners:me}))}}if((t&7)===0){e:{if($=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",$&&i!==Va&&(fe=i.relatedTarget||i.fromElement)&&(bs(fe)||fe[ys]))break e;if((te||$)&&($=re.window===re?re:($=re.ownerDocument)?$.defaultView||$.parentWindow:window,te?(fe=i.relatedTarget||i.toElement,te=J,fe=fe?bs(fe):null,fe!==null&&(je=K(fe),me=fe.tag,fe!==je||me!==5&&me!==27&&me!==6)&&(fe=null)):(te=null,fe=J),te!==fe)){if(me=Vc,le="onMouseLeave",X="onMouseEnter",F="mouse",(e==="pointerout"||e==="pointerover")&&(me=Fc,le="onPointerLeave",X="onPointerEnter",F="pointer"),je=te==null?$:dr(te),Z=fe==null?$:dr(fe),$=new me(le,F+"leave",te,i,re),$.target=je,$.relatedTarget=Z,le=null,bs(re)===J&&(me=new me(X,F+"enter",fe,i,re),me.target=Z,me.relatedTarget=je,le=me),je=le,te&&fe)t:{for(me=Qv,X=te,F=fe,Z=0,le=X;le;le=me(le))Z++;le=0;for(var pe=F;pe;pe=me(pe))le++;for(;0<Z-le;)X=me(X),Z--;for(;0<le-Z;)F=me(F),le--;for(;Z--;){if(X===F||F!==null&&X===F.alternate){me=X;break t}X=me(X),F=me(F)}me=null}else me=null;te!==null&&jf(ce,$,te,me,!1),fe!==null&&je!==null&&jf(ce,je,fe,me,!0)}}e:{if($=J?dr(J):window,te=$.nodeName&&$.nodeName.toLowerCase(),te==="select"||te==="input"&&$.type==="file")var ke=eu;else if(Jc($))if(tu)ke=lv;else{ke=nv;var _e=rv}else te=$.nodeName,!te||te.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?J&&Wa(J.elementType)&&(ke=eu):ke=av;if(ke&&(ke=ke(e,J))){$c(ce,ke,i,re);break e}_e&&_e(e,$,J),e==="focusout"&&J&&$.type==="number"&&J.memoizedProps.value!=null&&Pa($,"number",$.value)}switch(_e=J?dr(J):window,e){case"focusin":(Jc(_e)||_e.contentEditable==="true")&&(ks=_e,sl=J,Cr=null);break;case"focusout":Cr=sl=ks=null;break;case"mousedown":rl=!0;break;case"contextmenu":case"mouseup":case"dragend":rl=!1,cu(ce,i,re);break;case"selectionchange":if(cv)break;case"keydown":case"keyup":cu(ce,i,re)}var be;if($a)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Ds?Qc(e,i)&&(Te="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Te="onCompositionStart");Te&&(Kc&&i.locale!=="ko"&&(Ds||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Ds&&(be=Pc()):(xi=re,Xa="value"in xi?xi.value:xi.textContent,Ds=!0)),_e=ca(J,Te),0<_e.length&&(Te=new Yc(Te,e,null,i,re),ce.push({event:Te,listeners:_e}),be?Te.data=be:(be=Zc(i),be!==null&&(Te.data=be)))),(be=$_?ev(e,i):tv(e,i))&&(Te=ca(J,"onBeforeInput"),0<Te.length&&(_e=new Yc("onBeforeInput","beforeinput",null,i,re),ce.push({event:_e,listeners:Te}),_e.data=be)),Fv(ce,e,J,i,re)}Hf(ce,t)})}function Kr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function ca(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,n=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||n===null||(r=_r(e,i),r!=null&&s.unshift(Kr(e,r,n)),r=_r(e,t),r!=null&&s.push(Kr(e,r,n))),e.tag===3)return s;e=e.return}return[]}function Qv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jf(e,t,i,s,r){for(var n=t._reactName,C=[];i!==null&&i!==s;){var B=i,I=B.alternate,J=B.stateNode;if(B=B.tag,I!==null&&I===s)break;B!==5&&B!==26&&B!==27||J===null||(I=J,r?(J=_r(i,n),J!=null&&C.unshift(Kr(i,J,I))):r||(J=_r(i,n),J!=null&&C.push(Kr(i,J,I)))),i=i.return}C.length!==0&&e.push({event:t,listeners:C})}var Zv=/\r\n?/g,Jv=/\u0000|\uFFFD/g;function Uf(e){return(typeof e=="string"?e:""+e).replace(Zv,`
|
|
9
|
+
`).replace(Jv,"")}function qf(e,t){return t=Uf(t),Uf(e)===t}function ze(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||As(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&As(e,""+s);break;case"className":dn(e,"class",s);break;case"tabIndex":dn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":dn(e,i,s);break;case"style":Uc(e,s,n);break;case"data":if(t!=="object"){dn(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=vn(""+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 n=="function"&&(i==="formAction"?(t!=="input"&&ze(e,t,"name",r.name,r,null),ze(e,t,"formEncType",r.formEncType,r,null),ze(e,t,"formMethod",r.formMethod,r,null),ze(e,t,"formTarget",r.formTarget,r,null)):(ze(e,t,"encType",r.encType,r,null),ze(e,t,"method",r.method,r,null),ze(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=vn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ri);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(m(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(m(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=vn(""+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":xe("beforetoggle",e),xe("toggle",e),fn(e,"popover",s);break;case"xlinkActuate":si(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":si(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":si(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":si(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":si(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":si(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":si(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":si(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":si(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":fn(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=A_.get(i)||i,fn(e,i,s))}}function ko(e,t,i,s,r,n){switch(i){case"style":Uc(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(m(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(m(60));e.innerHTML=i}}break;case"children":typeof s=="string"?As(e,s):(typeof s=="number"||typeof s=="bigint")&&As(e,""+s);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ri);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kc.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),n=e[dt]||null,n=n!=null?n[i]:null,typeof n=="function"&&e.removeEventListener(t,n,r),typeof s=="function")){typeof n!="function"&&n!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):fn(e,i,s)}}}function ct(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var C=i[n];if(C!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(m(137,t));default:ze(e,t,n,C,i,null)}}r&&ze(e,t,"srcSet",i.srcSet,i,null),s&&ze(e,t,"src",i.src,i,null);return;case"input":xe("invalid",e);var B=n=C=r=null,I=null,J=null;for(s in i)if(i.hasOwnProperty(s)){var re=i[s];if(re!=null)switch(s){case"name":r=re;break;case"type":C=re;break;case"checked":I=re;break;case"defaultChecked":J=re;break;case"value":n=re;break;case"defaultValue":B=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(m(137,t));break;default:ze(e,t,s,re,i,null)}}Nc(e,n,B,I,J,C,r,!1);return;case"select":xe("invalid",e),s=C=n=null;for(r in i)if(i.hasOwnProperty(r)&&(B=i[r],B!=null))switch(r){case"value":n=B;break;case"defaultValue":C=B;break;case"multiple":s=B;default:ze(e,t,r,B,i,null)}t=n,i=C,e.multiple=!!s,t!=null?xs(e,!!s,t,!1):i!=null&&xs(e,!!s,i,!0);return;case"textarea":xe("invalid",e),n=r=s=null;for(C in i)if(i.hasOwnProperty(C)&&(B=i[C],B!=null))switch(C){case"value":s=B;break;case"defaultValue":r=B;break;case"children":n=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(m(91));break;default:ze(e,t,C,B,i,null)}zc(e,s,r,n);return;case"option":for(I in i)i.hasOwnProperty(I)&&(s=i[I],s!=null)&&(I==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":ze(e,t,I,s,i,null));return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(s=0;s<Fr.length;s++)xe(Fr[s],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("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(J in i)if(i.hasOwnProperty(J)&&(s=i[J],s!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(m(137,t));default:ze(e,t,J,s,i,null)}return;default:if(Wa(t)){for(re in i)i.hasOwnProperty(re)&&(s=i[re],s!==void 0&&ko(e,t,re,s,i,void 0));return}}for(B in i)i.hasOwnProperty(B)&&(s=i[B],s!=null&&ze(e,t,B,s,i,null))}function $v(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 r=null,n=null,C=null,B=null,I=null,J=null,re=null;for(te in i){var ce=i[te];if(i.hasOwnProperty(te)&&ce!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":I=ce;default:s.hasOwnProperty(te)||ze(e,t,te,null,s,ce)}}for(var $ in s){var te=s[$];if(ce=i[$],s.hasOwnProperty($)&&(te!=null||ce!=null))switch($){case"type":n=te;break;case"name":r=te;break;case"checked":J=te;break;case"defaultChecked":re=te;break;case"value":C=te;break;case"defaultValue":B=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(m(137,t));break;default:te!==ce&&ze(e,t,$,te,s,ce)}}Ia(e,C,B,I,J,re,n,r);return;case"select":te=C=B=$=null;for(n in i)if(I=i[n],i.hasOwnProperty(n)&&I!=null)switch(n){case"value":break;case"multiple":te=I;default:s.hasOwnProperty(n)||ze(e,t,n,null,s,I)}for(r in s)if(n=s[r],I=i[r],s.hasOwnProperty(r)&&(n!=null||I!=null))switch(r){case"value":$=n;break;case"defaultValue":B=n;break;case"multiple":C=n;default:n!==I&&ze(e,t,r,n,s,I)}t=B,i=C,s=te,$!=null?xs(e,!!i,$,!1):!!s!=!!i&&(t!=null?xs(e,!!i,t,!0):xs(e,!!i,i?[]:"",!1));return;case"textarea":te=$=null;for(B in i)if(r=i[B],i.hasOwnProperty(B)&&r!=null&&!s.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:ze(e,t,B,null,s,r)}for(C in s)if(r=s[C],n=i[C],s.hasOwnProperty(C)&&(r!=null||n!=null))switch(C){case"value":$=r;break;case"defaultValue":te=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(m(91));break;default:r!==n&&ze(e,t,C,r,s,n)}Hc(e,$,te);return;case"option":for(var fe in i)$=i[fe],i.hasOwnProperty(fe)&&$!=null&&!s.hasOwnProperty(fe)&&(fe==="selected"?e.selected=!1:ze(e,t,fe,null,s,$));for(I in s)$=s[I],te=i[I],s.hasOwnProperty(I)&&$!==te&&($!=null||te!=null)&&(I==="selected"?e.selected=$&&typeof $!="function"&&typeof $!="symbol":ze(e,t,I,$,s,te));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 me in i)$=i[me],i.hasOwnProperty(me)&&$!=null&&!s.hasOwnProperty(me)&&ze(e,t,me,null,s,$);for(J in s)if($=s[J],te=i[J],s.hasOwnProperty(J)&&$!==te&&($!=null||te!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(m(137,t));break;default:ze(e,t,J,$,s,te)}return;default:if(Wa(t)){for(var je in i)$=i[je],i.hasOwnProperty(je)&&$!==void 0&&!s.hasOwnProperty(je)&&ko(e,t,je,void 0,s,$);for(re in s)$=s[re],te=i[re],!s.hasOwnProperty(re)||$===te||$===void 0&&te===void 0||ko(e,t,re,$,s,te);return}}for(var X in i)$=i[X],i.hasOwnProperty(X)&&$!=null&&!s.hasOwnProperty(X)&&ze(e,t,X,null,s,$);for(ce in s)$=s[ce],te=i[ce],!s.hasOwnProperty(ce)||$===te||$==null&&te==null||ze(e,t,ce,$,s,te)}function If(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ep(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],n=r.transferSize,C=r.initiatorType,B=r.duration;if(n&&B&&If(C)){for(C=0,B=r.responseEnd,s+=1;s<i.length;s++){var I=i[s],J=I.startTime;if(J>B)break;var re=I.transferSize,ce=I.initiatorType;re&&If(ce)&&(I=I.responseEnd,C+=re*(I<B?1:(B-J)/(I-J)))}if(--s,t+=8*(n+C)/(r.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 Lo=null,Oo=null;function ua(e){return e.nodeType===9?e:e.ownerDocument}function Pf(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 Wf(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 Bo(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 Mo=null;function tp(){var e=window.event;return e&&e.type==="popstate"?e===Mo?!1:(Mo=e,!0):(Mo=null,!1)}var Vf=typeof setTimeout=="function"?setTimeout:void 0,ip=typeof clearTimeout=="function"?clearTimeout:void 0,Yf=typeof Promise=="function"?Promise:void 0,sp=typeof queueMicrotask=="function"?queueMicrotask:typeof Yf<"u"?function(e){return Yf.resolve(null).then(e).catch(rp)}:Vf;function rp(e){setTimeout(function(){throw e})}function Pi(e){return e==="head"}function Ff(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),sr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Xr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Xr(i);for(var n=i.firstChild;n;){var C=n.nextSibling,B=n.nodeName;n[fr]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=C}}else i==="body"&&Xr(e.ownerDocument.body);i=r}while(i);sr(t)}function Kf(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 No(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":No(i),Ua(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function np(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[fr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(n=e.getAttribute("rel"),n==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(n!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(n=e.getAttribute("src"),(n!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&n&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var n=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===n)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function ap(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ut(e.nextSibling),e===null))return null;return e}function Xf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function Ho(e){return e.data==="$?"||e.data==="$~"}function zo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function lp(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 Ut(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 jo=null;function Gf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ut(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Qf(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 Zf(e,t,i){switch(t=ua(i),e){case"html":if(e=t.documentElement,!e)throw Error(m(452));return e;case"head":if(e=t.head,!e)throw Error(m(453));return e;case"body":if(e=t.body,!e)throw Error(m(454));return e;default:throw Error(m(451))}}function Xr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ua(e)}var qt=new Map,Jf=new Set;function ha(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yi=G.d;G.d={f:op,r:cp,D:up,C:hp,L:fp,m:dp,X:vp,S:_p,M:pp};function op(){var e=yi.f(),t=ia();return e||t}function cp(e){var t=Cs(e);t!==null&&t.tag===5&&t.type==="form"?_h(t):yi.r(e)}var er=typeof document>"u"?null:document;function $f(e,t,i){var s=er;if(s&&typeof t=="string"&&t){var r=Ot(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),Jf.has(r)||(Jf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),ct(t,"link",e),st(t),s.head.appendChild(t)))}}function up(e){yi.D(e),$f("dns-prefetch",e,null)}function hp(e,t){yi.C(e,t),$f("preconnect",e,t)}function fp(e,t,i){yi.L(e,t,i);var s=er;if(s&&e&&t){var r='link[rel="preload"][as="'+Ot(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ot(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ot(i.imageSizes)+'"]')):r+='[href="'+Ot(e)+'"]';var n=r;switch(t){case"style":n=tr(e);break;case"script":n=ir(e)}qt.has(n)||(e=h({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),qt.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Gr(n))||t==="script"&&s.querySelector(Qr(n))||(t=s.createElement("link"),ct(t,"link",e),st(t),s.head.appendChild(t)))}}function dp(e,t){yi.m(e,t);var i=er;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ot(s)+'"][href="'+Ot(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ir(e)}if(!qt.has(n)&&(e=h({rel:"modulepreload",href:e},t),qt.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Qr(n)))return}s=i.createElement("link"),ct(s,"link",e),st(s),i.head.appendChild(s)}}}function _p(e,t,i){yi.S(e,t,i);var s=er;if(s&&e){var r=ws(s).hoistableStyles,n=tr(e);t=t||"default";var C=r.get(n);if(!C){var B={loading:0,preload:null};if(C=s.querySelector(Gr(n)))B.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=qt.get(n))&&Uo(e,i);var I=C=s.createElement("link");st(I),ct(I,"link",e),I._p=new Promise(function(J,re){I.onload=J,I.onerror=re}),I.addEventListener("load",function(){B.loading|=1}),I.addEventListener("error",function(){B.loading|=2}),B.loading|=4,fa(C,t,s)}C={type:"stylesheet",instance:C,count:1,state:B},r.set(n,C)}}}function vp(e,t){yi.X(e,t);var i=er;if(i&&e){var s=ws(i).hoistableScripts,r=ir(e),n=s.get(r);n||(n=i.querySelector(Qr(r)),n||(e=h({src:e,async:!0},t),(t=qt.get(r))&&qo(e,t),n=i.createElement("script"),st(n),ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function pp(e,t){yi.M(e,t);var i=er;if(i&&e){var s=ws(i).hoistableScripts,r=ir(e),n=s.get(r);n||(n=i.querySelector(Qr(r)),n||(e=h({src:e,async:!0,type:"module"},t),(t=qt.get(r))&&qo(e,t),n=i.createElement("script"),st(n),ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function ed(e,t,i,s){var r=(r=de.current)?ha(r):null;if(!r)throw Error(m(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=tr(i.href),i=ws(r).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=tr(i.href);var n=ws(r).hoistableStyles,C=n.get(e);if(C||(r=r.ownerDocument||r,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,C),(n=r.querySelector(Gr(e)))&&!n._p&&(C.instance=n,C.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),n||mp(r,e,i,C.state))),t&&s===null)throw Error(m(528,""));return C}if(t&&s!==null)throw Error(m(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ir(i),i=ws(r).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(m(444,e))}}function tr(e){return'href="'+Ot(e)+'"'}function Gr(e){return'link[rel="stylesheet"]['+e+"]"}function td(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function mp(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}),ct(t,"link",i),st(t),e.head.appendChild(t))}function ir(e){return'[src="'+Ot(e)+'"]'}function Qr(e){return"script[async]"+e}function id(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ot(i.href)+'"]');if(s)return t.instance=s,st(s),s;var r=h({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),st(s),ct(s,"style",r),fa(s,i.precedence,e),t.instance=s;case"stylesheet":r=tr(i.href);var n=e.querySelector(Gr(r));if(n)return t.state.loading|=4,t.instance=n,st(n),n;s=td(i),(r=qt.get(r))&&Uo(s,r),n=(e.ownerDocument||e).createElement("link"),st(n);var C=n;return C._p=new Promise(function(B,I){C.onload=B,C.onerror=I}),ct(n,"link",s),t.state.loading|=4,fa(n,i.precedence,e),t.instance=n;case"script":return n=ir(i.src),(r=e.querySelector(Qr(n)))?(t.instance=r,st(r),r):(s=i,(r=qt.get(n))&&(s=h({},i),qo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),st(r),ct(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(m(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,fa(s,i.precedence,e));return t.instance}function fa(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,n=r,C=0;C<s.length;C++){var B=s[C];if(B.dataset.precedence===t)n=B;else if(n!==r)break}n?n.parentNode.insertBefore(e,n.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Uo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var da=null;function sd(e,t,i){if(da===null){var s=new Map,r=da=new Map;r.set(i,s)}else r=da,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var n=i[r];if(!(n[fr]||n[nt]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var C=n.getAttribute(t)||"";C=e+C;var B=s.get(C);B?B.push(n):s.set(C,[n])}}return s}function rd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function gp(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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 nd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Sp(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 r=tr(s.href),n=t.querySelector(Gr(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_a.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,st(n);return}n=t.ownerDocument||t,s=td(s),(r=qt.get(r))&&Uo(s,r),n=n.createElement("link"),st(n);var C=n;C._p=new Promise(function(B,I){C.onload=B,C.onerror=I}),ct(n,"link",s),i.instance=n}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=_a.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Io=0;function yp(e,t){return e.stylesheets&&e.count===0&&pa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&pa(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&Io===0&&(Io=62500*ep());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pa(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>Io?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function _a(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var va=null;function pa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,va=new Map,t.forEach(bp,e),va=null,_a.call(e))}function bp(e,t){if(!(t.state.loading&4)){var i=va.get(e);if(i)var s=i.get(null);else{i=new Map,va.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var C=r[n];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(i.set(C.dataset.precedence,C),s=C)}s&&i.set(null,s)}r=t.instance,C=r.getAttribute("data-precedence"),n=i.get(C)||s,n===s&&i.set(null,r),i.set(C,r),this.count++,s=_a.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),n?n.parentNode.insertBefore(r,n.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Zr={$$typeof:o,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function Cp(e,t,i,s,r,n,C,B,I){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=Na(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Na(0),this.hiddenUpdates=Na(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function ad(e,t,i,s,r,n,C,B,I,J,re,ce){return e=new Cp(e,t,i,C,I,J,re,ce,B),t=1,n===!0&&(t|=24),n=Et(3,null,null,t),e.current=n,n.stateNode=e,t=Sl(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},wl(n),e}function ld(e){return e?(e=Bs,e):Bs}function od(e,t,i,s,r,n){r=ld(r),s.context===null?s.context=r:s.pendingContext=r,s=Li(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=Oi(e,s,t),i!==null&&(St(i,e,t),Dr(i,e,t))}function cd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Po(e,t){cd(e,t),(e=e.alternate)&&cd(e,t)}function ud(e){if(e.tag===13||e.tag===31){var t=ns(e,67108864);t!==null&&St(t,e,67108864),Po(e,67108864)}}function hd(e){if(e.tag===13||e.tag===31){var t=Dt();t=Ha(t);var i=ns(e,t);i!==null&&St(i,e,t),Po(e,t)}}var ma=!0;function wp(e,t,i,s){var r=P.T;P.T=null;var n=G.p;try{G.p=2,Wo(e,t,i,s)}finally{G.p=n,P.T=r}}function Ep(e,t,i,s){var r=P.T;P.T=null;var n=G.p;try{G.p=8,Wo(e,t,i,s)}finally{G.p=n,P.T=r}}function Wo(e,t,i,s){if(ma){var r=Vo(s);if(r===null)Do(e,t,s,ga,i),dd(e,s);else if(Ap(r,e,t,i,s))s.stopPropagation();else if(dd(e,s),t&4&&-1<xp.indexOf(e)){for(;r!==null;){var n=Cs(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var C=es(n.pendingLanes);if(C!==0){var B=n;for(B.pendingLanes|=2,B.entangledLanes|=2;C;){var I=1<<31-Ct(C);B.entanglements[1]|=I,C&=~I}$t(n),(Oe&6)===0&&(ea=et()+500,Yr(0))}}break;case 31:case 13:B=ns(n,2),B!==null&&St(B,n,2),ia(),Po(n,2)}if(n=Vo(s),n===null&&Do(e,t,s,ga,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else Do(e,t,s,null,i)}}function Vo(e){return e=Ya(e),Yo(e)}var ga=null;function Yo(e){if(ga=null,e=bs(e),e!==null){var t=K(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=z(t),e!==null)return e;e=null}else if(i===31){if(e=u(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 ga=e,null}function fd(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(kt()){case Ci:return 2;case Ss:return 8;case yt:case cr:return 32;case Wt:return 268435456;default:return 32}default:return 32}}var Fo=!1,Wi=null,Vi=null,Yi=null,Jr=new Map,$r=new Map,Fi=[],xp="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 dd(e,t){switch(e){case"focusin":case"focusout":Wi=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Yi=null;break;case"pointerover":case"pointerout":Jr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$r.delete(t.pointerId)}}function en(e,t,i,s,r,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:n,targetContainers:[r]},t!==null&&(t=Cs(t),t!==null&&ud(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Ap(e,t,i,s,r){switch(t){case"focusin":return Wi=en(Wi,e,t,i,s,r),!0;case"dragenter":return Vi=en(Vi,e,t,i,s,r),!0;case"mouseover":return Yi=en(Yi,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return Jr.set(n,en(Jr.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,$r.set(n,en($r.get(n)||null,e,t,i,s,r)),!0}return!1}function _d(e){var t=bs(e.target);if(t!==null){var i=K(t);if(i!==null){if(t=i.tag,t===13){if(t=z(i),t!==null){e.blockedOn=t,Tc(e.priority,function(){hd(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,Tc(e.priority,function(){hd(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Sa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Vo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Va=s,i.target.dispatchEvent(s),Va=null}else return t=Cs(i),t!==null&&ud(t),e.blockedOn=i,!1;t.shift()}return!0}function vd(e,t,i){Sa(e)&&i.delete(t)}function Tp(){Fo=!1,Wi!==null&&Sa(Wi)&&(Wi=null),Vi!==null&&Sa(Vi)&&(Vi=null),Yi!==null&&Sa(Yi)&&(Yi=null),Jr.forEach(vd),$r.forEach(vd)}function ya(e,t){e.blockedOn===t&&(e.blockedOn=null,Fo||(Fo=!0,p.unstable_scheduleCallback(p.unstable_NormalPriority,Tp)))}var ba=null;function pd(e){ba!==e&&(ba=e,p.unstable_scheduleCallback(p.unstable_NormalPriority,function(){ba===e&&(ba=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(Yo(s||i)===null)continue;break}var n=Cs(i);n!==null&&(e.splice(t,3),t-=3,Wl(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function sr(e){function t(I){return ya(I,e)}Wi!==null&&ya(Wi,e),Vi!==null&&ya(Vi,e),Yi!==null&&ya(Yi,e),Jr.forEach(t),$r.forEach(t);for(var i=0;i<Fi.length;i++){var s=Fi[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Fi.length&&(i=Fi[0],i.blockedOn===null);)_d(i),i.blockedOn===null&&Fi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],n=i[s+1],C=r[dt]||null;if(typeof n=="function")C||pd(i);else if(C){var B=null;if(n&&n.hasAttribute("formAction")){if(r=n,C=n[dt]||null)B=C.formAction;else if(Yo(r)!==null)continue}else B=C.action;typeof B=="function"?i[s+1]=B:(i.splice(s,3),s-=3),pd(i)}}}function md(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(C){return r=C})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var n=navigation.currentEntry;n&&n.url!=null&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=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),r!==null&&(r(),r=null)}}}function Ko(e){this._internalRoot=e}Ca.prototype.render=Ko.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(m(409));var i=t.current,s=Dt();od(i,s,e,t,null,null)},Ca.prototype.unmount=Ko.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;od(e.current,2,null,e,null,null),ia(),t[ys]=null}};function Ca(e){this._internalRoot=e}Ca.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ac();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Fi.length&&t!==0&&t<Fi[i].priority;i++);Fi.splice(i,0,e),i===0&&_d(e)}};var gd=f.version;if(gd!=="19.2.3")throw Error(m(527,gd,"19.2.3"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(m(188)):(e=Object.keys(e).join(","),Error(m(268,e)));return e=_(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wa.isDisabled&&wa.supportsFiber)try{$i=wa.inject(Rp),bt=wa}catch{}}return sn.createRoot=function(e,t){if(!M(e))throw Error(m(299));var i=!1,s="",r=Eh,n=xh,C=Ah;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(C=t.onRecoverableError)),t=ad(e,1,!1,null,null,i,s,null,r,n,C,md),e[ys]=t.current,Ro(e),new Ko(t)},sn.hydrateRoot=function(e,t,i){if(!M(e))throw Error(m(299));var s=!1,r="",n=Eh,C=xh,B=Ah,I=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(n=i.onUncaughtError),i.onCaughtError!==void 0&&(C=i.onCaughtError),i.onRecoverableError!==void 0&&(B=i.onRecoverableError),i.formState!==void 0&&(I=i.formState)),t=ad(e,1,!0,t,i??null,s,r,I,n,C,B,md),t.context=ld(null),i=t.current,s=Dt(),s=Ha(s),r=Li(s),r.callback=null,Oi(i,r,s),i=s,t.current.lanes=i,hr(t,i),$t(t),e[ys]=t.current,Ro(e),new Ca(t)},sn.version="19.2.3",sn}var Rd;function Up(){if(Rd)return Qo.exports;Rd=1;function p(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p)}catch(f){console.error(f)}}return p(),Qo.exports=jp(),Qo.exports}var qp=Up();function Ip(){return j.jsx("header",{className:"h-12 w-full bg-gray-900/80 border-b border-gray-800 px-6 py-2",children:j.jsxs("div",{className:"flex items-center gap-4",children:[j.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-600 to-indigo-600 rounded-xl flex items-center justify-center shadow-lg shadow-blue-500/20",children:j.jsx("i",{className:"fas fa-boxes text-white text-lg"})}),j.jsx("div",{children:j.jsxs("h1",{className:"font-bold text-lg tracking-wide text-white",children:["Monorepo",j.jsx("span",{className:"pl-2 text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-purple-400",children:"Time"})]})})]})})}const Pp={},Dd=p=>{let f;const v=new Set,m=(S,h)=>{const y=typeof S=="function"?S(f):S;if(!Object.is(y,f)){const x=f;f=h??(typeof y!="object"||y===null)?y:Object.assign({},f,y),v.forEach(A=>A(f,x))}},M=()=>f,d={setState:m,getState:M,getInitialState:()=>_,subscribe:S=>(v.add(S),()=>v.delete(S)),destroy:()=>{(Pp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),v.clear()}},_=f=p(m,M,d);return d},Wp=p=>p?Dd(p):Dd;var ec={exports:{}},tc={},ic={exports:{}},sc={};var kd;function Vp(){if(kd)return sc;kd=1;var p=ln();function f(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var v=typeof Object.is=="function"?Object.is:f,m=p.useState,M=p.useEffect,K=p.useLayoutEffect,z=p.useDebugValue;function u(h,y){var x=y(),A=m({inst:{value:x,getSnapshot:y}}),E=A[0].inst,a=A[1];return K(function(){E.value=x,E.getSnapshot=y,d(E)&&a({inst:E})},[h,x,y]),M(function(){return d(E)&&a({inst:E}),h(function(){d(E)&&a({inst:E})})},[h]),z(x),x}function d(h){var y=h.getSnapshot;h=h.value;try{var x=y();return!v(h,x)}catch{return!0}}function _(h,y){return y()}var S=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?_:u;return sc.useSyncExternalStore=p.useSyncExternalStore!==void 0?p.useSyncExternalStore:S,sc}var Ld;function Yp(){return Ld||(Ld=1,ic.exports=Vp()),ic.exports}var Od;function Fp(){if(Od)return tc;Od=1;var p=ln(),f=Yp();function v(_,S){return _===S&&(_!==0||1/_===1/S)||_!==_&&S!==S}var m=typeof Object.is=="function"?Object.is:v,M=f.useSyncExternalStore,K=p.useRef,z=p.useEffect,u=p.useMemo,d=p.useDebugValue;return tc.useSyncExternalStoreWithSelector=function(_,S,h,y,x){var A=K(null);if(A.current===null){var E={hasValue:!1,value:null};A.current=E}else E=A.current;A=u(function(){function c(T){if(!l){if(l=!0,o=T,T=y(T),x!==void 0&&E.hasValue){var D=E.value;if(x(D,T))return g=D}return g=T}if(D=g,m(o,T))return D;var b=y(T);return x!==void 0&&x(D,b)?(o=T,D):(o=T,g=b)}var l=!1,o,g,w=h===void 0?null:h;return[function(){return c(S())},w===null?void 0:function(){return c(w())}]},[S,h,y,x]);var a=M(_,A[0],A[1]);return z(function(){E.hasValue=!0,E.value=a},[a]),d(a),a},tc}var Bd;function Kp(){return Bd||(Bd=1,ec.exports=Fp()),ec.exports}var Xp=Kp();const Gp=Fd(Xp),Kd={},{useDebugValue:Qp}=Bp,{useSyncExternalStoreWithSelector:Zp}=Gp;let Md=!1;const Jp=p=>p;function $p(p,f=Jp,v){(Kd?"production":void 0)!=="production"&&v&&!Md&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Md=!0);const m=Zp(p.subscribe,p.getState,p.getServerState||p.getInitialState,f,v);return Qp(m),m}const em=p=>{(Kd?"production":void 0)!=="production"&&typeof p!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const f=typeof p=="function"?Wp(p):p,v=(m,M)=>$p(f,m,M);return Object.assign(v,f),v},ar=p=>em,lr=p=>{let f=p;f.use={};for(let v of Object.keys(f.getState()))f.use[v]=()=>f(m=>m[v]);return f},tm=[{name:"home",label:"Home",icon:"fa fa-home"},{name:"workspace",label:"Workspace",icon:"fa fa-cube"},{name:"turborepo",label:"Turborepo",icon:"fa fa-solid fa-truck-fast"},{name:"crud",label:"CRUD Tester",icon:"fa fa-microscope"}],im=ar()(p=>({currentPage:"home",action:{setCurrentPage:f=>p({currentPage:f})}})),uc=lr(im);function sm(){const p=uc.use.currentPage(),f=uc.use.action();return j.jsxs("nav",{id:"main-nav",className:"w-16 h-screen flex flex-col items-center py-4 bg-gray-900 border-r border-gray-800",children:[j.jsx("div",{className:"flex flex-col gap-2 w-full px-2",children:tm.map(v=>j.jsx(Nd,{isSelected:v.name===p,icon:v.icon,text:v.label,onClick:()=>f.setCurrentPage(v.name)},v.name))}),j.jsx("div",{className:"mt-auto pb-12",children:j.jsx(Nd,{isSelected:p==="settings",icon:"fa fa-cog",text:"Settings",onClick:()=>{f.setCurrentPage("settings")}})})]})}function Nd(p){const f=p.isSelected?"bg-blue-600 text-white shadow-lg shadow-blue-500/30 ring-1 ring-blue-500":"text-gray-400 hover:bg-gray-800 hover:text-white";return j.jsxs("button",{className:`nav-item group relative flex items-center justify-center w-12 h-12 rounded-xl transition-all duration-200 outline-none focus:ring-2 focus:ring-blue-500/50 ${f}`,id:p.text,onClick:p.onClick,children:[j.jsx("i",{className:`${p.icon} text-lg transition-transform duration-200 group-hover:scale-110`}),j.jsxs("div",{className:"z-50 absolute bg-gray-900 left-14 px-3 py-1.5 text-white text-sm font-medium rounded-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 translate-x-2 group-hover:translate-x-0 shadow-xl border border-gray-700 whitespace-nowrap",children:[p.text,j.jsx("div",{className:"absolute left-0 top-1/2 -translate-x-1 -translate-y-1/2 w-2 h-2 bg-gray-900 border-l border-b border-gray-700 rotate-45"})]})]})}function Hd({children:p,className:f}){return j.jsx("div",{className:`bg-gray-800/40 backdrop-blur-md border border-gray-700/50 rounded-2xl p-6 flex flex-col ${f}`,children:p})}const rm=ar()(p=>({dockerprocessInfo:[],loadDockerProcessInfo:async()=>{p({dockerprocessInfo:[{id:"1",image:"image1",status:"running",name:"container1",memoryStr:"128MB",memoryBytes:134217728},{id:"2",image:"image2",status:"stopped",name:"container2",memoryStr:"256MB",memoryBytes:268435456}]})}})),zd=lr(rm);function nm(){const p=zd.use.dockerprocessInfo(),f=zd.use.loadDockerProcessInfo();return ve.useEffect(()=>{setTimeout(()=>{f()},5e3)},[]),j.jsxs(j.Fragment,{children:[j.jsxs("div",{className:"flex items-center justify-between mb-4",children:[j.jsx("i",{className:"fab fa-docker text-blue-400"}),j.jsxs("div",{className:"flex items-center gap-3",children:[j.jsxs("button",{id:"docker-stop-all-btn",className:"hidden text-xs px-2 py-0.5 rounded bg-red-900/30 hover:bg-red-800/50 text-red-400 hover:text-red-200 transition-colors border border-red-800/30",title:"Stop All Containers",children:[j.jsx("i",{className:"fas fa-power-off"})," Stop All"]}),j.jsx("span",{id:"docker-mem-total",className:"text-xs text-blue-400 font-mono"}),j.jsx("span",{id:"docker-count",className:"text-xs text-gray-400 font-mono",children:"-- Active"})]})]}),j.jsxs("div",{className:"overflow-y-auto flex-1 space-y-2 pr-1 custom-scrollbar",id:"docker-list-container",children:[j.jsx("div",{className:"text-center text-xs text-gray-600 py-2",children:"Waiting for data..."}),p.map((v,m)=>j.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-gray-900/40 border border-gray-700/30 text-xs",children:[j.jsxs("div",{className:"flex flex-col gap-0.5 overflow-hidden",children:[j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("i",{className:"fab fa-docker text-blue-500"}),j.jsx("span",{className:"text-gray-200 font-bold truncate",title:v.name,children:v.name})]}),j.jsx("span",{className:"text-gray-500 text-[10px] truncate",title:v.image,children:v.image})]}),j.jsxs("div",{className:"flex items-center gap-3 flex-none ml-2",children:[j.jsxs("div",{className:"flex flex-col items-end gap-0.5",children:[j.jsx("span",{className:"text-[10px] text-gray-400 font-mono",children:v.memoryStr}),j.jsx("span",{className:"text-[10px] font-medium",children:v.status})]}),j.jsx("button",{className:"p-1 rounded hover:bg-red-500/20 text-gray-500 hover:text-red-400 transition-colors",title:"Stop Container",children:j.jsx("i",{className:"fas fa-power-off"})})]})]},m))]})]})}const am=ar()(p=>({childprocessInfo:[],totalRam:0,peakRam:0,loadChildProcessInfo:async()=>{const f=[{name:"Process 1",pid:666,mem:Math.floor(Math.random()*100)},{name:"Process 2",pid:555,mem:Math.floor(Math.random()*100)},{name:"Process 3",pid:333,mem:Math.floor(Math.random()*100)},{name:"Process 4",pid:111,mem:Math.floor(Math.random()*100)},{name:"Process 5",pid:222,mem:Math.floor(Math.random()*100)}],v=f.reduce((m,M)=>m+M.mem,0);p(m=>(v>m.peakRam&&p({peakRam:v}),{childprocessInfo:f,totalRam:v}))}})),Ea=lr(am);function lm(){const p=Ea.use.childprocessInfo(),f=Ea.use.totalRam(),v=Ea.use.peakRam(),m=Ea.use.loadChildProcessInfo();return ve.useEffect(()=>{const M=setInterval(async()=>{await m()},5e3);return()=>clearInterval(M)},[]),j.jsxs(j.Fragment,{children:[j.jsx("div",{className:"flex items-center justify-between mb-4",children:j.jsxs("h2",{className:"text-lg font-bold text-white flex items-center gap-2",children:[j.jsx("i",{className:"fas fa-chart-line text-blue-500"}),"Processes Memory Usage"]})}),j.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[j.jsxs("div",{className:"bg-gray-900/50 rounded-lg p-3 border border-gray-700/30",children:[j.jsx("div",{className:"text-gray-400 text-[10px] uppercase",children:"Current RAM"}),j.jsxs("div",{className:"text-xl font-bold text-white font-mono",children:[f," MB"]})]}),j.jsxs("div",{className:"bg-gray-900/50 rounded-lg p-3 border border-gray-700/30",children:[j.jsx("div",{className:"text-gray-400 text-[10px] uppercase",children:"Peak RAM"}),j.jsxs("div",{className:"text-xl font-bold text-pink-400 font-mono",children:[v," MB"]})]})]}),j.jsxs("div",{className:"flex-none h-full overflow-hidden flex flex-col",children:[j.jsxs("div",{className:"text-xs text-gray-400 uppercase mb-2 font-bold tracking-wider flex justify-between",children:["Top Processes",j.jsxs("span",{className:"text-xs text-gray-400 font-mono",children:[p.length," Active"]})]}),j.jsxs("div",{className:"overflow-y-auto flex-1 space-y-1 pr-1 custom-scrollbar",children:[p.length===0&&j.jsx("div",{className:"text-center text-xs text-gray-600 py-2",children:"Loading..."}),p.map((M,K)=>j.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-gray-900/40 hover:bg-gray-800/60 border border-transparent hover:border-gray-700 transition-colors text-xs",children:[j.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[j.jsx("i",{className:"fas fa-boxes w-4 text-center"}),j.jsx("span",{className:"text-gray-300 font-mono truncate",children:M.name})]}),j.jsxs("div",{className:"flex items-center gap-3 flex-none",children:[j.jsx("span",{className:"px-1.5 py-0.5 rounded bg-gray-800 text-[10px] text-gray-500",children:M.pid}),j.jsxs("span",{className:"font-mono text-white w-20 text-right",children:[j.jsx("span",{className:"text-orange-500",children:M.mem})," MB"]})]})]},K+M.name))]})]})]})}const Pt={apiPort:3e3},ei={scanWorkspace:"scanworkspace",runCmdDev:"runcmddev",stopProcess:"stopprocess",listWorkspacesDir:"listworkspacedirs",newWorkspace:"newworkspace",interactvTerminal:"interactvterminal",hideShowFileFolder:"hideshowfilefolder",updateWorkspace:"updateworkspace",getRootPath:"getrootpath",scaffoldRepo:"scaffoldrepo",turborepoExist:"turborepoexist"},om=ar()(p=>({modal:null,title:"",message:"",banner:null,callback:()=>{},showModal:(f,v,m,M,K)=>{p({modal:f,title:v,message:m,banner:M,callback:K})},hideModal:()=>{p({modal:null,title:"",message:"",banner:null,callback:()=>{}})}})),Xt=lr(om),cm=[{isRunningAs:"dev",consoleOutput:`
|
|
10
|
+
|
|
11
|
+
\x1B[1;33;40m 33;40 \x1B[1;33;41m 33;41 \x1B[1;33;42m 33;42 \x1B[1;33;43m 33;43 \x1B[1;33;44m 33;44 \x1B[1;33;45m 33;45 \x1B[1;33;46m 33;46 \x1B[1m\x1B[0
|
|
12
|
+
|
|
13
|
+
\x1B[1;33;42m >> Tests OK
|
|
14
|
+
|
|
15
|
+
`,info:{name:"Power JS",path:"/workspace/1",description:"Description 1",devCommand:"npm run dev",startCommand:"npm run start",stopCommand:"npm run stop",buildCommand:"npm run build",cleanCommand:"npm run clean",lintCommand:"npm run lint",testCommand:"npm run test",fontawesomeIcon:"fa-brands fa-node-js"}},{isRunningAs:"start",consoleOutput:`running me
|
|
16
|
+
|
|
17
|
+
Lorem ipsum dolor sit amet
|
|
18
|
+
consectetur adipisicing elit. Quisquam, quod . running me
|
|
19
|
+
|
|
20
|
+
Lorem ipsum dolor sit amet
|
|
21
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
22
|
+
|
|
23
|
+
Lorem ipsum dolor sit amet
|
|
24
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
25
|
+
|
|
26
|
+
Lorem ipsum dolor sit amet
|
|
27
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
28
|
+
|
|
29
|
+
Lorem ipsum dolor sit amet
|
|
30
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
31
|
+
|
|
32
|
+
Lorem ipsum dolor sit amet
|
|
33
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
34
|
+
|
|
35
|
+
Lorem ipsum dolor sit amet
|
|
36
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
37
|
+
|
|
38
|
+
Lorem ipsum dolor sit amet
|
|
39
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
40
|
+
|
|
41
|
+
Lorem ipsum dolor sit amet
|
|
42
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
43
|
+
|
|
44
|
+
Lorem ipsum dolor sit amet
|
|
45
|
+
consectetur adipisicing elit. Quisquam, quod. unning me
|
|
46
|
+
|
|
47
|
+
Lorem ipsum dolor sit amet
|
|
48
|
+
consectetur adipisicing elit. Quisquam, quod . running me
|
|
49
|
+
|
|
50
|
+
Lorem ipsum dolor sit amet
|
|
51
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
52
|
+
|
|
53
|
+
Lorem ipsum dolor sit amet
|
|
54
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
55
|
+
|
|
56
|
+
Lorem ipsum dolor sit amet
|
|
57
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
58
|
+
|
|
59
|
+
Lorem ipsum dolor sit amet
|
|
60
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
61
|
+
|
|
62
|
+
Lorem ipsum dolor sit amet
|
|
63
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
64
|
+
|
|
65
|
+
Lorem ipsum dolor sit amet
|
|
66
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
67
|
+
|
|
68
|
+
Lorem ipsum dolor sit amet
|
|
69
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
70
|
+
|
|
71
|
+
Lorem ipsum dolor sit amet
|
|
72
|
+
consectetur adipisicing elit. Quisquam, quod. running me
|
|
73
|
+
|
|
74
|
+
Lorem ipsum dolor sit amet
|
|
75
|
+
consectetur adipisicing elit. Quisquam, quod.`,info:{name:"Workspace 2",path:"/workspace/2",description:"Description 2",devCommand:"npm run dev",startCommand:"npm run start",stopCommand:"npm run stop",buildCommand:"npm run build",cleanCommand:"npm run clean",lintCommand:"npm run lint",testCommand:"npm run test",fontawesomeIcon:"fa-brands fa-node-js"}},{isRunningAs:null,consoleOutput:null,info:{name:"Workspace 3",path:"/workspace/3",description:"Description 3 asdsad asd asd asd asd asd asd asdas dasd as dasd asd asd asd asd",devCommand:"npm run dev",startCommand:"npm run start",stopCommand:"npm run stop",buildCommand:"npm run build",cleanCommand:"npm run clean",lintCommand:"npm run lint",testCommand:"npm run test",fontawesomeIcon:"fa-brands fa-node-js"}},{isRunningAs:null,consoleOutput:null,info:{name:"Workspace 4 asd asd asd asd",path:"/workspace/4",description:"Description 4",devCommand:"npm run dev",startCommand:"npm run start",stopCommand:"npm run stop",buildCommand:"npm run build",cleanCommand:"npm run clean",lintCommand:"npm run lint",testCommand:"npm run test",fontawesomeIcon:"fa-brands fa-node-js"}},{isRunningAs:"start",consoleOutput:null,info:{name:"AAA I am last",path:"/workspace/6",description:"Description 6",devCommand:"npm run dev",startCommand:"npm run start",stopCommand:"npm run stop",buildCommand:"npm run build",cleanCommand:"npm run clean",lintCommand:"npm run lint",testCommand:"npm run test",fontawesomeIcon:"fa-brands fa-node-js"}},{isRunningAs:"dev",consoleOutput:`Running as dev
|
|
76
|
+
Lorem ipsum dolor sit amet
|
|
77
|
+
consectetur adipisicing elit. Quisquam, quod.`,info:{name:"Opps",path:"/workspace/6",description:"Description 6",devCommand:"npm run dev",startCommand:"npm run start",stopCommand:"npm run stop",buildCommand:"npm run build",cleanCommand:"npm run clean",lintCommand:"npm run lint",testCommand:"npm run test",fontawesomeIcon:"fa-brands fa-node-js"}}],um=ar()((p,f)=>({workspace:[],activeTerminal:"",activeWorkspaceOptionModal:null,loadingWorkspace:null,loading:!1,showWorkspaceNew:!1,showNewTerminalWindow:null,setShowNewTerminalWindow:v=>{p({showNewTerminalWindow:v})},setActiveWorkspaceOptionModal:v=>{p({activeWorkspaceOptionModal:v})},setActiveTerminal:v=>{p({activeTerminal:v})},setShowWorkspaceNew:v=>{p({showWorkspaceNew:v})},setWorkSpaceRunningAs:(v,m)=>{f().workspace.find(K=>K.info.name===v)&&p({workspace:f().workspace.map(K=>K.info.name===v?{...K,isRunningAs:m}:K)})},writeOnConsole:(v,m)=>{const M=f().workspace.find(z=>z.info.name===v),K=m.trim();M&&K&&p({workspace:f().workspace.map(z=>z.info.name===v?{...z,consoleOutput:z.consoleOutput?`${z.consoleOutput}
|
|
78
|
+
${K}`:K}:z)})},clearConsole:v=>{f().workspace.find(M=>M.info.name===v)&&p({workspace:f().workspace.map(M=>M.info.name===v?{...M,consoleOutput:null}:M)})},loadWorkspace:async()=>{if(!f().loading){p({loading:!0});try{const m=await fetch(`http://localhost:${Pt.apiPort}/${ei.scanWorkspace}`);let M=await m.json();if(!m.ok||M.workspace.length===0)throw new Error("Failed to fetch workspace");const K=[],z=f().workspace;M.workspace.forEach(d=>{z.find(_=>_.info.name===d.name)?K.push({isRunningAs:z.find(_=>_.info.name===d.name)?.isRunningAs??null,consoleOutput:z.find(_=>_.info.name===d.name)?.consoleOutput??null,info:d}):K.push({isRunningAs:null,consoleOutput:null,info:d})});const u=K.sort((d,_)=>d.info.name<_.info.name?-1:d.info.name>_.info.name?1:0);p({workspace:u})}catch(m){console.error("Error fetching workspace:",m),p({workspace:cm})}p({loading:!1})}},stopProcess:async v=>{if(f().loadingWorkspace!=v){p({loadingWorkspace:v});try{if(!(await fetch(`http://localhost:${Pt.apiPort}/${ei.stopProcess}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:{name:v}})})).ok)throw new Error("Failed to stop process")}catch(M){console.error("Error stopping process:",M)}p({loadingWorkspace:null})}},listWorkspace:async()=>{try{const v=await fetch(`http://localhost:${Pt.apiPort}/${ei.listWorkspacesDir}`);if(!v.ok)throw new Error("Failed to list workspace");return await v.json()}catch(v){return console.error("Error listing workspace:",v),[]}},createNewWorkspace:async v=>{try{return await(await fetch(`http://localhost:${Pt.apiPort}/${ei.newWorkspace}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)})).json(),!0}catch{return!1}},updateWorkspace:async v=>{try{return await(await fetch(`http://localhost:${Pt.apiPort}/${ei.updateWorkspace}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)})).json(),!0}catch{return!1}}})),Be=lr(um);function hm(p){return ve.useEffect(()=>{(async()=>{try{(await(await fetch(`http://localhost:${Pt.apiPort}/${ei.turborepoExist}`)).json()).exists||Xt.getState().showModal("confirm","Turborepo Missing","Would you like to scaffold this monorepo with turborepo.js?","warning",async M=>{if(M)try{Xt.getState().showModal("alert","Processing","Scaffolding in progress...","success");const z=await(await fetch(`http://localhost:${Pt.apiPort}/${ei.scaffoldRepo}`)).json();z.success?(Xt.getState().showModal("alert","Success","Scaffolding complete!","success"),Be.getState().loadWorkspace()):Xt.getState().showModal("alert","Error","Failed to scaffold: "+(z.details||z.error),"error")}catch(K){Xt.getState().showModal("alert","Error","Failed to scaffold: "+String(K),"error")}})}catch(v){console.error("Failed to check turborepo existence",v)}})()},[]),j.jsx("div",{className:p.isVisible?"block":"hidden",children:j.jsx("div",{className:"px-6 py-8 space-y-8 animate-fade-in max-w-[1600px] mx-auto",children:j.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6",children:[j.jsx("div",{className:"lg:col-span-4 flex flex-col gap-6",children:j.jsxs("div",{className:"relative overflow-hidden rounded-3xl bg-gradient-to-r from-gray-900 to-gray-800 border border-gray-700/50 p-5 text-center md:text-left flex flex-col md:flex-row items-center justify-between gap-10 shadow-2xl shadow-black/50",children:[j.jsx("div",{className:"absolute top-0 right-0 w-[500px] h-[450px] bg-blue-600/10 rounded-full blur-[100px] -translate-y-1/2 translate-x-1/2 pointer-events-none"}),j.jsx("div",{className:"absolute bottom-0 left-0 w-[300px] h-[300px] bg-purple-600/10 rounded-full blur-[80px] translate-y-1/2 -translate-x-1/2 pointer-events-none"}),j.jsxs("div",{className:"space-y-6 max-w-2xl relative z-10",children:[j.jsxs("h1",{className:"text-3xl md:text-4xl font-extrabold text-white tracking-tight leading-tight",children:["Monorepo ",j.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-purple-400",children:"TIME!"})]}),j.jsx("p",{className:"text-sm text-gray-300 leading-relaxed font-light",children:"Orchestrate your microservices, manage deployments, and monitor system health from a unified, high-performance interface."})]}),j.jsxs("div",{className:"relative flex-shrink-0 animate-float",children:[j.jsx("div",{className:"w-32 h-32 rounded-2xl bg-gradient-to-br from-blue-500/20 to-purple-500/20 backdrop-blur-sm border border-white/10 flex items-center justify-center shadow-xl transform rotate-3",children:j.jsx("i",{className:"fas fa-boxes text-6xl md:text-7xl text-white/90 drop-shadow-lg"})}),j.jsx("div",{className:"absolute inset-0 bg-blue-500/20 blur-xl -z-10"})]})]})}),j.jsx("div",{className:"lg:col-span-4 flex flex-col gap-6",children:j.jsx(Hd,{children:j.jsx(lm,{})})}),j.jsx("div",{className:"lg:col-span-4 flex flex-col gap-6",children:j.jsx(Hd,{children:j.jsx(nm,{})})})]})})})}var rc={exports:{}},jd;function fm(){return jd||(jd=1,(function(p,f){(function(v,m){p.exports=m()})(self,(()=>(()=>{var v={4567:function(z,u,d){var _=this&&this.__decorate||function(o,g,w,T){var D,b=arguments.length,R=b<3?g:T===null?T=Object.getOwnPropertyDescriptor(g,w):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(o,g,w,T);else for(var U=o.length-1;U>=0;U--)(D=o[U])&&(R=(b<3?D(R):b>3?D(g,w,R):D(g,w))||R);return b>3&&R&&Object.defineProperty(g,w,R),R},S=this&&this.__param||function(o,g){return function(w,T){g(w,T,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const h=d(9042),y=d(6114),x=d(9924),A=d(844),E=d(5596),a=d(4725),c=d(3656);let l=u.AccessibilityManager=class extends A.Disposable{constructor(o,g){super(),this._terminal=o,this._renderService=g,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let w=0;w<this._terminal.rows;w++)this._rowElements[w]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[w]);if(this._topBoundaryFocusListener=w=>this._handleBoundaryFocus(w,0),this._bottomBoundaryFocusListener=w=>this._handleBoundaryFocus(w,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=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new x.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((w=>this._handleResize(w.rows)))),this.register(this._terminal.onRender((w=>this._refreshRows(w.start,w.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((w=>this._handleChar(w)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
79
|
+
`)))),this.register(this._terminal.onA11yTab((w=>this._handleTab(w)))),this.register(this._terminal.onKey((w=>this._handleKey(w.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this._screenDprMonitor=new E.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener((()=>this._refreshRowsDimensions())),this.register((0,c.addDisposableDomListener)(window,"resize",(()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,A.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let g=0;g<o;g++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
|
|
80
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),y.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((()=>{this._accessibilityContainer.appendChild(this._liveRegion)}),0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,y.isMac&&this._liveRegion.remove()}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,g){this._liveRegionDebouncer.refresh(o,g,this._terminal.rows)}_renderRows(o,g){const w=this._terminal.buffer,T=w.lines.length.toString();for(let D=o;D<=g;D++){const b=w.translateBufferLineToString(w.ydisp+D,!0),R=(w.ydisp+D+1).toString(),U=this._rowElements[D];U&&(b.length===0?U.innerText=" ":U.textContent=b,U.setAttribute("aria-posinset",R),U.setAttribute("aria-setsize",T))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,g){const w=o.target,T=this._rowElements[g===0?1:this._rowElements.length-2];if(w.getAttribute("aria-posinset")===(g===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==T)return;let D,b;if(g===0?(D=w,b=this._rowElements.pop(),this._rowContainer.removeChild(b)):(D=this._rowElements.shift(),b=w,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),b.removeEventListener("focus",this._bottomBoundaryFocusListener),g===0){const R=this._createAccessibilityTreeNode();this._rowElements.unshift(R),this._rowContainer.insertAdjacentElement("afterbegin",R)}else{const R=this._createAccessibilityTreeNode();this._rowElements.push(R),this._rowContainer.appendChild(R)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(g===0?-1:1),this._rowElements[g===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let g=this._rowContainer.children.length;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);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=document.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`}};u.AccessibilityManager=l=_([S(1,a.IRenderService)],l)},3614:(z,u)=>{function d(y){return y.replace(/\r?\n/g,"\r")}function _(y,x){return x?"\x1B[200~"+y+"\x1B[201~":y}function S(y,x,A,E){y=_(y=d(y),A.decPrivateModes.bracketedPasteMode&&E.rawOptions.ignoreBracketedPasteMode!==!0),A.triggerDataEvent(y,!0),x.value=""}function h(y,x,A){const E=A.getBoundingClientRect(),a=y.clientX-E.left-10,c=y.clientY-E.top-10;x.style.width="20px",x.style.height="20px",x.style.left=`${a}px`,x.style.top=`${c}px`,x.style.zIndex="1000",x.focus()}Object.defineProperty(u,"__esModule",{value:!0}),u.rightClickHandler=u.moveTextAreaUnderMouseCursor=u.paste=u.handlePasteEvent=u.copyHandler=u.bracketTextForPaste=u.prepareTextForTerminal=void 0,u.prepareTextForTerminal=d,u.bracketTextForPaste=_,u.copyHandler=function(y,x){y.clipboardData&&y.clipboardData.setData("text/plain",x.selectionText),y.preventDefault()},u.handlePasteEvent=function(y,x,A,E){y.stopPropagation(),y.clipboardData&&S(y.clipboardData.getData("text/plain"),x,A,E)},u.paste=S,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(y,x,A,E,a){h(y,x,A),a&&E.rightClickSelect(y),x.value=E.selectionText,x.select()}},7239:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const _=d(1505);u.ColorContrastCache=class{constructor(){this._color=new _.TwoKeyMap,this._css=new _.TwoKeyMap}setCss(S,h,y){this._css.set(S,h,y)}getCss(S,h){return this._css.get(S,h)}setColor(S,h,y){this._color.set(S,h,y)}getColor(S,h){return this._color.get(S,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(d,_,S,h){d.addEventListener(_,S,h);let y=!1;return{dispose:()=>{y||(y=!0,d.removeEventListener(_,S,h))}}}},6465:function(z,u,d){var _=this&&this.__decorate||function(a,c,l,o){var g,w=arguments.length,T=w<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(a,c,l,o);else for(var D=a.length-1;D>=0;D--)(g=a[D])&&(T=(w<3?g(T):w>3?g(c,l,T):g(c,l))||T);return w>3&&T&&Object.defineProperty(c,l,T),T},S=this&&this.__param||function(a,c){return function(l,o){c(l,o,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier2=void 0;const h=d(3656),y=d(8460),x=d(844),A=d(2585);let E=u.Linkifier2=class extends x.Disposable{get currentLink(){return this._currentLink}constructor(a){super(),this._bufferService=a,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new y.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new y.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,x.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,x.toDisposable)((()=>{this._lastMouseEvent=void 0}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0})))}registerLinkProvider(a){return this._linkProviders.push(a),{dispose:()=>{const c=this._linkProviders.indexOf(a);c!==-1&&this._linkProviders.splice(c,1)}}}attachToDom(a,c,l){this._element=a,this._mouseService=c,this._renderService=l,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(a){if(this._lastMouseEvent=a,!this._element||!this._mouseService)return;const c=this._positionFromMouseEvent(a,this._element,this._mouseService);if(!c)return;this._isMouseOut=!1;const l=a.composedPath();for(let o=0;o<l.length;o++){const g=l[o];if(g.classList.contains("xterm"))break;if(g.classList.contains("xterm-hover"))return}this._lastBufferCell&&c.x===this._lastBufferCell.x&&c.y===this._lastBufferCell.y||(this._handleHover(c),this._lastBufferCell=c)}_handleHover(a){if(this._activeLine!==a.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(a,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,a)||(this._clearCurrentLink(),this._askForLink(a,!0))}_askForLink(a,c){var l,o;this._activeProviderReplies&&c||((l=this._activeProviderReplies)===null||l===void 0||l.forEach((w=>{w?.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=a.y);let g=!1;for(const[w,T]of this._linkProviders.entries())c?!((o=this._activeProviderReplies)===null||o===void 0)&&o.get(w)&&(g=this._checkLinkProviderResult(w,a,g)):T.provideLinks(a.y,(D=>{var b,R;if(this._isMouseOut)return;const U=D?.map((W=>({link:W})));(b=this._activeProviderReplies)===null||b===void 0||b.set(w,U),g=this._checkLinkProviderResult(w,a,g),((R=this._activeProviderReplies)===null||R===void 0?void 0:R.size)===this._linkProviders.length&&this._removeIntersectingLinks(a.y,this._activeProviderReplies)}))}_removeIntersectingLinks(a,c){const l=new Set;for(let o=0;o<c.size;o++){const g=c.get(o);if(g)for(let w=0;w<g.length;w++){const T=g[w],D=T.link.range.start.y<a?0:T.link.range.start.x,b=T.link.range.end.y>a?this._bufferService.cols:T.link.range.end.x;for(let R=D;R<=b;R++){if(l.has(R)){g.splice(w--,1);break}l.add(R)}}}}_checkLinkProviderResult(a,c,l){var o;if(!this._activeProviderReplies)return l;const g=this._activeProviderReplies.get(a);let w=!1;for(let T=0;T<a;T++)this._activeProviderReplies.has(T)&&!this._activeProviderReplies.get(T)||(w=!0);if(!w&&g){const T=g.find((D=>this._linkAtPosition(D.link,c)));T&&(l=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(let T=0;T<this._activeProviderReplies.size;T++){const D=(o=this._activeProviderReplies.get(T))===null||o===void 0?void 0:o.find((b=>this._linkAtPosition(b.link,c)));if(D){l=!0,this._handleNewLink(D);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(a){if(!this._element||!this._mouseService||!this._currentLink)return;const c=this._positionFromMouseEvent(a,this._element,this._mouseService);c&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,c)&&this._currentLink.link.activate(a,this._currentLink.link.text)}_clearCurrentLink(a,c){this._element&&this._currentLink&&this._lastMouseEvent&&(!a||!c||this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=c)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,x.disposeArray)(this._linkCacheDisposables))}_handleNewLink(a){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._linkAtPosition(a.link,c)&&(this._currentLink=a,this._currentLink.state={decorations:{underline:a.link.decorations===void 0||a.link.decorations.underline,pointerCursor:a.link.decorations===void 0||a.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,a.link,this._lastMouseEvent),a.link.decorations={},Object.defineProperties(a.link.decorations,{pointerCursor:{get:()=>{var l,o;return(o=(l=this._currentLink)===null||l===void 0?void 0:l.state)===null||o===void 0?void 0:o.decorations.pointerCursor},set:l=>{var o,g;!((o=this._currentLink)===null||o===void 0)&&o.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&((g=this._element)===null||g===void 0||g.classList.toggle("xterm-cursor-pointer",l)))}},underline:{get:()=>{var l,o;return(o=(l=this._currentLink)===null||l===void 0?void 0:l.state)===null||o===void 0?void 0:o.decorations.underline},set:l=>{var o,g,w;!((o=this._currentLink)===null||o===void 0)&&o.state&&((w=(g=this._currentLink)===null||g===void 0?void 0:g.state)===null||w===void 0?void 0:w.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(a.link,l))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const o=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,g=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=o&&this._currentLink.link.range.end.y<=g&&(this._clearCurrentLink(o,g),this._lastMouseEvent&&this._element)){const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._askForLink(w,!1)}}))))}_linkHover(a,c,l){var o;!((o=this._currentLink)===null||o===void 0)&&o.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(c,!0),this._currentLink.state.decorations.pointerCursor&&a.classList.add("xterm-cursor-pointer")),c.hover&&c.hover(l,c.text)}_fireUnderlineEvent(a,c){const l=a.range,o=this._bufferService.buffer.ydisp,g=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-o-1,l.end.x,l.end.y-o-1,void 0);(c?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(g)}_linkLeave(a,c,l){var o;!((o=this._currentLink)===null||o===void 0)&&o.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(c,!1),this._currentLink.state.decorations.pointerCursor&&a.classList.remove("xterm-cursor-pointer")),c.leave&&c.leave(l,c.text)}_linkAtPosition(a,c){const l=a.range.start.y*this._bufferService.cols+a.range.start.x,o=a.range.end.y*this._bufferService.cols+a.range.end.x,g=c.y*this._bufferService.cols+c.x;return l<=g&&g<=o}_positionFromMouseEvent(a,c,l){const o=l.getCoords(a,c,this._bufferService.cols,this._bufferService.rows);if(o)return{x:o[0],y:o[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(a,c,l,o,g){return{x1:a,y1:c,x2:l,y2:o,cols:this._bufferService.cols,fg:g}}};u.Linkifier2=E=_([S(0,A.IBufferService)],E)},9042:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.tooMuchOutput=u.promptLabel=void 0,u.promptLabel="Terminal input",u.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(z,u,d){var _=this&&this.__decorate||function(E,a,c,l){var o,g=arguments.length,w=g<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,c):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(E,a,c,l);else for(var T=E.length-1;T>=0;T--)(o=E[T])&&(w=(g<3?o(w):g>3?o(a,c,w):o(a,c))||w);return g>3&&w&&Object.defineProperty(a,c,w),w},S=this&&this.__param||function(E,a){return function(c,l){a(c,l,E)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const h=d(511),y=d(2585);let x=u.OscLinkProvider=class{constructor(E,a,c){this._bufferService=E,this._optionsService=a,this._oscLinkService=c}provideLinks(E,a){var c;const l=this._bufferService.buffer.lines.get(E-1);if(!l)return void a(void 0);const o=[],g=this._optionsService.rawOptions.linkHandler,w=new h.CellData,T=l.getTrimmedLength();let D=-1,b=-1,R=!1;for(let U=0;U<T;U++)if(b!==-1||l.hasContent(U)){if(l.loadCell(U,w),w.hasExtendedAttrs()&&w.extended.urlId){if(b===-1){b=U,D=w.extended.urlId;continue}R=w.extended.urlId!==D}else b!==-1&&(R=!0);if(R||b!==-1&&U===T-1){const W=(c=this._oscLinkService.getLinkData(D))===null||c===void 0?void 0:c.uri;if(W){const H={start:{x:b+1,y:E},end:{x:U+(R||U!==T-1?0:1),y:E}};let V=!1;if(!g?.allowNonHttpProtocols)try{const se=new URL(W);["http:","https:"].includes(se.protocol)||(V=!0)}catch{V=!0}V||o.push({text:W,range:H,activate:(se,ae)=>g?g.activate(se,ae,H):A(0,ae),hover:(se,ae)=>{var P;return(P=g?.hover)===null||P===void 0?void 0:P.call(g,se,ae,H)},leave:(se,ae)=>{var P;return(P=g?.leave)===null||P===void 0?void 0:P.call(g,se,ae,H)}})}R=!1,w.hasExtendedAttrs()&&w.extended.urlId?(b=U,D=w.extended.urlId):(b=-1,D=-1)}}a(o)}};function A(E,a){if(confirm(`Do you want to navigate to ${a}?
|
|
81
|
+
|
|
82
|
+
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=a}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=x=_([S(0,y.IBufferService),S(1,y.IOptionsService),S(2,y.IOscLinkService)],x)},6193:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(d,_){this._parentWindow=d,this._renderCallback=_,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(d){return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(d,_,S){this._rowCount=S,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},5596:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ScreenDprMonitor=void 0;const _=d(844);class S extends _.Disposable{constructor(y){super(),this._parentWindow=y,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,_.toDisposable)((()=>{this.clearListener()})))}setListener(y){this._listener&&this.clearListener(),this._listener=y,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var y;this._outerListener&&((y=this._resolutionMediaMatchList)===null||y===void 0||y.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._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}u.ScreenDprMonitor=S},3236:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const _=d(3614),S=d(3656),h=d(6465),y=d(9042),x=d(3730),A=d(1680),E=d(3107),a=d(5744),c=d(2950),l=d(1296),o=d(428),g=d(4269),w=d(5114),T=d(8934),D=d(3230),b=d(9312),R=d(4725),U=d(6731),W=d(8055),H=d(8969),V=d(8460),se=d(844),ae=d(6114),P=d(8437),G=d(2584),L=d(7399),N=d(5941),q=d(9074),k=d(2585),Y=d(5435),ee=d(4567),oe=typeof window<"u"?window.document:null;class ue extends H.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(O={}){super(O),this.browser=ae,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new se.MutableDisposable),this._onCursorMove=this.register(new V.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new V.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new V.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new V.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new V.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new V.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new V.EventEmitter),this._onBlur=this.register(new V.EventEmitter),this._onA11yCharEmitter=this.register(new V.EventEmitter),this._onA11yTabEmitter=this.register(new V.EventEmitter),this._onWillOpen=this.register(new V.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(h.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(x.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(q.DecorationService),this._instantiationService.setService(k.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((Q,ie)=>this.refresh(Q,ie)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((Q=>this._reportWindowsOptions(Q)))),this.register(this._inputHandler.onColor((Q=>this._handleColorEvent(Q)))),this.register((0,V.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,V.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,V.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,V.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((Q=>this._afterResize(Q.cols,Q.rows)))),this.register((0,se.toDisposable)((()=>{var Q,ie;this._customKeyEventHandler=void 0,(ie=(Q=this.element)===null||Q===void 0?void 0:Q.parentNode)===null||ie===void 0||ie.removeChild(this.element)})))}_handleColorEvent(O){if(this._themeService)for(const Q of O){let ie,ne="";switch(Q.index){case 256:ie="foreground",ne="10";break;case 257:ie="background",ne="11";break;case 258:ie="cursor",ne="12";break;default:ie="ansi",ne="4;"+Q.index}switch(Q.type){case 0:const ge=W.color.toColorRGB(ie==="ansi"?this._themeService.colors.ansi[Q.index]:this._themeService.colors[ie]);this.coreService.triggerDataEvent(`${G.C0.ESC}]${ne};${(0,N.toRgbString)(ge)}${G.C1_ESCAPED.ST}`);break;case 1:if(ie==="ansi")this._themeService.modifyColors((he=>he.ansi[Q.index]=W.rgba.toColor(...Q.color)));else{const he=ie;this._themeService.modifyColors((De=>De[he]=W.rgba.toColor(...Q.color)))}break;case 2:this._themeService.restoreColor(Q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(O){O?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ee.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(O){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(G.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(G.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const O=this.buffer.ybase+this.buffer.y,Q=this.buffer.lines.get(O);if(!Q)return;const ie=Math.min(this.buffer.x,this.cols-1),ne=this._renderService.dimensions.css.cell.height,ge=Q.getWidth(ie),he=this._renderService.dimensions.css.cell.width*ge,De=this.buffer.y*this._renderService.dimensions.css.cell.height,qe=ie*this._renderService.dimensions.css.cell.width;this.textarea.style.left=qe+"px",this.textarea.style.top=De+"px",this.textarea.style.width=he+"px",this.textarea.style.height=ne+"px",this.textarea.style.lineHeight=ne+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,S.addDisposableDomListener)(this.element,"copy",(Q=>{this.hasSelection()&&(0,_.copyHandler)(Q,this._selectionService)})));const O=Q=>(0,_.handlePasteEvent)(Q,this.textarea,this.coreService,this.optionsService);this.register((0,S.addDisposableDomListener)(this.textarea,"paste",O)),this.register((0,S.addDisposableDomListener)(this.element,"paste",O)),ae.isFirefox?this.register((0,S.addDisposableDomListener)(this.element,"mousedown",(Q=>{Q.button===2&&(0,_.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,S.addDisposableDomListener)(this.element,"contextmenu",(Q=>{(0,_.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ae.isLinux&&this.register((0,S.addDisposableDomListener)(this.element,"auxclick",(Q=>{Q.button===1&&(0,_.moveTextAreaUnderMouseCursor)(Q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,S.addDisposableDomListener)(this.textarea,"keyup",(O=>this._keyUp(O)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keydown",(O=>this._keyDown(O)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keypress",(O=>this._keyPress(O)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionupdate",(O=>this._compositionHelper.compositionupdate(O)))),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,S.addDisposableDomListener)(this.textarea,"input",(O=>this._inputEvent(O)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(O){var Q;if(!O)throw new Error("Terminal requires a parent element.");O.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=O.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),O.appendChild(this.element);const ie=oe.createDocumentFragment();this._viewportElement=oe.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),ie.appendChild(this._viewportElement),this._viewportScrollArea=oe.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=oe.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=oe.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),ie.appendChild(this.screenElement),this.textarea=oe.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",y.promptLabel),ae.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._instantiationService.createInstance(w.CoreBrowserService,this.textarea,(Q=this._document.defaultView)!==null&&Q!==void 0?Q:window),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,S.addDisposableDomListener)(this.textarea,"focus",(ne=>this._handleTextAreaFocus(ne)))),this.register((0,S.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(o.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(U.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(g.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ne=>this._onRender.fire(ne)))),this.onResize((ne=>this._renderService.resize(ne.cols,ne.rows))),this._compositionView=oe.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(ie);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(T.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(A.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ne=>this.scrollLines(ne.amount,ne.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(b.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ne=>this.scrollLines(ne.amount,ne.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ne=>this._renderService.handleSelectionChanged(ne.start,ne.end,ne.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ne=>{this.textarea.value=ne,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ne=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,S.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(E.BufferDecorationRenderer,this.screenElement)),this.register((0,S.addDisposableDomListener)(this.element,"mousedown",(ne=>this._selectionService.handleMouseDown(ne)))),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(ee.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ne=>this._handleScreenReaderModeOptionChange(ne)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(a.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ne=>{!this._overviewRulerRenderer&&ne&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(a.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(l.DomRenderer,this.element,this.screenElement,this._viewportElement,this.linkifier2)}bindMouse(){const O=this,Q=this.element;function ie(he){const De=O._mouseService.getMouseReportCoords(he,O.screenElement);if(!De)return!1;let qe,it;switch(he.overrideType||he.type){case"mousemove":it=32,he.buttons===void 0?(qe=3,he.button!==void 0&&(qe=he.button<3?he.button:3)):qe=1&he.buttons?0:4&he.buttons?1:2&he.buttons?2:3;break;case"mouseup":it=0,qe=he.button<3?he.button:3;break;case"mousedown":it=1,qe=he.button<3?he.button:3;break;case"wheel":if(O.viewport.getLinesScrolled(he)===0)return!1;it=he.deltaY<0?0:1,qe=4;break;default:return!1}return!(it===void 0||qe===void 0||qe>4)&&O.coreMouseService.triggerMouseEvent({col:De.col,row:De.row,x:De.x,y:De.y,button:qe,action:it,ctrl:he.ctrlKey,alt:he.altKey,shift:he.shiftKey})}const ne={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:he=>(ie(he),he.buttons||(this._document.removeEventListener("mouseup",ne.mouseup),ne.mousedrag&&this._document.removeEventListener("mousemove",ne.mousedrag)),this.cancel(he)),wheel:he=>(ie(he),this.cancel(he,!0)),mousedrag:he=>{he.buttons&&ie(he)},mousemove:he=>{he.buttons||ie(he)}};this.register(this.coreMouseService.onProtocolChange((he=>{he?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(he)),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&he?ne.mousemove||(Q.addEventListener("mousemove",ge.mousemove),ne.mousemove=ge.mousemove):(Q.removeEventListener("mousemove",ne.mousemove),ne.mousemove=null),16&he?ne.wheel||(Q.addEventListener("wheel",ge.wheel,{passive:!1}),ne.wheel=ge.wheel):(Q.removeEventListener("wheel",ne.wheel),ne.wheel=null),2&he?ne.mouseup||(Q.addEventListener("mouseup",ge.mouseup),ne.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",ne.mouseup),Q.removeEventListener("mouseup",ne.mouseup),ne.mouseup=null),4&he?ne.mousedrag||(ne.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",ne.mousedrag),ne.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,S.addDisposableDomListener)(Q,"mousedown",(he=>{if(he.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(he))return ie(he),ne.mouseup&&this._document.addEventListener("mouseup",ne.mouseup),ne.mousedrag&&this._document.addEventListener("mousemove",ne.mousedrag),this.cancel(he)}))),this.register((0,S.addDisposableDomListener)(Q,"wheel",(he=>{if(!ne.wheel){if(!this.buffer.hasScrollback){const De=this.viewport.getLinesScrolled(he);if(De===0)return;const qe=G.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(he.deltaY<0?"A":"B");let it="";for(let Gt=0;Gt<Math.abs(De);Gt++)it+=qe;return this.coreService.triggerDataEvent(it,!0),this.cancel(he,!0)}return this.viewport.handleWheel(he)?this.cancel(he):void 0}}),{passive:!1})),this.register((0,S.addDisposableDomListener)(Q,"touchstart",(he=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(he),this.cancel(he)}),{passive:!0})),this.register((0,S.addDisposableDomListener)(Q,"touchmove",(he=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(he)?void 0:this.cancel(he)}),{passive:!1}))}refresh(O,Q){var ie;(ie=this._renderService)===null||ie===void 0||ie.refreshRows(O,Q)}updateCursorStyle(O){var Q;!((Q=this._selectionService)===null||Q===void 0)&&Q.shouldColumnSelect(O)?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(O,Q,ie=0){var ne;ie===1?(super.scrollLines(O,Q,ie),this.refresh(0,this.rows-1)):(ne=this.viewport)===null||ne===void 0||ne.scrollLines(O)}paste(O){(0,_.paste)(O,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(O){this._customKeyEventHandler=O}registerLinkProvider(O){return this.linkifier2.registerLinkProvider(O)}registerCharacterJoiner(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const Q=this._characterJoinerService.register(O);return this.refresh(0,this.rows-1),Q}deregisterCharacterJoiner(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(O)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(O){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)}registerDecoration(O){return this._decorationService.registerDecoration(O)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(O,Q,ie){this._selectionService.setSelection(O,Q,ie)}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 O;(O=this._selectionService)===null||O===void 0||O.clearSelection()}selectAll(){var O;(O=this._selectionService)===null||O===void 0||O.selectAll()}selectLines(O,Q){var ie;(ie=this._selectionService)===null||ie===void 0||ie.selectLines(O,Q)}_keyDown(O){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;const Q=this.browser.isMac&&this.options.macOptionIsMeta&&O.altKey;if(!Q&&!this._compositionHelper.keydown(O))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Q||O.key!=="Dead"&&O.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ie=(0,L.evaluateKeyboardEvent)(O,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),ie.type===3||ie.type===2){const ne=this.rows-1;return this.scrollLines(ie.type===2?-ne:ne),this.cancel(O,!0)}return ie.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(ie.cancel&&this.cancel(O,!0),!ie.key||!!(O.key&&!O.ctrlKey&&!O.altKey&&!O.metaKey&&O.key.length===1&&O.key.charCodeAt(0)>=65&&O.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ie.key!==G.C0.ETX&&ie.key!==G.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ie.key,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(ie.key,!0),!this.optionsService.rawOptions.screenReaderMode||O.altKey||O.ctrlKey?this.cancel(O,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(O,Q){const ie=O.isMac&&!this.options.macOptionIsMeta&&Q.altKey&&!Q.ctrlKey&&!Q.metaKey||O.isWindows&&Q.altKey&&Q.ctrlKey&&!Q.metaKey||O.isWindows&&Q.getModifierState("AltGraph");return Q.type==="keypress"?ie:ie&&(!Q.keyCode||Q.keyCode>47)}_keyUp(O){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||((function(Q){return Q.keyCode===16||Q.keyCode===17||Q.keyCode===18})(O)||this.focus(),this.updateCursorStyle(O),this._keyPressHandled=!1)}_keyPress(O){let Q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)Q=O.charCode;else if(O.which===null||O.which===void 0)Q=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;Q=O.which}return!(!Q||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O)||(Q=String.fromCharCode(Q),this._onKey.fire({key:Q,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(Q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(O){if(O.data&&O.inputType==="insertText"&&(!O.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const Q=O.data;return this.coreService.triggerDataEvent(Q,!0),this.cancel(O),!0}return!1}resize(O,Q){O!==this.cols||Q!==this.rows?super.resize(O,Q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(O,Q){var ie,ne;(ie=this._charSizeService)===null||ie===void 0||ie.measure(),(ne=this.viewport)===null||ne===void 0||ne.syncScrollArea(!0)}clear(){var O;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 Q=1;Q<this.rows;Q++)this.buffer.lines.push(this.buffer.getBlankLine(P.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(O=this.viewport)===null||O===void 0||O.reset(),this.refresh(0,this.rows-1)}}reset(){var O,Q;this.options.rows=this.rows,this.options.cols=this.cols;const ie=this._customKeyEventHandler;this._setup(),super.reset(),(O=this._selectionService)===null||O===void 0||O.reset(),this._decorationService.reset(),(Q=this.viewport)===null||Q===void 0||Q.reset(),this._customKeyEventHandler=ie,this.refresh(0,this.rows-1)}clearTextureAtlas(){var O;(O=this._renderService)===null||O===void 0||O.clearTextureAtlas()}_reportFocus(){var O;!((O=this.element)===null||O===void 0)&&O.classList.contains("focus")?this.coreService.triggerDataEvent(G.C0.ESC+"[I"):this.coreService.triggerDataEvent(G.C0.ESC+"[O")}_reportWindowsOptions(O){if(this._renderService)switch(O){case Y.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const Q=this._renderService.dimensions.css.canvas.width.toFixed(0),ie=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${G.C0.ESC}[4;${ie};${Q}t`);break;case Y.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ne=this._renderService.dimensions.css.cell.width.toFixed(0),ge=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${G.C0.ESC}[6;${ge};${ne}t`)}}cancel(O,Q){if(this.options.cancelEvents||Q)return O.preventDefault(),O.stopPropagation(),!1}}u.Terminal=ue},9924:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(d,_=1e3){this._renderCallback=d,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,_,S){this._rowCount=S,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const y=h-this._lastRefreshMs,x=this._debounceThresholdMS-y;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),x)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_)}}},1680:function(z,u,d){var _=this&&this.__decorate||function(c,l,o,g){var w,T=arguments.length,D=T<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,o):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,l,o,g);else for(var b=c.length-1;b>=0;b--)(w=c[b])&&(D=(T<3?w(D):T>3?w(l,o,D):w(l,o))||D);return T>3&&D&&Object.defineProperty(l,o,D),D},S=this&&this.__param||function(c,l){return function(o,g){l(o,g,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const h=d(3656),y=d(4725),x=d(8460),A=d(844),E=d(2585);let a=u.Viewport=class extends A.Disposable{constructor(c,l,o,g,w,T,D,b){super(),this._viewportElement=c,this._scrollArea=l,this._bufferService=o,this._optionsService=g,this._charSizeService=w,this._renderService=T,this._coreBrowserService=D,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 x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((R=>this._renderDimensions=R))),this._handleThemeChange(b.colors),this.register(b.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(c){if(c)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderService.dimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const l=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.css.canvas.height);this._lastRecordedBufferHeight!==l&&(this._lastRecordedBufferHeight=l,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const l=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(c,l){const o=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(l<0&&this._viewportElement.scrollTop!==0||l>0&&o<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const l=this._getPixelsScrolled(c);return l!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+l:this._smoothScrollState.target+=l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=l,this._bubbleScroll(c,l))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const l=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let l=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?l*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._currentRowHeight*this._bufferService.rows),l}getBufferElements(c,l){var o;let g,w="";const T=[],D=l??this._bufferService.buffer.lines.length,b=this._bufferService.buffer.lines;for(let R=c;R<D;R++){const U=b.get(R);if(!U)continue;const W=(o=b.get(R+1))===null||o===void 0?void 0:o.isWrapped;if(w+=U.translateToString(!W),!W||R===b.length-1){const H=document.createElement("div");H.textContent=w,T.push(H),w.length>0&&(g=H),w=""}}return{bufferElements:T,cursorElement:g}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let l=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(l/=this._currentRowHeight+0,this._wheelPartialScroll+=l,l=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._bufferService.rows),l}_applyScrollModifier(c,l){const o=this._optionsService.rawOptions.fastScrollModifier;return o==="alt"&&l.altKey||o==="ctrl"&&l.ctrlKey||o==="shift"&&l.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const l=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,l!==0&&(this._viewportElement.scrollTop+=l,this._bubbleScroll(c,l))}};u.Viewport=a=_([S(2,E.IBufferService),S(3,E.IOptionsService),S(4,y.ICharSizeService),S(5,y.IRenderService),S(6,y.ICoreBrowserService),S(7,y.IThemeService)],a)},3107:function(z,u,d){var _=this&&this.__decorate||function(a,c,l,o){var g,w=arguments.length,T=w<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(a,c,l,o);else for(var D=a.length-1;D>=0;D--)(g=a[D])&&(T=(w<3?g(T):w>3?g(c,l,T):g(c,l))||T);return w>3&&T&&Object.defineProperty(c,l,T),T},S=this&&this.__param||function(a,c){return function(l,o){c(l,o,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const h=d(3656),y=d(4725),x=d(844),A=d(2585);let E=u.BufferDecorationRenderer=class extends x.Disposable{constructor(a,c,l,o){super(),this._screenElement=a,this._bufferService=c,this._decorationService=l,this._renderService=o,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((0,h.addDisposableDomListener)(window,"resize",(()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((g=>this._removeDecoration(g)))),this.register((0,x.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 a of this._decorationService.decorations)this._renderDecoration(a);this._dimensionsChanged=!1}_renderDecoration(a){this._refreshStyle(a),this._dimensionsChanged&&this._refreshXPosition(a)}_createElement(a){var c,l;const o=document.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",((c=a?.options)===null||c===void 0?void 0:c.layer)==="top"),o.style.width=`${Math.round((a.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(a.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(a.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",o.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const g=(l=a.options.x)!==null&&l!==void 0?l:0;return g&&g>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(a,o),o}_refreshStyle(a){const c=a.marker.line-this._bufferService.buffers.active.ydisp;if(c<0||c>=this._bufferService.rows)a.element&&(a.element.style.display="none",a.onRenderEmitter.fire(a.element));else{let l=this._decorationElements.get(a);l||(l=this._createElement(a),a.element=l,this._decorationElements.set(a,l),this._container.appendChild(l),a.onDispose((()=>{this._decorationElements.delete(a),l.remove()}))),l.style.top=c*this._renderService.dimensions.css.cell.height+"px",l.style.display=this._altBufferIsActive?"none":"block",a.onRenderEmitter.fire(l)}}_refreshXPosition(a,c=a.element){var l;if(!c)return;const o=(l=a.options.x)!==null&&l!==void 0?l:0;(a.options.anchor||"left")==="right"?c.style.right=o?o*this._renderService.dimensions.css.cell.width+"px":"":c.style.left=o?o*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(a){var c;(c=this._decorationElements.get(a))===null||c===void 0||c.remove(),this._decorationElements.delete(a),a.dispose()}};u.BufferDecorationRenderer=E=_([S(1,A.IBufferService),S(2,A.IDecorationService),S(3,y.IRenderService)],E)},5871:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorZoneStore=void 0,u.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(d){if(d.options.overviewRulerOptions){for(const _ of this._zones)if(_.color===d.options.overviewRulerOptions.color&&_.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(_,d.marker.line))return;if(this._lineAdjacentToZone(_,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(_,d.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(d){this._linePadding=d}_lineIntersectsZone(d,_){return _>=d.startBufferLine&&_<=d.endBufferLine}_lineAdjacentToZone(d,_,S){return _>=d.startBufferLine-this._linePadding[S||"full"]&&_<=d.endBufferLine+this._linePadding[S||"full"]}_addLineToZone(d,_){d.startBufferLine=Math.min(d.startBufferLine,_),d.endBufferLine=Math.max(d.endBufferLine,_)}}},5744:function(z,u,d){var _=this&&this.__decorate||function(g,w,T,D){var b,R=arguments.length,U=R<3?w:D===null?D=Object.getOwnPropertyDescriptor(w,T):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(g,w,T,D);else for(var W=g.length-1;W>=0;W--)(b=g[W])&&(U=(R<3?b(U):R>3?b(w,T,U):b(w,T))||U);return R>3&&U&&Object.defineProperty(w,T,U),U},S=this&&this.__param||function(g,w){return function(T,D){w(T,D,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=d(5871),y=d(3656),x=d(4725),A=d(844),E=d(2585),a={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0};let o=u.OverviewRulerRenderer=class extends A.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,w,T,D,b,R,U){var W;super(),this._viewportElement=g,this._screenElement=w,this._bufferService=T,this._decorationService=D,this._renderService=b,this._optionsService=R,this._coreBrowseService=U,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(W=this._viewportElement.parentElement)===null||W===void 0||W.insertBefore(this._canvas,this._viewportElement);const H=this._canvas.getContext("2d");if(!H)throw new Error("Ctx cannot be null");this._ctx=H,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,A.toDisposable)((()=>{var V;(V=this._canvas)===null||V===void 0||V.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register((0,y.addDisposableDomListener)(this._coreBrowseService.window,"resize",(()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const g=Math.floor(this._canvas.width/3),w=Math.ceil(this._canvas.width/3);c.full=this._canvas.width,c.left=g,c.center=w,c.right=g,this._refreshDrawHeightConstants(),l.full=0,l.left=0,l.center=c.left,l.right=c.left+c.center}_refreshDrawHeightConstants(){a.full=Math.round(2*this._coreBrowseService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,w=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowseService.dpr);a.left=w,a.center=w,a.right=w}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*a.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*a.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*a.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*a.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._coreBrowseService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowseService.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 w of this._decorationService.decorations)this._colorZoneStore.addDecoration(w);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const w of g)w.position!=="full"&&this._renderColorZone(w);for(const w of g)w.position==="full"&&this._renderColorZone(w);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(l[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-a[g.position||"full"]/2),c[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+a[g.position||"full"]))}_queueRefresh(g,w){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=w||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=o=_([S(2,E.IBufferService),S(3,E.IDecorationService),S(4,x.IRenderService),S(5,E.IOptionsService),S(6,x.ICoreBrowserService)],o)},2950:function(z,u,d){var _=this&&this.__decorate||function(E,a,c,l){var o,g=arguments.length,w=g<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,c):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(E,a,c,l);else for(var T=E.length-1;T>=0;T--)(o=E[T])&&(w=(g<3?o(w):g>3?o(a,c,w):o(a,c))||w);return g>3&&w&&Object.defineProperty(a,c,w),w},S=this&&this.__param||function(E,a){return function(c,l){a(c,l,E)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const h=d(4725),y=d(2585),x=d(2584);let A=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(E,a,c,l,o,g){this._textarea=E,this._compositionView=a,this._bufferService=c,this._optionsService=l,this._coreService=o,this._renderService=g,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(E){this._compositionView.textContent=E.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(E){if(this._isComposing||this._isSendingComposition){if(E.keyCode===229||E.keyCode===16||E.keyCode===17||E.keyCode===18)return!1;this._finalizeComposition(!1)}return E.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(E){if(this._compositionView.classList.remove("active"),this._isComposing=!1,E){const a={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,a.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(a.start,a.end):this._textarea.value.substring(a.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const a=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(a,!0)}}_handleAnyTextareaChanges(){const E=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const a=this._textarea.value,c=a.replace(E,"");this._dataAlreadySent=c,a.length>E.length?this._coreService.triggerDataEvent(c,!0):a.length<E.length?this._coreService.triggerDataEvent(`${x.C0.DEL}`,!0):a.length===E.length&&a!==E&&this._coreService.triggerDataEvent(a,!0)}}),0)}updateCompositionElements(E){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const a=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,l=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=a*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=l+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const g=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(g.width,1)+"px",this._textarea.style.height=Math.max(g.height,1)+"px",this._textarea.style.lineHeight=g.height+"px"}E||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=A=_([S(2,y.IBufferService),S(3,y.IOptionsService),S(4,y.ICoreService),S(5,h.IRenderService)],A)},9806:(z,u)=>{function d(_,S,h){const y=h.getBoundingClientRect(),x=_.getComputedStyle(h),A=parseInt(x.getPropertyValue("padding-left")),E=parseInt(x.getPropertyValue("padding-top"));return[S.clientX-y.left-A,S.clientY-y.top-E]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=d,u.getCoords=function(_,S,h,y,x,A,E,a,c){if(!A)return;const l=d(_,S,h);return l?(l[0]=Math.ceil((l[0]+(c?E/2:0))/E),l[1]=Math.ceil(l[1]/a),l[0]=Math.min(Math.max(l[0],1),y+(c?1:0)),l[1]=Math.min(Math.max(l[1],1),x),l):void 0}},9504:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const _=d(2584);function S(a,c,l,o){const g=a-h(a,l),w=c-h(c,l),T=Math.abs(g-w)-(function(D,b,R){let U=0;const W=D-h(D,R),H=b-h(b,R);for(let V=0;V<Math.abs(W-H);V++){const se=y(D,b)==="A"?-1:1,ae=R.buffer.lines.get(W+se*V);ae?.isWrapped&&U++}return U})(a,c,l);return E(T,A(y(a,c),o))}function h(a,c){let l=0,o=c.buffer.lines.get(a),g=o?.isWrapped;for(;g&&a>=0&&a<c.rows;)l++,o=c.buffer.lines.get(--a),g=o?.isWrapped;return l}function y(a,c){return a>c?"A":"B"}function x(a,c,l,o,g,w){let T=a,D=c,b="";for(;T!==l||D!==o;)T+=g?1:-1,g&&T>w.cols-1?(b+=w.buffer.translateBufferLineToString(D,!1,a,T),T=0,a=0,D++):!g&&T<0&&(b+=w.buffer.translateBufferLineToString(D,!1,0,a+1),T=w.cols-1,a=T,D--);return b+w.buffer.translateBufferLineToString(D,!1,a,T)}function A(a,c){const l=c?"O":"[";return _.C0.ESC+l+a}function E(a,c){a=Math.floor(a);let l="";for(let o=0;o<a;o++)l+=c;return l}u.moveToCellSequence=function(a,c,l,o){const g=l.buffer.x,w=l.buffer.y;if(!l.buffer.hasScrollback)return(function(b,R,U,W,H,V){return S(R,W,H,V).length===0?"":E(x(b,R,b,R-h(R,H),!1,H).length,A("D",V))})(g,w,0,c,l,o)+S(w,c,l,o)+(function(b,R,U,W,H,V){let se;se=S(R,W,H,V).length>0?W-h(W,H):R;const ae=W,P=(function(G,L,N,q,k,Y){let ee;return ee=S(N,q,k,Y).length>0?q-h(q,k):L,G<N&&ee<=q||G>=N&&ee<q?"C":"D"})(b,R,U,W,H,V);return E(x(b,se,U,ae,P==="C",H).length,A(P,V))})(g,w,a,c,l,o);let T;if(w===c)return T=g>a?"D":"C",E(Math.abs(g-a),A(T,o));T=w>c?"D":"C";const D=Math.abs(w-c);return E((function(b,R){return R.cols-b})(w>c?a:g,l)+(D-1)*l.cols+1+((w>c?g:a)-1),A(T,o))}},1296:function(z,u,d){var _=this&&this.__decorate||function(H,V,se,ae){var P,G=arguments.length,L=G<3?V:ae===null?ae=Object.getOwnPropertyDescriptor(V,se):ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(H,V,se,ae);else for(var N=H.length-1;N>=0;N--)(P=H[N])&&(L=(G<3?P(L):G>3?P(V,se,L):P(V,se))||L);return G>3&&L&&Object.defineProperty(V,se,L),L},S=this&&this.__param||function(H,V){return function(se,ae){V(se,ae,H)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=d(3787),y=d(2550),x=d(2223),A=d(6171),E=d(4725),a=d(8055),c=d(8460),l=d(844),o=d(2585),g="xterm-dom-renderer-owner-",w="xterm-rows",T="xterm-fg-",D="xterm-bg-",b="xterm-focus",R="xterm-selection";let U=1,W=u.DomRenderer=class extends l.Disposable{constructor(H,V,se,ae,P,G,L,N,q,k){super(),this._element=H,this._screenElement=V,this._viewportElement=se,this._linkifier2=ae,this._charSizeService=G,this._optionsService=L,this._bufferService=N,this._coreBrowserService=q,this._themeService=k,this._terminalClass=U++,this._rowElements=[],this.onRequestRedraw=this.register(new c.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(w),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=document.createElement("div"),this._selectionContainer.classList.add(R),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,A.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((Y=>this._injectCss(Y)))),this._injectCss(this._themeService.colors),this._rowFactory=P.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(g+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((Y=>this._handleLinkHover(Y)))),this.register(this._linkifier2.onHideLinkUnderline((Y=>this._handleLinkLeave(Y)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(g+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new y.WidthCache(document),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const H=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*H,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*H),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/H),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/H),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 se of this._rowElements)se.style.width=`${this.dimensions.css.canvas.width}px`,se.style.height=`${this.dimensions.css.cell.height}px`,se.style.lineHeight=`${this.dimensions.css.cell.height}px`,se.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${w} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,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(H){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${w} { color: ${H.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${w} .xterm-dim { color: ${a.color.multiplyOpacity(H.foreground,.5).css};}`,V+=`${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;}`,V+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",V+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css}; } 50% { background-color: inherit; color: ${H.cursor.css}; }}`,V+=`${this._terminalSelector} .${w}.${b} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${w}.${b} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css};}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${H.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${H.cursor.css} inset;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${H.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${R} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${R} div { position: absolute; background-color: ${H.selectionBackgroundOpaque.css};}${this._terminalSelector} .${R} div { position: absolute; background-color: ${H.selectionInactiveBackgroundOpaque.css};}`;for(const[se,ae]of H.ansi.entries())V+=`${this._terminalSelector} .${T}${se} { color: ${ae.css}; }${this._terminalSelector} .${T}${se}.xterm-dim { color: ${a.color.multiplyOpacity(ae,.5).css}; }${this._terminalSelector} .${D}${se} { background-color: ${ae.css}; }`;V+=`${this._terminalSelector} .${T}${x.INVERTED_DEFAULT_COLOR} { color: ${a.color.opaque(H.background).css}; }${this._terminalSelector} .${T}${x.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${a.color.multiplyOpacity(a.color.opaque(H.background),.5).css}; }${this._terminalSelector} .${D}${x.INVERTED_DEFAULT_COLOR} { background-color: ${H.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const H=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${H}px`,this._rowFactory.defaultSpacing=H}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(H,V){for(let se=this._rowElements.length;se<=V;se++){const ae=document.createElement("div");this._rowContainer.appendChild(ae),this._rowElements.push(ae)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(H,V){this._refreshRowElements(H,V),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(b)}handleFocus(){this._rowContainer.classList.add(b),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(H,V,se){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(H,V,se),this.renderRows(0,this._bufferService.rows-1),!H||!V)return;const ae=H[1]-this._bufferService.buffer.ydisp,P=V[1]-this._bufferService.buffer.ydisp,G=Math.max(ae,0),L=Math.min(P,this._bufferService.rows-1);if(G>=this._bufferService.rows||L<0)return;const N=document.createDocumentFragment();if(se){const q=H[0]>V[0];N.appendChild(this._createSelectionElement(G,q?V[0]:H[0],q?H[0]:V[0],L-G+1))}else{const q=ae===G?H[0]:0,k=G===P?V[0]:this._bufferService.cols;N.appendChild(this._createSelectionElement(G,q,k));const Y=L-G-1;if(N.appendChild(this._createSelectionElement(G+1,0,this._bufferService.cols,Y)),G!==L){const ee=P===L?V[0]:this._bufferService.cols;N.appendChild(this._createSelectionElement(L,0,ee))}}this._selectionContainer.appendChild(N)}_createSelectionElement(H,V,se,ae=1){const P=document.createElement("div");return P.style.height=ae*this.dimensions.css.cell.height+"px",P.style.top=H*this.dimensions.css.cell.height+"px",P.style.left=V*this.dimensions.css.cell.width+"px",P.style.width=this.dimensions.css.cell.width*(se-V)+"px",P}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 H of this._rowElements)H.replaceChildren()}renderRows(H,V){const se=this._bufferService.buffer,ae=se.ybase+se.y,P=Math.min(se.x,this._bufferService.cols-1),G=this._optionsService.rawOptions.cursorBlink,L=this._optionsService.rawOptions.cursorStyle,N=this._optionsService.rawOptions.cursorInactiveStyle;for(let q=H;q<=V;q++){const k=q+se.ydisp,Y=this._rowElements[q],ee=se.lines.get(k);if(!Y||!ee)break;Y.replaceChildren(...this._rowFactory.createRow(ee,k,k===ae,L,N,P,G,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${g}${this._terminalClass}`}_handleLinkHover(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!0)}_handleLinkLeave(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!1)}_setCellUnderline(H,V,se,ae,P,G){se<0&&(H=0),ae<0&&(V=0);const L=this._bufferService.rows-1;se=Math.max(Math.min(se,L),0),ae=Math.max(Math.min(ae,L),0),P=Math.min(P,this._bufferService.cols);const N=this._bufferService.buffer,q=N.ybase+N.y,k=Math.min(N.x,P-1),Y=this._optionsService.rawOptions.cursorBlink,ee=this._optionsService.rawOptions.cursorStyle,oe=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=se;ue<=ae;++ue){const de=ue+N.ydisp,O=this._rowElements[ue],Q=N.lines.get(de);if(!O||!Q)break;O.replaceChildren(...this._rowFactory.createRow(Q,de,de===q,ee,oe,k,Y,this.dimensions.css.cell.width,this._widthCache,G?ue===se?H:0:-1,G?(ue===ae?V:P)-1:-1))}}};u.DomRenderer=W=_([S(4,o.IInstantiationService),S(5,E.ICharSizeService),S(6,o.IOptionsService),S(7,o.IBufferService),S(8,E.ICoreBrowserService),S(9,E.IThemeService)],W)},3787:function(z,u,d){var _=this&&this.__decorate||function(T,D,b,R){var U,W=arguments.length,H=W<3?D:R===null?R=Object.getOwnPropertyDescriptor(D,b):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(T,D,b,R);else for(var V=T.length-1;V>=0;V--)(U=T[V])&&(H=(W<3?U(H):W>3?U(D,b,H):U(D,b))||H);return W>3&&H&&Object.defineProperty(D,b,H),H},S=this&&this.__param||function(T,D){return function(b,R){D(b,R,T)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=d(2223),y=d(643),x=d(511),A=d(2585),E=d(8055),a=d(4725),c=d(4269),l=d(6171),o=d(3734);let g=u.DomRendererRowFactory=class{constructor(T,D,b,R,U,W,H){this._document=T,this._characterJoinerService=D,this._optionsService=b,this._coreBrowserService=R,this._coreService=U,this._decorationService=W,this._themeService=H,this._workCell=new x.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(T,D,b){this._selectionStart=T,this._selectionEnd=D,this._columnSelectMode=b}createRow(T,D,b,R,U,W,H,V,se,ae,P){const G=[],L=this._characterJoinerService.getJoinedCharacters(D),N=this._themeService.colors;let q,k=T.getNoBgTrimmedLength();b&&k<W+1&&(k=W+1);let Y=0,ee="",oe=0,ue=0,de=0,O=!1,Q=0,ie=!1,ne=0;const ge=[],he=ae!==-1&&P!==-1;for(let De=0;De<k;De++){T.loadCell(De,this._workCell);let qe=this._workCell.getWidth();if(qe===0)continue;let it=!1,Gt=De,we=this._workCell;if(L.length>0&&De===L[0][0]){it=!0;const Ie=L.shift();we=new c.JoinedCellData(this._workCell,T.translateToString(!0,Ie[0],Ie[1]),Ie[1]-Ie[0]),Gt=Ie[1]-1,qe=we.getWidth()}const bi=this._isCellInSelection(De,D),Gi=b&&De===W,Qi=he&&De>=ae&&De<=P;let Zi=!1;this._decorationService.forEachDecorationAtCell(De,D,void 0,(Ie=>{Zi=!0}));let gs=we.getChars()||y.WHITESPACE_CELL_CHAR;if(gs===" "&&(we.isUnderline()||we.isOverline())&&(gs=" "),ne=qe*V-se.get(gs,we.isBold(),we.isItalic()),q){if(Y&&(bi&&ie||!bi&&!ie&&we.bg===oe)&&(bi&&ie&&N.selectionForeground||we.fg===ue)&&we.extended.ext===de&&Qi===O&&ne===Q&&!Gi&&!it&&!Zi){ee+=gs,Y++;continue}Y&&(q.textContent=ee),q=this._document.createElement("span"),Y=0,ee=""}else q=this._document.createElement("span");if(oe=we.bg,ue=we.fg,de=we.extended.ext,O=Qi,Q=ne,ie=bi,it&&W>=De&&W<=Gt&&(W=De),!this._coreService.isCursorHidden&&Gi){if(ge.push("xterm-cursor"),this._coreBrowserService.isFocused)H&&ge.push("xterm-cursor-blink"),ge.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(U)switch(U){case"outline":ge.push("xterm-cursor-outline");break;case"block":ge.push("xterm-cursor-block");break;case"bar":ge.push("xterm-cursor-bar");break;case"underline":ge.push("xterm-cursor-underline")}}if(we.isBold()&&ge.push("xterm-bold"),we.isItalic()&&ge.push("xterm-italic"),we.isDim()&&ge.push("xterm-dim"),ee=we.isInvisible()?y.WHITESPACE_CELL_CHAR:we.getChars()||y.WHITESPACE_CELL_CHAR,we.isUnderline()&&(ge.push(`xterm-underline-${we.extended.underlineStyle}`),ee===" "&&(ee=" "),!we.isUnderlineColorDefault()))if(we.isUnderlineColorRGB())q.style.textDecorationColor=`rgb(${o.AttributeData.toColorRGB(we.getUnderlineColor()).join(",")})`;else{let Ie=we.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&we.isBold()&&Ie<8&&(Ie+=8),q.style.textDecorationColor=N.ansi[Ie].css}we.isOverline()&&(ge.push("xterm-overline"),ee===" "&&(ee=" ")),we.isStrikethrough()&&ge.push("xterm-strikethrough"),Qi&&(q.style.textDecoration="underline");let ft=we.getFgColor(),et=we.getFgColorMode(),kt=we.getBgColor(),Ci=we.getBgColorMode();const Ss=!!we.isInverse();if(Ss){const Ie=ft;ft=kt,kt=Ie;const $i=et;et=Ci,Ci=$i}let yt,cr,Wt,Ji=!1;switch(this._decorationService.forEachDecorationAtCell(De,D,void 0,(Ie=>{Ie.options.layer!=="top"&&Ji||(Ie.backgroundColorRGB&&(Ci=50331648,kt=Ie.backgroundColorRGB.rgba>>8&16777215,yt=Ie.backgroundColorRGB),Ie.foregroundColorRGB&&(et=50331648,ft=Ie.foregroundColorRGB.rgba>>8&16777215,cr=Ie.foregroundColorRGB),Ji=Ie.options.layer==="top")})),!Ji&&bi&&(yt=this._coreBrowserService.isFocused?N.selectionBackgroundOpaque:N.selectionInactiveBackgroundOpaque,kt=yt.rgba>>8&16777215,Ci=50331648,Ji=!0,N.selectionForeground&&(et=50331648,ft=N.selectionForeground.rgba>>8&16777215,cr=N.selectionForeground)),Ji&&ge.push("xterm-decoration-top"),Ci){case 16777216:case 33554432:Wt=N.ansi[kt],ge.push(`xterm-bg-${kt}`);break;case 50331648:Wt=E.rgba.toColor(kt>>16,kt>>8&255,255&kt),this._addStyle(q,`background-color:#${w((kt>>>0).toString(16),"0",6)}`);break;default:Ss?(Wt=N.foreground,ge.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Wt=N.background}switch(yt||we.isDim()&&(yt=E.color.multiplyOpacity(Wt,.5)),et){case 16777216:case 33554432:we.isBold()&&ft<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ft+=8),this._applyMinimumContrast(q,Wt,N.ansi[ft],we,yt,void 0)||ge.push(`xterm-fg-${ft}`);break;case 50331648:const Ie=E.rgba.toColor(ft>>16&255,ft>>8&255,255&ft);this._applyMinimumContrast(q,Wt,Ie,we,yt,cr)||this._addStyle(q,`color:#${w(ft.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(q,Wt,N.foreground,we,yt,void 0)||Ss&&ge.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}ge.length&&(q.className=ge.join(" "),ge.length=0),Gi||it||Zi?q.textContent=ee:Y++,ne!==this.defaultSpacing&&(q.style.letterSpacing=`${ne}px`),G.push(q),De=Gt}return q&&Y&&(q.textContent=ee),G}_applyMinimumContrast(T,D,b,R,U,W){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,l.excludeFromContrastRatioDemands)(R.getCode()))return!1;const H=this._getContrastCache(R);let V;if(U||W||(V=H.getColor(D.rgba,b.rgba)),V===void 0){const se=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);V=E.color.ensureContrastRatio(U||D,W||b,se),H.setColor((U||D).rgba,(W||b).rgba,V??null)}return!!V&&(this._addStyle(T,`color:${V.css}`),!0)}_getContrastCache(T){return T.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(T,D){T.setAttribute("style",`${T.getAttribute("style")||""}${D};`)}_isCellInSelection(T,D){const b=this._selectionStart,R=this._selectionEnd;return!(!b||!R)&&(this._columnSelectMode?b[0]<=R[0]?T>=b[0]&&D>=b[1]&&T<R[0]&&D<=R[1]:T<b[0]&&D>=b[1]&&T>=R[0]&&D<=R[1]:D>b[1]&&D<R[1]||b[1]===R[1]&&D===b[1]&&T>=b[0]&&T<R[0]||b[1]<R[1]&&D===R[1]&&T<R[0]||b[1]<R[1]&&D===b[1]&&T>=b[0])}};function w(T,D,b){for(;T.length<b;)T=D+T;return T}u.DomRendererRowFactory=g=_([S(1,a.ICharacterJoinerService),S(2,A.IOptionsService),S(3,a.ICoreBrowserService),S(4,A.ICoreService),S(5,A.IDecorationService),S(6,a.IThemeService)],g)},2550:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=d.createElement("div"),this._container.style.position="absolute",this._container.style.top="-50000px",this._container.style.width="50000px",this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const _=d.createElement("span"),S=d.createElement("span");S.style.fontWeight="bold";const h=d.createElement("span");h.style.fontStyle="italic";const y=d.createElement("span");y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[_,S,h,y],this._container.appendChild(_),this._container.appendChild(S),this._container.appendChild(h),this._container.appendChild(y),d.body.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(d,_,S,h){d===this._font&&_===this._fontSize&&S===this._weight&&h===this._weightBold||(this._font=d,this._fontSize=_,this._weight=S,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${S}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${S}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(d,_,S){let h=0;if(!_&&!S&&d.length===1&&(h=d.charCodeAt(0))<256)return this._flat[h]!==-9999?this._flat[h]:this._flat[h]=this._measure(d,0);let y=d;_&&(y+="B"),S&&(y+="I");let x=this._holey.get(y);if(x===void 0){let A=0;_&&(A|=1),S&&(A|=2),x=this._measure(d,A),this._holey.set(y,x)}return x}_measure(d,_){const S=this._measureElements[_];return S.textContent=d.repeat(32),S.offsetWidth/32}}},2223:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const _=d(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},6171:(z,u)=>{function d(_){return 57508<=_&&_<=57558}Object.defineProperty(u,"__esModule",{value:!0}),u.createRenderDimensions=u.excludeFromContrastRatioDemands=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},u.isPowerlineGlyph=d,u.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},u.excludeFromContrastRatioDemands=function(_){return d(_)||(function(S){return 9472<=S&&S<=9631})(_)},u.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}}}}},456:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionModel=void 0,u.SelectionModel=class{constructor(d){this._bufferService=d,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const d=this.selectionStart,_=this.selectionEnd;return!(!d||!_)&&(d[1]>_[1]||d[1]===_[1]&&d[0]>_[0])}handleTrim(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(z,u,d){var _=this&&this.__decorate||function(a,c,l,o){var g,w=arguments.length,T=w<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(a,c,l,o);else for(var D=a.length-1;D>=0;D--)(g=a[D])&&(T=(w<3?g(T):w>3?g(c,l,T):g(c,l))||T);return w>3&&T&&Object.defineProperty(c,l,T),T},S=this&&this.__param||function(a,c){return function(l,o){c(l,o,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const h=d(2585),y=d(8460),x=d(844);let A=u.CharSizeService=class extends x.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(a,c,l){super(),this._optionsService=l,this.width=0,this.height=0,this._onCharSizeChange=this.register(new y.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new E(a,c,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())}};u.CharSizeService=A=_([S(2,h.IOptionsService)],A);class E{constructor(c,l,o){this._document=c,this._parentElement=l,this._optionsService=o,this._result={width:0,height:0},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(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const c={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return c.width!==0&&c.height!==0&&(this._result.width=c.width/32,this._result.height=Math.ceil(c.height)),this._result}}},4269:function(z,u,d){var _=this&&this.__decorate||function(c,l,o,g){var w,T=arguments.length,D=T<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,o):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,l,o,g);else for(var b=c.length-1;b>=0;b--)(w=c[b])&&(D=(T<3?w(D):T>3?w(l,o,D):w(l,o))||D);return T>3&&D&&Object.defineProperty(l,o,D),D},S=this&&this.__param||function(c,l){return function(o,g){l(o,g,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const h=d(3734),y=d(643),x=d(511),A=d(2585);class E extends h.AttributeData{constructor(l,o,g){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=o,this._width=g}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=E;let a=u.CharacterJoinerService=class Xd{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new x.CellData}register(l){const o={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(o),o.id}deregister(l){for(let o=0;o<this._characterJoiners.length;o++)if(this._characterJoiners[o].id===l)return this._characterJoiners.splice(o,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const o=this._bufferService.buffer.lines.get(l);if(!o||o.length===0)return[];const g=[],w=o.translateToString(!0);let T=0,D=0,b=0,R=o.getFg(0),U=o.getBg(0);for(let W=0;W<o.getTrimmedLength();W++)if(o.loadCell(W,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==U){if(W-T>1){const H=this._getJoinedRanges(w,b,D,o,T);for(let V=0;V<H.length;V++)g.push(H[V])}T=W,b=D,R=this._workCell.fg,U=this._workCell.bg}D+=this._workCell.getChars().length||y.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-T>1){const W=this._getJoinedRanges(w,b,D,o,T);for(let H=0;H<W.length;H++)g.push(W[H])}return g}_getJoinedRanges(l,o,g,w,T){const D=l.substring(o,g);let b=[];try{b=this._characterJoiners[0].handler(D)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const U=this._characterJoiners[R].handler(D);for(let W=0;W<U.length;W++)Xd._mergeRanges(b,U[W])}catch(U){console.error(U)}return this._stringRangesToCellRanges(b,w,T),b}_stringRangesToCellRanges(l,o,g){let w=0,T=!1,D=0,b=l[w];if(b){for(let R=g;R<this._bufferService.cols;R++){const U=o.getWidth(R),W=o.getString(R).length||y.WHITESPACE_CELL_CHAR.length;if(U!==0){if(!T&&b[0]<=D&&(b[0]=R,T=!0),b[1]<=D){if(b[1]=R,b=l[++w],!b)break;b[0]<=D?(b[0]=R,T=!0):T=!1}D+=W}}b&&(b[1]=this._bufferService.cols)}}static _mergeRanges(l,o){let g=!1;for(let w=0;w<l.length;w++){const T=l[w];if(g){if(o[1]<=T[0])return l[w-1][1]=o[1],l;if(o[1]<=T[1])return l[w-1][1]=Math.max(o[1],T[1]),l.splice(w,1),l;l.splice(w,1),w--}else{if(o[1]<=T[0])return l.splice(w,0,o),l;if(o[1]<=T[1])return T[0]=Math.min(o[0],T[0]),l;o[0]<T[1]&&(T[0]=Math.min(o[0],T[0]),g=!0)}}return g?l[l.length-1][1]=o[1]:l.push(o),l}};u.CharacterJoinerService=a=_([S(0,A.IBufferService)],a)},5114:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0,u.CoreBrowserService=class{constructor(d,_){this._textarea=d,this.window=_,this._isFocused=!1,this._cachedIsFocused=void 0,this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}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}}},8934:function(z,u,d){var _=this&&this.__decorate||function(A,E,a,c){var l,o=arguments.length,g=o<3?E:c===null?c=Object.getOwnPropertyDescriptor(E,a):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(A,E,a,c);else for(var w=A.length-1;w>=0;w--)(l=A[w])&&(g=(o<3?l(g):o>3?l(E,a,g):l(E,a))||g);return o>3&&g&&Object.defineProperty(E,a,g),g},S=this&&this.__param||function(A,E){return function(a,c){E(a,c,A)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=d(4725),y=d(9806);let x=u.MouseService=class{constructor(A,E){this._renderService=A,this._charSizeService=E}getCoords(A,E,a,c,l){return(0,y.getCoords)(window,A,E,a,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(A,E){const a=(0,y.getCoordsRelativeToElement)(window,A,E);if(this._charSizeService.hasValidSize)return a[0]=Math.min(Math.max(a[0],0),this._renderService.dimensions.css.canvas.width-1),a[1]=Math.min(Math.max(a[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(a[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(a[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(a[0]),y:Math.floor(a[1])}}};u.MouseService=x=_([S(0,h.IRenderService),S(1,h.ICharSizeService)],x)},3230:function(z,u,d){var _=this&&this.__decorate||function(g,w,T,D){var b,R=arguments.length,U=R<3?w:D===null?D=Object.getOwnPropertyDescriptor(w,T):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(g,w,T,D);else for(var W=g.length-1;W>=0;W--)(b=g[W])&&(U=(R<3?b(U):R>3?b(w,T,U):b(w,T))||U);return R>3&&U&&Object.defineProperty(w,T,U),U},S=this&&this.__param||function(g,w){return function(T,D){w(T,D,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=d(3656),y=d(6193),x=d(5596),A=d(4725),E=d(8460),a=d(844),c=d(7226),l=d(2585);let o=u.RenderService=class extends a.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(g,w,T,D,b,R,U,W){if(super(),this._rowCount=g,this._charSizeService=D,this._renderer=this.register(new a.MutableDisposable),this._pausedResizeTask=new c.DebouncedIdleTask,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 E.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new E.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new E.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new E.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new y.RenderDebouncer(U.window,((H,V)=>this._renderRows(H,V))),this.register(this._renderDebouncer),this._screenDprMonitor=new x.ScreenDprMonitor(U.window),this._screenDprMonitor.setListener((()=>this.handleDevicePixelRatioChange())),this.register(this._screenDprMonitor),this.register(R.onResize((()=>this._fullRefresh()))),this.register(R.buffers.onBufferActivate((()=>{var H;return(H=this._renderer.value)===null||H===void 0?void 0:H.clear()}))),this.register(T.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(b.onDecorationRegistered((()=>this._fullRefresh()))),this.register(b.onDecorationRemoved((()=>this._fullRefresh()))),this.register(T.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],(()=>{this.clear(),this.handleResize(R.cols,R.rows),this._fullRefresh()}))),this.register(T.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(R.buffer.y,R.buffer.y,!0)))),this.register((0,h.addDisposableDomListener)(U.window,"resize",(()=>this.handleDevicePixelRatioChange()))),this.register(W.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in U.window){const H=new U.window.IntersectionObserver((V=>this._handleIntersectionChange(V[V.length-1])),{threshold:0});H.observe(w),this.register({dispose:()=>H.disconnect()})}}_handleIntersectionChange(g){this._isPaused=g.isIntersecting===void 0?g.intersectionRatio===0:!g.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(g,w,T=!1){this._isPaused?this._needsFullRefresh=!0:(T||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(g,w,this._rowCount))}_renderRows(g,w){this._renderer.value&&(g=Math.min(g,this._rowCount-1),w=Math.min(w,this._rowCount-1),this._renderer.value.renderRows(g,w),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:g,end:w}),this._onRender.fire({start:g,end:w}),this._isNextRenderRedrawOnly=!0)}resize(g,w){this._rowCount=w,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(g){this._renderer.value=g,this._renderer.value.onRequestRedraw((w=>this.refreshRows(w.start,w.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(g){return this._renderDebouncer.addRefreshCallback(g)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var g,w;this._renderer.value&&((w=(g=this._renderer.value).clearTextureAtlas)===null||w===void 0||w.call(g),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(g,w){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value.handleResize(g,w))):this._renderer.value.handleResize(g,w),this._fullRefresh())}handleCharSizeChanged(){var g;(g=this._renderer.value)===null||g===void 0||g.handleCharSizeChanged()}handleBlur(){var g;(g=this._renderer.value)===null||g===void 0||g.handleBlur()}handleFocus(){var g;(g=this._renderer.value)===null||g===void 0||g.handleFocus()}handleSelectionChanged(g,w,T){var D;this._selectionState.start=g,this._selectionState.end=w,this._selectionState.columnSelectMode=T,(D=this._renderer.value)===null||D===void 0||D.handleSelectionChanged(g,w,T)}handleCursorMove(){var g;(g=this._renderer.value)===null||g===void 0||g.handleCursorMove()}clear(){var g;(g=this._renderer.value)===null||g===void 0||g.clear()}};u.RenderService=o=_([S(2,l.IOptionsService),S(3,A.ICharSizeService),S(4,l.IDecorationService),S(5,l.IBufferService),S(6,A.ICoreBrowserService),S(7,A.IThemeService)],o)},9312:function(z,u,d){var _=this&&this.__decorate||function(b,R,U,W){var H,V=arguments.length,se=V<3?R:W===null?W=Object.getOwnPropertyDescriptor(R,U):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(b,R,U,W);else for(var ae=b.length-1;ae>=0;ae--)(H=b[ae])&&(se=(V<3?H(se):V>3?H(R,U,se):H(R,U))||se);return V>3&&se&&Object.defineProperty(R,U,se),se},S=this&&this.__param||function(b,R){return function(U,W){R(U,W,b)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=d(9806),y=d(9504),x=d(456),A=d(4725),E=d(8460),a=d(844),c=d(6114),l=d(4841),o=d(511),g=d(2585),w=" ",T=new RegExp(w,"g");let D=u.SelectionService=class extends a.Disposable{constructor(b,R,U,W,H,V,se,ae,P){super(),this._element=b,this._screenElement=R,this._linkifier=U,this._bufferService=W,this._coreService=H,this._mouseService=V,this._optionsService=se,this._renderService=ae,this._coreBrowserService=P,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new o.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new E.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new E.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new E.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new E.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=G=>this._handleMouseMove(G),this._mouseUpListener=G=>this._handleMouseUp(G),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((G=>this._handleTrim(G))),this.register(this._bufferService.buffers.onBufferActivate((G=>this._handleBufferActivate(G)))),this.enable(),this._model=new x.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,a.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const b=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!b||!R||b[0]===R[0]&&b[1]===R[1])}get selectionText(){const b=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!b||!R)return"";const U=this._bufferService.buffer,W=[];if(this._activeSelectionMode===3){if(b[0]===R[0])return"";const H=b[0]<R[0]?b[0]:R[0],V=b[0]<R[0]?R[0]:b[0];for(let se=b[1];se<=R[1];se++){const ae=U.translateBufferLineToString(se,!0,H,V);W.push(ae)}}else{const H=b[1]===R[1]?R[0]:void 0;W.push(U.translateBufferLineToString(b[1],!0,b[0],H));for(let V=b[1]+1;V<=R[1]-1;V++){const se=U.lines.get(V),ae=U.translateBufferLineToString(V,!0);se?.isWrapped?W[W.length-1]+=ae:W.push(ae)}if(b[1]!==R[1]){const V=U.lines.get(R[1]),se=U.translateBufferLineToString(R[1],!0,0,R[0]);V&&V.isWrapped?W[W.length-1]+=se:W.push(se)}}return W.map((H=>H.replace(T," "))).join(c.isWindows?`\r
|
|
83
|
+
`:`
|
|
84
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(b){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&b&&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(b){const R=this._getMouseBufferCoords(b),U=this._model.finalSelectionStart,W=this._model.finalSelectionEnd;return!!(U&&W&&R)&&this._areCoordsInSelection(R,U,W)}isCellInSelection(b,R){const U=this._model.finalSelectionStart,W=this._model.finalSelectionEnd;return!(!U||!W)&&this._areCoordsInSelection([b,R],U,W)}_areCoordsInSelection(b,R,U){return b[1]>R[1]&&b[1]<U[1]||R[1]===U[1]&&b[1]===R[1]&&b[0]>=R[0]&&b[0]<U[0]||R[1]<U[1]&&b[1]===U[1]&&b[0]<U[0]||R[1]<U[1]&&b[1]===R[1]&&b[0]>=R[0]}_selectWordAtCursor(b,R){var U,W;const H=(W=(U=this._linkifier.currentLink)===null||U===void 0?void 0:U.link)===null||W===void 0?void 0:W.range;if(H)return this._model.selectionStart=[H.start.x-1,H.start.y-1],this._model.selectionStartLength=(0,l.getRangeLength)(H,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const V=this._getMouseBufferCoords(b);return!!V&&(this._selectWordAt(V,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(b,R){this._model.clearSelection(),b=Math.max(b,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,b],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(b){this._model.handleTrim(b)&&this.refresh()}_getMouseBufferCoords(b){const R=this._mouseService.getCoords(b,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(b){let R=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,b,this._screenElement)[1];const U=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=U?0:(R>U&&(R-=U),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(b){return c.isMac?b.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:b.shiftKey}handleMouseDown(b){if(this._mouseDownTimeStamp=b.timeStamp,(b.button!==2||!this.hasSelection)&&b.button===0){if(!this._enabled){if(!this.shouldForceSelection(b))return;b.stopPropagation()}b.preventDefault(),this._dragScrollAmount=0,this._enabled&&b.shiftKey?this._handleIncrementalClick(b):b.detail===1?this._handleSingleClick(b):b.detail===2?this._handleDoubleClick(b):b.detail===3&&this._handleTripleClick(b),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(b){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(b))}_handleSingleClick(b){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(b)?3:0,this._model.selectionStart=this._getMouseBufferCoords(b),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(b){this._selectWordAtCursor(b,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(b){const R=this._getMouseBufferCoords(b);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(b){return b.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(b){if(b.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(b),!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(b),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const U=this._bufferService.buffer;if(this._model.selectionEnd[1]<U.lines.length){const W=U.lines.get(this._model.selectionEnd[1]);W&&W.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}R&&R[0]===this._model.selectionEnd[0]&&R[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const b=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(b.ydisp+this._bufferService.rows,b.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=b.ydisp),this.refresh()}}_handleMouseUp(b){const R=b.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&b.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const U=this._mouseService.getCoords(b,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(U&&U[0]!==void 0&&U[1]!==void 0){const W=(0,y.moveToCellSequence)(U[0]-1,U[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(W,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const b=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,U=!(!b||!R||b[0]===R[0]&&b[1]===R[1]);U?b&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&b[0]===this._oldSelectionStart[0]&&b[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(b,R,U)):this._oldHasSelection&&this._fireOnSelectionChange(b,R,U)}_fireOnSelectionChange(b,R,U){this._oldSelectionStart=b,this._oldSelectionEnd=R,this._oldHasSelection=U,this._onSelectionChange.fire()}_handleBufferActivate(b){this.clearSelection(),this._trimListener.dispose(),this._trimListener=b.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(b,R){let U=R;for(let W=0;R>=W;W++){const H=b.loadCell(W,this._workCell).getChars().length;this._workCell.getWidth()===0?U--:H>1&&R!==W&&(U+=H-1)}return U}setSelection(b,R,U){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[b,R],this._model.selectionStartLength=U,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(b){this._isClickInSelection(b)||(this._selectWordAtCursor(b,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(b,R,U=!0,W=!0){if(b[0]>=this._bufferService.cols)return;const H=this._bufferService.buffer,V=H.lines.get(b[1]);if(!V)return;const se=H.translateBufferLineToString(b[1],!1);let ae=this._convertViewportColToCharacterIndex(V,b[0]),P=ae;const G=b[0]-ae;let L=0,N=0,q=0,k=0;if(se.charAt(ae)===" "){for(;ae>0&&se.charAt(ae-1)===" ";)ae--;for(;P<se.length&&se.charAt(P+1)===" ";)P++}else{let oe=b[0],ue=b[0];V.getWidth(oe)===0&&(L++,oe--),V.getWidth(ue)===2&&(N++,ue++);const de=V.getString(ue).length;for(de>1&&(k+=de-1,P+=de-1);oe>0&&ae>0&&!this._isCharWordSeparator(V.loadCell(oe-1,this._workCell));){V.loadCell(oe-1,this._workCell);const O=this._workCell.getChars().length;this._workCell.getWidth()===0?(L++,oe--):O>1&&(q+=O-1,ae-=O-1),ae--,oe--}for(;ue<V.length&&P+1<se.length&&!this._isCharWordSeparator(V.loadCell(ue+1,this._workCell));){V.loadCell(ue+1,this._workCell);const O=this._workCell.getChars().length;this._workCell.getWidth()===2?(N++,ue++):O>1&&(k+=O-1,P+=O-1),P++,ue++}}P++;let Y=ae+G-L+q,ee=Math.min(this._bufferService.cols,P-ae+L+N-q-k);if(R||se.slice(ae,P).trim()!==""){if(U&&Y===0&&V.getCodePoint(0)!==32){const oe=H.lines.get(b[1]-1);if(oe&&V.isWrapped&&oe.getCodePoint(this._bufferService.cols-1)!==32){const ue=this._getWordAt([this._bufferService.cols-1,b[1]-1],!1,!0,!1);if(ue){const de=this._bufferService.cols-ue.start;Y-=de,ee+=de}}}if(W&&Y+ee===this._bufferService.cols&&V.getCodePoint(this._bufferService.cols-1)!==32){const oe=H.lines.get(b[1]+1);if(oe?.isWrapped&&oe.getCodePoint(0)!==32){const ue=this._getWordAt([0,b[1]+1],!1,!1,!0);ue&&(ee+=ue.length)}}return{start:Y,length:ee}}}_selectWordAt(b,R){const U=this._getWordAt(b,R);if(U){for(;U.start<0;)U.start+=this._bufferService.cols,b[1]--;this._model.selectionStart=[U.start,b[1]],this._model.selectionStartLength=U.length}}_selectToWordAt(b){const R=this._getWordAt(b,!0);if(R){let U=b[1];for(;R.start<0;)R.start+=this._bufferService.cols,U--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,U++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,U]}}_isCharWordSeparator(b){return b.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(b.getChars())>=0}_selectLineAt(b){const R=this._bufferService.buffer.getWrappedRangeForLine(b),U={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,l.getRangeLength)(U,this._bufferService.cols)}};u.SelectionService=D=_([S(3,g.IBufferService),S(4,g.ICoreService),S(5,A.IMouseService),S(6,g.IOptionsService),S(7,A.IRenderService),S(8,A.ICoreBrowserService)],D)},4725:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IThemeService=u.ICharacterJoinerService=u.ISelectionService=u.IRenderService=u.IMouseService=u.ICoreBrowserService=u.ICharSizeService=void 0;const _=d(8343);u.ICharSizeService=(0,_.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),u.IMouseService=(0,_.createDecorator)("MouseService"),u.IRenderService=(0,_.createDecorator)("RenderService"),u.ISelectionService=(0,_.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,_.createDecorator)("ThemeService")},6731:function(z,u,d){var _=this&&this.__decorate||function(D,b,R,U){var W,H=arguments.length,V=H<3?b:U===null?U=Object.getOwnPropertyDescriptor(b,R):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(D,b,R,U);else for(var se=D.length-1;se>=0;se--)(W=D[se])&&(V=(H<3?W(V):H>3?W(b,R,V):W(b,R))||V);return H>3&&V&&Object.defineProperty(b,R,V),V},S=this&&this.__param||function(D,b){return function(R,U){b(R,U,D)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=d(7239),y=d(8055),x=d(8460),A=d(844),E=d(2585),a=y.css.toColor("#ffffff"),c=y.css.toColor("#000000"),l=y.css.toColor("#ffffff"),o=y.css.toColor("#000000"),g={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const D=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],b=[0,95,135,175,215,255];for(let R=0;R<216;R++){const U=b[R/36%6|0],W=b[R/6%6|0],H=b[R%6];D.push({css:y.channels.toCss(U,W,H),rgba:y.channels.toRgba(U,W,H)})}for(let R=0;R<24;R++){const U=8+10*R;D.push({css:y.channels.toCss(U,U,U),rgba:y.channels.toRgba(U,U,U)})}return D})());let w=u.ThemeService=class extends A.Disposable{get colors(){return this._colors}constructor(D){super(),this._optionsService=D,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new x.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:a,background:c,cursor:l,cursorAccent:o,selectionForeground:void 0,selectionBackgroundTransparent:g,selectionBackgroundOpaque:y.color.blend(c,g),selectionInactiveBackgroundTransparent:g,selectionInactiveBackgroundOpaque:y.color.blend(c,g),ansi:u.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(D={}){const b=this._colors;if(b.foreground=T(D.foreground,a),b.background=T(D.background,c),b.cursor=T(D.cursor,l),b.cursorAccent=T(D.cursorAccent,o),b.selectionBackgroundTransparent=T(D.selectionBackground,g),b.selectionBackgroundOpaque=y.color.blend(b.background,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundTransparent=T(D.selectionInactiveBackground,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundOpaque=y.color.blend(b.background,b.selectionInactiveBackgroundTransparent),b.selectionForeground=D.selectionForeground?T(D.selectionForeground,y.NULL_COLOR):void 0,b.selectionForeground===y.NULL_COLOR&&(b.selectionForeground=void 0),y.color.isOpaque(b.selectionBackgroundTransparent)&&(b.selectionBackgroundTransparent=y.color.opacity(b.selectionBackgroundTransparent,.3)),y.color.isOpaque(b.selectionInactiveBackgroundTransparent)&&(b.selectionInactiveBackgroundTransparent=y.color.opacity(b.selectionInactiveBackgroundTransparent,.3)),b.ansi=u.DEFAULT_ANSI_COLORS.slice(),b.ansi[0]=T(D.black,u.DEFAULT_ANSI_COLORS[0]),b.ansi[1]=T(D.red,u.DEFAULT_ANSI_COLORS[1]),b.ansi[2]=T(D.green,u.DEFAULT_ANSI_COLORS[2]),b.ansi[3]=T(D.yellow,u.DEFAULT_ANSI_COLORS[3]),b.ansi[4]=T(D.blue,u.DEFAULT_ANSI_COLORS[4]),b.ansi[5]=T(D.magenta,u.DEFAULT_ANSI_COLORS[5]),b.ansi[6]=T(D.cyan,u.DEFAULT_ANSI_COLORS[6]),b.ansi[7]=T(D.white,u.DEFAULT_ANSI_COLORS[7]),b.ansi[8]=T(D.brightBlack,u.DEFAULT_ANSI_COLORS[8]),b.ansi[9]=T(D.brightRed,u.DEFAULT_ANSI_COLORS[9]),b.ansi[10]=T(D.brightGreen,u.DEFAULT_ANSI_COLORS[10]),b.ansi[11]=T(D.brightYellow,u.DEFAULT_ANSI_COLORS[11]),b.ansi[12]=T(D.brightBlue,u.DEFAULT_ANSI_COLORS[12]),b.ansi[13]=T(D.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),b.ansi[14]=T(D.brightCyan,u.DEFAULT_ANSI_COLORS[14]),b.ansi[15]=T(D.brightWhite,u.DEFAULT_ANSI_COLORS[15]),D.extendedAnsi){const R=Math.min(b.ansi.length-16,D.extendedAnsi.length);for(let U=0;U<R;U++)b.ansi[U+16]=T(D.extendedAnsi[U],u.DEFAULT_ANSI_COLORS[U+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(D){this._restoreColor(D),this._onChangeColors.fire(this.colors)}_restoreColor(D){if(D!==void 0)switch(D){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[D]=this._restoreColors.ansi[D]}else for(let b=0;b<this._restoreColors.ansi.length;++b)this._colors.ansi[b]=this._restoreColors.ansi[b]}modifyColors(D){D(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 T(D,b){if(D!==void 0)try{return y.css.toColor(D)}catch{}return b}u.ThemeService=w=_([S(0,E.IOptionsService)],w)},6349:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const _=d(8460),S=d(844);class h extends S.Disposable{constructor(x){super(),this._maxLength=x,this.onDeleteEmitter=this.register(new _.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new _.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new _.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(x){if(this._maxLength===x)return;const A=new Array(x);for(let E=0;E<Math.min(x,this.length);E++)A[E]=this._array[this._getCyclicIndex(E)];this._array=A,this._maxLength=x,this._startIndex=0}get length(){return this._length}set length(x){if(x>this._length)for(let A=this._length;A<x;A++)this._array[A]=void 0;this._length=x}get(x){return this._array[this._getCyclicIndex(x)]}set(x,A){this._array[this._getCyclicIndex(x)]=A}push(x){this._array[this._getCyclicIndex(this._length)]=x,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(x,A,...E){if(A){for(let a=x;a<this._length-A;a++)this._array[this._getCyclicIndex(a)]=this._array[this._getCyclicIndex(a+A)];this._length-=A,this.onDeleteEmitter.fire({index:x,amount:A})}for(let a=this._length-1;a>=x;a--)this._array[this._getCyclicIndex(a+E.length)]=this._array[this._getCyclicIndex(a)];for(let a=0;a<E.length;a++)this._array[this._getCyclicIndex(x+a)]=E[a];if(E.length&&this.onInsertEmitter.fire({index:x,amount:E.length}),this._length+E.length>this._maxLength){const a=this._length+E.length-this._maxLength;this._startIndex+=a,this._length=this._maxLength,this.onTrimEmitter.fire(a)}else this._length+=E.length}trimStart(x){x>this._length&&(x=this._length),this._startIndex+=x,this._length-=x,this.onTrimEmitter.fire(x)}shiftElements(x,A,E){if(!(A<=0)){if(x<0||x>=this._length)throw new Error("start argument out of range");if(x+E<0)throw new Error("Cannot shift elements in list beyond index 0");if(E>0){for(let c=A-1;c>=0;c--)this.set(x+c+E,this.get(x+c));const a=x+A+E-this._length;if(a>0)for(this._length+=a;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let a=0;a<A;a++)this.set(x+a+E,this.get(x+a))}}_getCyclicIndex(x){return(this._startIndex+x)%this._maxLength}}u.CircularList=h},1439:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function d(_,S=5){if(typeof _!="object")return _;const h=Array.isArray(_)?[]:{};for(const y in _)h[y]=S<=1?_[y]:_[y]&&d(_[y],S-1);return h}},8055:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.contrastRatio=u.toPaddedHex=u.rgba=u.rgb=u.css=u.color=u.channels=u.NULL_COLOR=void 0;const _=d(6114);let S=0,h=0,y=0,x=0;var A,E,a,c,l;function o(w){const T=w.toString(16);return T.length<2?"0"+T:T}function g(w,T){return w<T?(T+.05)/(w+.05):(w+.05)/(T+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(w){w.toCss=function(T,D,b,R){return R!==void 0?`#${o(T)}${o(D)}${o(b)}${o(R)}`:`#${o(T)}${o(D)}${o(b)}`},w.toRgba=function(T,D,b,R=255){return(T<<24|D<<16|b<<8|R)>>>0}})(A||(u.channels=A={})),(function(w){function T(D,b){return x=Math.round(255*b),[S,h,y]=l.toChannels(D.rgba),{css:A.toCss(S,h,y,x),rgba:A.toRgba(S,h,y,x)}}w.blend=function(D,b){if(x=(255&b.rgba)/255,x===1)return{css:b.css,rgba:b.rgba};const R=b.rgba>>24&255,U=b.rgba>>16&255,W=b.rgba>>8&255,H=D.rgba>>24&255,V=D.rgba>>16&255,se=D.rgba>>8&255;return S=H+Math.round((R-H)*x),h=V+Math.round((U-V)*x),y=se+Math.round((W-se)*x),{css:A.toCss(S,h,y),rgba:A.toRgba(S,h,y)}},w.isOpaque=function(D){return(255&D.rgba)==255},w.ensureContrastRatio=function(D,b,R){const U=l.ensureContrastRatio(D.rgba,b.rgba,R);if(U)return l.toColor(U>>24&255,U>>16&255,U>>8&255)},w.opaque=function(D){const b=(255|D.rgba)>>>0;return[S,h,y]=l.toChannels(b),{css:A.toCss(S,h,y),rgba:b}},w.opacity=T,w.multiplyOpacity=function(D,b){return x=255&D.rgba,T(D,x*b/255)},w.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(E||(u.color=E={})),(function(w){let T,D;if(!_.isNode){const b=document.createElement("canvas");b.width=1,b.height=1;const R=b.getContext("2d",{willReadFrequently:!0});R&&(T=R,T.globalCompositeOperation="copy",D=T.createLinearGradient(0,0,1,1))}w.toColor=function(b){if(b.match(/#[\da-f]{3,8}/i))switch(b.length){case 4:return S=parseInt(b.slice(1,2).repeat(2),16),h=parseInt(b.slice(2,3).repeat(2),16),y=parseInt(b.slice(3,4).repeat(2),16),l.toColor(S,h,y);case 5:return S=parseInt(b.slice(1,2).repeat(2),16),h=parseInt(b.slice(2,3).repeat(2),16),y=parseInt(b.slice(3,4).repeat(2),16),x=parseInt(b.slice(4,5).repeat(2),16),l.toColor(S,h,y,x);case 7:return{css:b,rgba:(parseInt(b.slice(1),16)<<8|255)>>>0};case 9:return{css:b,rgba:parseInt(b.slice(1),16)>>>0}}const R=b.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(R)return S=parseInt(R[1]),h=parseInt(R[2]),y=parseInt(R[3]),x=Math.round(255*(R[5]===void 0?1:parseFloat(R[5]))),l.toColor(S,h,y,x);if(!T||!D)throw new Error("css.toColor: Unsupported css format");if(T.fillStyle=D,T.fillStyle=b,typeof T.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(T.fillRect(0,0,1,1),[S,h,y,x]=T.getImageData(0,0,1,1).data,x!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:A.toRgba(S,h,y,x),css:b}}})(a||(u.css=a={})),(function(w){function T(D,b,R){const U=D/255,W=b/255,H=R/255;return .2126*(U<=.03928?U/12.92:Math.pow((U+.055)/1.055,2.4))+.7152*(W<=.03928?W/12.92:Math.pow((W+.055)/1.055,2.4))+.0722*(H<=.03928?H/12.92:Math.pow((H+.055)/1.055,2.4))}w.relativeLuminance=function(D){return T(D>>16&255,D>>8&255,255&D)},w.relativeLuminance2=T})(c||(u.rgb=c={})),(function(w){function T(b,R,U){const W=b>>24&255,H=b>>16&255,V=b>>8&255;let se=R>>24&255,ae=R>>16&255,P=R>>8&255,G=g(c.relativeLuminance2(se,ae,P),c.relativeLuminance2(W,H,V));for(;G<U&&(se>0||ae>0||P>0);)se-=Math.max(0,Math.ceil(.1*se)),ae-=Math.max(0,Math.ceil(.1*ae)),P-=Math.max(0,Math.ceil(.1*P)),G=g(c.relativeLuminance2(se,ae,P),c.relativeLuminance2(W,H,V));return(se<<24|ae<<16|P<<8|255)>>>0}function D(b,R,U){const W=b>>24&255,H=b>>16&255,V=b>>8&255;let se=R>>24&255,ae=R>>16&255,P=R>>8&255,G=g(c.relativeLuminance2(se,ae,P),c.relativeLuminance2(W,H,V));for(;G<U&&(se<255||ae<255||P<255);)se=Math.min(255,se+Math.ceil(.1*(255-se))),ae=Math.min(255,ae+Math.ceil(.1*(255-ae))),P=Math.min(255,P+Math.ceil(.1*(255-P))),G=g(c.relativeLuminance2(se,ae,P),c.relativeLuminance2(W,H,V));return(se<<24|ae<<16|P<<8|255)>>>0}w.ensureContrastRatio=function(b,R,U){const W=c.relativeLuminance(b>>8),H=c.relativeLuminance(R>>8);if(g(W,H)<U){if(H<W){const ae=T(b,R,U),P=g(W,c.relativeLuminance(ae>>8));if(P<U){const G=D(b,R,U);return P>g(W,c.relativeLuminance(G>>8))?ae:G}return ae}const V=D(b,R,U),se=g(W,c.relativeLuminance(V>>8));if(se<U){const ae=T(b,R,U);return se>g(W,c.relativeLuminance(ae>>8))?V:ae}return V}},w.reduceLuminance=T,w.increaseLuminance=D,w.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]},w.toColor=function(b,R,U,W){return{css:A.toCss(b,R,U,W),rgba:A.toRgba(b,R,U,W)}}})(l||(u.rgba=l={})),u.toPaddedHex=o,u.contrastRatio=g},8969:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const _=d(844),S=d(2585),h=d(4348),y=d(7866),x=d(744),A=d(7302),E=d(6975),a=d(8460),c=d(1753),l=d(1480),o=d(7994),g=d(9282),w=d(5435),T=d(5981),D=d(2660);let b=!1;class R extends _.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new a.EventEmitter),this._onScroll.event((W=>{var H;(H=this._onScrollApi)===null||H===void 0||H.fire(W.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(W){for(const H in W)this.optionsService.options[H]=W[H]}constructor(W){super(),this._windowsWrappingHeuristics=this.register(new _.MutableDisposable),this._onBinary=this.register(new a.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new a.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new a.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new a.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new a.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new a.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new A.OptionsService(W)),this._instantiationService.setService(S.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(x.BufferService)),this._instantiationService.setService(S.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(y.LogService)),this._instantiationService.setService(S.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(E.CoreService)),this._instantiationService.setService(S.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(S.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(l.UnicodeService)),this._instantiationService.setService(S.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(o.CharsetService),this._instantiationService.setService(S.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(D.OscLinkService),this._instantiationService.setService(S.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new w.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,a.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,a.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,a.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,a.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((H=>{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((H=>{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 T.WriteBuffer(((H,V)=>this._inputHandler.parse(H,V)))),this.register((0,a.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(W,H){this._writeBuffer.write(W,H)}writeSync(W,H){this._logService.logLevel<=S.LogLevelEnum.WARN&&!b&&(this._logService.warn("writeSync is unreliable and will be removed soon."),b=!0),this._writeBuffer.writeSync(W,H)}resize(W,H){isNaN(W)||isNaN(H)||(W=Math.max(W,x.MINIMUM_COLS),H=Math.max(H,x.MINIMUM_ROWS),this._bufferService.resize(W,H))}scroll(W,H=!1){this._bufferService.scroll(W,H)}scrollLines(W,H,V){this._bufferService.scrollLines(W,H,V)}scrollPages(W){this.scrollLines(W*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(W){const H=W-this._bufferService.buffer.ydisp;H!==0&&this.scrollLines(H)}registerEscHandler(W,H){return this._inputHandler.registerEscHandler(W,H)}registerDcsHandler(W,H){return this._inputHandler.registerDcsHandler(W,H)}registerCsiHandler(W,H){return this._inputHandler.registerCsiHandler(W,H)}registerOscHandler(W,H){return this._inputHandler.registerOscHandler(W,H)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let W=!1;const H=this.optionsService.rawOptions.windowsPty;H&&H.buildNumber!==void 0&&H.buildNumber!==void 0?W=H.backend==="conpty"&&H.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(W=!0),W?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const W=[];W.push(this.onLineFeed(g.updateWindowsModeWrappedState.bind(null,this._bufferService))),W.push(this.registerCsiHandler({final:"H"},(()=>((0,g.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,_.toDisposable)((()=>{for(const H of W)H.dispose()}))}}}u.CoreTerminal=R},8460:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.forwardEvent=u.EventEmitter=void 0,u.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===d)return void this._listeners.splice(_,1)}}})),this._event}fire(d,_){const S=[];for(let h=0;h<this._listeners.length;h++)S.push(this._listeners[h]);for(let h=0;h<S.length;h++)S[h].call(void 0,d,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(d,_){return d((S=>_.fire(S)))}},5435:function(z,u,d){var _=this&&this.__decorate||function(G,L,N,q){var k,Y=arguments.length,ee=Y<3?L:q===null?q=Object.getOwnPropertyDescriptor(L,N):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(G,L,N,q);else for(var oe=G.length-1;oe>=0;oe--)(k=G[oe])&&(ee=(Y<3?k(ee):Y>3?k(L,N,ee):k(L,N))||ee);return Y>3&&ee&&Object.defineProperty(L,N,ee),ee},S=this&&this.__param||function(G,L){return function(N,q){L(N,q,G)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=d(2584),y=d(7116),x=d(2015),A=d(844),E=d(482),a=d(8437),c=d(8460),l=d(643),o=d(511),g=d(3734),w=d(2585),T=d(6242),D=d(6351),b=d(5941),R={"(":0,")":1,"*":2,"+":3,"-":1,".":2},U=131072;function W(G,L){if(G>24)return L.setWinLines||!1;switch(G){case 1:return!!L.restoreWin;case 2:return!!L.minimizeWin;case 3:return!!L.setWinPosition;case 4:return!!L.setWinSizePixels;case 5:return!!L.raiseWin;case 6:return!!L.lowerWin;case 7:return!!L.refreshWin;case 8:return!!L.setWinSizeChars;case 9:return!!L.maximizeWin;case 10:return!!L.fullscreenWin;case 11:return!!L.getWinState;case 13:return!!L.getWinPosition;case 14:return!!L.getWinSizePixels;case 15:return!!L.getScreenSizePixels;case 16:return!!L.getCellSizePixels;case 18:return!!L.getWinSizeChars;case 19:return!!L.getScreenSizeChars;case 20:return!!L.getIconTitle;case 21:return!!L.getWinTitle;case 22:return!!L.pushTitle;case 23:return!!L.popTitle;case 24:return!!L.setWinLines}return!1}var H;(function(G){G[G.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",G[G.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(H||(u.WindowsOptionsReportType=H={}));let V=0;class se extends A.Disposable{getAttrData(){return this._curAttrData}constructor(L,N,q,k,Y,ee,oe,ue,de=new x.EscapeSequenceParser){super(),this._bufferService=L,this._charsetService=N,this._coreService=q,this._logService=k,this._optionsService=Y,this._oscLinkService=ee,this._coreMouseService=oe,this._unicodeService=ue,this._parser=de,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new E.StringToUtf32,this._utf8Decoder=new E.Utf8ToUtf32,this._workCell=new o.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=a.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=a.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new ae(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((O=>this._activeBuffer=O.activeBuffer))),this._parser.setCsiHandlerFallback(((O,Q)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(O),params:Q.toArray()})})),this._parser.setEscHandlerFallback((O=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(O)})})),this._parser.setExecuteHandlerFallback((O=>{this._logService.debug("Unknown EXECUTE code: ",{code:O})})),this._parser.setOscHandlerFallback(((O,Q,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:O,action:Q,data:ie})})),this._parser.setDcsHandlerFallback(((O,Q,ie)=>{Q==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(O),action:Q,payload:ie})})),this._parser.setPrintHandler(((O,Q,ie)=>this.print(O,Q,ie))),this._parser.registerCsiHandler({final:"@"},(O=>this.insertChars(O))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(O=>this.scrollLeft(O))),this._parser.registerCsiHandler({final:"A"},(O=>this.cursorUp(O))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(O=>this.scrollRight(O))),this._parser.registerCsiHandler({final:"B"},(O=>this.cursorDown(O))),this._parser.registerCsiHandler({final:"C"},(O=>this.cursorForward(O))),this._parser.registerCsiHandler({final:"D"},(O=>this.cursorBackward(O))),this._parser.registerCsiHandler({final:"E"},(O=>this.cursorNextLine(O))),this._parser.registerCsiHandler({final:"F"},(O=>this.cursorPrecedingLine(O))),this._parser.registerCsiHandler({final:"G"},(O=>this.cursorCharAbsolute(O))),this._parser.registerCsiHandler({final:"H"},(O=>this.cursorPosition(O))),this._parser.registerCsiHandler({final:"I"},(O=>this.cursorForwardTab(O))),this._parser.registerCsiHandler({final:"J"},(O=>this.eraseInDisplay(O,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(O=>this.eraseInDisplay(O,!0))),this._parser.registerCsiHandler({final:"K"},(O=>this.eraseInLine(O,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(O=>this.eraseInLine(O,!0))),this._parser.registerCsiHandler({final:"L"},(O=>this.insertLines(O))),this._parser.registerCsiHandler({final:"M"},(O=>this.deleteLines(O))),this._parser.registerCsiHandler({final:"P"},(O=>this.deleteChars(O))),this._parser.registerCsiHandler({final:"S"},(O=>this.scrollUp(O))),this._parser.registerCsiHandler({final:"T"},(O=>this.scrollDown(O))),this._parser.registerCsiHandler({final:"X"},(O=>this.eraseChars(O))),this._parser.registerCsiHandler({final:"Z"},(O=>this.cursorBackwardTab(O))),this._parser.registerCsiHandler({final:"`"},(O=>this.charPosAbsolute(O))),this._parser.registerCsiHandler({final:"a"},(O=>this.hPositionRelative(O))),this._parser.registerCsiHandler({final:"b"},(O=>this.repeatPrecedingCharacter(O))),this._parser.registerCsiHandler({final:"c"},(O=>this.sendDeviceAttributesPrimary(O))),this._parser.registerCsiHandler({prefix:">",final:"c"},(O=>this.sendDeviceAttributesSecondary(O))),this._parser.registerCsiHandler({final:"d"},(O=>this.linePosAbsolute(O))),this._parser.registerCsiHandler({final:"e"},(O=>this.vPositionRelative(O))),this._parser.registerCsiHandler({final:"f"},(O=>this.hVPosition(O))),this._parser.registerCsiHandler({final:"g"},(O=>this.tabClear(O))),this._parser.registerCsiHandler({final:"h"},(O=>this.setMode(O))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(O=>this.setModePrivate(O))),this._parser.registerCsiHandler({final:"l"},(O=>this.resetMode(O))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(O=>this.resetModePrivate(O))),this._parser.registerCsiHandler({final:"m"},(O=>this.charAttributes(O))),this._parser.registerCsiHandler({final:"n"},(O=>this.deviceStatus(O))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(O=>this.deviceStatusPrivate(O))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(O=>this.softReset(O))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(O=>this.setCursorStyle(O))),this._parser.registerCsiHandler({final:"r"},(O=>this.setScrollRegion(O))),this._parser.registerCsiHandler({final:"s"},(O=>this.saveCursor(O))),this._parser.registerCsiHandler({final:"t"},(O=>this.windowOptions(O))),this._parser.registerCsiHandler({final:"u"},(O=>this.restoreCursor(O))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(O=>this.insertColumns(O))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(O=>this.deleteColumns(O))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(O=>this.selectProtected(O))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(O=>this.requestMode(O,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(O=>this.requestMode(O,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((O=>(this.setTitle(O),this.setIconName(O),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((O=>this.setIconName(O)))),this._parser.registerOscHandler(2,new T.OscHandler((O=>this.setTitle(O)))),this._parser.registerOscHandler(4,new T.OscHandler((O=>this.setOrReportIndexedColor(O)))),this._parser.registerOscHandler(8,new T.OscHandler((O=>this.setHyperlink(O)))),this._parser.registerOscHandler(10,new T.OscHandler((O=>this.setOrReportFgColor(O)))),this._parser.registerOscHandler(11,new T.OscHandler((O=>this.setOrReportBgColor(O)))),this._parser.registerOscHandler(12,new T.OscHandler((O=>this.setOrReportCursorColor(O)))),this._parser.registerOscHandler(104,new T.OscHandler((O=>this.restoreIndexedColor(O)))),this._parser.registerOscHandler(110,new T.OscHandler((O=>this.restoreFgColor(O)))),this._parser.registerOscHandler(111,new T.OscHandler((O=>this.restoreBgColor(O)))),this._parser.registerOscHandler(112,new T.OscHandler((O=>this.restoreCursorColor(O)))),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 O in y.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:O},(()=>this.selectCharset("("+O))),this._parser.registerEscHandler({intermediates:")",final:O},(()=>this.selectCharset(")"+O))),this._parser.registerEscHandler({intermediates:"*",final:O},(()=>this.selectCharset("*"+O))),this._parser.registerEscHandler({intermediates:"+",final:O},(()=>this.selectCharset("+"+O))),this._parser.registerEscHandler({intermediates:"-",final:O},(()=>this.selectCharset("-"+O))),this._parser.registerEscHandler({intermediates:".",final:O},(()=>this.selectCharset("."+O))),this._parser.registerEscHandler({intermediates:"/",final:O},(()=>this.selectCharset("/"+O)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((O=>(this._logService.error("Parsing error: ",O),O))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new D.DcsHandler(((O,Q)=>this.requestStatusString(O,Q))))}_preserveStack(L,N,q,k){this._parseStack.paused=!0,this._parseStack.cursorStartX=L,this._parseStack.cursorStartY=N,this._parseStack.decodedLength=q,this._parseStack.position=k}_logSlowResolvingAsync(L){this._logService.logLevel<=w.LogLevelEnum.WARN&&Promise.race([L,new Promise(((N,q)=>setTimeout((()=>q("#SLOW_TIMEOUT")),5e3)))]).catch((N=>{if(N!=="#SLOW_TIMEOUT")throw N;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(L,N){let q,k=this._activeBuffer.x,Y=this._activeBuffer.y,ee=0;const oe=this._parseStack.paused;if(oe){if(q=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,N))return this._logSlowResolvingAsync(q),q;k=this._parseStack.cursorStartX,Y=this._parseStack.cursorStartY,this._parseStack.paused=!1,L.length>U&&(ee=this._parseStack.position+U)}if(this._logService.logLevel<=w.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof L=="string"?` "${L}"`:` "${Array.prototype.map.call(L,(ue=>String.fromCharCode(ue))).join("")}"`),typeof L=="string"?L.split("").map((ue=>ue.charCodeAt(0))):L),this._parseBuffer.length<L.length&&this._parseBuffer.length<U&&(this._parseBuffer=new Uint32Array(Math.min(L.length,U))),oe||this._dirtyRowTracker.clearRange(),L.length>U)for(let ue=ee;ue<L.length;ue+=U){const de=ue+U<L.length?ue+U:L.length,O=typeof L=="string"?this._stringDecoder.decode(L.substring(ue,de),this._parseBuffer):this._utf8Decoder.decode(L.subarray(ue,de),this._parseBuffer);if(q=this._parser.parse(this._parseBuffer,O))return this._preserveStack(k,Y,O,ue),this._logSlowResolvingAsync(q),q}else if(!oe){const ue=typeof L=="string"?this._stringDecoder.decode(L,this._parseBuffer):this._utf8Decoder.decode(L,this._parseBuffer);if(q=this._parser.parse(this._parseBuffer,ue))return this._preserveStack(k,Y,ue,0),this._logSlowResolvingAsync(q),q}this._activeBuffer.x===k&&this._activeBuffer.y===Y||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(L,N,q){let k,Y;const ee=this._charsetService.charset,oe=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,de=this._coreService.decPrivateModes.wraparound,O=this._coreService.modes.insertMode,Q=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&q-N>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodePoint(this._activeBuffer.x-1,0,1,Q.fg,Q.bg,Q.extended);for(let ne=N;ne<q;++ne){if(k=L[ne],Y=this._unicodeService.wcwidth(k),k<127&&ee){const ge=ee[String.fromCharCode(k)];ge&&(k=ge.charCodeAt(0))}if(oe&&this._onA11yChar.fire((0,E.stringFromCodePoint)(k)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),Y||!this._activeBuffer.x){if(this._activeBuffer.x+Y-1>=ue){if(de){for(;this._activeBuffer.x<ue;)ie.setCellFromCodePoint(this._activeBuffer.x++,0,1,Q.fg,Q.bg,Q.extended);this._activeBuffer.x=0,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)}else if(this._activeBuffer.x=ue-1,Y===2)continue}if(O&&(ie.insertCells(this._activeBuffer.x,Y,this._activeBuffer.getNullCell(Q),Q),ie.getWidth(ue-1)===2&&ie.setCellFromCodePoint(ue-1,l.NULL_CELL_CODE,l.NULL_CELL_WIDTH,Q.fg,Q.bg,Q.extended)),ie.setCellFromCodePoint(this._activeBuffer.x++,k,Y,Q.fg,Q.bg,Q.extended),Y>0)for(;--Y;)ie.setCellFromCodePoint(this._activeBuffer.x++,0,0,Q.fg,Q.bg,Q.extended)}else ie.getWidth(this._activeBuffer.x-1)?ie.addCodepointToCell(this._activeBuffer.x-1,k):ie.addCodepointToCell(this._activeBuffer.x-2,k)}q-N>0&&(ie.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<ue&&q-N>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodePoint(this._activeBuffer.x,0,1,Q.fg,Q.bg,Q.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(L,N){return L.final!=="t"||L.prefix||L.intermediates?this._parser.registerCsiHandler(L,N):this._parser.registerCsiHandler(L,(q=>!W(q.params[0],this._optionsService.rawOptions.windowOptions)||N(q)))}registerDcsHandler(L,N){return this._parser.registerDcsHandler(L,new D.DcsHandler(N))}registerEscHandler(L,N){return this._parser.registerEscHandler(L,N)}registerOscHandler(L,N){return this._parser.registerOscHandler(L,new T.OscHandler(N))}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 L;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&&(!((L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||L===void 0)&&L.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const N=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);N.hasWidth(this._activeBuffer.x)&&!N.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const L=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-L),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(L=this._bufferService.cols-1){this._activeBuffer.x=Math.min(L,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(L,N){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=L,this._activeBuffer.y=this._activeBuffer.scrollTop+N):(this._activeBuffer.x=L,this._activeBuffer.y=N),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(L,N){this._restrictCursor(),this._setCursor(this._activeBuffer.x+L,this._activeBuffer.y+N)}cursorUp(L){const N=this._activeBuffer.y-this._activeBuffer.scrollTop;return N>=0?this._moveCursor(0,-Math.min(N,L.params[0]||1)):this._moveCursor(0,-(L.params[0]||1)),!0}cursorDown(L){const N=this._activeBuffer.scrollBottom-this._activeBuffer.y;return N>=0?this._moveCursor(0,Math.min(N,L.params[0]||1)):this._moveCursor(0,L.params[0]||1),!0}cursorForward(L){return this._moveCursor(L.params[0]||1,0),!0}cursorBackward(L){return this._moveCursor(-(L.params[0]||1),0),!0}cursorNextLine(L){return this.cursorDown(L),this._activeBuffer.x=0,!0}cursorPrecedingLine(L){return this.cursorUp(L),this._activeBuffer.x=0,!0}cursorCharAbsolute(L){return this._setCursor((L.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(L){return this._setCursor(L.length>=2?(L.params[1]||1)-1:0,(L.params[0]||1)-1),!0}charPosAbsolute(L){return this._setCursor((L.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(L){return this._moveCursor(L.params[0]||1,0),!0}linePosAbsolute(L){return this._setCursor(this._activeBuffer.x,(L.params[0]||1)-1),!0}vPositionRelative(L){return this._moveCursor(0,L.params[0]||1),!0}hVPosition(L){return this.cursorPosition(L),!0}tabClear(L){const N=L.params[0];return N===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:N===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(L){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let N=L.params[0]||1;for(;N--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(L){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let N=L.params[0]||1;for(;N--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(L){const N=L.params[0];return N===1&&(this._curAttrData.bg|=536870912),N!==2&&N!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(L,N,q,k=!1,Y=!1){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);ee.replaceCells(N,q,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),Y),k&&(ee.isWrapped=!1)}_resetBufferLine(L,N=!1){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);q&&(q.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),N),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+L),q.isWrapped=!1)}eraseInDisplay(L,N=!1){let q;switch(this._restrictCursor(this._bufferService.cols),L.params[0]){case 0:for(q=this._activeBuffer.y,this._dirtyRowTracker.markDirty(q),this._eraseInBufferLine(q++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,N);q<this._bufferService.rows;q++)this._resetBufferLine(q,N);this._dirtyRowTracker.markDirty(q);break;case 1:for(q=this._activeBuffer.y,this._dirtyRowTracker.markDirty(q),this._eraseInBufferLine(q,0,this._activeBuffer.x+1,!0,N),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(q+1).isWrapped=!1);q--;)this._resetBufferLine(q,N);this._dirtyRowTracker.markDirty(0);break;case 2:for(q=this._bufferService.rows,this._dirtyRowTracker.markDirty(q-1);q--;)this._resetBufferLine(q,N);this._dirtyRowTracker.markDirty(0);break;case 3:const k=this._activeBuffer.lines.length-this._bufferService.rows;k>0&&(this._activeBuffer.lines.trimStart(k),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-k,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-k,0),this._onScroll.fire(0))}return!0}eraseInLine(L,N=!1){switch(this._restrictCursor(this._bufferService.cols),L.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,N);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,N);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,N)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(L){this._restrictCursor();let N=L.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const q=this._activeBuffer.ybase+this._activeBuffer.y,k=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Y=this._bufferService.rows-1+this._activeBuffer.ybase-k+1;for(;N--;)this._activeBuffer.lines.splice(Y-1,1),this._activeBuffer.lines.splice(q,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(L){this._restrictCursor();let N=L.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const q=this._activeBuffer.ybase+this._activeBuffer.y;let k;for(k=this._bufferService.rows-1-this._activeBuffer.scrollBottom,k=this._bufferService.rows-1+this._activeBuffer.ybase-k;N--;)this._activeBuffer.lines.splice(q,1),this._activeBuffer.lines.splice(k,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(L){this._restrictCursor();const N=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return N&&(N.insertCells(this._activeBuffer.x,L.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(L){this._restrictCursor();const N=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return N&&(N.deleteCells(this._activeBuffer.x,L.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(L){let N=L.params[0]||1;for(;N--;)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(L){let N=L.params[0]||1;for(;N--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(a.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=L.params[0]||1;for(let q=this._activeBuffer.scrollTop;q<=this._activeBuffer.scrollBottom;++q){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+q);k.deleteCells(0,N,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=L.params[0]||1;for(let q=this._activeBuffer.scrollTop;q<=this._activeBuffer.scrollBottom;++q){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+q);k.insertCells(0,N,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=L.params[0]||1;for(let q=this._activeBuffer.scrollTop;q<=this._activeBuffer.scrollBottom;++q){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+q);k.insertCells(this._activeBuffer.x,N,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=L.params[0]||1;for(let q=this._activeBuffer.scrollTop;q<=this._activeBuffer.scrollBottom;++q){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+q);k.deleteCells(this._activeBuffer.x,N,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(L){this._restrictCursor();const N=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return N&&(N.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(L.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(L){if(!this._parser.precedingCodepoint)return!0;const N=L.params[0]||1,q=new Uint32Array(N);for(let k=0;k<N;++k)q[k]=this._parser.precedingCodepoint;return this.print(q,0,q.length),!0}sendDeviceAttributesPrimary(L){return L.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(L){return L.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(L.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(L){return(this._optionsService.rawOptions.termName+"").indexOf(L)===0}setMode(L){for(let N=0;N<L.length;N++)switch(L.params[N]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(L){for(let N=0;N<L.length;N++)switch(L.params[N]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),this._charsetService.setgCharset(1,y.DEFAULT_CHARSET),this._charsetService.setgCharset(2,y.DEFAULT_CHARSET),this._charsetService.setgCharset(3,y.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(L){for(let N=0;N<L.length;N++)switch(L.params[N]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(L){for(let N=0;N<L.length;N++)switch(L.params[N]){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(),L.params[N]===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(L,N){const q=this._coreService.decPrivateModes,{activeProtocol:k,activeEncoding:Y}=this._coreMouseService,ee=this._coreService,{buffers:oe,cols:ue}=this._bufferService,{active:de,alt:O}=oe,Q=this._optionsService.rawOptions,ie=De=>De?1:2,ne=L.params[0];return ge=ne,he=N?ne===2?4:ne===4?ie(ee.modes.insertMode):ne===12?3:ne===20?ie(Q.convertEol):0:ne===1?ie(q.applicationCursorKeys):ne===3?Q.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:ne===6?ie(q.origin):ne===7?ie(q.wraparound):ne===8?3:ne===9?ie(k==="X10"):ne===12?ie(Q.cursorBlink):ne===25?ie(!ee.isCursorHidden):ne===45?ie(q.reverseWraparound):ne===66?ie(q.applicationKeypad):ne===67?4:ne===1e3?ie(k==="VT200"):ne===1002?ie(k==="DRAG"):ne===1003?ie(k==="ANY"):ne===1004?ie(q.sendFocus):ne===1005?4:ne===1006?ie(Y==="SGR"):ne===1015?4:ne===1016?ie(Y==="SGR_PIXELS"):ne===1048?1:ne===47||ne===1047||ne===1049?ie(de===O):ne===2004?ie(q.bracketedPasteMode):0,ee.triggerDataEvent(`${h.C0.ESC}[${N?"":"?"}${ge};${he}$y`),!0;var ge,he}_updateAttrColor(L,N,q,k,Y){return N===2?(L|=50331648,L&=-16777216,L|=g.AttributeData.fromColorRGB([q,k,Y])):N===5&&(L&=-50331904,L|=33554432|255&q),L}_extractColor(L,N,q){const k=[0,0,-1,0,0,0];let Y=0,ee=0;do{if(k[ee+Y]=L.params[N+ee],L.hasSubParams(N+ee)){const oe=L.getSubParams(N+ee);let ue=0;do k[1]===5&&(Y=1),k[ee+ue+1+Y]=oe[ue];while(++ue<oe.length&&ue+ee+1+Y<k.length);break}if(k[1]===5&&ee+Y>=2||k[1]===2&&ee+Y>=5)break;k[1]&&(Y=1)}while(++ee+N<L.length&&ee+Y<k.length);for(let oe=2;oe<k.length;++oe)k[oe]===-1&&(k[oe]=0);switch(k[0]){case 38:q.fg=this._updateAttrColor(q.fg,k[1],k[3],k[4],k[5]);break;case 48:q.bg=this._updateAttrColor(q.bg,k[1],k[3],k[4],k[5]);break;case 58:q.extended=q.extended.clone(),q.extended.underlineColor=this._updateAttrColor(q.extended.underlineColor,k[1],k[3],k[4],k[5])}return ee}_processUnderline(L,N){N.extended=N.extended.clone(),(!~L||L>5)&&(L=1),N.extended.underlineStyle=L,N.fg|=268435456,L===0&&(N.fg&=-268435457),N.updateExtended()}_processSGR0(L){L.fg=a.DEFAULT_ATTR_DATA.fg,L.bg=a.DEFAULT_ATTR_DATA.bg,L.extended=L.extended.clone(),L.extended.underlineStyle=0,L.extended.underlineColor&=-67108864,L.updateExtended()}charAttributes(L){if(L.length===1&&L.params[0]===0)return this._processSGR0(this._curAttrData),!0;const N=L.length;let q;const k=this._curAttrData;for(let Y=0;Y<N;Y++)q=L.params[Y],q>=30&&q<=37?(k.fg&=-50331904,k.fg|=16777216|q-30):q>=40&&q<=47?(k.bg&=-50331904,k.bg|=16777216|q-40):q>=90&&q<=97?(k.fg&=-50331904,k.fg|=16777224|q-90):q>=100&&q<=107?(k.bg&=-50331904,k.bg|=16777224|q-100):q===0?this._processSGR0(k):q===1?k.fg|=134217728:q===3?k.bg|=67108864:q===4?(k.fg|=268435456,this._processUnderline(L.hasSubParams(Y)?L.getSubParams(Y)[0]:1,k)):q===5?k.fg|=536870912:q===7?k.fg|=67108864:q===8?k.fg|=1073741824:q===9?k.fg|=2147483648:q===2?k.bg|=134217728:q===21?this._processUnderline(2,k):q===22?(k.fg&=-134217729,k.bg&=-134217729):q===23?k.bg&=-67108865:q===24?(k.fg&=-268435457,this._processUnderline(0,k)):q===25?k.fg&=-536870913:q===27?k.fg&=-67108865:q===28?k.fg&=-1073741825:q===29?k.fg&=2147483647:q===39?(k.fg&=-67108864,k.fg|=16777215&a.DEFAULT_ATTR_DATA.fg):q===49?(k.bg&=-67108864,k.bg|=16777215&a.DEFAULT_ATTR_DATA.bg):q===38||q===48||q===58?Y+=this._extractColor(L,Y,k):q===53?k.bg|=1073741824:q===55?k.bg&=-1073741825:q===59?(k.extended=k.extended.clone(),k.extended.underlineColor=-1,k.updateExtended()):q===100?(k.fg&=-67108864,k.fg|=16777215&a.DEFAULT_ATTR_DATA.fg,k.bg&=-67108864,k.bg|=16777215&a.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",q);return!0}deviceStatus(L){switch(L.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const N=this._activeBuffer.y+1,q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${N};${q}R`)}return!0}deviceStatusPrivate(L){if(L.params[0]===6){const N=this._activeBuffer.y+1,q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${N};${q}R`)}return!0}softReset(L){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=a.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(L){const N=L.params[0]||1;switch(N){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 q=N%2==1;return this._optionsService.options.cursorBlink=q,!0}setScrollRegion(L){const N=L.params[0]||1;let q;return(L.length<2||(q=L.params[1])>this._bufferService.rows||q===0)&&(q=this._bufferService.rows),q>N&&(this._activeBuffer.scrollTop=N-1,this._activeBuffer.scrollBottom=q-1,this._setCursor(0,0)),!0}windowOptions(L){if(!W(L.params[0],this._optionsService.rawOptions.windowOptions))return!0;const N=L.length>1?L.params[1]:0;switch(L.params[0]){case 14:N!==2&&this._onRequestWindowsOptionsReport.fire(H.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(H.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:N!==0&&N!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),N!==0&&N!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:N!==0&&N!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),N!==0&&N!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(L){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(L){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(L){return this._windowTitle=L,this._onTitleChange.fire(L),!0}setIconName(L){return this._iconName=L,!0}setOrReportIndexedColor(L){const N=[],q=L.split(";");for(;q.length>1;){const k=q.shift(),Y=q.shift();if(/^\d+$/.exec(k)){const ee=parseInt(k);if(P(ee))if(Y==="?")N.push({type:0,index:ee});else{const oe=(0,b.parseColor)(Y);oe&&N.push({type:1,index:ee,color:oe})}}}return N.length&&this._onColor.fire(N),!0}setHyperlink(L){const N=L.split(";");return!(N.length<2)&&(N[1]?this._createHyperlink(N[0],N[1]):!N[0]&&this._finishHyperlink())}_createHyperlink(L,N){this._getCurrentLinkId()&&this._finishHyperlink();const q=L.split(":");let k;const Y=q.findIndex((ee=>ee.startsWith("id=")));return Y!==-1&&(k=q[Y].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:k,uri:N}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(L,N){const q=L.split(";");for(let k=0;k<q.length&&!(N>=this._specialColors.length);++k,++N)if(q[k]==="?")this._onColor.fire([{type:0,index:this._specialColors[N]}]);else{const Y=(0,b.parseColor)(q[k]);Y&&this._onColor.fire([{type:1,index:this._specialColors[N],color:Y}])}return!0}setOrReportFgColor(L){return this._setOrReportSpecialColor(L,0)}setOrReportBgColor(L){return this._setOrReportSpecialColor(L,1)}setOrReportCursorColor(L){return this._setOrReportSpecialColor(L,2)}restoreIndexedColor(L){if(!L)return this._onColor.fire([{type:2}]),!0;const N=[],q=L.split(";");for(let k=0;k<q.length;++k)if(/^\d+$/.exec(q[k])){const Y=parseInt(q[k]);P(Y)&&N.push({type:2,index:Y})}return N.length&&this._onColor.fire(N),!0}restoreFgColor(L){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(L){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(L){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,y.DEFAULT_CHARSET),!0}selectCharset(L){return L.length!==2?(this.selectDefaultCharset(),!0):(L[0]==="/"||this._charsetService.setgCharset(R[L[0]],y.CHARSETS[L[1]]||y.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 L=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,L,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=a.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=a.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(L){return this._charsetService.setgLevel(L),!0}screenAlignmentPattern(){const L=new o.CellData;L.content=4194373,L.fg=this._curAttrData.fg,L.bg=this._curAttrData.bg,this._setCursor(0,0);for(let N=0;N<this._bufferService.rows;++N){const q=this._activeBuffer.ybase+this._activeBuffer.y+N,k=this._activeBuffer.lines.get(q);k&&(k.fill(L),k.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(L,N){const q=this._bufferService.buffer,k=this._optionsService.rawOptions;return(Y=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${Y}${h.C0.ESC}\\`),!0))(L==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:L==='"p'?'P1$r61;1"p':L==="r"?`P1$r${q.scrollTop+1};${q.scrollBottom+1}r`:L==="m"?"P1$r0m":L===" q"?`P1$r${{block:2,underline:4,bar:6}[k.cursorStyle]-(k.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(L,N){this._dirtyRowTracker.markRangeDirty(L,N)}}u.InputHandler=se;let ae=class{constructor(G){this._bufferService=G,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(G){G<this.start?this.start=G:G>this.end&&(this.end=G)}markRangeDirty(G,L){G>L&&(V=G,G=L,L=V),G<this.start&&(this.start=G),L>this.end&&(this.end=L)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function P(G){return 0<=G&&G<256}ae=_([S(0,w.IBufferService)],ae)},844:(z,u)=>{function d(_){for(const S of _)S.dispose();_.length=0}Object.defineProperty(u,"__esModule",{value:!0}),u.getDisposeArrayDisposable=u.disposeArray=u.toDisposable=u.MutableDisposable=u.Disposable=void 0,u.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const S=this._disposables.indexOf(_);S!==-1&&this._disposables.splice(S,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var S;this._isDisposed||_===this._value||((S=this._value)===null||S===void 0||S.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)===null||_===void 0||_.dispose(),this._value=void 0}},u.toDisposable=function(_){return{dispose:_}},u.disposeArray=d,u.getDisposeArrayDisposable=function(_){return{dispose:()=>d(_)}}},1505:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(S,h,y){this._data[S]||(this._data[S]={}),this._data[S][h]=y}get(S,h){return this._data[S]?this._data[S][h]:void 0}clear(){this._data={}}}u.TwoKeyMap=d,u.FourKeyMap=class{constructor(){this._data=new d}set(_,S,h,y,x){this._data.get(_,S)||this._data.set(_,S,new d),this._data.get(_,S).set(h,y,x)}get(_,S,h,y){var x;return(x=this._data.get(_,S))===null||x===void 0?void 0:x.get(h,y)}clear(){this._data.clear()}}},6114:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isChromeOS=u.isLinux=u.isWindows=u.isIphone=u.isIpad=u.isMac=u.getSafariVersion=u.isSafari=u.isLegacyEdge=u.isFirefox=u.isNode=void 0,u.isNode=typeof navigator>"u";const d=u.isNode?"node":navigator.userAgent,_=u.isNode?"node":navigator.platform;u.isFirefox=d.includes("Firefox"),u.isLegacyEdge=d.includes("Edge"),u.isSafari=/^((?!chrome|android).)*safari/i.test(d),u.getSafariVersion=function(){if(!u.isSafari)return 0;const S=d.match(/Version\/(\d+)/);return S===null||S.length<2?0:parseInt(S[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),u.isIpad=_==="iPad",u.isIphone=_==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),u.isLinux=_.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(d)},6106:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let d=0;u.SortedList=class{constructor(_){this._getKey=_,this._array=[]}clear(){this._array.length=0}insert(_){this._array.length!==0?(d=this._search(this._getKey(_)),this._array.splice(d,0,_)):this._array.push(_)}delete(_){if(this._array.length===0)return!1;const S=this._getKey(_);if(S===void 0||(d=this._search(S),d===-1)||this._getKey(this._array[d])!==S)return!1;do if(this._array[d]===_)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===S);return!1}*getKeyIterator(_){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===_)}forEachByKey(_,S){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do S(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===_)}values(){return[...this._array].values()}_search(_){let S=0,h=this._array.length-1;for(;h>=S;){let y=S+h>>1;const x=this._getKey(this._array[y]);if(x>_)h=y-1;else{if(!(x<_)){for(;y>0&&this._getKey(this._array[y-1])===_;)y--;return y}S=y+1}}return S}}},7226:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const _=d(6114);class S{constructor(){this._tasks=[],this._i=0}enqueue(x){this._tasks.push(x),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(x){this._idleCallback=void 0;let A=0,E=0,a=x.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(A=Date.now(),this._tasks[this._i]()||this._i++,A=Math.max(1,Date.now()-A),E=Math.max(A,E),c=x.timeRemaining(),1.5*E>c)return a-A<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(a-A))}ms`),void this._start();a=c}this.clear()}}class h extends S{_requestCallback(x){return setTimeout((()=>x(this._createDeadline(16))))}_cancelCallback(x){clearTimeout(x)}_createDeadline(x){const A=Date.now()+x;return{timeRemaining:()=>Math.max(0,A-Date.now())}}}u.PriorityTaskQueue=h,u.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends S{_requestCallback(y){return requestIdleCallback(y)}_cancelCallback(y){cancelIdleCallback(y)}}:h,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(y){this._queue.clear(),this._queue.enqueue(y)}flush(){this._queue.flush()}}},9282:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const _=d(643);u.updateWindowsModeWrappedState=function(S){const h=S.buffer.lines.get(S.buffer.ybase+S.buffer.y-1),y=h?.get(S.cols-1),x=S.buffer.lines.get(S.buffer.ybase+S.buffer.y);x&&y&&(x.isWrapped=y[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&y[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExtendedAttrs=u.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new d;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}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}}u.AttributeData=d;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}constructor(h=0,y=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=y}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=_},9092:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const _=d(6349),S=d(7226),h=d(3734),y=d(8437),x=d(4634),A=d(511),E=d(643),a=d(4863),c=d(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(l,o,g){this._hasScrollback=l,this._optionsService=o,this._bufferService=g,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=y.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=A.CellData.fromCharData([0,E.NULL_CELL_CHAR,E.NULL_CELL_WIDTH,E.NULL_CELL_CODE]),this._whitespaceCell=A.CellData.fromCharData([0,E.WHITESPACE_CELL_CHAR,E.WHITESPACE_CELL_WIDTH,E.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new S.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(l){return l?(this._nullCell.fg=l.fg,this._nullCell.bg=l.bg,this._nullCell.extended=l.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(l){return l?(this._whitespaceCell.fg=l.fg,this._whitespaceCell.bg=l.bg,this._whitespaceCell.extended=l.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(l,o){return new y.BufferLine(this._bufferService.cols,this.getNullCell(l),o)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const l=this.ybase+this.y-this.ydisp;return l>=0&&l<this._rows}_getCorrectBufferLength(l){if(!this._hasScrollback)return l;const o=l+this._optionsService.rawOptions.scrollback;return o>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:o}fillViewportRows(l){if(this.lines.length===0){l===void 0&&(l=y.DEFAULT_ATTR_DATA);let o=this._rows;for(;o--;)this.lines.push(this.getBlankLine(l))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(l,o){const g=this.getNullCell(y.DEFAULT_ATTR_DATA);let w=0;const T=this._getCorrectBufferLength(o);if(T>this.lines.maxLength&&(this.lines.maxLength=T),this.lines.length>0){if(this._cols<l)for(let b=0;b<this.lines.length;b++)w+=+this.lines.get(b).resize(l,g);let D=0;if(this._rows<o)for(let b=this._rows;b<o;b++)this.lines.length<o+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new y.BufferLine(l,g)):this.ybase>0&&this.lines.length<=this.ybase+this.y+D+1?(this.ybase--,D++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(l,g)));else for(let b=this._rows;b>o;b--)this.lines.length>o+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(T<this.lines.maxLength){const b=this.lines.length-T;b>0&&(this.lines.trimStart(b),this.ybase=Math.max(this.ybase-b,0),this.ydisp=Math.max(this.ydisp-b,0),this.savedY=Math.max(this.savedY-b,0)),this.lines.maxLength=T}this.x=Math.min(this.x,l-1),this.y=Math.min(this.y,o-1),D&&(this.y+=D),this.savedX=Math.min(this.savedX,l-1),this.scrollTop=0}if(this.scrollBottom=o-1,this._isReflowEnabled&&(this._reflow(l,o),this._cols>l))for(let D=0;D<this.lines.length;D++)w+=+this.lines.get(D).resize(l,g);this._cols=l,this._rows=o,this._memoryCleanupQueue.clear(),w>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let l=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,l=!1);let o=0;for(;this._memoryCleanupPosition<this.lines.length;)if(o+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),o>100)return!0;return l}get _isReflowEnabled(){const l=this._optionsService.rawOptions.windowsPty;return l&&l.buildNumber?this._hasScrollback&&l.backend==="conpty"&&l.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(l,o){this._cols!==l&&(l>this._cols?this._reflowLarger(l,o):this._reflowSmaller(l,o))}_reflowLarger(l,o){const g=(0,x.reflowLargerGetLinesToRemove)(this.lines,this._cols,l,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(g.length>0){const w=(0,x.reflowLargerCreateNewLayout)(this.lines,g);(0,x.reflowLargerApplyNewLayout)(this.lines,w.layout),this._reflowLargerAdjustViewport(l,o,w.countRemoved)}}_reflowLargerAdjustViewport(l,o,g){const w=this.getNullCell(y.DEFAULT_ATTR_DATA);let T=g;for(;T-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<o&&this.lines.push(new y.BufferLine(l,w))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-g,0)}_reflowSmaller(l,o){const g=this.getNullCell(y.DEFAULT_ATTR_DATA),w=[];let T=0;for(let D=this.lines.length-1;D>=0;D--){let b=this.lines.get(D);if(!b||!b.isWrapped&&b.getTrimmedLength()<=l)continue;const R=[b];for(;b.isWrapped&&D>0;)b=this.lines.get(--D),R.unshift(b);const U=this.ybase+this.y;if(U>=D&&U<D+R.length)continue;const W=R[R.length-1].getTrimmedLength(),H=(0,x.reflowSmallerGetNewLineLengths)(R,this._cols,l),V=H.length-R.length;let se;se=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+V):Math.max(0,this.lines.length-this.lines.maxLength+V);const ae=[];for(let k=0;k<V;k++){const Y=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);ae.push(Y)}ae.length>0&&(w.push({start:D+R.length+T,newLines:ae}),T+=ae.length),R.push(...ae);let P=H.length-1,G=H[P];G===0&&(P--,G=H[P]);let L=R.length-V-1,N=W;for(;L>=0;){const k=Math.min(N,G);if(R[P]===void 0)break;if(R[P].copyCellsFrom(R[L],N-k,G-k,k,!0),G-=k,G===0&&(P--,G=H[P]),N-=k,N===0){L--;const Y=Math.max(L,0);N=(0,x.getWrappedLineTrimmedLength)(R,Y,this._cols)}}for(let k=0;k<R.length;k++)H[k]<l&&R[k].setCell(H[k],g);let q=V-se;for(;q-- >0;)this.ybase===0?this.y<o-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+T)-o&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+V,this.ybase+o-1)}if(w.length>0){const D=[],b=[];for(let P=0;P<this.lines.length;P++)b.push(this.lines.get(P));const R=this.lines.length;let U=R-1,W=0,H=w[W];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+T);let V=0;for(let P=Math.min(this.lines.maxLength-1,R+T-1);P>=0;P--)if(H&&H.start>U+V){for(let G=H.newLines.length-1;G>=0;G--)this.lines.set(P--,H.newLines[G]);P++,D.push({index:U+1,amount:H.newLines.length}),V+=H.newLines.length,H=w[++W]}else this.lines.set(P,b[U--]);let se=0;for(let P=D.length-1;P>=0;P--)D[P].index+=se,this.lines.onInsertEmitter.fire(D[P]),se+=D[P].amount;const ae=Math.max(0,R+T-this.lines.maxLength);ae>0&&this.lines.onTrimEmitter.fire(ae)}}translateBufferLineToString(l,o,g=0,w){const T=this.lines.get(l);return T?T.translateToString(o,g,w):""}getWrappedRangeForLine(l){let o=l,g=l;for(;o>0&&this.lines.get(o).isWrapped;)o--;for(;g+1<this.lines.length&&this.lines.get(g+1).isWrapped;)g++;return{first:o,last:g}}setupTabStops(l){for(l!=null?this.tabs[l]||(l=this.prevStop(l)):(this.tabs={},l=0);l<this._cols;l+=this._optionsService.rawOptions.tabStopWidth)this.tabs[l]=!0}prevStop(l){for(l==null&&(l=this.x);!this.tabs[--l]&&l>0;);return l>=this._cols?this._cols-1:l<0?0:l}nextStop(l){for(l==null&&(l=this.x);!this.tabs[++l]&&l<this._cols;);return l>=this._cols?this._cols-1:l<0?0:l}clearMarkers(l){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].line===l&&(this.markers[o].dispose(),this.markers.splice(o--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].dispose(),this.markers.splice(l--,1);this._isClearing=!1}addMarker(l){const o=new a.Marker(l);return this.markers.push(o),o.register(this.lines.onTrim((g=>{o.line-=g,o.line<0&&o.dispose()}))),o.register(this.lines.onInsert((g=>{o.line>=g.index&&(o.line+=g.amount)}))),o.register(this.lines.onDelete((g=>{o.line>=g.index&&o.line<g.index+g.amount&&o.dispose(),o.line>g.index&&(o.line-=g.amount)}))),o.register(o.onDispose((()=>this._removeMarker(o)))),o}_removeMarker(l){this._isClearing||this.markers.splice(this.markers.indexOf(l),1)}}},8437:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const _=d(3734),S=d(511),h=d(643),y=d(482);u.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let x=0;class A{constructor(a,c,l=!1){this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*a);const o=c||S.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let g=0;g<a;++g)this.setCell(g,o);this.length=a}get(a){const c=this._data[3*a+0],l=2097151&c;return[this._data[3*a+1],2097152&c?this._combined[a]:l?(0,y.stringFromCodePoint)(l):"",c>>22,2097152&c?this._combined[a].charCodeAt(this._combined[a].length-1):l]}set(a,c){this._data[3*a+1]=c[h.CHAR_DATA_ATTR_INDEX],c[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[a]=c[1],this._data[3*a+0]=2097152|a|c[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*a+0]=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(a){return this._data[3*a+0]>>22}hasWidth(a){return 12582912&this._data[3*a+0]}getFg(a){return this._data[3*a+1]}getBg(a){return this._data[3*a+2]}hasContent(a){return 4194303&this._data[3*a+0]}getCodePoint(a){const c=this._data[3*a+0];return 2097152&c?this._combined[a].charCodeAt(this._combined[a].length-1):2097151&c}isCombined(a){return 2097152&this._data[3*a+0]}getString(a){const c=this._data[3*a+0];return 2097152&c?this._combined[a]:2097151&c?(0,y.stringFromCodePoint)(2097151&c):""}isProtected(a){return 536870912&this._data[3*a+2]}loadCell(a,c){return x=3*a,c.content=this._data[x+0],c.fg=this._data[x+1],c.bg=this._data[x+2],2097152&c.content&&(c.combinedData=this._combined[a]),268435456&c.bg&&(c.extended=this._extendedAttrs[a]),c}setCell(a,c){2097152&c.content&&(this._combined[a]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[a]=c.extended),this._data[3*a+0]=c.content,this._data[3*a+1]=c.fg,this._data[3*a+2]=c.bg}setCellFromCodePoint(a,c,l,o,g,w){268435456&g&&(this._extendedAttrs[a]=w),this._data[3*a+0]=c|l<<22,this._data[3*a+1]=o,this._data[3*a+2]=g}addCodepointToCell(a,c){let l=this._data[3*a+0];2097152&l?this._combined[a]+=(0,y.stringFromCodePoint)(c):(2097151&l?(this._combined[a]=(0,y.stringFromCodePoint)(2097151&l)+(0,y.stringFromCodePoint)(c),l&=-2097152,l|=2097152):l=c|4194304,this._data[3*a+0]=l)}insertCells(a,c,l,o){if((a%=this.length)&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new _.ExtendedAttrs),c<this.length-a){const g=new S.CellData;for(let w=this.length-a-c-1;w>=0;--w)this.setCell(a+c+w,this.loadCell(a+w,g));for(let w=0;w<c;++w)this.setCell(a+w,l)}else for(let g=a;g<this.length;++g)this.setCell(g,l);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new _.ExtendedAttrs)}deleteCells(a,c,l,o){if(a%=this.length,c<this.length-a){const g=new S.CellData;for(let w=0;w<this.length-a-c;++w)this.setCell(a+w,this.loadCell(a+c+w,g));for(let w=this.length-c;w<this.length;++w)this.setCell(w,l)}else for(let g=a;g<this.length;++g)this.setCell(g,l);a&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new _.ExtendedAttrs),this.getWidth(a)!==0||this.hasContent(a)||this.setCellFromCodePoint(a,0,1,o?.fg||0,o?.bg||0,o?.extended||new _.ExtendedAttrs)}replaceCells(a,c,l,o,g=!1){if(g)for(a&&this.getWidth(a-1)===2&&!this.isProtected(a-1)&&this.setCellFromCodePoint(a-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new _.ExtendedAttrs),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodePoint(c,0,1,o?.fg||0,o?.bg||0,o?.extended||new _.ExtendedAttrs);a<c&&a<this.length;)this.isProtected(a)||this.setCell(a,l),a++;else for(a&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new _.ExtendedAttrs),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c,0,1,o?.fg||0,o?.bg||0,o?.extended||new _.ExtendedAttrs);a<c&&a<this.length;)this.setCell(a++,l)}resize(a,c){if(a===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const l=3*a;if(a>this.length){if(this._data.buffer.byteLength>=4*l)this._data=new Uint32Array(this._data.buffer,0,l);else{const o=new Uint32Array(l);o.set(this._data),this._data=o}for(let o=this.length;o<a;++o)this.setCell(o,c)}else{this._data=this._data.subarray(0,l);const o=Object.keys(this._combined);for(let w=0;w<o.length;w++){const T=parseInt(o[w],10);T>=a&&delete this._combined[T]}const g=Object.keys(this._extendedAttrs);for(let w=0;w<g.length;w++){const T=parseInt(g[w],10);T>=a&&delete this._extendedAttrs[T]}}return this.length=a,4*l*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const a=new Uint32Array(this._data.length);return a.set(this._data),this._data=a,1}return 0}fill(a,c=!1){if(c)for(let l=0;l<this.length;++l)this.isProtected(l)||this.setCell(l,a);else{this._combined={},this._extendedAttrs={};for(let l=0;l<this.length;++l)this.setCell(l,a)}}copyFrom(a){this.length!==a.length?this._data=new Uint32Array(a._data):this._data.set(a._data),this.length=a.length,this._combined={};for(const c in a._combined)this._combined[c]=a._combined[c];this._extendedAttrs={};for(const c in a._extendedAttrs)this._extendedAttrs[c]=a._extendedAttrs[c];this.isWrapped=a.isWrapped}clone(){const a=new A(0);a._data=new Uint32Array(this._data),a.length=this.length;for(const c in this._combined)a._combined[c]=this._combined[c];for(const c in this._extendedAttrs)a._extendedAttrs[c]=this._extendedAttrs[c];return a.isWrapped=this.isWrapped,a}getTrimmedLength(){for(let a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0])return a+(this._data[3*a+0]>>22);return 0}getNoBgTrimmedLength(){for(let a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0]||50331648&this._data[3*a+2])return a+(this._data[3*a+0]>>22);return 0}copyCellsFrom(a,c,l,o,g){const w=a._data;if(g)for(let D=o-1;D>=0;D--){for(let b=0;b<3;b++)this._data[3*(l+D)+b]=w[3*(c+D)+b];268435456&w[3*(c+D)+2]&&(this._extendedAttrs[l+D]=a._extendedAttrs[c+D])}else for(let D=0;D<o;D++){for(let b=0;b<3;b++)this._data[3*(l+D)+b]=w[3*(c+D)+b];268435456&w[3*(c+D)+2]&&(this._extendedAttrs[l+D]=a._extendedAttrs[c+D])}const T=Object.keys(a._combined);for(let D=0;D<T.length;D++){const b=parseInt(T[D],10);b>=c&&(this._combined[b-c+l]=a._combined[b])}}translateToString(a=!1,c=0,l=this.length){a&&(l=Math.min(l,this.getTrimmedLength()));let o="";for(;c<l;){const g=this._data[3*c+0],w=2097151&g;o+=2097152&g?this._combined[c]:w?(0,y.stringFromCodePoint)(w):h.WHITESPACE_CELL_CHAR,c+=g>>22||1}return o}}u.BufferLine=A},4841:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(d,_){if(d.start.y>d.end.y)throw new Error(`Buffer range end (${d.end.x}, ${d.end.y}) cannot be before start (${d.start.x}, ${d.start.y})`);return _*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(z,u)=>{function d(_,S,h){if(S===_.length-1)return _[S].getTrimmedLength();const y=!_[S].hasContent(h-1)&&_[S].getWidth(h-1)===1,x=_[S+1].getWidth(0)===2;return y&&x?h-1:h}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(_,S,h,y,x){const A=[];for(let E=0;E<_.length-1;E++){let a=E,c=_.get(++a);if(!c.isWrapped)continue;const l=[_.get(E)];for(;a<_.length&&c.isWrapped;)l.push(c),c=_.get(++a);if(y>=E&&y<a){E+=l.length-1;continue}let o=0,g=d(l,o,S),w=1,T=0;for(;w<l.length;){const b=d(l,w,S),R=b-T,U=h-g,W=Math.min(R,U);l[o].copyCellsFrom(l[w],T,g,W,!1),g+=W,g===h&&(o++,g=0),T+=W,T===b&&(w++,T=0),g===0&&o!==0&&l[o-1].getWidth(h-1)===2&&(l[o].copyCellsFrom(l[o-1],h-1,g++,1,!1),l[o-1].setCell(h-1,x))}l[o].replaceCells(g,h,x);let D=0;for(let b=l.length-1;b>0&&(b>o||l[b].getTrimmedLength()===0);b--)D++;D>0&&(A.push(E+l.length-D),A.push(D)),E+=l.length-1}return A},u.reflowLargerCreateNewLayout=function(_,S){const h=[];let y=0,x=S[y],A=0;for(let E=0;E<_.length;E++)if(x===E){const a=S[++y];_.onDeleteEmitter.fire({index:E-A,amount:a}),E+=a-1,A+=a,x=S[++y]}else h.push(E);return{layout:h,countRemoved:A}},u.reflowLargerApplyNewLayout=function(_,S){const h=[];for(let y=0;y<S.length;y++)h.push(_.get(S[y]));for(let y=0;y<h.length;y++)_.set(y,h[y]);_.length=S.length},u.reflowSmallerGetNewLineLengths=function(_,S,h){const y=[],x=_.map(((c,l)=>d(_,l,S))).reduce(((c,l)=>c+l));let A=0,E=0,a=0;for(;a<x;){if(x-a<h){y.push(x-a);break}A+=h;const c=d(_,E,S);A>c&&(A-=c,E++);const l=_[E].getWidth(A-1)===2;l&&A--;const o=l?h-1:h;y.push(o),a+=o}return y},u.getWrappedLineTrimmedLength=d},5295:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const _=d(8460),S=d(844),h=d(9092);class y extends S.Disposable{constructor(A,E){super(),this._optionsService=A,this._bufferService=E,this._onBufferActivate=this.register(new _.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.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(A){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(A),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(A,E){this._normal.resize(A,E),this._alt.resize(A,E),this.setupTabStops(A)}setupTabStops(A){this._normal.setupTabStops(A),this._alt.setupTabStops(A)}}u.BufferSet=y},511:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const _=d(482),S=d(643),h=d(3734);class y extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(A){const E=new y;return E.setFromCharData(A),E}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(A){this.fg=A[S.CHAR_DATA_ATTR_INDEX],this.bg=0;let E=!1;if(A[S.CHAR_DATA_CHAR_INDEX].length>2)E=!0;else if(A[S.CHAR_DATA_CHAR_INDEX].length===2){const a=A[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=a&&a<=56319){const c=A[S.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(a-55296)+c-56320+65536|A[S.CHAR_DATA_WIDTH_INDEX]<<22:E=!0}else E=!0}else this.content=A[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|A[S.CHAR_DATA_WIDTH_INDEX]<<22;E&&(this.combinedData=A[S.CHAR_DATA_CHAR_INDEX],this.content=2097152|A[S.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=y},643:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WHITESPACE_CELL_CODE=u.WHITESPACE_CELL_WIDTH=u.WHITESPACE_CELL_CHAR=u.NULL_CELL_CODE=u.NULL_CELL_WIDTH=u.NULL_CELL_CHAR=u.CHAR_DATA_CODE_INDEX=u.CHAR_DATA_WIDTH_INDEX=u.CHAR_DATA_CHAR_INDEX=u.CHAR_DATA_ATTR_INDEX=u.DEFAULT_EXT=u.DEFAULT_ATTR=u.DEFAULT_COLOR=void 0,u.DEFAULT_COLOR=0,u.DEFAULT_ATTR=256|u.DEFAULT_COLOR<<9,u.DEFAULT_EXT=0,u.CHAR_DATA_ATTR_INDEX=0,u.CHAR_DATA_CHAR_INDEX=1,u.CHAR_DATA_WIDTH_INDEX=2,u.CHAR_DATA_CODE_INDEX=3,u.NULL_CELL_CHAR="",u.NULL_CELL_WIDTH=1,u.NULL_CELL_CODE=0,u.WHITESPACE_CELL_CHAR=" ",u.WHITESPACE_CELL_WIDTH=1,u.WHITESPACE_CELL_CODE=32},4863:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const _=d(8460),S=d(844);class h{get id(){return this._id}constructor(x){this.line=x,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,S.disposeArray)(this._disposables),this._disposables.length=0)}register(x){return this._disposables.push(x),x}}u.Marker=h,h._nextId=1},7116:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_CHARSET=u.CHARSETS=void 0,u.CHARSETS={},u.DEFAULT_CHARSET=u.CHARSETS.B,u.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:"≥","{":"π","|":"≠","}":"£","~":"·"},u.CHARSETS.A={"#":"£"},u.CHARSETS.B=void 0,u.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},u.CHARSETS.C=u.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},u.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},u.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},u.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},u.CHARSETS.E=u.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},u.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},u.CHARSETS.H=u.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(z,u)=>{var d,_,S;Object.defineProperty(u,"__esModule",{value:!0}),u.C1_ESCAPED=u.C1=u.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
85
|
+
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(d||(u.C0=d={})),(function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""})(_||(u.C1=_={})),(function(h){h.ST=`${d.ESC}\\`})(S||(u.C1_ESCAPED=S={}))},7399:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const _=d(2584),S={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:["'",'"']};u.evaluateKeyboardEvent=function(h,y,x,A){const E={type:0,cancel:!1,key:void 0},a=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?E.key=y?_.C0.ESC+"OA":_.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?E.key=y?_.C0.ESC+"OD":_.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?E.key=y?_.C0.ESC+"OC":_.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(E.key=y?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:if(h.altKey){E.key=_.C0.ESC+_.C0.DEL;break}E.key=_.C0.DEL;break;case 9:if(h.shiftKey){E.key=_.C0.ESC+"[Z";break}E.key=_.C0.HT,E.cancel=!0;break;case 13:E.key=h.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,E.cancel=!0;break;case 27:E.key=_.C0.ESC,h.altKey&&(E.key=_.C0.ESC+_.C0.ESC),E.cancel=!0;break;case 37:if(h.metaKey)break;a?(E.key=_.C0.ESC+"[1;"+(a+1)+"D",E.key===_.C0.ESC+"[1;3D"&&(E.key=_.C0.ESC+(x?"b":"[1;5D"))):E.key=y?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(h.metaKey)break;a?(E.key=_.C0.ESC+"[1;"+(a+1)+"C",E.key===_.C0.ESC+"[1;3C"&&(E.key=_.C0.ESC+(x?"f":"[1;5C"))):E.key=y?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(h.metaKey)break;a?(E.key=_.C0.ESC+"[1;"+(a+1)+"A",x||E.key!==_.C0.ESC+"[1;3A"||(E.key=_.C0.ESC+"[1;5A")):E.key=y?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(h.metaKey)break;a?(E.key=_.C0.ESC+"[1;"+(a+1)+"B",x||E.key!==_.C0.ESC+"[1;3B"||(E.key=_.C0.ESC+"[1;5B")):E.key=y?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(E.key=_.C0.ESC+"[2~");break;case 46:E.key=a?_.C0.ESC+"[3;"+(a+1)+"~":_.C0.ESC+"[3~";break;case 36:E.key=a?_.C0.ESC+"[1;"+(a+1)+"H":y?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:E.key=a?_.C0.ESC+"[1;"+(a+1)+"F":y?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:h.shiftKey?E.type=2:h.ctrlKey?E.key=_.C0.ESC+"[5;"+(a+1)+"~":E.key=_.C0.ESC+"[5~";break;case 34:h.shiftKey?E.type=3:h.ctrlKey?E.key=_.C0.ESC+"[6;"+(a+1)+"~":E.key=_.C0.ESC+"[6~";break;case 112:E.key=a?_.C0.ESC+"[1;"+(a+1)+"P":_.C0.ESC+"OP";break;case 113:E.key=a?_.C0.ESC+"[1;"+(a+1)+"Q":_.C0.ESC+"OQ";break;case 114:E.key=a?_.C0.ESC+"[1;"+(a+1)+"R":_.C0.ESC+"OR";break;case 115:E.key=a?_.C0.ESC+"[1;"+(a+1)+"S":_.C0.ESC+"OS";break;case 116:E.key=a?_.C0.ESC+"[15;"+(a+1)+"~":_.C0.ESC+"[15~";break;case 117:E.key=a?_.C0.ESC+"[17;"+(a+1)+"~":_.C0.ESC+"[17~";break;case 118:E.key=a?_.C0.ESC+"[18;"+(a+1)+"~":_.C0.ESC+"[18~";break;case 119:E.key=a?_.C0.ESC+"[19;"+(a+1)+"~":_.C0.ESC+"[19~";break;case 120:E.key=a?_.C0.ESC+"[20;"+(a+1)+"~":_.C0.ESC+"[20~";break;case 121:E.key=a?_.C0.ESC+"[21;"+(a+1)+"~":_.C0.ESC+"[21~";break;case 122:E.key=a?_.C0.ESC+"[23;"+(a+1)+"~":_.C0.ESC+"[23~";break;case 123:E.key=a?_.C0.ESC+"[24;"+(a+1)+"~":_.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(x&&!A||!h.altKey||h.metaKey)!x||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?E.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(E.key=_.C0.US),h.key==="@"&&(E.key=_.C0.NUL)):h.keyCode===65&&(E.type=1);else{const c=S[h.keyCode],l=c?.[h.shiftKey?1:0];if(l)E.key=_.C0.ESC+l;else if(h.keyCode>=65&&h.keyCode<=90){const o=h.ctrlKey?h.keyCode-64:h.keyCode+32;let g=String.fromCharCode(o);h.shiftKey&&(g=g.toUpperCase()),E.key=_.C0.ESC+g}else if(h.keyCode===32)E.key=_.C0.ESC+(h.ctrlKey?_.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let o=h.code.slice(3,4);h.shiftKey||(o=o.toLowerCase()),E.key=_.C0.ESC+o,E.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?E.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?E.key=_.C0.NUL:h.keyCode>=51&&h.keyCode<=55?E.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?E.key=_.C0.DEL:h.keyCode===219?E.key=_.C0.ESC:h.keyCode===220?E.key=_.C0.FS:h.keyCode===221&&(E.key=_.C0.GS)}return E}},482:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Utf8ToUtf32=u.StringToUtf32=u.utf32ToString=u.stringFromCodePoint=void 0,u.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},u.utf32ToString=function(d,_=0,S=d.length){let h="";for(let y=_;y<S;++y){let x=d[y];x>65535?(x-=65536,h+=String.fromCharCode(55296+(x>>10))+String.fromCharCode(x%1024+56320)):h+=String.fromCharCode(x)}return h},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,_){const S=d.length;if(!S)return 0;let h=0,y=0;if(this._interim){const x=d.charCodeAt(y++);56320<=x&&x<=57343?_[h++]=1024*(this._interim-55296)+x-56320+65536:(_[h++]=this._interim,_[h++]=x),this._interim=0}for(let x=y;x<S;++x){const A=d.charCodeAt(x);if(55296<=A&&A<=56319){if(++x>=S)return this._interim=A,h;const E=d.charCodeAt(x);56320<=E&&E<=57343?_[h++]=1024*(A-55296)+E-56320+65536:(_[h++]=A,_[h++]=E)}else A!==65279&&(_[h++]=A)}return h}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,_){const S=d.length;if(!S)return 0;let h,y,x,A,E=0,a=0,c=0;if(this.interim[0]){let g=!1,w=this.interim[0];w&=(224&w)==192?31:(240&w)==224?15:7;let T,D=0;for(;(T=63&this.interim[++D])&&D<4;)w<<=6,w|=T;const b=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=b-D;for(;c<R;){if(c>=S)return 0;if(T=d[c++],(192&T)!=128){c--,g=!0;break}this.interim[D++]=T,w<<=6,w|=63&T}g||(b===2?w<128?c--:_[E++]=w:b===3?w<2048||w>=55296&&w<=57343||w===65279||(_[E++]=w):w<65536||w>1114111||(_[E++]=w)),this.interim.fill(0)}const l=S-4;let o=c;for(;o<S;){for(;!(!(o<l)||128&(h=d[o])||128&(y=d[o+1])||128&(x=d[o+2])||128&(A=d[o+3]));)_[E++]=h,_[E++]=y,_[E++]=x,_[E++]=A,o+=4;if(h=d[o++],h<128)_[E++]=h;else if((224&h)==192){if(o>=S)return this.interim[0]=h,E;if(y=d[o++],(192&y)!=128){o--;continue}if(a=(31&h)<<6|63&y,a<128){o--;continue}_[E++]=a}else if((240&h)==224){if(o>=S)return this.interim[0]=h,E;if(y=d[o++],(192&y)!=128){o--;continue}if(o>=S)return this.interim[0]=h,this.interim[1]=y,E;if(x=d[o++],(192&x)!=128){o--;continue}if(a=(15&h)<<12|(63&y)<<6|63&x,a<2048||a>=55296&&a<=57343||a===65279)continue;_[E++]=a}else if((248&h)==240){if(o>=S)return this.interim[0]=h,E;if(y=d[o++],(192&y)!=128){o--;continue}if(o>=S)return this.interim[0]=h,this.interim[1]=y,E;if(x=d[o++],(192&x)!=128){o--;continue}if(o>=S)return this.interim[0]=h,this.interim[1]=y,this.interim[2]=x,E;if(A=d[o++],(192&A)!=128){o--;continue}if(a=(7&h)<<18|(63&y)<<12|(63&x)<<6|63&A,a<65536||a>1114111)continue;_[E++]=a}}return E}}},225:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const d=[[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]],_=[[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 S;u.UnicodeV6=class{constructor(){if(this.version="6",!S){S=new Uint8Array(65536),S.fill(1),S[0]=0,S.fill(0,1,32),S.fill(0,127,160),S.fill(2,4352,4448),S[9001]=2,S[9002]=2,S.fill(2,11904,42192),S[12351]=1,S.fill(2,44032,55204),S.fill(2,63744,64256),S.fill(2,65040,65050),S.fill(2,65072,65136),S.fill(2,65280,65377),S.fill(2,65504,65511);for(let h=0;h<d.length;++h)S.fill(0,d[h][0],d[h][1]+1)}}wcwidth(h){return h<32?0:h<127?1:h<65536?S[h]:(function(y,x){let A,E=0,a=x.length-1;if(y<x[0][0]||y>x[a][1])return!1;for(;a>=E;)if(A=E+a>>1,y>x[A][1])E=A+1;else{if(!(y<x[A][0]))return!0;a=A-1}return!1})(h,_)?0:h>=131072&&h<=196605||h>=196608&&h<=262141?2:1}}},5981:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const _=d(8460),S=d(844);class h extends S.Disposable{constructor(x){super(),this._action=x,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(x,A){if(A!==void 0&&this._syncCalls>A)return void(this._syncCalls=0);if(this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let E;for(this._isSyncWriting=!0;E=this._writeBuffer.shift();){this._action(E);const a=this._callbacks.shift();a&&a()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(x,A){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+=x.length,this._writeBuffer.push(x),this._callbacks.push(A),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(A)}_innerWrite(x=0,A=!0){const E=x||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const a=this._writeBuffer[this._bufferOffset],c=this._action(a,A);if(c){const o=g=>Date.now()-E>=12?setTimeout((()=>this._innerWrite(0,g))):this._innerWrite(E,g);return void c.catch((g=>(queueMicrotask((()=>{throw g})),Promise.resolve(!1)))).then(o)}const l=this._callbacks[this._bufferOffset];if(l&&l(),this._bufferOffset++,this._pendingData-=a.length,Date.now()-E>=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()}}u.WriteBuffer=h},5941:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.toRgbString=u.parseColor=void 0;const d=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,_=/^[\da-f]+$/;function S(h,y){const x=h.toString(16),A=x.length<2?"0"+x:x;switch(y){case 4:return x[0];case 8:return A;case 12:return(A+A).slice(0,3);default:return A+A}}u.parseColor=function(h){if(!h)return;let y=h.toLowerCase();if(y.indexOf("rgb:")===0){y=y.slice(4);const x=d.exec(y);if(x){const A=x[1]?15:x[4]?255:x[7]?4095:65535;return[Math.round(parseInt(x[1]||x[4]||x[7]||x[10],16)/A*255),Math.round(parseInt(x[2]||x[5]||x[8]||x[11],16)/A*255),Math.round(parseInt(x[3]||x[6]||x[9]||x[12],16)/A*255)]}}else if(y.indexOf("#")===0&&(y=y.slice(1),_.exec(y)&&[3,6,9,12].includes(y.length))){const x=y.length/3,A=[0,0,0];for(let E=0;E<3;++E){const a=parseInt(y.slice(x*E,x*E+x),16);A[E]=x===1?a<<4:x===2?a:x===3?a>>4:a>>8}return A}},u.toRgbString=function(h,y=16){const[x,A,E]=h;return`rgb:${S(x,y)}/${S(A,y)}/${S(E,y)}`}},5770:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const _=d(482),S=d(8742),h=d(5770),y=[];u.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=y,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=y}registerHandler(A,E){this._handlers[A]===void 0&&(this._handlers[A]=[]);const a=this._handlers[A];return a.push(E),{dispose:()=>{const c=a.indexOf(E);c!==-1&&a.splice(c,1)}}}clearHandler(A){this._handlers[A]&&delete this._handlers[A]}setHandlerFallback(A){this._handlerFb=A}reset(){if(this._active.length)for(let A=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;A>=0;--A)this._active[A].unhook(!1);this._stack.paused=!1,this._active=y,this._ident=0}hook(A,E){if(this.reset(),this._ident=A,this._active=this._handlers[A]||y,this._active.length)for(let a=this._active.length-1;a>=0;a--)this._active[a].hook(E);else this._handlerFb(this._ident,"HOOK",E)}put(A,E,a){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(A,E,a);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(A,E,a))}unhook(A,E=!0){if(this._active.length){let a=!1,c=this._active.length-1,l=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,a=E,l=this._stack.fallThrough,this._stack.paused=!1),!l&&a===!1){for(;c>=0&&(a=this._active[c].unhook(A),a!==!0);c--)if(a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,a;c--}for(;c>=0;c--)if(a=this._active[c].unhook(!1),a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,a}else this._handlerFb(this._ident,"UNHOOK",A);this._active=y,this._ident=0}};const x=new S.Params;x.addParam(0),u.DcsHandler=class{constructor(A){this._handler=A,this._data="",this._params=x,this._hitLimit=!1}hook(A){this._params=A.length>1||A.params[0]?A.clone():x,this._data="",this._hitLimit=!1}put(A,E,a){this._hitLimit||(this._data+=(0,_.utf32ToString)(A,E,a),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(A){let E=!1;if(this._hitLimit)E=!1;else if(A&&(E=this._handler(this._data,this._params),E instanceof Promise))return E.then((a=>(this._params=x,this._data="",this._hitLimit=!1,a)));return this._params=x,this._data="",this._hitLimit=!1,E}}},2015:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const _=d(844),S=d(8742),h=d(6242),y=d(6351);class x{constructor(c){this.table=new Uint8Array(c)}setDefault(c,l){this.table.fill(c<<4|l)}add(c,l,o,g){this.table[l<<8|c]=o<<4|g}addMany(c,l,o,g){for(let w=0;w<c.length;w++)this.table[l<<8|c[w]]=o<<4|g}}u.TransitionTable=x;const A=160;u.VT500_TRANSITION_TABLE=(function(){const a=new x(4095),c=Array.apply(null,Array(256)).map(((D,b)=>b)),l=(D,b)=>c.slice(D,b),o=l(32,127),g=l(0,24);g.push(25),g.push.apply(g,l(28,32));const w=l(0,14);let T;for(T in a.setDefault(1,0),a.addMany(o,0,2,0),w)a.addMany([24,26,153,154],T,3,0),a.addMany(l(128,144),T,3,0),a.addMany(l(144,152),T,3,0),a.add(156,T,0,0),a.add(27,T,11,1),a.add(157,T,4,8),a.addMany([152,158,159],T,0,7),a.add(155,T,11,3),a.add(144,T,11,9);return a.addMany(g,0,3,0),a.addMany(g,1,3,1),a.add(127,1,0,1),a.addMany(g,8,0,8),a.addMany(g,3,3,3),a.add(127,3,0,3),a.addMany(g,4,3,4),a.add(127,4,0,4),a.addMany(g,6,3,6),a.addMany(g,5,3,5),a.add(127,5,0,5),a.addMany(g,2,3,2),a.add(127,2,0,2),a.add(93,1,4,8),a.addMany(o,8,5,8),a.add(127,8,5,8),a.addMany([156,27,24,26,7],8,6,0),a.addMany(l(28,32),8,0,8),a.addMany([88,94,95],1,0,7),a.addMany(o,7,0,7),a.addMany(g,7,0,7),a.add(156,7,0,0),a.add(127,7,0,7),a.add(91,1,11,3),a.addMany(l(64,127),3,7,0),a.addMany(l(48,60),3,8,4),a.addMany([60,61,62,63],3,9,4),a.addMany(l(48,60),4,8,4),a.addMany(l(64,127),4,7,0),a.addMany([60,61,62,63],4,0,6),a.addMany(l(32,64),6,0,6),a.add(127,6,0,6),a.addMany(l(64,127),6,0,0),a.addMany(l(32,48),3,9,5),a.addMany(l(32,48),5,9,5),a.addMany(l(48,64),5,0,6),a.addMany(l(64,127),5,7,0),a.addMany(l(32,48),4,9,5),a.addMany(l(32,48),1,9,2),a.addMany(l(32,48),2,9,2),a.addMany(l(48,127),2,10,0),a.addMany(l(48,80),1,10,0),a.addMany(l(81,88),1,10,0),a.addMany([89,90,92],1,10,0),a.addMany(l(96,127),1,10,0),a.add(80,1,11,9),a.addMany(g,9,0,9),a.add(127,9,0,9),a.addMany(l(28,32),9,0,9),a.addMany(l(32,48),9,9,12),a.addMany(l(48,60),9,8,10),a.addMany([60,61,62,63],9,9,10),a.addMany(g,11,0,11),a.addMany(l(32,128),11,0,11),a.addMany(l(28,32),11,0,11),a.addMany(g,10,0,10),a.add(127,10,0,10),a.addMany(l(28,32),10,0,10),a.addMany(l(48,60),10,8,10),a.addMany([60,61,62,63],10,0,11),a.addMany(l(32,48),10,9,12),a.addMany(g,12,0,12),a.add(127,12,0,12),a.addMany(l(28,32),12,0,12),a.addMany(l(32,48),12,9,12),a.addMany(l(48,64),12,0,11),a.addMany(l(64,127),12,12,13),a.addMany(l(64,127),10,12,13),a.addMany(l(64,127),9,12,13),a.addMany(g,13,13,13),a.addMany(o,13,13,13),a.add(127,13,0,13),a.addMany([27,156,24,26],13,14,0),a.add(A,0,2,0),a.add(A,8,5,8),a.add(A,6,0,6),a.add(A,11,0,11),a.add(A,13,13,13),a})();class E extends _.Disposable{constructor(c=u.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new S.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(l,o,g)=>{},this._executeHandlerFb=l=>{},this._csiHandlerFb=(l,o)=>{},this._escHandlerFb=l=>{},this._errorHandlerFb=l=>l,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,_.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new y.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,l=[64,126]){let o=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(o=c.prefix.charCodeAt(0),o&&60>o||o>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let w=0;w<c.intermediates.length;++w){const T=c.intermediates.charCodeAt(w);if(32>T||T>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");o<<=8,o|=T}}if(c.final.length!==1)throw new Error("final must be a single byte");const g=c.final.charCodeAt(0);if(l[0]>g||g>l[1])throw new Error(`final must be in range ${l[0]} .. ${l[1]}`);return o<<=8,o|=g,o}identToString(c){const l=[];for(;c;)l.push(String.fromCharCode(255&c)),c>>=8;return l.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,l){const o=this._identifier(c,[48,126]);this._escHandlers[o]===void 0&&(this._escHandlers[o]=[]);const g=this._escHandlers[o];return g.push(l),{dispose:()=>{const w=g.indexOf(l);w!==-1&&g.splice(w,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,l){this._executeHandlers[c.charCodeAt(0)]=l}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,l){const o=this._identifier(c);this._csiHandlers[o]===void 0&&(this._csiHandlers[o]=[]);const g=this._csiHandlers[o];return g.push(l),{dispose:()=>{const w=g.indexOf(l);w!==-1&&g.splice(w,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,l){return this._dcsParser.registerHandler(this._identifier(c),l)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,l){return this._oscParser.registerHandler(c,l)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(c,l,o,g,w){this._parseStack.state=c,this._parseStack.handlers=l,this._parseStack.handlerPos=o,this._parseStack.transition=g,this._parseStack.chunkPos=w}parse(c,l,o){let g,w=0,T=0,D=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,D=this._parseStack.chunkPos+1;else{if(o===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const b=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(o===!1&&R>-1){for(;R>=0&&(g=b[R](this._params),g!==!0);R--)if(g instanceof Promise)return this._parseStack.handlerPos=R,g}this._parseStack.handlers=[];break;case 4:if(o===!1&&R>-1){for(;R>=0&&(g=b[R](),g!==!0);R--)if(g instanceof Promise)return this._parseStack.handlerPos=R,g}this._parseStack.handlers=[];break;case 6:if(w=c[this._parseStack.chunkPos],g=this._dcsParser.unhook(w!==24&&w!==26,o),g)return g;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(w=c[this._parseStack.chunkPos],g=this._oscParser.end(w!==24&&w!==26,o),g)return g;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,D=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let b=D;b<l;++b){switch(w=c[b],T=this._transitions.table[this.currentState<<8|(w<160?w:A)],T>>4){case 2:for(let V=b+1;;++V){if(V>=l||(w=c[V])<32||w>126&&w<A){this._printHandler(c,b,V),b=V-1;break}if(++V>=l||(w=c[V])<32||w>126&&w<A){this._printHandler(c,b,V),b=V-1;break}if(++V>=l||(w=c[V])<32||w>126&&w<A){this._printHandler(c,b,V),b=V-1;break}if(++V>=l||(w=c[V])<32||w>126&&w<A){this._printHandler(c,b,V),b=V-1;break}}break;case 3:this._executeHandlers[w]?this._executeHandlers[w]():this._executeHandlerFb(w),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:b,code:w,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|w];let U=R?R.length-1:-1;for(;U>=0&&(g=R[U](this._params),g!==!0);U--)if(g instanceof Promise)return this._preserveStack(3,R,U,T,b),g;U<0&&this._csiHandlerFb(this._collect<<8|w,this._params),this.precedingCodepoint=0;break;case 8:do switch(w){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(w-48)}while(++b<l&&(w=c[b])>47&&w<60);b--;break;case 9:this._collect<<=8,this._collect|=w;break;case 10:const W=this._escHandlers[this._collect<<8|w];let H=W?W.length-1:-1;for(;H>=0&&(g=W[H](),g!==!0);H--)if(g instanceof Promise)return this._preserveStack(4,W,H,T,b),g;H<0&&this._escHandlerFb(this._collect<<8|w),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|w,this._params);break;case 13:for(let V=b+1;;++V)if(V>=l||(w=c[V])===24||w===26||w===27||w>127&&w<A){this._dcsParser.put(c,b,V),b=V-1;break}break;case 14:if(g=this._dcsParser.unhook(w!==24&&w!==26),g)return this._preserveStack(6,[],0,T,b),g;w===27&&(T|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let V=b+1;;V++)if(V>=l||(w=c[V])<32||w>127&&w<A){this._oscParser.put(c,b,V),b=V-1;break}break;case 6:if(g=this._oscParser.end(w!==24&&w!==26),g)return this._preserveStack(5,[],0,T,b),g;w===27&&(T|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&T}}}u.EscapeSequenceParser=E},6242:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const _=d(5770),S=d(482),h=[];u.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(y,x){this._handlers[y]===void 0&&(this._handlers[y]=[]);const A=this._handlers[y];return A.push(x),{dispose:()=>{const E=A.indexOf(x);E!==-1&&A.splice(E,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].start();else this._handlerFb(this._id,"START")}_put(y,x,A){if(this._active.length)for(let E=this._active.length-1;E>=0;E--)this._active[E].put(y,x,A);else this._handlerFb(this._id,"PUT",(0,S.utf32ToString)(y,x,A))}start(){this.reset(),this._state=1}put(y,x,A){if(this._state!==3){if(this._state===1)for(;x<A;){const E=y[x++];if(E===59){this._state=2,this._start();break}if(E<48||57<E)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+E-48}this._state===2&&A-x>0&&this._put(y,x,A)}}end(y,x=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let A=!1,E=this._active.length-1,a=!1;if(this._stack.paused&&(E=this._stack.loopPosition-1,A=x,a=this._stack.fallThrough,this._stack.paused=!1),!a&&A===!1){for(;E>=0&&(A=this._active[E].end(y),A!==!0);E--)if(A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=E,this._stack.fallThrough=!1,A;E--}for(;E>=0;E--)if(A=this._active[E].end(!1),A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=E,this._stack.fallThrough=!0,A}else this._handlerFb(this._id,"END",y);this._active=h,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(y){this._handler=y,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(y,x,A){this._hitLimit||(this._data+=(0,S.utf32ToString)(y,x,A),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(y){let x=!1;if(this._hitLimit)x=!1;else if(y&&(x=this._handler(this._data),x instanceof Promise))return x.then((A=>(this._data="",this._hitLimit=!1,A)));return this._data="",this._hitLimit=!1,x}}},8742:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const d=2147483647;class _{static fromArray(h){const y=new _;if(!h.length)return y;for(let x=Array.isArray(h[0])?1:0;x<h.length;++x){const A=h[x];if(Array.isArray(A))for(let E=0;E<A.length;++E)y.addSubParam(A[E]);else y.addParam(A)}return y}constructor(h=32,y=32){if(this.maxLength=h,this.maxSubParamsLength=y,y>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(y),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new _(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let y=0;y<this.length;++y){h.push(this.params[y]);const x=this._subParamsIdx[y]>>8,A=255&this._subParamsIdx[y];A-x>0&&h.push(Array.prototype.slice.call(this._subParams,x,A))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>d?d:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>d?d:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const y=this._subParamsIdx[h]>>8,x=255&this._subParamsIdx[h];return x-y>0?this._subParams.subarray(y,x):null}getSubParamsAll(){const h={};for(let y=0;y<this.length;++y){const x=this._subParamsIdx[y]>>8,A=255&this._subParamsIdx[y];A-x>0&&(h[y]=this._subParams.slice(x,A))}return h}addDigit(h){let y;if(this._rejectDigits||!(y=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const x=this._digitIsSub?this._subParams:this.params,A=x[y-1];x[y-1]=~A?Math.min(10*A+h,d):h}}u.Params=_},5741:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.AddonManager=void 0,u.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()}loadAddon(d,_){const S={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(S),_.dispose=()=>this._wrappedAddonDispose(S),_.activate(d)}_wrappedAddonDispose(d){if(d.isDisposed)return;let _=-1;for(let S=0;S<this._addons.length;S++)if(this._addons[S]===d){_=S;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(_,1)}}},8771:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const _=d(3785),S=d(511);u.BufferApiView=class{constructor(h,y){this._buffer=h,this.type=y}init(h){return this._buffer=h,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(h){const y=this._buffer.lines.get(h);if(y)return new _.BufferLineApiView(y)}getNullCell(){return new S.CellData}}},3785:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const _=d(511);u.BufferLineApiView=class{constructor(S){this._line=S}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(S,h){if(!(S<0||S>=this._line.length))return h?(this._line.loadCell(S,h),h):this._line.loadCell(S,new _.CellData)}translateToString(S,h,y){return this._line.translateToString(S,h,y)}}},8285:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const _=d(8771),S=d(8460),h=d(844);class y extends h.Disposable{constructor(A){super(),this._core=A,this._onBufferChange=this.register(new S.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}u.BufferNamespaceApi=y},7975:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(d){this._core=d}registerCsiHandler(d,_){return this._core.registerCsiHandler(d,(S=>_(S.toArray())))}addCsiHandler(d,_){return this.registerCsiHandler(d,_)}registerDcsHandler(d,_){return this._core.registerDcsHandler(d,((S,h)=>_(S,h.toArray())))}addDcsHandler(d,_){return this.registerDcsHandler(d,_)}registerEscHandler(d,_){return this._core.registerEscHandler(d,_)}addEscHandler(d,_){return this.registerEscHandler(d,_)}registerOscHandler(d,_){return this._core.registerOscHandler(d,_)}addOscHandler(d,_){return this.registerOscHandler(d,_)}}},7090:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeApi=void 0,u.UnicodeApi=class{constructor(d){this._core=d}register(d){this._core.unicodeService.register(d)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(d){this._core.unicodeService.activeVersion=d}}},744:function(z,u,d){var _=this&&this.__decorate||function(a,c,l,o){var g,w=arguments.length,T=w<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(a,c,l,o);else for(var D=a.length-1;D>=0;D--)(g=a[D])&&(T=(w<3?g(T):w>3?g(c,l,T):g(c,l))||T);return w>3&&T&&Object.defineProperty(c,l,T),T},S=this&&this.__param||function(a,c){return function(l,o){c(l,o,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const h=d(8460),y=d(844),x=d(5295),A=d(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let E=u.BufferService=class extends y.Disposable{get buffer(){return this.buffers.active}constructor(a){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(a.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(a.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new x.BufferSet(a,this))}resize(a,c){this.cols=a,this.rows=c,this.buffers.resize(a,c),this._onResize.fire({cols:a,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(a,c=!1){const l=this.buffer;let o;o=this._cachedBlankLine,o&&o.length===this.cols&&o.getFg(0)===a.fg&&o.getBg(0)===a.bg||(o=l.getBlankLine(a,c),this._cachedBlankLine=o),o.isWrapped=c;const g=l.ybase+l.scrollTop,w=l.ybase+l.scrollBottom;if(l.scrollTop===0){const T=l.lines.isFull;w===l.lines.length-1?T?l.lines.recycle().copyFrom(o):l.lines.push(o.clone()):l.lines.splice(w+1,0,o.clone()),T?this.isUserScrolling&&(l.ydisp=Math.max(l.ydisp-1,0)):(l.ybase++,this.isUserScrolling||l.ydisp++)}else{const T=w-g+1;l.lines.shiftElements(g+1,T-1,-1),l.lines.set(w,o.clone())}this.isUserScrolling||(l.ydisp=l.ybase),this._onScroll.fire(l.ydisp)}scrollLines(a,c,l){const o=this.buffer;if(a<0){if(o.ydisp===0)return;this.isUserScrolling=!0}else a+o.ydisp>=o.ybase&&(this.isUserScrolling=!1);const g=o.ydisp;o.ydisp=Math.max(Math.min(o.ydisp+a,o.ybase),0),g!==o.ydisp&&(c||this._onScroll.fire(o.ydisp))}};u.BufferService=E=_([S(0,A.IOptionsService)],E)},7994:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CharsetService=void 0,u.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(d){this.glevel=d,this.charset=this._charsets[d]}setgCharset(d,_){this._charsets[d]=_,this.glevel===d&&(this.charset=_)}}},1753:function(z,u,d){var _=this&&this.__decorate||function(o,g,w,T){var D,b=arguments.length,R=b<3?g:T===null?T=Object.getOwnPropertyDescriptor(g,w):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(o,g,w,T);else for(var U=o.length-1;U>=0;U--)(D=o[U])&&(R=(b<3?D(R):b>3?D(g,w,R):D(g,w))||R);return b>3&&R&&Object.defineProperty(g,w,R),R},S=this&&this.__param||function(o,g){return function(w,T){g(w,T,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const h=d(2585),y=d(8460),x=d(844),A={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:o=>o.button!==4&&o.action===1&&(o.ctrl=!1,o.alt=!1,o.shift=!1,!0)},VT200:{events:19,restrict:o=>o.action!==32},DRAG:{events:23,restrict:o=>o.action!==32||o.button!==3},ANY:{events:31,restrict:o=>!0}};function E(o,g){let w=(o.ctrl?16:0)|(o.shift?4:0)|(o.alt?8:0);return o.button===4?(w|=64,w|=o.action):(w|=3&o.button,4&o.button&&(w|=64),8&o.button&&(w|=128),o.action===32?w|=32:o.action!==0||g||(w|=3)),w}const a=String.fromCharCode,c={DEFAULT:o=>{const g=[E(o,!1)+32,o.col+32,o.row+32];return g[0]>255||g[1]>255||g[2]>255?"":`\x1B[M${a(g[0])}${a(g[1])}${a(g[2])}`},SGR:o=>{const g=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${E(o,!0)};${o.col};${o.row}${g}`},SGR_PIXELS:o=>{const g=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${E(o,!0)};${o.x};${o.y}${g}`}};let l=u.CoreMouseService=class extends x.Disposable{constructor(o,g){super(),this._bufferService=o,this._coreService=g,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new y.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const w of Object.keys(A))this.addProtocol(w,A[w]);for(const w of Object.keys(c))this.addEncoding(w,c[w]);this.reset()}addProtocol(o,g){this._protocols[o]=g}addEncoding(o,g){this._encodings[o]=g}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(o){if(!this._protocols[o])throw new Error(`unknown protocol "${o}"`);this._activeProtocol=o,this._onProtocolChange.fire(this._protocols[o].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(o){if(!this._encodings[o])throw new Error(`unknown encoding "${o}"`);this._activeEncoding=o}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(o){if(o.col<0||o.col>=this._bufferService.cols||o.row<0||o.row>=this._bufferService.rows||o.button===4&&o.action===32||o.button===3&&o.action!==32||o.button!==4&&(o.action===2||o.action===3)||(o.col++,o.row++,o.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,o,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(o))return!1;const g=this._encodings[this._activeEncoding](o);return g&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(g):this._coreService.triggerDataEvent(g,!0)),this._lastEvent=o,!0}explainEvents(o){return{down:!!(1&o),up:!!(2&o),drag:!!(4&o),move:!!(8&o),wheel:!!(16&o)}}_equalEvents(o,g,w){if(w){if(o.x!==g.x||o.y!==g.y)return!1}else if(o.col!==g.col||o.row!==g.row)return!1;return o.button===g.button&&o.action===g.action&&o.ctrl===g.ctrl&&o.alt===g.alt&&o.shift===g.shift}};u.CoreMouseService=l=_([S(0,h.IBufferService),S(1,h.ICoreService)],l)},6975:function(z,u,d){var _=this&&this.__decorate||function(l,o,g,w){var T,D=arguments.length,b=D<3?o:w===null?w=Object.getOwnPropertyDescriptor(o,g):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,o,g,w);else for(var R=l.length-1;R>=0;R--)(T=l[R])&&(b=(D<3?T(b):D>3?T(o,g,b):T(o,g))||b);return D>3&&b&&Object.defineProperty(o,g,b),b},S=this&&this.__param||function(l,o){return function(g,w){o(g,w,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const h=d(1439),y=d(8460),x=d(844),A=d(2585),E=Object.freeze({insertMode:!1}),a=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=u.CoreService=class extends x.Disposable{constructor(l,o,g){super(),this._bufferService=l,this._logService=o,this._optionsService=g,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new y.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new y.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new y.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(E),this.decPrivateModes=(0,h.clone)(a)}reset(){this.modes=(0,h.clone)(E),this.decPrivateModes=(0,h.clone)(a)}triggerDataEvent(l,o=!1){if(this._optionsService.rawOptions.disableStdin)return;const g=this._bufferService.buffer;o&&this._optionsService.rawOptions.scrollOnUserInput&&g.ybase!==g.ydisp&&this._onRequestScrollToBottom.fire(),o&&this._onUserInput.fire(),this._logService.debug(`sending data "${l}"`,(()=>l.split("").map((w=>w.charCodeAt(0))))),this._onData.fire(l)}triggerBinaryEvent(l){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${l}"`,(()=>l.split("").map((o=>o.charCodeAt(0))))),this._onBinary.fire(l))}};u.CoreService=c=_([S(0,A.IBufferService),S(1,A.ILogService),S(2,A.IOptionsService)],c)},9074:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const _=d(8055),S=d(8460),h=d(844),y=d(6106);let x=0,A=0;class E extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new y.SortedList((l=>l?.marker.line)),this._onDecorationRegistered=this.register(new S.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new S.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(l){if(l.marker.isDisposed)return;const o=new a(l);if(o){const g=o.marker.onDispose((()=>o.dispose()));o.onDispose((()=>{o&&(this._decorations.delete(o)&&this._onDecorationRemoved.fire(o),g.dispose())})),this._decorations.insert(o),this._onDecorationRegistered.fire(o)}return o}reset(){for(const l of this._decorations.values())l.dispose();this._decorations.clear()}*getDecorationsAtCell(l,o,g){var w,T,D;let b=0,R=0;for(const U of this._decorations.getKeyIterator(o))b=(w=U.options.x)!==null&&w!==void 0?w:0,R=b+((T=U.options.width)!==null&&T!==void 0?T:1),l>=b&&l<R&&(!g||((D=U.options.layer)!==null&&D!==void 0?D:"bottom")===g)&&(yield U)}forEachDecorationAtCell(l,o,g,w){this._decorations.forEachByKey(o,(T=>{var D,b,R;x=(D=T.options.x)!==null&&D!==void 0?D:0,A=x+((b=T.options.width)!==null&&b!==void 0?b:1),l>=x&&l<A&&(!g||((R=T.options.layer)!==null&&R!==void 0?R:"bottom")===g)&&w(T)}))}}u.DecorationService=E;class a extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=_.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=_.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(l){super(),this.options=l,this.onRenderEmitter=this.register(new S.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new S.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=l.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const _=d(2585),S=d(8343);class h{constructor(...x){this._entries=new Map;for(const[A,E]of x)this.set(A,E)}set(x,A){const E=this._entries.get(x);return this._entries.set(x,A),E}forEach(x){for(const[A,E]of this._entries.entries())x(A,E)}has(x){return this._entries.has(x)}get(x){return this._entries.get(x)}}u.ServiceCollection=h,u.InstantiationService=class{constructor(){this._services=new h,this._services.set(_.IInstantiationService,this)}setService(y,x){this._services.set(y,x)}getService(y){return this._services.get(y)}createInstance(y,...x){const A=(0,S.getServiceDependencies)(y).sort(((c,l)=>c.index-l.index)),E=[];for(const c of A){const l=this._services.get(c.id);if(!l)throw new Error(`[createInstance] ${y.name} depends on UNKNOWN service ${c.id}.`);E.push(l)}const a=A.length>0?A[0].index:x.length;if(x.length!==a)throw new Error(`[createInstance] First service dependency of ${y.name} at position ${a+1} conflicts with ${x.length} static arguments`);return new y(...x,...E)}}},7866:function(z,u,d){var _=this&&this.__decorate||function(a,c,l,o){var g,w=arguments.length,T=w<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(a,c,l,o);else for(var D=a.length-1;D>=0;D--)(g=a[D])&&(T=(w<3?g(T):w>3?g(c,l,T):g(c,l))||T);return w>3&&T&&Object.defineProperty(c,l,T),T},S=this&&this.__param||function(a,c){return function(l,o){c(l,o,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const h=d(844),y=d(2585),x={trace:y.LogLevelEnum.TRACE,debug:y.LogLevelEnum.DEBUG,info:y.LogLevelEnum.INFO,warn:y.LogLevelEnum.WARN,error:y.LogLevelEnum.ERROR,off:y.LogLevelEnum.OFF};let A,E=u.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(a){super(),this._optionsService=a,this._logLevel=y.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),A=this}_updateLogLevel(){this._logLevel=x[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(a){for(let c=0;c<a.length;c++)typeof a[c]=="function"&&(a[c]=a[c]())}_log(a,c,l){this._evalLazyOptionalParams(l),a.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...l)}trace(a,...c){var l,o;this._logLevel<=y.LogLevelEnum.TRACE&&this._log((o=(l=this._optionsService.options.logger)===null||l===void 0?void 0:l.trace.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.log,a,c)}debug(a,...c){var l,o;this._logLevel<=y.LogLevelEnum.DEBUG&&this._log((o=(l=this._optionsService.options.logger)===null||l===void 0?void 0:l.debug.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.log,a,c)}info(a,...c){var l,o;this._logLevel<=y.LogLevelEnum.INFO&&this._log((o=(l=this._optionsService.options.logger)===null||l===void 0?void 0:l.info.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.info,a,c)}warn(a,...c){var l,o;this._logLevel<=y.LogLevelEnum.WARN&&this._log((o=(l=this._optionsService.options.logger)===null||l===void 0?void 0:l.warn.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.warn,a,c)}error(a,...c){var l,o;this._logLevel<=y.LogLevelEnum.ERROR&&this._log((o=(l=this._optionsService.options.logger)===null||l===void 0?void 0:l.error.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.error,a,c)}};u.LogService=E=_([S(0,y.IOptionsService)],E),u.setTraceLogger=function(a){A=a},u.traceCall=function(a,c,l){if(typeof l.value!="function")throw new Error("not supported");const o=l.value;l.value=function(...g){if(A.logLevel!==y.LogLevelEnum.TRACE)return o.apply(this,g);A.trace(`GlyphRenderer#${o.name}(${g.map((T=>JSON.stringify(T))).join(", ")})`);const w=o.apply(this,g);return A.trace(`GlyphRenderer#${o.name} return`,w),w}}},7302:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const _=d(8460),S=d(844),h=d(6114);u.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,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:{},rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const y=["normal","bold","100","200","300","400","500","600","700","800","900"];class x extends S.Disposable{constructor(E){super(),this._onOptionChange=this.register(new _.EventEmitter),this.onOptionChange=this._onOptionChange.event;const a=Object.assign({},u.DEFAULT_OPTIONS);for(const c in E)if(c in a)try{const l=E[c];a[c]=this._sanitizeAndValidateOption(c,l)}catch(l){console.error(l)}this.rawOptions=a,this.options=Object.assign({},a),this._setupOptions()}onSpecificOptionChange(E,a){return this.onOptionChange((c=>{c===E&&a(this.rawOptions[E])}))}onMultipleOptionChange(E,a){return this.onOptionChange((c=>{E.indexOf(c)!==-1&&a()}))}_setupOptions(){const E=c=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},a=(c,l)=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);l=this._sanitizeAndValidateOption(c,l),this.rawOptions[c]!==l&&(this.rawOptions[c]=l,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const l={get:E.bind(this,c),set:a.bind(this,c)};Object.defineProperty(this.options,c,l)}}_sanitizeAndValidateOption(E,a){switch(E){case"cursorStyle":if(a||(a=u.DEFAULT_OPTIONS[E]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(a))throw new Error(`"${a}" is not a valid value for ${E}`);break;case"wordSeparator":a||(a=u.DEFAULT_OPTIONS[E]);break;case"fontWeight":case"fontWeightBold":if(typeof a=="number"&&1<=a&&a<=1e3)break;a=y.includes(a)?a:u.DEFAULT_OPTIONS[E];break;case"cursorWidth":a=Math.floor(a);case"lineHeight":case"tabStopWidth":if(a<1)throw new Error(`${E} cannot be less than 1, value: ${a}`);break;case"minimumContrastRatio":a=Math.max(1,Math.min(21,Math.round(10*a)/10));break;case"scrollback":if((a=Math.min(a,4294967295))<0)throw new Error(`${E} cannot be less than 0, value: ${a}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(a<=0)throw new Error(`${E} cannot be less than or equal to 0, value: ${a}`);break;case"rows":case"cols":if(!a&&a!==0)throw new Error(`${E} must be numeric, value: ${a}`);break;case"windowsPty":a=a??{}}return a}}u.OptionsService=x},2660:function(z,u,d){var _=this&&this.__decorate||function(x,A,E,a){var c,l=arguments.length,o=l<3?A:a===null?a=Object.getOwnPropertyDescriptor(A,E):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(x,A,E,a);else for(var g=x.length-1;g>=0;g--)(c=x[g])&&(o=(l<3?c(o):l>3?c(A,E,o):c(A,E))||o);return l>3&&o&&Object.defineProperty(A,E,o),o},S=this&&this.__param||function(x,A){return function(E,a){A(E,a,x)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const h=d(2585);let y=u.OscLinkService=class{constructor(x){this._bufferService=x,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(x){const A=this._bufferService.buffer;if(x.id===void 0){const g=A.addMarker(A.ybase+A.y),w={data:x,id:this._nextId++,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(w,g))),this._dataByLinkId.set(w.id,w),w.id}const E=x,a=this._getEntryIdKey(E),c=this._entriesWithId.get(a);if(c)return this.addLineToLink(c.id,A.ybase+A.y),c.id;const l=A.addMarker(A.ybase+A.y),o={id:this._nextId++,key:this._getEntryIdKey(E),data:E,lines:[l]};return l.onDispose((()=>this._removeMarkerFromLink(o,l))),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(x,A){const E=this._dataByLinkId.get(x);if(E&&E.lines.every((a=>a.line!==A))){const a=this._bufferService.buffer.addMarker(A);E.lines.push(a),a.onDispose((()=>this._removeMarkerFromLink(E,a)))}}getLinkData(x){var A;return(A=this._dataByLinkId.get(x))===null||A===void 0?void 0:A.data}_getEntryIdKey(x){return`${x.id};;${x.uri}`}_removeMarkerFromLink(x,A){const E=x.lines.indexOf(A);E!==-1&&(x.lines.splice(E,1),x.lines.length===0&&(x.data.id!==void 0&&this._entriesWithId.delete(x.key),this._dataByLinkId.delete(x.id)))}};u.OscLinkService=y=_([S(0,h.IBufferService)],y)},8343:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const d="di$target",_="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(S){return S[_]||[]},u.createDecorator=function(S){if(u.serviceRegistry.has(S))return u.serviceRegistry.get(S);const h=function(y,x,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(E,a,c){a[d]===a?a[_].push({id:E,index:c}):(a[_]=[{id:E,index:c}],a[d]=a)})(h,y,A)};return h.toString=()=>S,u.serviceRegistry.set(S,h),h}},2585:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IDecorationService=u.IUnicodeService=u.IOscLinkService=u.IOptionsService=u.ILogService=u.LogLevelEnum=u.IInstantiationService=u.ICharsetService=u.ICoreService=u.ICoreMouseService=u.IBufferService=void 0;const _=d(8343);var S;u.IBufferService=(0,_.createDecorator)("BufferService"),u.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),u.ICoreService=(0,_.createDecorator)("CoreService"),u.ICharsetService=(0,_.createDecorator)("CharsetService"),u.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(S||(u.LogLevelEnum=S={})),u.ILogService=(0,_.createDecorator)("LogService"),u.IOptionsService=(0,_.createDecorator)("OptionsService"),u.IOscLinkService=(0,_.createDecorator)("OscLinkService"),u.IUnicodeService=(0,_.createDecorator)("UnicodeService"),u.IDecorationService=(0,_.createDecorator)("DecorationService")},1480:(z,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const _=d(8460),S=d(225);u.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter,this.onChange=this._onChange.event;const h=new S.UnicodeV6;this.register(h),this._active=h.version,this._activeProvider=h}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(h){if(!this._providers[h])throw new Error(`unknown Unicode version "${h}"`);this._active=h,this._activeProvider=this._providers[h],this._onChange.fire(h)}register(h){this._providers[h.version]=h}wcwidth(h){return this._activeProvider.wcwidth(h)}getStringCellWidth(h){let y=0;const x=h.length;for(let A=0;A<x;++A){let E=h.charCodeAt(A);if(55296<=E&&E<=56319){if(++A>=x)return y+this.wcwidth(E);const a=h.charCodeAt(A);56320<=a&&a<=57343?E=1024*(E-55296)+a-56320+65536:y+=this.wcwidth(a)}y+=this.wcwidth(E)}return y}}}},m={};function M(z){var u=m[z];if(u!==void 0)return u.exports;var d=m[z]={exports:{}};return v[z].call(d.exports,d,d.exports,M),d.exports}var K={};return(()=>{var z=K;Object.defineProperty(z,"__esModule",{value:!0}),z.Terminal=void 0;const u=M(9042),d=M(3236),_=M(844),S=M(5741),h=M(8285),y=M(7975),x=M(7090),A=["cols","rows"];class E extends _.Disposable{constructor(c){super(),this._core=this.register(new d.Terminal(c)),this._addonManager=this.register(new S.AddonManager),this._publicOptions=Object.assign({},this._core.options);const l=g=>this._core.options[g],o=(g,w)=>{this._checkReadonlyOptions(g),this._core.options[g]=w};for(const g in this._core.options){const w={get:l.bind(this,g),set:o.bind(this,g)};Object.defineProperty(this._publicOptions,g,w)}}_checkReadonlyOptions(c){if(A.includes(c))throw new Error(`Option "${c}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new y.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new x.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 h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let l="none";switch(this._core.coreMouseService.activeProtocol){case"X10":l="x10";break;case"VT200":l="vt200";break;case"DRAG":l="drag";break;case"ANY":l="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:l,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const l in c)this._publicOptions[l]=c[l]}blur(){this._core.blur()}focus(){this._core.focus()}resize(c,l){this._verifyIntegers(c,l),this._core.resize(c,l)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){var l,o,g;return this._checkProposedApi(),this._verifyPositiveIntegers((l=c.x)!==null&&l!==void 0?l:0,(o=c.width)!==null&&o!==void 0?o:0,(g=c.height)!==null&&g!==void 0?g:0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,l,o){this._verifyIntegers(c,l,o),this._core.select(c,l,o)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,l){this._verifyIntegers(c,l),this._core.selectLines(c,l)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,l){this._core.write(c,l)}writeln(c,l){this._core.write(c),this._core.write(`\r
|
|
86
|
+
`,l)}paste(c){this._core.paste(c)}refresh(c,l){this._verifyIntegers(c,l),this._core.refresh(c,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return u}_verifyIntegers(...c){for(const l of c)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const l of c)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}z.Terminal=E})(),K})()))})(rc)),rc.exports}var Gd=fm(),nc={exports:{}},Ud;function dm(){return Ud||(Ud=1,(function(p,f){(function(v,m){p.exports=m()})(self,(()=>(()=>{var v={};return(()=>{var m=v;Object.defineProperty(m,"__esModule",{value:!0}),m.FitAddon=void 0,m.FitAddon=class{activate(M){this._terminal=M}dispose(){}fit(){const M=this.proposeDimensions();if(!M||!this._terminal||isNaN(M.cols)||isNaN(M.rows))return;const K=this._terminal._core;this._terminal.rows===M.rows&&this._terminal.cols===M.cols||(K._renderService.clear(),this._terminal.resize(M.cols,M.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const M=this._terminal._core,K=M._renderService.dimensions;if(K.css.cell.width===0||K.css.cell.height===0)return;const z=this._terminal.options.scrollback===0?0:M.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(u.getPropertyValue("height")),_=Math.max(0,parseInt(u.getPropertyValue("width"))),S=window.getComputedStyle(this._terminal.element),h=d-(parseInt(S.getPropertyValue("padding-top"))+parseInt(S.getPropertyValue("padding-bottom"))),y=_-(parseInt(S.getPropertyValue("padding-right"))+parseInt(S.getPropertyValue("padding-left")))-z;return{cols:Math.max(2,Math.floor(y/K.css.cell.width)),rows:Math.max(1,Math.floor(h/K.css.cell.height))}}}})(),v})()))})(nc)),nc.exports}var Qd=dm(),ac={exports:{}},qd;function _m(){return qd||(qd=1,(function(p,f){(function(v,m){p.exports=m()})(self,(()=>(()=>{var v={6:(z,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.LinkComputer=u.WebLinkProvider=void 0,u.WebLinkProvider=class{constructor(_,S,h,y={}){this._terminal=_,this._regex=S,this._handler=h,this._options=y}provideLinks(_,S){const h=d.computeLink(_,this._regex,this._terminal,this._handler);S(this._addCallbacks(h))}_addCallbacks(_){return _.map((S=>(S.leave=this._options.leave,S.hover=(h,y)=>{if(this._options.hover){const{range:x}=S;this._options.hover(h,y,x)}},S)))}};class d{static computeLink(S,h,y,x){const A=new RegExp(h.source,(h.flags||"")+"g"),[E,a]=d._getWindowedLineStrings(S-1,y),c=E.join("");let l;const o=[];for(;l=A.exec(c);){const g=l[0];try{const U=new URL(g),W=decodeURI(U.toString());if(g!==W&&g+"/"!==W)continue}catch{continue}const[w,T]=d._mapStrIdx(y,a,0,l.index),[D,b]=d._mapStrIdx(y,w,T,g.length);if(w===-1||T===-1||D===-1||b===-1)continue;const R={start:{x:T+1,y:w+1},end:{x:b,y:D+1}};o.push({range:R,text:g,activate:x})}return o}static _getWindowedLineStrings(S,h){let y,x=S,A=S,E=0,a="";const c=[];if(y=h.buffer.active.getLine(S)){const l=y.translateToString(!0);if(y.isWrapped&&l[0]!==" "){for(E=0;(y=h.buffer.active.getLine(--x))&&E<2048&&(a=y.translateToString(!0),E+=a.length,c.push(a),y.isWrapped&&a.indexOf(" ")===-1););c.reverse()}for(c.push(l),E=0;(y=h.buffer.active.getLine(++A))&&y.isWrapped&&E<2048&&(a=y.translateToString(!0),E+=a.length,c.push(a),a.indexOf(" ")===-1););}return[c,x]}static _mapStrIdx(S,h,y,x){const A=S.buffer.active,E=A.getNullCell();let a=y;for(;x;){const c=A.getLine(h);if(!c)return[-1,-1];for(let l=a;l<c.length;++l){c.getCell(l,E);const o=E.getChars();if(E.getWidth()&&(x-=o.length||1,l===c.length-1&&o==="")){const g=A.getLine(h+1);g&&g.isWrapped&&(g.getCell(0,E),E.getWidth()===2&&(x+=1))}if(x<0)return[h,l]}h++,a=0}return[h,a]}}u.LinkComputer=d}},m={};function M(z){var u=m[z];if(u!==void 0)return u.exports;var d=m[z]={exports:{}};return v[z](d,d.exports,M),d.exports}var K={};return(()=>{var z=K;Object.defineProperty(z,"__esModule",{value:!0}),z.WebLinksAddon=void 0;const u=M(6),d=/https?:[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function _(S,h){const y=window.open();if(y){try{y.opener=null}catch{}y.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}z.WebLinksAddon=class{constructor(S=_,h={}){this._handler=S,this._options=h}activate(S){this._terminal=S;const h=this._options,y=h.urlRegex||d;this._linkProvider=this._terminal.registerLinkProvider(new u.WebLinkProvider(this._terminal,y,this._handler,h))}dispose(){var S;(S=this._linkProvider)===null||S===void 0||S.dispose()}}})(),K})()))})(ac)),ac.exports}var Zd=_m();const Jd=ve.forwardRef((p,f)=>{const v=ve.useRef(null),m=ve.useRef(null),M=ve.useRef(null),K=ve.useRef(p.onData);return ve.useImperativeHandle(f,()=>({fit:()=>{try{M.current?.fit()}catch{}}})),ve.useEffect(()=>{K.current=p.onData},[p.onData]),ve.useEffect(()=>{if(!v.current)return;const z=new Gd.Terminal({cursorBlink:!0,fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:15,theme:{background:"#111827",foreground:"#f3f4f6",cursor:"#ffffff",selectionBackground:"#374151"},convertEol:!0}),u=new Qd.FitAddon,d=new Zd.WebLinksAddon;z.loadAddon(u),z.loadAddon(d);const _=setTimeout(()=>{if(v.current){z.open(v.current);try{u.fit()}catch(h){console.warn("Fit failed on init:",h)}}},0);m.current=z,M.current=u,p.terminalRef&&(p.terminalRef.current=z),z.onData(h=>{K.current&&K.current(h)});const S=new ResizeObserver(()=>{try{u.fit()}catch{}});return S.observe(v.current),()=>{clearTimeout(_),S.disconnect(),z.dispose()}},[]),j.jsx("div",{className:"h-full w-full overflow-hidden bg-gray-900 p-1",ref:v})});function vm(){const p=Be.use.workspace(),f=Be.use.activeTerminal(),v=Be.use.setActiveTerminal(),m=Be.use.stopProcess(),M=Be.use.writeOnConsole(),K=Be.use.clearConsole(),z=Be.use.setWorkSpaceRunningAs(),[u,d]=ve.useState(!1);async function _(){if(!u)try{if(d(!0),M(f,".."),!p.find(h=>h.info.name===f))return;await m(f),z(f,null),d(!1),K(f),v("")}catch(S){console.error(S),d(!1)}}return j.jsxs("div",{className:"w-full h-full flex flex-col",children:[j.jsx("header",{className:"flex-none w-full pt-1 flex bg-gray-800 min-h-6 flex-wrap gap-2 select-none",children:p.map((S,h)=>S.isRunningAs=="dev"||S.isRunningAs=="start"?j.jsxs("div",{onClick:()=>v(S.info.name),className:`group px-2 w-[200px] gap-2 flex items-center ${f===S.info.name?"bg-gray-800":"mb-1 opacity-60 cursor-pointer bg-gray-700 hover:bg-gray-600"}`,children:[j.jsxs("div",{className:"flex-1 flex items-center gap-2 truncate overflow-hidden",children:[j.jsx("i",{className:`${S.info.fontawesomeIcon??"fas fa-terminal"} text-blue-500/50 text-[18px] flex-shrink-0`}),j.jsx("span",{className:"truncate font-medium text-[16px] text-gray-100",children:S.info.name})]}),j.jsx("button",{onClick:y=>{y.stopPropagation(),_()},className:"opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:j.jsx("i",{className:"fa fa-times"})})]},h):null)}),j.jsxs("div",{className:"flex-1 overflow-hidden bg-gray-900 p-2 relative",children:[f==""&&j.jsxs("div",{className:"absolute inset-0 flex gap-4 items-center justify-center opacity-40 select-none pointer-events-none",children:[j.jsx("div",{className:"w-8 h-8 bg-gray-800 rounded-full flex items-center justify-center shadow-inner",children:j.jsx("i",{className:"fas fa-terminal text-md text-gray-600"})}),j.jsx("span",{className:"text-[16px] text-gray-500",children:"Terminal"})]}),p.map(S=>j.jsx(pm,{output:S.consoleOutput||"",visible:f==S.info.name&&(S.isRunningAs=="dev"||S.isRunningAs=="start"||!1)},S.info.name))]})]})}function pm({output:p,visible:f}){const v=ve.useRef(null),m=ve.useRef(0);return ve.useEffect(()=>{if(!v.current)return;p.length<m.current&&(v.current.reset(),m.current=0);const M=p.slice(m.current);M&&(v.current.write(M),m.current=p.length)},[p]),j.jsx("div",{className:`w-full h-full ${f?"block":"hidden"}`,children:j.jsx(Jd,{terminalRef:v})})}const ii=Object.create(null);ii.open="0";ii.close="1";ii.ping="2";ii.pong="3";ii.message="4";ii.upgrade="5";ii.noop="6";const Ta=Object.create(null);Object.keys(ii).forEach(p=>{Ta[ii[p]]=p});const hc={type:"error",data:"parser error"},$d=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",e_=typeof ArrayBuffer=="function",t_=p=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(p):p&&p.buffer instanceof ArrayBuffer,mc=({type:p,data:f},v,m)=>$d&&f instanceof Blob?v?m(f):Id(f,m):e_&&(f instanceof ArrayBuffer||t_(f))?v?m(f):Id(new Blob([f]),m):m(ii[p]+(f||"")),Id=(p,f)=>{const v=new FileReader;return v.onload=function(){const m=v.result.split(",")[1];f("b"+(m||""))},v.readAsDataURL(p)};function Pd(p){return p instanceof Uint8Array?p:p instanceof ArrayBuffer?new Uint8Array(p):new Uint8Array(p.buffer,p.byteOffset,p.byteLength)}let lc;function mm(p,f){if($d&&p.data instanceof Blob)return p.data.arrayBuffer().then(Pd).then(f);if(e_&&(p.data instanceof ArrayBuffer||t_(p.data)))return f(Pd(p.data));mc(p,!1,v=>{lc||(lc=new TextEncoder),f(lc.encode(v))})}const Wd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let p=0;p<Wd.length;p++)nn[Wd.charCodeAt(p)]=p;const gm=p=>{let f=p.length*.75,v=p.length,m,M=0,K,z,u,d;p[p.length-1]==="="&&(f--,p[p.length-2]==="="&&f--);const _=new ArrayBuffer(f),S=new Uint8Array(_);for(m=0;m<v;m+=4)K=nn[p.charCodeAt(m)],z=nn[p.charCodeAt(m+1)],u=nn[p.charCodeAt(m+2)],d=nn[p.charCodeAt(m+3)],S[M++]=K<<2|z>>4,S[M++]=(z&15)<<4|u>>2,S[M++]=(u&3)<<6|d&63;return _},Sm=typeof ArrayBuffer=="function",gc=(p,f)=>{if(typeof p!="string")return{type:"message",data:i_(p,f)};const v=p.charAt(0);return v==="b"?{type:"message",data:ym(p.substring(1),f)}:Ta[v]?p.length>1?{type:Ta[v],data:p.substring(1)}:{type:Ta[v]}:hc},ym=(p,f)=>{if(Sm){const v=gm(p);return i_(v,f)}else return{base64:!0,data:p}},i_=(p,f)=>f==="blob"?p instanceof Blob?p:new Blob([p]):p instanceof ArrayBuffer?p:p.buffer,s_="",bm=(p,f)=>{const v=p.length,m=new Array(v);let M=0;p.forEach((K,z)=>{mc(K,!1,u=>{m[z]=u,++M===v&&f(m.join(s_))})})},Cm=(p,f)=>{const v=p.split(s_),m=[];for(let M=0;M<v.length;M++){const K=gc(v[M],f);if(m.push(K),K.type==="error")break}return m};function wm(){return new TransformStream({transform(p,f){mm(p,v=>{const m=v.length;let M;if(m<126)M=new Uint8Array(1),new DataView(M.buffer).setUint8(0,m);else if(m<65536){M=new Uint8Array(3);const K=new DataView(M.buffer);K.setUint8(0,126),K.setUint16(1,m)}else{M=new Uint8Array(9);const K=new DataView(M.buffer);K.setUint8(0,127),K.setBigUint64(1,BigInt(m))}p.data&&typeof p.data!="string"&&(M[0]|=128),f.enqueue(M),f.enqueue(v)})}})}let oc;function xa(p){return p.reduce((f,v)=>f+v.length,0)}function Aa(p,f){if(p[0].length===f)return p.shift();const v=new Uint8Array(f);let m=0;for(let M=0;M<f;M++)v[M]=p[0][m++],m===p[0].length&&(p.shift(),m=0);return p.length&&m<p[0].length&&(p[0]=p[0].slice(m)),v}function Em(p,f){oc||(oc=new TextDecoder);const v=[];let m=0,M=-1,K=!1;return new TransformStream({transform(z,u){for(v.push(z);;){if(m===0){if(xa(v)<1)break;const d=Aa(v,1);K=(d[0]&128)===128,M=d[0]&127,M<126?m=3:M===126?m=1:m=2}else if(m===1){if(xa(v)<2)break;const d=Aa(v,2);M=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),m=3}else if(m===2){if(xa(v)<8)break;const d=Aa(v,8),_=new DataView(d.buffer,d.byteOffset,d.length),S=_.getUint32(0);if(S>Math.pow(2,21)-1){u.enqueue(hc);break}M=S*Math.pow(2,32)+_.getUint32(4),m=3}else{if(xa(v)<M)break;const d=Aa(v,M);u.enqueue(gc(K?d:oc.decode(d),f)),m=0}if(M===0||M>p){u.enqueue(hc);break}}}})}const r_=4;function $e(p){if(p)return xm(p)}function xm(p){for(var f in $e.prototype)p[f]=$e.prototype[f];return p}$e.prototype.on=$e.prototype.addEventListener=function(p,f){return this._callbacks=this._callbacks||{},(this._callbacks["$"+p]=this._callbacks["$"+p]||[]).push(f),this};$e.prototype.once=function(p,f){function v(){this.off(p,v),f.apply(this,arguments)}return v.fn=f,this.on(p,v),this};$e.prototype.off=$e.prototype.removeListener=$e.prototype.removeAllListeners=$e.prototype.removeEventListener=function(p,f){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var v=this._callbacks["$"+p];if(!v)return this;if(arguments.length==1)return delete this._callbacks["$"+p],this;for(var m,M=0;M<v.length;M++)if(m=v[M],m===f||m.fn===f){v.splice(M,1);break}return v.length===0&&delete this._callbacks["$"+p],this};$e.prototype.emit=function(p){this._callbacks=this._callbacks||{};for(var f=new Array(arguments.length-1),v=this._callbacks["$"+p],m=1;m<arguments.length;m++)f[m-1]=arguments[m];if(v){v=v.slice(0);for(var m=0,M=v.length;m<M;++m)v[m].apply(this,f)}return this};$e.prototype.emitReserved=$e.prototype.emit;$e.prototype.listeners=function(p){return this._callbacks=this._callbacks||{},this._callbacks["$"+p]||[]};$e.prototype.hasListeners=function(p){return!!this.listeners(p).length};const La=typeof Promise=="function"&&typeof Promise.resolve=="function"?f=>Promise.resolve().then(f):(f,v)=>v(f,0),It=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Am="arraybuffer";function n_(p,...f){return f.reduce((v,m)=>(p.hasOwnProperty(m)&&(v[m]=p[m]),v),{})}const Tm=It.setTimeout,Rm=It.clearTimeout;function Oa(p,f){f.useNativeTimers?(p.setTimeoutFn=Tm.bind(It),p.clearTimeoutFn=Rm.bind(It)):(p.setTimeoutFn=It.setTimeout.bind(It),p.clearTimeoutFn=It.clearTimeout.bind(It))}const Dm=1.33;function km(p){return typeof p=="string"?Lm(p):Math.ceil((p.byteLength||p.size)*Dm)}function Lm(p){let f=0,v=0;for(let m=0,M=p.length;m<M;m++)f=p.charCodeAt(m),f<128?v+=1:f<2048?v+=2:f<55296||f>=57344?v+=3:(m++,v+=4);return v}function a_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Om(p){let f="";for(let v in p)p.hasOwnProperty(v)&&(f.length&&(f+="&"),f+=encodeURIComponent(v)+"="+encodeURIComponent(p[v]));return f}function Bm(p){let f={},v=p.split("&");for(let m=0,M=v.length;m<M;m++){let K=v[m].split("=");f[decodeURIComponent(K[0])]=decodeURIComponent(K[1])}return f}class Mm extends Error{constructor(f,v,m){super(f),this.description=v,this.context=m,this.type="TransportError"}}class Sc extends $e{constructor(f){super(),this.writable=!1,Oa(this,f),this.opts=f,this.query=f.query,this.socket=f.socket,this.supportsBinary=!f.forceBase64}onError(f,v,m){return super.emitReserved("error",new Mm(f,v,m)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(f){this.readyState==="open"&&this.write(f)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(f){const v=gc(f,this.socket.binaryType);this.onPacket(v)}onPacket(f){super.emitReserved("packet",f)}onClose(f){this.readyState="closed",super.emitReserved("close",f)}pause(f){}createUri(f,v={}){return f+"://"+this._hostname()+this._port()+this.opts.path+this._query(v)}_hostname(){const f=this.opts.hostname;return f.indexOf(":")===-1?f:"["+f+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(f){const v=Om(f);return v.length?"?"+v:""}}class Nm extends Sc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(f){this.readyState="pausing";const v=()=>{this.readyState="paused",f()};if(this._polling||!this.writable){let m=0;this._polling&&(m++,this.once("pollComplete",function(){--m||v()})),this.writable||(m++,this.once("drain",function(){--m||v()}))}else v()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(f){const v=m=>{if(this.readyState==="opening"&&m.type==="open"&&this.onOpen(),m.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(m)};Cm(f,this.socket.binaryType).forEach(v),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const f=()=>{this.write([{type:"close"}])};this.readyState==="open"?f():this.once("open",f)}write(f){this.writable=!1,bm(f,v=>{this.doWrite(v,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const f=this.opts.secure?"https":"http",v=this.query||{};return this.opts.timestampRequests!==!1&&(v[this.opts.timestampParam]=a_()),!this.supportsBinary&&!v.sid&&(v.b64=1),this.createUri(f,v)}}let l_=!1;try{l_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Hm=l_;function zm(){}class jm extends Nm{constructor(f){if(super(f),typeof location<"u"){const v=location.protocol==="https:";let m=location.port;m||(m=v?"443":"80"),this.xd=typeof location<"u"&&f.hostname!==location.hostname||m!==f.port}}doWrite(f,v){const m=this.request({method:"POST",data:f});m.on("success",v),m.on("error",(M,K)=>{this.onError("xhr post error",M,K)})}doPoll(){const f=this.request();f.on("data",this.onData.bind(this)),f.on("error",(v,m)=>{this.onError("xhr poll error",v,m)}),this.pollXhr=f}}class ti extends $e{constructor(f,v,m){super(),this.createRequest=f,Oa(this,m),this._opts=m,this._method=m.method||"GET",this._uri=v,this._data=m.data!==void 0?m.data:null,this._create()}_create(){var f;const v=n_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");v.xdomain=!!this._opts.xd;const m=this._xhr=this.createRequest(v);try{m.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){m.setDisableHeaderCheck&&m.setDisableHeaderCheck(!0);for(let M in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(M)&&m.setRequestHeader(M,this._opts.extraHeaders[M])}}catch{}if(this._method==="POST")try{m.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{m.setRequestHeader("Accept","*/*")}catch{}(f=this._opts.cookieJar)===null||f===void 0||f.addCookies(m),"withCredentials"in m&&(m.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(m.timeout=this._opts.requestTimeout),m.onreadystatechange=()=>{var M;m.readyState===3&&((M=this._opts.cookieJar)===null||M===void 0||M.parseCookies(m.getResponseHeader("set-cookie"))),m.readyState===4&&(m.status===200||m.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof m.status=="number"?m.status:0)},0))},m.send(this._data)}catch(M){this.setTimeoutFn(()=>{this._onError(M)},0);return}typeof document<"u"&&(this._index=ti.requestsCount++,ti.requests[this._index]=this)}_onError(f){this.emitReserved("error",f,this._xhr),this._cleanup(!0)}_cleanup(f){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=zm,f)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ti.requests[this._index],this._xhr=null}}_onLoad(){const f=this._xhr.responseText;f!==null&&(this.emitReserved("data",f),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}ti.requestsCount=0;ti.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Vd);else if(typeof addEventListener=="function"){const p="onpagehide"in It?"pagehide":"unload";addEventListener(p,Vd,!1)}}function Vd(){for(let p in ti.requests)ti.requests.hasOwnProperty(p)&&ti.requests[p].abort()}const Um=(function(){const p=o_({xdomain:!1});return p&&p.responseType!==null})();class qm extends jm{constructor(f){super(f);const v=f&&f.forceBase64;this.supportsBinary=Um&&!v}request(f={}){return Object.assign(f,{xd:this.xd},this.opts),new ti(o_,this.uri(),f)}}function o_(p){const f=p.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!f||Hm))return new XMLHttpRequest}catch{}if(!f)try{return new It[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const c_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Im extends Sc{get name(){return"websocket"}doOpen(){const f=this.uri(),v=this.opts.protocols,m=c_?{}:n_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(m.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(f,v,m)}catch(M){return this.emitReserved("error",M)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=f=>this.onClose({description:"websocket connection closed",context:f}),this.ws.onmessage=f=>this.onData(f.data),this.ws.onerror=f=>this.onError("websocket error",f)}write(f){this.writable=!1;for(let v=0;v<f.length;v++){const m=f[v],M=v===f.length-1;mc(m,this.supportsBinary,K=>{try{this.doWrite(m,K)}catch{}M&&La(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const f=this.opts.secure?"wss":"ws",v=this.query||{};return this.opts.timestampRequests&&(v[this.opts.timestampParam]=a_()),this.supportsBinary||(v.b64=1),this.createUri(f,v)}}const cc=It.WebSocket||It.MozWebSocket;class Pm extends Im{createSocket(f,v,m){return c_?new cc(f,v,m):v?new cc(f,v):new cc(f)}doWrite(f,v){this.ws.send(v)}}class Wm extends Sc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(f){return this.emitReserved("error",f)}this._transport.closed.then(()=>{this.onClose()}).catch(f=>{this.onError("webtransport error",f)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(f=>{const v=Em(Number.MAX_SAFE_INTEGER,this.socket.binaryType),m=f.readable.pipeThrough(v).getReader(),M=wm();M.readable.pipeTo(f.writable),this._writer=M.writable.getWriter();const K=()=>{m.read().then(({done:u,value:d})=>{u||(this.onPacket(d),K())}).catch(u=>{})};K();const z={type:"open"};this.query.sid&&(z.data=`{"sid":"${this.query.sid}"}`),this._writer.write(z).then(()=>this.onOpen())})})}write(f){this.writable=!1;for(let v=0;v<f.length;v++){const m=f[v],M=v===f.length-1;this._writer.write(m).then(()=>{M&&La(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var f;(f=this._transport)===null||f===void 0||f.close()}}const Vm={websocket:Pm,webtransport:Wm,polling:qm},Ym=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Fm=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function fc(p){if(p.length>8e3)throw"URI too long";const f=p,v=p.indexOf("["),m=p.indexOf("]");v!=-1&&m!=-1&&(p=p.substring(0,v)+p.substring(v,m).replace(/:/g,";")+p.substring(m,p.length));let M=Ym.exec(p||""),K={},z=14;for(;z--;)K[Fm[z]]=M[z]||"";return v!=-1&&m!=-1&&(K.source=f,K.host=K.host.substring(1,K.host.length-1).replace(/;/g,":"),K.authority=K.authority.replace("[","").replace("]","").replace(/;/g,":"),K.ipv6uri=!0),K.pathNames=Km(K,K.path),K.queryKey=Xm(K,K.query),K}function Km(p,f){const v=/\/{2,9}/g,m=f.replace(v,"/").split("/");return(f.slice(0,1)=="/"||f.length===0)&&m.splice(0,1),f.slice(-1)=="/"&&m.splice(m.length-1,1),m}function Xm(p,f){const v={};return f.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(m,M,K){M&&(v[M]=K)}),v}const dc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ra=[];dc&&addEventListener("offline",()=>{Ra.forEach(p=>p())},!1);class Xi extends $e{constructor(f,v){if(super(),this.binaryType=Am,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,f&&typeof f=="object"&&(v=f,f=null),f){const m=fc(f);v.hostname=m.host,v.secure=m.protocol==="https"||m.protocol==="wss",v.port=m.port,m.query&&(v.query=m.query)}else v.host&&(v.hostname=fc(v.host).host);Oa(this,v),this.secure=v.secure!=null?v.secure:typeof location<"u"&&location.protocol==="https:",v.hostname&&!v.port&&(v.port=this.secure?"443":"80"),this.hostname=v.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=v.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},v.transports.forEach(m=>{const M=m.prototype.name;this.transports.push(M),this._transportsByName[M]=m}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},v),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Bm(this.opts.query)),dc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ra.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(f){const v=Object.assign({},this.opts.query);v.EIO=r_,v.transport=f,this.id&&(v.sid=this.id);const m=Object.assign({},this.opts,{query:v,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[f]);return new this._transportsByName[f](m)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const f=this.opts.rememberUpgrade&&Xi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const v=this.createTransport(f);v.open(),this.setTransport(v)}setTransport(f){this.transport&&this.transport.removeAllListeners(),this.transport=f,f.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",v=>this._onClose("transport close",v))}onOpen(){this.readyState="open",Xi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(f){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",f),this.emitReserved("heartbeat"),f.type){case"open":this.onHandshake(JSON.parse(f.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const v=new Error("server error");v.code=f.data,this._onError(v);break;case"message":this.emitReserved("data",f.data),this.emitReserved("message",f.data);break}}onHandshake(f){this.emitReserved("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this._pingInterval=f.pingInterval,this._pingTimeout=f.pingTimeout,this._maxPayload=f.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const f=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+f,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},f),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const f=this._getWritablePackets();this.transport.send(f),this._prevBufferLen=f.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let v=1;for(let m=0;m<this.writeBuffer.length;m++){const M=this.writeBuffer[m].data;if(M&&(v+=km(M)),m>0&&v>this._maxPayload)return this.writeBuffer.slice(0,m);v+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const f=Date.now()>this._pingTimeoutTime;return f&&(this._pingTimeoutTime=0,La(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),f}write(f,v,m){return this._sendPacket("message",f,v,m),this}send(f,v,m){return this._sendPacket("message",f,v,m),this}_sendPacket(f,v,m,M){if(typeof v=="function"&&(M=v,v=void 0),typeof m=="function"&&(M=m,m=null),this.readyState==="closing"||this.readyState==="closed")return;m=m||{},m.compress=m.compress!==!1;const K={type:f,data:v,options:m};this.emitReserved("packetCreate",K),this.writeBuffer.push(K),M&&this.once("flush",M),this.flush()}close(){const f=()=>{this._onClose("forced close"),this.transport.close()},v=()=>{this.off("upgrade",v),this.off("upgradeError",v),f()},m=()=>{this.once("upgrade",v),this.once("upgradeError",v)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?m():f()}):this.upgrading?m():f()),this}_onError(f){if(Xi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",f),this._onClose("transport error",f)}_onClose(f,v){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),dc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const m=Ra.indexOf(this._offlineEventListener);m!==-1&&Ra.splice(m,1)}this.readyState="closed",this.id=null,this.emitReserved("close",f,v),this.writeBuffer=[],this._prevBufferLen=0}}}Xi.protocol=r_;class Gm extends Xi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let f=0;f<this._upgrades.length;f++)this._probe(this._upgrades[f])}_probe(f){let v=this.createTransport(f),m=!1;Xi.priorWebsocketSuccess=!1;const M=()=>{m||(v.send([{type:"ping",data:"probe"}]),v.once("packet",h=>{if(!m)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",v),!v)return;Xi.priorWebsocketSuccess=v.name==="websocket",this.transport.pause(()=>{m||this.readyState!=="closed"&&(S(),this.setTransport(v),v.send([{type:"upgrade"}]),this.emitReserved("upgrade",v),v=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=v.name,this.emitReserved("upgradeError",y)}}))};function K(){m||(m=!0,S(),v.close(),v=null)}const z=h=>{const y=new Error("probe error: "+h);y.transport=v.name,K(),this.emitReserved("upgradeError",y)};function u(){z("transport closed")}function d(){z("socket closed")}function _(h){v&&h.name!==v.name&&K()}const S=()=>{v.removeListener("open",M),v.removeListener("error",z),v.removeListener("close",u),this.off("close",d),this.off("upgrading",_)};v.once("open",M),v.once("error",z),v.once("close",u),this.once("close",d),this.once("upgrading",_),this._upgrades.indexOf("webtransport")!==-1&&f!=="webtransport"?this.setTimeoutFn(()=>{m||v.open()},200):v.open()}onHandshake(f){this._upgrades=this._filterUpgrades(f.upgrades),super.onHandshake(f)}_filterUpgrades(f){const v=[];for(let m=0;m<f.length;m++)~this.transports.indexOf(f[m])&&v.push(f[m]);return v}}let Qm=class extends Gm{constructor(f,v={}){const m=typeof f=="object"?f:v;(!m.transports||m.transports&&typeof m.transports[0]=="string")&&(m.transports=(m.transports||["polling","websocket","webtransport"]).map(M=>Vm[M]).filter(M=>!!M)),super(f,m)}};function Zm(p,f="",v){let m=p;v=v||typeof location<"u"&&location,p==null&&(p=v.protocol+"//"+v.host),typeof p=="string"&&(p.charAt(0)==="/"&&(p.charAt(1)==="/"?p=v.protocol+p:p=v.host+p),/^(https?|wss?):\/\//.test(p)||(typeof v<"u"?p=v.protocol+"//"+p:p="https://"+p),m=fc(p)),m.port||(/^(http|ws)$/.test(m.protocol)?m.port="80":/^(http|ws)s$/.test(m.protocol)&&(m.port="443")),m.path=m.path||"/";const K=m.host.indexOf(":")!==-1?"["+m.host+"]":m.host;return m.id=m.protocol+"://"+K+":"+m.port+f,m.href=m.protocol+"://"+K+(v&&v.port===m.port?"":":"+m.port),m}const Jm=typeof ArrayBuffer=="function",$m=p=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(p):p.buffer instanceof ArrayBuffer,u_=Object.prototype.toString,eg=typeof Blob=="function"||typeof Blob<"u"&&u_.call(Blob)==="[object BlobConstructor]",tg=typeof File=="function"||typeof File<"u"&&u_.call(File)==="[object FileConstructor]";function yc(p){return Jm&&(p instanceof ArrayBuffer||$m(p))||eg&&p instanceof Blob||tg&&p instanceof File}function Da(p,f){if(!p||typeof p!="object")return!1;if(Array.isArray(p)){for(let v=0,m=p.length;v<m;v++)if(Da(p[v]))return!0;return!1}if(yc(p))return!0;if(p.toJSON&&typeof p.toJSON=="function"&&arguments.length===1)return Da(p.toJSON(),!0);for(const v in p)if(Object.prototype.hasOwnProperty.call(p,v)&&Da(p[v]))return!0;return!1}function ig(p){const f=[],v=p.data,m=p;return m.data=_c(v,f),m.attachments=f.length,{packet:m,buffers:f}}function _c(p,f){if(!p)return p;if(yc(p)){const v={_placeholder:!0,num:f.length};return f.push(p),v}else if(Array.isArray(p)){const v=new Array(p.length);for(let m=0;m<p.length;m++)v[m]=_c(p[m],f);return v}else if(typeof p=="object"&&!(p instanceof Date)){const v={};for(const m in p)Object.prototype.hasOwnProperty.call(p,m)&&(v[m]=_c(p[m],f));return v}return p}function sg(p,f){return p.data=vc(p.data,f),delete p.attachments,p}function vc(p,f){if(!p)return p;if(p&&p._placeholder===!0){if(typeof p.num=="number"&&p.num>=0&&p.num<f.length)return f[p.num];throw new Error("illegal attachments")}else if(Array.isArray(p))for(let v=0;v<p.length;v++)p[v]=vc(p[v],f);else if(typeof p=="object")for(const v in p)Object.prototype.hasOwnProperty.call(p,v)&&(p[v]=vc(p[v],f));return p}const h_=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],rg=5;var Ce;(function(p){p[p.CONNECT=0]="CONNECT",p[p.DISCONNECT=1]="DISCONNECT",p[p.EVENT=2]="EVENT",p[p.ACK=3]="ACK",p[p.CONNECT_ERROR=4]="CONNECT_ERROR",p[p.BINARY_EVENT=5]="BINARY_EVENT",p[p.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class ng{constructor(f){this.replacer=f}encode(f){return(f.type===Ce.EVENT||f.type===Ce.ACK)&&Da(f)?this.encodeAsBinary({type:f.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:f.nsp,data:f.data,id:f.id}):[this.encodeAsString(f)]}encodeAsString(f){let v=""+f.type;return(f.type===Ce.BINARY_EVENT||f.type===Ce.BINARY_ACK)&&(v+=f.attachments+"-"),f.nsp&&f.nsp!=="/"&&(v+=f.nsp+","),f.id!=null&&(v+=f.id),f.data!=null&&(v+=JSON.stringify(f.data,this.replacer)),v}encodeAsBinary(f){const v=ig(f),m=this.encodeAsString(v.packet),M=v.buffers;return M.unshift(m),M}}class bc extends $e{constructor(f){super(),this.reviver=f}add(f){let v;if(typeof f=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");v=this.decodeString(f);const m=v.type===Ce.BINARY_EVENT;m||v.type===Ce.BINARY_ACK?(v.type=m?Ce.EVENT:Ce.ACK,this.reconstructor=new ag(v),v.attachments===0&&super.emitReserved("decoded",v)):super.emitReserved("decoded",v)}else if(yc(f)||f.base64)if(this.reconstructor)v=this.reconstructor.takeBinaryData(f),v&&(this.reconstructor=null,super.emitReserved("decoded",v));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+f)}decodeString(f){let v=0;const m={type:Number(f.charAt(0))};if(Ce[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===Ce.BINARY_EVENT||m.type===Ce.BINARY_ACK){const K=v+1;for(;f.charAt(++v)!=="-"&&v!=f.length;);const z=f.substring(K,v);if(z!=Number(z)||f.charAt(v)!=="-")throw new Error("Illegal attachments");m.attachments=Number(z)}if(f.charAt(v+1)==="/"){const K=v+1;for(;++v&&!(f.charAt(v)===","||v===f.length););m.nsp=f.substring(K,v)}else m.nsp="/";const M=f.charAt(v+1);if(M!==""&&Number(M)==M){const K=v+1;for(;++v;){const z=f.charAt(v);if(z==null||Number(z)!=z){--v;break}if(v===f.length)break}m.id=Number(f.substring(K,v+1))}if(f.charAt(++v)){const K=this.tryParse(f.substr(v));if(bc.isPayloadValid(m.type,K))m.data=K;else throw new Error("invalid payload")}return m}tryParse(f){try{return JSON.parse(f,this.reviver)}catch{return!1}}static isPayloadValid(f,v){switch(f){case Ce.CONNECT:return ka(v);case Ce.DISCONNECT:return v===void 0;case Ce.CONNECT_ERROR:return typeof v=="string"||ka(v);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(v)&&(typeof v[0]=="number"||typeof v[0]=="string"&&h_.indexOf(v[0])===-1);case Ce.ACK:case Ce.BINARY_ACK:return Array.isArray(v)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ag{constructor(f){this.packet=f,this.buffers=[],this.reconPack=f}takeBinaryData(f){if(this.buffers.push(f),this.buffers.length===this.reconPack.attachments){const v=sg(this.reconPack,this.buffers);return this.finishedReconstruction(),v}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function lg(p){return typeof p=="string"}const og=Number.isInteger||function(p){return typeof p=="number"&&isFinite(p)&&Math.floor(p)===p};function cg(p){return p===void 0||og(p)}function ka(p){return Object.prototype.toString.call(p)==="[object Object]"}function ug(p,f){switch(p){case Ce.CONNECT:return f===void 0||ka(f);case Ce.DISCONNECT:return f===void 0;case Ce.EVENT:return Array.isArray(f)&&(typeof f[0]=="number"||typeof f[0]=="string"&&h_.indexOf(f[0])===-1);case Ce.ACK:return Array.isArray(f);case Ce.CONNECT_ERROR:return typeof f=="string"||ka(f);default:return!1}}function hg(p){return lg(p.nsp)&&cg(p.id)&&ug(p.type,p.data)}const fg=Object.freeze(Object.defineProperty({__proto__:null,Decoder:bc,Encoder:ng,get PacketType(){return Ce},isPacketValid:hg,protocol:rg},Symbol.toStringTag,{value:"Module"}));function Kt(p,f,v){return p.on(f,v),function(){p.off(f,v)}}const dg=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class f_ extends $e{constructor(f,v,m){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=f,this.nsp=v,m&&m.auth&&(this.auth=m.auth),this._opts=Object.assign({},m),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const f=this.io;this.subs=[Kt(f,"open",this.onopen.bind(this)),Kt(f,"packet",this.onpacket.bind(this)),Kt(f,"error",this.onerror.bind(this)),Kt(f,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...f){return f.unshift("message"),this.emit.apply(this,f),this}emit(f,...v){var m,M,K;if(dg.hasOwnProperty(f))throw new Error('"'+f.toString()+'" is a reserved event name');if(v.unshift(f),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(v),this;const z={type:Ce.EVENT,data:v};if(z.options={},z.options.compress=this.flags.compress!==!1,typeof v[v.length-1]=="function"){const S=this.ids++,h=v.pop();this._registerAckCallback(S,h),z.id=S}const u=(M=(m=this.io.engine)===null||m===void 0?void 0:m.transport)===null||M===void 0?void 0:M.writable,d=this.connected&&!(!((K=this.io.engine)===null||K===void 0)&&K._hasPingExpired());return this.flags.volatile&&!u||(d?(this.notifyOutgoingListeners(z),this.packet(z)):this.sendBuffer.push(z)),this.flags={},this}_registerAckCallback(f,v){var m;const M=(m=this.flags.timeout)!==null&&m!==void 0?m:this._opts.ackTimeout;if(M===void 0){this.acks[f]=v;return}const K=this.io.setTimeoutFn(()=>{delete this.acks[f];for(let u=0;u<this.sendBuffer.length;u++)this.sendBuffer[u].id===f&&this.sendBuffer.splice(u,1);v.call(this,new Error("operation has timed out"))},M),z=(...u)=>{this.io.clearTimeoutFn(K),v.apply(this,u)};z.withError=!0,this.acks[f]=z}emitWithAck(f,...v){return new Promise((m,M)=>{const K=(z,u)=>z?M(z):m(u);K.withError=!0,v.push(K),this.emit(f,...v)})}_addToQueue(f){let v;typeof f[f.length-1]=="function"&&(v=f.pop());const m={id:this._queueSeq++,tryCount:0,pending:!1,args:f,flags:Object.assign({fromQueue:!0},this.flags)};f.push((M,...K)=>(this._queue[0],M!==null?m.tryCount>this._opts.retries&&(this._queue.shift(),v&&v(M)):(this._queue.shift(),v&&v(null,...K)),m.pending=!1,this._drainQueue())),this._queue.push(m),this._drainQueue()}_drainQueue(f=!1){if(!this.connected||this._queue.length===0)return;const v=this._queue[0];v.pending&&!f||(v.pending=!0,v.tryCount++,this.flags=v.flags,this.emit.apply(this,v.args))}packet(f){f.nsp=this.nsp,this.io._packet(f)}onopen(){typeof this.auth=="function"?this.auth(f=>{this._sendConnectPacket(f)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(f){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},f):f})}onerror(f){this.connected||this.emitReserved("connect_error",f)}onclose(f,v){this.connected=!1,delete this.id,this.emitReserved("disconnect",f,v),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(f=>{if(!this.sendBuffer.some(m=>String(m.id)===f)){const m=this.acks[f];delete this.acks[f],m.withError&&m.call(this,new Error("socket has been disconnected"))}})}onpacket(f){if(f.nsp===this.nsp)switch(f.type){case Ce.CONNECT:f.data&&f.data.sid?this.onconnect(f.data.sid,f.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(f);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(f);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const m=new Error(f.data.message);m.data=f.data.data,this.emitReserved("connect_error",m);break}}onevent(f){const v=f.data||[];f.id!=null&&v.push(this.ack(f.id)),this.connected?this.emitEvent(v):this.receiveBuffer.push(Object.freeze(v))}emitEvent(f){if(this._anyListeners&&this._anyListeners.length){const v=this._anyListeners.slice();for(const m of v)m.apply(this,f)}super.emit.apply(this,f),this._pid&&f.length&&typeof f[f.length-1]=="string"&&(this._lastOffset=f[f.length-1])}ack(f){const v=this;let m=!1;return function(...M){m||(m=!0,v.packet({type:Ce.ACK,id:f,data:M}))}}onack(f){const v=this.acks[f.id];typeof v=="function"&&(delete this.acks[f.id],v.withError&&f.data.unshift(null),v.apply(this,f.data))}onconnect(f,v){this.id=f,this.recovered=v&&this._pid===v,this._pid=v,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(f=>this.emitEvent(f)),this.receiveBuffer=[],this.sendBuffer.forEach(f=>{this.notifyOutgoingListeners(f),this.packet(f)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(f=>f()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(f){return this.flags.compress=f,this}get volatile(){return this.flags.volatile=!0,this}timeout(f){return this.flags.timeout=f,this}onAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(f),this}prependAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(f),this}offAny(f){if(!this._anyListeners)return this;if(f){const v=this._anyListeners;for(let m=0;m<v.length;m++)if(f===v[m])return v.splice(m,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(f),this}prependAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(f),this}offAnyOutgoing(f){if(!this._anyOutgoingListeners)return this;if(f){const v=this._anyOutgoingListeners;for(let m=0;m<v.length;m++)if(f===v[m])return v.splice(m,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(f){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const v=this._anyOutgoingListeners.slice();for(const m of v)m.apply(this,f.data)}}}function or(p){p=p||{},this.ms=p.min||100,this.max=p.max||1e4,this.factor=p.factor||2,this.jitter=p.jitter>0&&p.jitter<=1?p.jitter:0,this.attempts=0}or.prototype.duration=function(){var p=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var f=Math.random(),v=Math.floor(f*this.jitter*p);p=(Math.floor(f*10)&1)==0?p-v:p+v}return Math.min(p,this.max)|0};or.prototype.reset=function(){this.attempts=0};or.prototype.setMin=function(p){this.ms=p};or.prototype.setMax=function(p){this.max=p};or.prototype.setJitter=function(p){this.jitter=p};class pc extends $e{constructor(f,v){var m;super(),this.nsps={},this.subs=[],f&&typeof f=="object"&&(v=f,f=void 0),v=v||{},v.path=v.path||"/socket.io",this.opts=v,Oa(this,v),this.reconnection(v.reconnection!==!1),this.reconnectionAttempts(v.reconnectionAttempts||1/0),this.reconnectionDelay(v.reconnectionDelay||1e3),this.reconnectionDelayMax(v.reconnectionDelayMax||5e3),this.randomizationFactor((m=v.randomizationFactor)!==null&&m!==void 0?m:.5),this.backoff=new or({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(v.timeout==null?2e4:v.timeout),this._readyState="closed",this.uri=f;const M=v.parser||fg;this.encoder=new M.Encoder,this.decoder=new M.Decoder,this._autoConnect=v.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(f){return arguments.length?(this._reconnection=!!f,f||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(f){return f===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=f,this)}reconnectionDelay(f){var v;return f===void 0?this._reconnectionDelay:(this._reconnectionDelay=f,(v=this.backoff)===null||v===void 0||v.setMin(f),this)}randomizationFactor(f){var v;return f===void 0?this._randomizationFactor:(this._randomizationFactor=f,(v=this.backoff)===null||v===void 0||v.setJitter(f),this)}reconnectionDelayMax(f){var v;return f===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=f,(v=this.backoff)===null||v===void 0||v.setMax(f),this)}timeout(f){return arguments.length?(this._timeout=f,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(f){if(~this._readyState.indexOf("open"))return this;this.engine=new Qm(this.uri,this.opts);const v=this.engine,m=this;this._readyState="opening",this.skipReconnect=!1;const M=Kt(v,"open",function(){m.onopen(),f&&f()}),K=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),f?f(u):this.maybeReconnectOnOpen()},z=Kt(v,"error",K);if(this._timeout!==!1){const u=this._timeout,d=this.setTimeoutFn(()=>{M(),K(new Error("timeout")),v.close()},u);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(M),this.subs.push(z),this}connect(f){return this.open(f)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const f=this.engine;this.subs.push(Kt(f,"ping",this.onping.bind(this)),Kt(f,"data",this.ondata.bind(this)),Kt(f,"error",this.onerror.bind(this)),Kt(f,"close",this.onclose.bind(this)),Kt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(f){try{this.decoder.add(f)}catch(v){this.onclose("parse error",v)}}ondecoded(f){La(()=>{this.emitReserved("packet",f)},this.setTimeoutFn)}onerror(f){this.emitReserved("error",f)}socket(f,v){let m=this.nsps[f];return m?this._autoConnect&&!m.active&&m.connect():(m=new f_(this,f,v),this.nsps[f]=m),m}_destroy(f){const v=Object.keys(this.nsps);for(const m of v)if(this.nsps[m].active)return;this._close()}_packet(f){const v=this.encoder.encode(f);for(let m=0;m<v.length;m++)this.engine.write(v[m],f.options)}cleanup(){this.subs.forEach(f=>f()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(f,v){var m;this.cleanup(),(m=this.engine)===null||m===void 0||m.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",f,v),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const f=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const v=this.backoff.duration();this._reconnecting=!0;const m=this.setTimeoutFn(()=>{f.skipReconnect||(this.emitReserved("reconnect_attempt",f.backoff.attempts),!f.skipReconnect&&f.open(M=>{M?(f._reconnecting=!1,f.reconnect(),this.emitReserved("reconnect_error",M)):f.onreconnect()}))},v);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}}onreconnect(){const f=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",f)}}const rn={};function rr(p,f){typeof p=="object"&&(f=p,p=void 0),f=f||{};const v=Zm(p,f.path||"/socket.io"),m=v.source,M=v.id,K=v.path,z=rn[M]&&K in rn[M].nsps,u=f.forceNew||f["force new connection"]||f.multiplex===!1||z;let d;return u?d=new pc(m,f):(rn[M]||(rn[M]=new pc(m,f)),d=rn[M]),v.query&&!f.query&&(f.query=v.queryKey),d.socket(v.path,f)}Object.assign(rr,{Manager:pc,Socket:f_,io:rr,connect:rr});function _g(p){const f=ve.useRef(null),v=Be.use.writeOnConsole(),m=Be.use.clearConsole(),M=Be.use.setWorkSpaceRunningAs(),K=Be.use.setActiveTerminal(),z=Be.use.setActiveWorkspaceOptionModal(),u=Be.use.setShowNewTerminalWindow(),d=Be.use.stopProcess(),_=Be.use.loadingWorkspace(),[S,h]=ve.useState(!1);ve.useEffect(()=>{_==p.info.name?h(!0):h(!1)},[_]),ve.useEffect(()=>()=>{f.current&&(f.current.disconnect(),v(p.info.name,"Terminal Disconnected"))},[]);const y=A=>{if(!S)try{h(!0),setTimeout(()=>h(!1),2e3);const E=Pt.apiPort||3e3;!f.current||!f.current.connected?(f.current=rr(`http://localhost:${E}`,{transports:["websocket"]}),f.current.on("connect",()=>{M(p.info.name,A),K(p.info.name),f.current?.emit("run",{workspace:p.info,runas:A}),f.current?.on("log",a=>{v(p.info.name,a)}),f.current?.on("error",a=>{v(p.info.name,a)}),f.current?.on("exit",a=>{v(p.info.name,a)}),f.current?.on("disconnect",()=>{v(p.info.name,"Disconnected")})})):(M(p.info.name,A),K(p.info.name),f.current.emit("run",{workspace:p.info,runas:A}))}catch(E){console.error(E),h(!1)}};async function x(){if(!S)try{h(!0),v(p.info.name,".."),await d(p.info.name),M(p.info.name,null),h(!1),m(p.info.name)}catch(A){console.error(A),h(!1)}}return j.jsxs("div",{className:"bg-gray-800 border border-gray-700 overflow-hidden flex flex-col",children:[j.jsxs("header",{className:"p-2 flex-1 flex gap-4 items-center",children:[j.jsx("i",{className:`${p.info.fontawesomeIcon??"fa fa-cube"} text-blue-400 text-3xl`}),j.jsxs("div",{className:"flex flex-col h-10 overflow-hidden flex-1",children:[j.jsx("h3",{className:"text-base font-bold text-white leading-tight mb-0.5 ",children:p.info.name}),j.jsx("p",{className:"text-gray-400 text-[14px] truncate",children:p.info.description})]}),j.jsx("button",{onClick:()=>u(p.info),className:"text-gray-500 hover:text-white",children:j.jsx("i",{className:"fas fa-terminal text-sm"})})]}),j.jsxs("div",{className:"p-3 bg-gray-900/30 border-t border-gray-800 flex gap-2 relative",children:[j.jsx("button",{onClick:()=>z(p.info),className:"flex-none w-10 py-2 rounded-lg border border-gray-600 text-gray-300 hover:bg-gray-700 hover:text-white transition-colors text-sm font-medium flex items-center justify-center",title:"Options",children:j.jsx("i",{className:"fas fa-cog"})}),j.jsxs("div",{className:"flex-1 flex gap-2",children:[S&&j.jsxs("button",{className:"flex-1 py-1 px-2 rounded-lg bg-gray-600 text-white hover:bg-gray-500 transition-colors shadow-lg shadow-gray-600/20 text-sm font-medium flex items-center justify-center gap-2 animate-fade-in",children:[j.jsx("i",{className:"fas fa-spinner animate-spin text-lg"}),"Loading"]}),!S&&p.isRunningAs=="start"&&j.jsxs("button",{onClick:x,className:"flex-1 py-1 px-2 rounded-lg bg-orange-600 text-white hover:bg-orange-500 transition-colors shadow-lg shadow-orange-600/20 text-sm font-medium flex items-center justify-center gap-2 animate-fade-in",children:[j.jsx("i",{className:"fas fa-check-circle text-lg"}),"Server is up"]}),!S&&p.isRunningAs=="dev"&&j.jsxs("button",{onClick:()=>x(),className:"flex-1 py-1 px-2 rounded-lg bg-red-600 text-white hover:bg-red-500 transition-colors shadow-lg shadow-red-600/20 text-sm font-medium flex items-center justify-center gap-2 animate-fade-in",children:[j.jsx("i",{className:"fas fa-stop text-lg"}),"Stop Dev"]}),!S&&p.isRunningAs!="dev"&&p.isRunningAs!="start"&&p.info.startCommand&&j.jsxs("button",{onClick:()=>y("start"),className:"flex-1 py-1 px-2 rounded-lg bg-green-600 text-white hover:bg-green-500 transition-colors shadow-lg shadow-green-600/20 text-sm font-medium flex items-center justify-center gap-2 animate-fade-in",children:[j.jsx("i",{className:"fas fa-play text-lg"}),"Start"]}),!S&&p.isRunningAs!="dev"&&p.isRunningAs!="start"&&p.info.devCommand&&j.jsxs("button",{onClick:()=>y("dev"),className:"flex-1 py-1 px-2 rounded-lg bg-blue-600 text-white hover:bg-blue-500 transition-colors shadow-lg shadow-blue-600/20 text-sm font-medium flex items-center justify-center gap-2 animate-fade-in",children:[j.jsx("i",{className:"fas fa-play text-lg"}),"Start Dev"]})]})]})]})}function nr({label:p,icon:f,placeholder:v,value:m,onChange:M}){return j.jsxs("div",{className:"flex flex-col gap-2 w-full m-0 p-0",children:[j.jsx("label",{className:"text-xs tracking-wider",children:p}),j.jsxs("div",{className:"relative",children:[j.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:j.jsx("i",{className:`${f} text-blue-500/50 group-focus-within:text-green-500 transition-colors text-md`})}),j.jsx("input",{type:"text",className:"pl-10 text-sm w-full bg-gray-900/70 border border-gray-600 rounded p-2 text-gray-400 flex-1",placeholder:v,value:m,onChange:K=>{M(K)}})]})]})}function Ba({close:p,title:f,description:v,icon:m}){return j.jsxs("header",{className:"px-4 py-2 border-b border-gray-700 flex justify-between items-center bg-gray-800/50",children:[j.jsxs("div",{className:"text-md font-bold text-white flex items-center gap-4",children:[j.jsx("i",{className:m||"fas fa-cube text-blue-500 text-3xl"}),j.jsxs("div",{className:"flex flex-col",children:[j.jsx("span",{className:"text-xl",children:f}),j.jsx("span",{className:"text-gray-400 font-normal text-sm truncate w-full text-xs",children:v})]})]}),j.jsx("button",{onClick:p,className:"text-gray-400 hover:text-white transition-colors",children:j.jsx("i",{className:"fas fa-times text-lg"})})]})}function Ma({children:p}){return j.jsx("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-gray-900/70",children:j.jsx("div",{onClick:f=>f.stopPropagation(),className:"bg-gray-800 border border-gray-700 w-[80%] md:w-[60%] max-w-[650px] h-[80%] max-h-[650x] overflow-hidden flex flex-col",children:p})})}function vg(){const p=Be.use.activeWorkspaceOptionModal(),f=Be.use.setActiveWorkspaceOptionModal(),v=Be.use.updateWorkspace(),[m,M]=ve.useState(null),[K,z]=ve.useState("");ve.useEffect(()=>{p&&(M(p),z(p.name))},[p]);function u(){f(null),z(".")}function d(){m&&v(m)&&u()}return p?j.jsxs(Ma,{children:[j.jsx(Ba,{close:u,title:K,description:m?.path??""}),j.jsxs("div",{className:"p-3 flex-1 overflow-y-auto text-md",children:[j.jsx("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[{pkg:"name",label:"Package Name",icon:"fas fa-cube",placeholder:"Workspace Name"},{pkg:"fontawesomeIcon",label:"Icon",icon:"fas fa-icons",placeholder:"(optional) fontawesome icon"}].map(_=>j.jsx(nr,{label:_.label,icon:_.icon,placeholder:_.placeholder,value:m?.[_.pkg]||"",onChange:S=>{m&&M({...m,[_.pkg]:S.target.value})}},_.pkg))}),j.jsx(nr,{label:"Description",icon:"fas fa-info",placeholder:"(optional) Description",value:m?.description||"",onChange:_=>{m&&M({...m,description:_.target.value})}},"description"),j.jsx("h4",{className:"my-4 w-full font-semibold text-gray-500 uppercase tracking-wider flex items-center",children:j.jsxs("p",{className:"flex-1 text-sm",children:[j.jsx("i",{className:"fas fa-terminal mr-2"}),j.jsx("span",{children:"Scripts & Commands"})]})}),j.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{pkg:"devCommand",label:"Dev Command",icon:"fas fa-code",placeholder:"ex: nodemon index.js"},{pkg:"startCommand",label:"Start Command",icon:"fas fa-code",placeholder:"ex: node index.js"},{pkg:"stopCommand",label:"Stop Command",icon:"fas fa-code",placeholder:"ex: npx -y kill-port 3000"},{pkg:"buildCommand",label:"Build Command",icon:"fas fa-code",placeholder:"ex: tsc"},{pkg:"cleanCommand",label:"Clean Command",icon:"fas fa-code",placeholder:"ex: rm -rf dist"},{pkg:"lintCommand",label:"Lint Command",icon:"fas fa-code",placeholder:"ex: lint ."},{pkg:"testCommand",label:"Test Command",icon:"fas fa-code",placeholder:"ex: jest"}].map(_=>j.jsx(nr,{label:_.label,icon:_.icon,placeholder:_.placeholder,value:m?.[_.pkg]||"",onChange:S=>{m&&M({...m,[_.pkg]:S.target.value})}},_.pkg))})]}),j.jsxs("footer",{className:"p-2 border-t border-gray-600 flex justify-end gap-4",children:[j.jsx("button",{onClick:u,className:"w-32 bg-gray-700 hover:bg-gray-600 transition-colors p-1 rounded",children:"Cancel"}),j.jsx("button",{onClick:d,className:"w-40 bg-blue-500 hover:bg-blue-600 transition-colors p-1 rounded",children:"Save"})]})]}):null}function pg({label:p,icon:f,value:v,onChange:m,options:M,placeholder:K="Select an option"}){return j.jsxs("div",{className:"flex flex-col gap-2 w-full m-0 p-0",children:[j.jsx("label",{className:"text-xs tracking-wider text-gray-400",children:p}),j.jsxs("div",{className:"relative group",children:[j.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none z-10",children:j.jsx("i",{className:`${f} text-blue-500/50 group-focus-within:text-green-500 transition-colors text-md`})}),j.jsxs("select",{value:v,onChange:m,className:"appearance-none pl-10 pr-10 text-sm w-full bg-gray-900/70 border border-gray-600 rounded p-2 text-gray-400 flex-1 focus:outline-none focus:border-blue-500 transition-colors cursor-pointer",children:[j.jsx("option",{value:"",disabled:!0,children:K}),M.map((z,u)=>{const d=typeof z=="string"?z:z.label,_=typeof z=="string"?z:z.value||z.path||"";return j.jsx("option",{value:_,className:"bg-gray-800 text-gray-300",children:d},u)})]}),j.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:j.jsx("i",{className:"fas fa-chevron-down text-gray-500 text-xs"})})]})]})}const Yd={name:"",path:"",fontawesomeIcon:"",description:"",devCommand:"",startCommand:"",stopCommand:"",buildCommand:"",cleanCommand:"",lintCommand:"",testCommand:""};function mg(){const[p,f]=ve.useState(Yd),[v,m]=ve.useState([]),[M,K]=ve.useState(""),z=Be.use.showWorkspaceNew(),u=Be.use.workspace(),d=Be.use.createNewWorkspace(),_=Be.use.setShowWorkspaceNew(),S=Be.use.setShowNewTerminalWindow(),h=Be.use.loadWorkspace();ve.useEffect(()=>{z&&(f(Yd),(async()=>{const a=await(await fetch(`http://localhost:${Pt.apiPort}/${ei.listWorkspacesDir}`)).json();m(a)})())},[z]);function y(){K(""),_(!1)}async function x(){if(p.name===""||p.path===""){K("Package name and path is required");return}if(u.find(a=>a.info.name===p.name)){K("Package name already exist");return}const E={name:p.name,path:p.path+"/"+p.name,devCommand:p.devCommand,fontawesomeIcon:p.fontawesomeIcon||void 0,description:p.description||void 0,startCommand:p.startCommand||void 0,stopCommand:p.stopCommand||void 0,buildCommand:p.buildCommand||void 0,cleanCommand:p.cleanCommand||void 0,lintCommand:p.lintCommand||void 0,testCommand:p.testCommand||void 0};try{await d(E)&&(h(),S(E),y())}catch{K("Failed to create workspace")}}return z?j.jsxs(Ma,{children:[j.jsx(Ba,{close:y,title:"New Workspace",description:"Create a new workspace"}),j.jsxs("div",{className:"p-3 flex-1 overflow-y-auto text-md",children:[M&&j.jsx("p",{className:"text-red-500",children:M}),j.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[j.jsx(nr,{label:"Package Name",icon:"fa fa-cube",placeholder:"Package and Folder Name",value:p?.name||"",onChange:A=>{p&&f({...p,name:A.target.value})}}),j.jsx(pg,{label:"Path",icon:"fas fa-folder",placeholder:"Select a path",value:p?.path||"",onChange:A=>{p&&f({...p,path:A.target.value})},options:v})]}),j.jsx("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[{pkg:"fontawesomeIcon",label:"Icon",icon:"fas fa-icons",placeholder:"(optional) fontawesome icon"},{pkg:"description",label:"Description",icon:"fas fa-info",placeholder:"(optional) description"}].map(A=>j.jsx(nr,{label:A.label,icon:A.icon,placeholder:A.placeholder,value:p?.[A.pkg]||"",onChange:E=>{p&&f({...p,[A.pkg]:E.target.value})}},A.pkg))}),j.jsx("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[{pkg:"devCommand",label:"Dev Command",icon:"fas fa-code",placeholder:"ex: nodemon index.js"},{pkg:"startCommand",label:"Start Command",icon:"fas fa-code",placeholder:"ex: node index.js"},{pkg:"stopCommand",label:"Stop Command",icon:"fas fa-code",placeholder:"ex: npx -y kill-port 3000"},{pkg:"buildCommand",label:"Build Command",icon:"fas fa-code",placeholder:"ex: tsc"},{pkg:"cleanCommand",label:"Clean Command",icon:"fas fa-code",placeholder:"ex: rm -rf dist"},{pkg:"lintCommand",label:"Lint Command",icon:"fas fa-code",placeholder:"ex: lint ."},{pkg:"testCommand",label:"Test Command",icon:"fas fa-code",placeholder:"ex: jest"}].map(A=>j.jsx(nr,{label:A.label,icon:A.icon,placeholder:A.placeholder,value:p?.[A.pkg]||"",onChange:E=>{p&&f({...p,[A.pkg]:E.target.value})}},A.pkg))})]}),j.jsxs("footer",{className:"p-2 border-t border-gray-600 flex justify-end gap-4",children:[j.jsx("button",{onClick:y,className:"w-32 bg-gray-700 hover:bg-gray-600 transition-colors p-1 rounded",children:"Cancel"}),j.jsx("button",{onClick:x,className:"w-40 bg-blue-500 hover:bg-blue-600 transition-colors p-1 rounded",children:"New Workspace"})]})]}):null}const gg=[{label:"Vite React TS Tailwind",cmd:"npm create vite@latest . -- --template react-ts && npm install -D tailwindcss postcss autoprefixer && npx tailwindcss init -p",icon:"fab fa-react text-blue-400"},{label:"Nodemon Express TS",cmd:"npm init -y && npm install express && npm install -D typescript ts-node nodemon @types/node @types/express && npx tsc --init",icon:"fab fa-node-js text-green-500"},{label:"Next.js TS",cmd:'npx create-next-app@latest . --typescript --tailwind --eslint --no-src-dir --import-alias "@/*" --use-npm',icon:"fas fa-n text-white"}];function Sg(){const p=Be.use.showNewTerminalWindow(),f=Be.use.setShowNewTerminalWindow(),[v,m]=ve.useState(!1),[M,K]=ve.useState(!1),z=ve.useRef(null),u=ve.useRef(null);ve.useEffect(()=>{if(p){const y=Pt.apiPort;return u.current=rr(`http://localhost:${y}`,{transports:["websocket"]}),u.current.on("connect",()=>{const x=`\x1B[34m[PATH]\x1B[0m \x1B[32m${p?.path}\x1B[0m`;z.current?.write(`${x}\r
|
|
87
|
+
\x1B[34m[SYSTEM]\x1B[0m Please enter your command prompt.\r
|
|
88
|
+
\x1B[34m[SYSTEM]\x1B[0m Example: npm install nodemon -D\r
|
|
89
|
+
$ `)}),u.current.on("terminal:log",x=>{z.current?.write(x)}),u.current.on("terminal:error",x=>{z.current?.write(`\x1B[31m${x}\x1B[0m`)}),u.current.on("terminal:exit",x=>{m(!1),x===0?z.current?.write(`\r
|
|
90
|
+
\x1B[32mCommand finished successfully.\x1B[0m\r
|
|
91
|
+
$ `):z.current?.write(`\r
|
|
92
|
+
\x1B[31mCommand failed with exit code ${x}.\x1B[0m\r
|
|
93
|
+
$ `)}),()=>{u.current&&u.current.disconnect()}}},[p]);const d=()=>{u.current&&u.current.disconnect(),f(null)},_=ve.useRef(""),S=y=>{if(v)u.current?.emit("terminal:input",y);else if(y==="\r"){const x=_.current;z.current?.write(`\r
|
|
94
|
+
`),x.trim()?(m(!0),u.current?.emit("terminal:start",{path:p?.path||"",command:x.trim()})):z.current?.write("$ "),_.current=""}else y===""?_.current.length>0&&(_.current=_.current.slice(0,-1),z.current?.write("\b \b")):y>=" "&&y<="~"&&(_.current+=y,z.current?.write(y))},h=y=>{v||(z.current?.write(`\r
|
|
95
|
+
\x1B[36m[TEMPLATE]\x1B[0m Executing template...\r
|
|
96
|
+
`),m(!0),u.current?.emit("terminal:start",{path:p?.path||"",command:y}),z.current?.focus())};return p?j.jsxs(Ma,{children:[j.jsx(Ba,{close:d,title:p.name||"",description:p.description||"",icon:"fas fa-terminal text-blue-500 text-xl"}),j.jsxs("div",{className:"relative p-2 bg-gray-800 border-b border-gray-700 flex items-center",children:[j.jsxs("button",{onClick:()=>K(!M),disabled:v,className:`flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-md transition-all
|
|
97
|
+
${v?"bg-gray-700 text-gray-500 cursor-not-allowed opacity-50":"bg-gray-800 hover:bg-gray-700 text-white"}`,children:[j.jsx("span",{children:"Project Templates"}),j.jsx("i",{className:`fas fa-chevron-down transition-transform ${M?"rotate-180":""}`})]}),M&&j.jsxs(j.Fragment,{children:[j.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>K(!1)}),j.jsxs("div",{className:"absolute top-10 left-2 z-20 w-64 bg-gray-800 border border-gray-700 rounded-lg shadow-2xl overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:[j.jsx("div",{className:"p-2 border-b border-gray-700 bg-gray-800/50",children:j.jsx("span",{className:"text-[10px] text-gray-400 uppercase tracking-widest font-bold px-2",children:"Select Template"})}),gg.map((y,x)=>j.jsxs("button",{onClick:()=>{h(y.cmd),K(!1)},className:"w-full text-left px-4 py-3 text-xs text-gray-300 hover:bg-gray-700 hover:text-white flex items-center gap-3 transition-colors border-b border-gray-700 last:border-0",children:[j.jsx("div",{className:"w-6 text-center",children:j.jsx("i",{className:`${y.icon} text-sm`})}),j.jsx("span",{children:y.label})]},x))]})]})]}),j.jsx("div",{className:"flex-1 overflow-hidden p-3 bg-gray-900",children:j.jsx(Jd,{terminalRef:z,onData:S})})]}):null}const yg=ar()((p,f)=>({showTerminal:!1,setShowTerminal:v=>p({showTerminal:v}),rootDir:"",loadRootDir:async()=>{if(f().rootDir.length>0)return;const v=Pt.apiPort,M=await(await fetch(`http://localhost:${v}/${ei.getRootPath}`)).json();p({rootDir:M.path})}})),an=lr(yg);function bg(p){const f=Be.use.workspace(),v=Be.use.loadWorkspace(),m=Be.use.setShowWorkspaceNew(),M=an.use.setShowTerminal(),[K,z]=ve.useState(!0);ve.useEffect(()=>{window.isWorkSpaceLoaded||(window.isWorkSpaceLoaded=!0,v())},[]);async function u(){try{let d=[];f.filter(x=>x.isRunningAs!=null).length>0&&(d=f.filter(x=>x.isRunningAs==null).map(x=>x.info.path)),(await(await fetch(`http://localhost:${Pt.apiPort}/${ei.hideShowFileFolder}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hide:K,pathInclude:d})})).json()).isHidden?z(!1):z(!0)}catch(d){console.error("Error toggling files visibility:",d)}}return j.jsxs("div",{className:`relative flex flex-col w-full h-[calc(100vh-68px)] ${p.isVisible?"":"hidden"}`,children:[j.jsxs("div",{className:"grid grid-rows-5 h-full min-h-0 gap-2",children:[j.jsx("div",{className:"row-span-3 min-h-0 overflow-y-auto flex flex-col gap-3 p-4",children:j.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-4",children:f.map(d=>j.jsx("div",{children:j.jsx(_g,{...d})},d.info.name))})}),j.jsx("div",{className:"row-span-2",children:j.jsx(vm,{})})]}),j.jsxs("button",{onClick:()=>M(!0),className:"p-2 pt-3 fixed bottom-44 right-8 bg-blue-600 hover:bg-blue-500 text-white rounded-full shadow-lg shadow-blue-600/30 transition-all hover:scale-110 flex items-center gap-2 z-50 group",children:[j.jsx("i",{className:"w-8 h-8 fa-solid fa-terminal text-xl"}),j.jsx("span",{className:"font-medium pr-2 hidden group-hover:inline-block transition-all duration-300 whitespace-nowrap overflow-hidden",children:"Root Terminal"})]}),j.jsxs("button",{onClick:u,className:`p-2 pt-3 fixed bottom-26 right-8 ${K?"bg-blue-600 hover:bg-blue-500 ":"bg-green-600 hover:bg-green-500 "}text-white rounded-full shadow-lg shadow-blue-600/30 transition-all hover:scale-110 flex items-center gap-2 z-50 group `,children:[K?j.jsx("i",{className:"w-8 h-8 fa-solid fa-eye-slash text-xl"}):j.jsx("i",{className:"w-8 h-8 fa-solid fa-eye text-xl"}),j.jsx("span",{className:"font-medium pr-2 hidden group-hover:inline-block transition-all duration-300 whitespace-nowrap overflow-hidden",children:K?"Hide Files":"Show Files"})]}),j.jsxs("button",{onClick:()=>m(!0),className:"p-2 pt-3 fixed bottom-8 right-8 bg-blue-600 hover:bg-blue-500 text-white rounded-full shadow-lg shadow-blue-600/30 transition-all hover:scale-110 flex items-center gap-2 z-50 group",children:[j.jsx("i",{className:"w-8 h-8 fa-solid fa-plus text-xl"}),j.jsx("span",{className:"font-medium pr-2 hidden group-hover:inline-block transition-all duration-300 whitespace-nowrap overflow-hidden",children:"Add Workspace"})]}),j.jsx(vg,{}),j.jsx(mg,{}),j.jsx(Sg,{})]})}function Cg(){const p=Xt.use.modal(),f=Xt.use.title(),v=Xt.use.message(),m=Xt.use.callback(),M=Xt.use.hideModal(),K=Xt.use.banner();let z="fa fa-info-circle text-blue-500",u="bg-blue-600 hover:bg-blue-500 shadow-blue-500/20";return K==="warning"?(z="fa fa-exclamation-triangle text-yellow-500",u="bg-yellow-600 hover:bg-yellow-500 shadow-yellow-500/20"):K==="error"?(z="fa fa-times-circle text-red-500",u="bg-red-600 hover:bg-red-500 shadow-red-500/20"):K==="success"&&(z="fa fa-check-circle text-green-500",u="bg-green-600 hover:bg-green-500 shadow-green-500/20"),j.jsx("div",{children:p&&j.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[200] flex items-center justify-center p-4",children:j.jsxs("div",{className:"w-[500px] min-h-[200px] max-h-[300px] flex flex-col bg-gray-800 p-4 rounded-xl shadow-lg",children:[j.jsxs("div",{className:"flex-1 ",children:[j.jsxs("div",{className:"mb-2 flex gap-4",children:[j.jsx("i",{className:`${z} text-3xl`}),j.jsx("h2",{className:"text-xl font-bold mb-2 text-white",children:f})]}),j.jsx("p",{className:"text-gray-300",children:v})]}),p==="alert"&&j.jsx("button",{onClick:()=>{m&&m(void 0),M()},autoFocus:!0,className:`w-[80%] mx-auto py-2 rounded-xl text-white shadow-lg font-bold ${u}`,children:"OK"}),p==="confirm"&&j.jsxs("div",{className:"flex gap-4 justify-end",children:[j.jsx("button",{onClick:()=>{m&&m(!1),M()},className:"px-4 py-2 rounded-xl text-white bg-gray-600 hover:bg-gray-500 font-bold",children:"Cancel"}),j.jsx("button",{onClick:()=>{m&&m(!0),M()},className:`px-4 py-2 rounded-xl text-white shadow-lg font-bold ${u}`,children:"OK"})]})]})})})}const d_=ve.forwardRef((p,f)=>{const v=ve.useRef(null),m=ve.useRef(null),M=ve.useRef(null),K=ve.useRef(null),z=ve.useRef(null),u=()=>{M.current&&(M.current.disconnect(),M.current=null)},d=(S,h="bash")=>{u();const y=p.socketUrl||"http://localhost:3000",x=rr(y,{transports:["websocket"],forceNew:!0,reconnection:!1});M.current=x,x.on("connect",()=>{v.current?.clear(),h!="bash"&&v.current?.write(`\x1B[34m${S}\x1B[0m: ${h}\r
|
|
98
|
+
`),x.emit("terminal:start",{path:S,command:h}),v.current?.focus(),setTimeout(()=>{m.current?.fit()},100)}),x.on("terminal:log",A=>{v.current?.write(A)}),x.on("terminal:error",A=>{v.current?.write(`\x1B[31m${A}\x1B[0m`)}),x.on("terminal:exit",A=>{v.current?.write(`\r
|
|
99
|
+
\x1B[33mProcess exited with code ${A}\x1B[0m\r
|
|
100
|
+
`),z.current&&z.current(),p.onExit&&p.onExit()})};ve.useImperativeHandle(f,()=>({write:S=>{v.current?.write(S)},input:S=>{if(M.current&&M.current.connected){const h=S.endsWith("\r")?S:S+"\r";M.current.emit("terminal:input",h)}else K.current&&K.current(S+"\r")},onData:S=>{K.current=S},onClose:S=>{z.current=S},fit:()=>{m.current?.fit()},clear:()=>{v.current?.clear()},focus:()=>{v.current?.focus()},connect:(S,h="bash")=>{d(S,h)},disconnect:()=>{u()}})),ve.useEffect(()=>{p.startingText&&v.current&&v.current.write(p.startingText)},[p.startingText]),ve.useEffect(()=>()=>{u()},[]),ve.useEffect(()=>{const S=v.current;if(!S)return;const h=p.isInteractive??!0;S.options.disableStdin=!h,S.options.cursorBlink=h,S.options.cursorStyle=h?"block":"underline",h?S.options.theme={...S.options.theme,cursor:"#ffffff"}:S.options.theme={...S.options.theme,cursor:"transparent"}},[p.isInteractive]);const _=S=>{M.current&&M.current.connected&&M.current.emit("terminal:input",S),K.current&&K.current(S)};return j.jsx("div",{className:`h-full w-full ${p.className||""}`,children:j.jsx(wg,{ref:m,terminalRef:v,onData:_})})});d_.displayName="InteractiveTerminal";const wg=ve.forwardRef((p,f)=>{const v=ve.useRef(null),m=ve.useRef(null),M=ve.useRef(null),K=ve.useRef(p.onData);return ve.useImperativeHandle(f,()=>({fit:()=>{try{M.current?.fit()}catch{}}})),ve.useEffect(()=>{K.current=p.onData},[p.onData]),ve.useEffect(()=>{if(!v.current)return;const z=new Gd.Terminal({cursorBlink:!0,fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:15,theme:{background:"#111827",foreground:"#f3f4f6",cursor:"#ffffff",selectionBackground:"#374151"},convertEol:!0}),u=new Qd.FitAddon,d=new Zd.WebLinksAddon;z.loadAddon(u),z.loadAddon(d);const _=setTimeout(()=>{if(v.current){z.open(v.current);try{u.fit()}catch(h){console.warn("Fit failed on init:",h)}}},0);m.current=z,M.current=u,p.terminalRef&&(p.terminalRef.current=z),z.onData(h=>{K.current&&K.current(h)});const S=new ResizeObserver(()=>{try{u.fit()}catch{}});return S.observe(v.current),()=>{clearTimeout(_),S.disconnect(),z.dispose()}},[]),j.jsx("div",{className:"h-full w-full overflow-hidden bg-gray-900 p-1",ref:v})});function Eg(){const p=an.use.showTerminal(),f=an.use.rootDir(),v=an.use.setShowTerminal(),m=ve.useRef(null),M=()=>{m.current&&m.current.disconnect(),v(!1)};return ve.useEffect(()=>{if(p&&f&&m.current){const K=setTimeout(()=>{m.current?.connect(f),m.current?.focus()},50);return()=>clearTimeout(K)}},[p,f]),p?j.jsxs(Ma,{children:[j.jsx(Ba,{close:M,title:"Root Terminal",description:"Execute commands in the project root",icon:"fas fa-terminal text-blue-500 text-xl"}),j.jsx("div",{className:"flex-1 overflow-hidden p-2 bg-gray-900",children:j.jsx(d_,{ref:m,isInteractive:!0,className:"h-full"})})]}):null}function xg(){const p=uc.use.currentPage(),f=an.use.loadRootDir();return ve.useEffect(()=>{setTimeout(()=>{f()},10)},[]),j.jsxs("div",{className:"w-screen h-screen overflow-hidden",children:[j.jsx(Ip,{}),j.jsxs("div",{className:"flex flex-1 overflow-hidden ",children:[j.jsx(sm,{}),j.jsxs("main",{className:"flex-1 relative overflow-hidden bg-gray-900",children:[j.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[j.jsx("div",{className:"absolute top-0 left-1/4 w-[500px] h-[500px] bg-blue-500/5 rounded-full blur-3xl"}),j.jsx("div",{className:"absolute bottom-0 right-1/4 w-[500px] h-[500px] bg-purple-500/5 rounded-full blur-3xl"})]}),j.jsxs("div",{id:"app-content",className:"w-full h-full p-2",children:[j.jsx(hm,{isVisible:p==="home"}),j.jsx(bg,{isVisible:p==="workspace"})]})]})]}),j.jsx(Cg,{}),j.jsx(Eg,{})]})}qp.createRoot(document.getElementById("root")).render(j.jsx(ve.StrictMode,{children:j.jsx(xg,{})}));
|