@fengye404/termpilot 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -6
- package/app/dist/assets/index-CCXqowYd.css +1 -0
- package/app/dist/assets/{index-ChAARFV0.js → index-CyNBuXm-.js} +14 -14
- package/app/dist/index.html +2 -2
- package/app/dist/sw.js +1 -1
- package/dist/cli.js +244 -15
- package/package.json +1 -1
- package/app/dist/assets/index-L-E4Jdut.css +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
(function(){const ce=document.createElement("link").relList;if(ce&&ce.supports&&ce.supports("modulepreload"))return;for(const oe of document.querySelectorAll('link[rel="modulepreload"]'))G(oe);new MutationObserver(oe=>{for(const me of oe)if(me.type==="childList")for(const ee of me.addedNodes)ee.tagName==="LINK"&&ee.rel==="modulepreload"&&G(ee)}).observe(document,{childList:!0,subtree:!0});function ge(oe){const me={};return oe.integrity&&(me.integrity=oe.integrity),oe.referrerPolicy&&(me.referrerPolicy=oe.referrerPolicy),oe.crossOrigin==="use-credentials"?me.credentials="include":oe.crossOrigin==="anonymous"?me.credentials="omit":me.credentials="same-origin",me}function G(oe){if(oe.ep)return;oe.ep=!0;const me=ge(oe);fetch(oe.href,me)}})();function Ff(q){return q&&q.__esModule&&Object.prototype.hasOwnProperty.call(q,"default")?q.default:q}var Lo={exports:{}},sn={};var Of;function nv(){if(Of)return sn;Of=1;var q=Symbol.for("react.transitional.element"),ce=Symbol.for("react.fragment");function ge(G,oe,me){var ee=null;if(me!==void 0&&(ee=""+me),oe.key!==void 0&&(ee=""+oe.key),"key"in oe){me={};for(var u in oe)u!=="key"&&(me[u]=oe[u])}else me=oe;return oe=me.ref,{$$typeof:q,type:G,key:ee,ref:oe!==void 0?oe:null,props:me}}return sn.Fragment=ce,sn.jsx=ge,sn.jsxs=ge,sn}var Bf;function lv(){return Bf||(Bf=1,Lo.exports=nv()),Lo.exports}var le=lv(),Oo={exports:{}},be={};var kf;function av(){if(kf)return be;kf=1;var q=Symbol.for("react.transitional.element"),ce=Symbol.for("react.portal"),ge=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),me=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),p=Symbol.iterator;function C(w){return w===null||typeof w!="object"?null:(w=p&&w[p]||w["@@iterator"],typeof w=="function"?w:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,l={};function c(w,N,Q){this.props=w,this.context=N,this.refs=l,this.updater=Q||A}c.prototype.isReactComponent={},c.prototype.setState=function(w,N){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,N,"setState")},c.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function a(){}a.prototype=c.prototype;function o(w,N,Q){this.props=w,this.context=N,this.refs=l,this.updater=Q||A}var _=o.prototype=new a;_.constructor=o,S(_,c.prototype),_.isPureReactComponent=!0;var m=Array.isArray;function b(){}var D={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function E(w,N,Q){var se=Q.ref;return{$$typeof:q,type:w,key:N,ref:se!==void 0?se:null,props:Q}}function L(w,N){return E(w.type,N,w.props)}function z(w){return typeof w=="object"&&w!==null&&w.$$typeof===q}function O(w){var N={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(Q){return N[Q]})}var U=/\/+/g;function V(w,N){return typeof w=="object"&&w!==null&&w.key!=null?O(""+w.key):N.toString(36)}function J(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(b,b):(w.status="pending",w.then(function(N){w.status==="pending"&&(w.status="fulfilled",w.value=N)},function(N){w.status==="pending"&&(w.status="rejected",w.reason=N)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function k(w,N,Q,se,ne){var fe=typeof w;(fe==="undefined"||fe==="boolean")&&(w=null);var T=!1;if(w===null)T=!0;else switch(fe){case"bigint":case"string":case"number":T=!0;break;case"object":switch(w.$$typeof){case q:case ce:T=!0;break;case y:return T=w._init,k(T(w._payload),N,Q,se,ne)}}if(T)return ne=ne(w),T=se===""?"."+V(w,0):se,m(ne)?(Q="",T!=null&&(Q=T.replace(U,"$&/")+"/"),k(ne,N,Q,"",function(te){return te})):ne!=null&&(z(ne)&&(ne=L(ne,Q+(ne.key==null||w&&w.key===ne.key?"":(""+ne.key).replace(U,"$&/")+"/")+T)),N.push(ne)),1;T=0;var K=se===""?".":se+":";if(m(w))for(var Z=0;Z<w.length;Z++)se=w[Z],fe=K+V(se,Z),T+=k(se,N,Q,fe,ne);else if(Z=C(w),typeof Z=="function")for(w=Z.call(w),Z=0;!(se=w.next()).done;)se=se.value,fe=K+V(se,Z++),T+=k(se,N,Q,fe,ne);else if(fe==="object"){if(typeof w.then=="function")return k(J(w),N,Q,se,ne);throw N=String(w),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return T}function I(w,N,Q){if(w==null)return w;var se=[],ne=0;return k(w,se,"","",function(fe){return N.call(Q,fe,ne++)}),se}function x(w){if(w._status===-1){var N=w._result;N=N(),N.then(function(Q){(w._status===0||w._status===-1)&&(w._status=1,w._result=Q)},function(Q){(w._status===0||w._status===-1)&&(w._status=2,w._result=Q)}),w._status===-1&&(w._status=0,w._result=N)}if(w._status===1)return w._result.default;throw w._result}var M=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},B={map:I,forEach:function(w,N,Q){I(w,function(){N.apply(this,arguments)},Q)},count:function(w){var N=0;return I(w,function(){N++}),N},toArray:function(w){return I(w,function(N){return N})||[]},only:function(w){if(!z(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return be.Activity=h,be.Children=B,be.Component=c,be.Fragment=ge,be.Profiler=oe,be.PureComponent=o,be.StrictMode=G,be.Suspense=f,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,be.__COMPILER_RUNTIME={__proto__:null,c:function(w){return D.H.useMemoCache(w)}},be.cache=function(w){return function(){return w.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(w,N,Q){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var se=S({},w.props),ne=w.key;if(N!=null)for(fe in N.key!==void 0&&(ne=""+N.key),N)!v.call(N,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&N.ref===void 0||(se[fe]=N[fe]);var fe=arguments.length-2;if(fe===1)se.children=Q;else if(1<fe){for(var T=Array(fe),K=0;K<fe;K++)T[K]=arguments[K+2];se.children=T}return E(w.type,ne,se)},be.createContext=function(w){return w={$$typeof:ee,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:me,_context:w},w},be.createElement=function(w,N,Q){var se,ne={},fe=null;if(N!=null)for(se in N.key!==void 0&&(fe=""+N.key),N)v.call(N,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(ne[se]=N[se]);var T=arguments.length-2;if(T===1)ne.children=Q;else if(1<T){for(var K=Array(T),Z=0;Z<T;Z++)K[Z]=arguments[Z+2];ne.children=K}if(w&&w.defaultProps)for(se in T=w.defaultProps,T)ne[se]===void 0&&(ne[se]=T[se]);return E(w,fe,ne)},be.createRef=function(){return{current:null}},be.forwardRef=function(w){return{$$typeof:u,render:w}},be.isValidElement=z,be.lazy=function(w){return{$$typeof:y,_payload:{_status:-1,_result:w},_init:x}},be.memo=function(w,N){return{$$typeof:d,type:w,compare:N===void 0?null:N}},be.startTransition=function(w){var N=D.T,Q={};D.T=Q;try{var se=w(),ne=D.S;ne!==null&&ne(Q,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(b,M)}catch(fe){M(fe)}finally{N!==null&&Q.types!==null&&(N.types=Q.types),D.T=N}},be.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},be.use=function(w){return D.H.use(w)},be.useActionState=function(w,N,Q){return D.H.useActionState(w,N,Q)},be.useCallback=function(w,N){return D.H.useCallback(w,N)},be.useContext=function(w){return D.H.useContext(w)},be.useDebugValue=function(){},be.useDeferredValue=function(w,N){return D.H.useDeferredValue(w,N)},be.useEffect=function(w,N){return D.H.useEffect(w,N)},be.useEffectEvent=function(w){return D.H.useEffectEvent(w)},be.useId=function(){return D.H.useId()},be.useImperativeHandle=function(w,N,Q){return D.H.useImperativeHandle(w,N,Q)},be.useInsertionEffect=function(w,N){return D.H.useInsertionEffect(w,N)},be.useLayoutEffect=function(w,N){return D.H.useLayoutEffect(w,N)},be.useMemo=function(w,N){return D.H.useMemo(w,N)},be.useOptimistic=function(w,N){return D.H.useOptimistic(w,N)},be.useReducer=function(w,N,Q){return D.H.useReducer(w,N,Q)},be.useRef=function(w){return D.H.useRef(w)},be.useState=function(w){return D.H.useState(w)},be.useSyncExternalStore=function(w,N,Q){return D.H.useSyncExternalStore(w,N,Q)},be.useTransition=function(){return D.H.useTransition()},be.version="19.2.4",be}var Hf;function jo(){return Hf||(Hf=1,Oo.exports=av()),Oo.exports}var pe=jo();const ov=Ff(pe);var Bo={exports:{}},rn={},ko={exports:{}},Ho={};var zf;function cv(){return zf||(zf=1,(function(q){function ce(k,I){var x=k.length;k.push(I);e:for(;0<x;){var M=x-1>>>1,B=k[M];if(0<oe(B,I))k[M]=I,k[x]=B,x=M;else break e}}function ge(k){return k.length===0?null:k[0]}function G(k){if(k.length===0)return null;var I=k[0],x=k.pop();if(x!==I){k[0]=x;e:for(var M=0,B=k.length,w=B>>>1;M<w;){var N=2*(M+1)-1,Q=k[N],se=N+1,ne=k[se];if(0>oe(Q,x))se<B&&0>oe(ne,Q)?(k[M]=ne,k[se]=x,M=se):(k[M]=Q,k[N]=x,M=N);else if(se<B&&0>oe(ne,x))k[M]=ne,k[se]=x,M=se;else break e}}return I}function oe(k,I){var x=k.sortIndex-I.sortIndex;return x!==0?x:k.id-I.id}if(q.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var me=performance;q.unstable_now=function(){return me.now()}}else{var ee=Date,u=ee.now();q.unstable_now=function(){return ee.now()-u}}var f=[],d=[],y=1,h=null,p=3,C=!1,A=!1,S=!1,l=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,o=typeof setImmediate<"u"?setImmediate:null;function _(k){for(var I=ge(d);I!==null;){if(I.callback===null)G(d);else if(I.startTime<=k)G(d),I.sortIndex=I.expirationTime,ce(f,I);else break;I=ge(d)}}function m(k){if(S=!1,_(k),!A)if(ge(f)!==null)A=!0,b||(b=!0,O());else{var I=ge(d);I!==null&&J(m,I.startTime-k)}}var b=!1,D=-1,v=5,E=-1;function L(){return l?!0:!(q.unstable_now()-E<v)}function z(){if(l=!1,b){var k=q.unstable_now();E=k;var I=!0;try{e:{A=!1,S&&(S=!1,a(D),D=-1),C=!0;var x=p;try{t:{for(_(k),h=ge(f);h!==null&&!(h.expirationTime>k&&L());){var M=h.callback;if(typeof M=="function"){h.callback=null,p=h.priorityLevel;var B=M(h.expirationTime<=k);if(k=q.unstable_now(),typeof B=="function"){h.callback=B,_(k),I=!0;break t}h===ge(f)&&G(f),_(k)}else G(f);h=ge(f)}if(h!==null)I=!0;else{var w=ge(d);w!==null&&J(m,w.startTime-k),I=!1}}break e}finally{h=null,p=x,C=!1}I=void 0}}finally{I?O():b=!1}}}var O;if(typeof o=="function")O=function(){o(z)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,V=U.port2;U.port1.onmessage=z,O=function(){V.postMessage(null)}}else O=function(){c(z,0)};function J(k,I){D=c(function(){k(q.unstable_now())},I)}q.unstable_IdlePriority=5,q.unstable_ImmediatePriority=1,q.unstable_LowPriority=4,q.unstable_NormalPriority=3,q.unstable_Profiling=null,q.unstable_UserBlockingPriority=2,q.unstable_cancelCallback=function(k){k.callback=null},q.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<k?Math.floor(1e3/k):5},q.unstable_getCurrentPriorityLevel=function(){return p},q.unstable_next=function(k){switch(p){case 1:case 2:case 3:var I=3;break;default:I=p}var x=p;p=I;try{return k()}finally{p=x}},q.unstable_requestPaint=function(){l=!0},q.unstable_runWithPriority=function(k,I){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var x=p;p=k;try{return I()}finally{p=x}},q.unstable_scheduleCallback=function(k,I,x){var M=q.unstable_now();switch(typeof x=="object"&&x!==null?(x=x.delay,x=typeof x=="number"&&0<x?M+x:M):x=M,k){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=x+B,k={id:y++,callback:I,priorityLevel:k,startTime:x,expirationTime:B,sortIndex:-1},x>M?(k.sortIndex=x,ce(d,k),ge(f)===null&&k===ge(d)&&(S?(a(D),D=-1):S=!0,J(m,x-M))):(k.sortIndex=B,ce(f,k),A||C||(A=!0,b||(b=!0,O()))),k},q.unstable_shouldYield=L,q.unstable_wrapCallback=function(k){var I=p;return function(){var x=p;p=I;try{return k.apply(this,arguments)}finally{p=x}}}})(Ho)),Ho}var Uf;function uv(){return Uf||(Uf=1,ko.exports=cv()),ko.exports}var zo={exports:{}},yt={};var Nf;function hv(){if(Nf)return yt;Nf=1;var q=jo();function ce(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)d+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ge(){}var G={d:{f:ge,r:function(){throw Error(ce(522))},D:ge,C:ge,L:ge,m:ge,X:ge,S:ge,M:ge},p:0,findDOMNode:null},oe=Symbol.for("react.portal");function me(f,d,y){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:oe,key:h==null?null:""+h,children:f,containerInfo:d,implementation:y}}var ee=q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,yt.createPortal=function(f,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(ce(299));return me(f,d,null,y)},yt.flushSync=function(f){var d=ee.T,y=G.p;try{if(ee.T=null,G.p=2,f)return f()}finally{ee.T=d,G.p=y,G.d.f()}},yt.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,G.d.C(f,d))},yt.prefetchDNS=function(f){typeof f=="string"&&G.d.D(f)},yt.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var y=d.as,h=u(y,d.crossOrigin),p=typeof d.integrity=="string"?d.integrity:void 0,C=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;y==="style"?G.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:p,fetchPriority:C}):y==="script"&&G.d.X(f,{crossOrigin:h,integrity:p,fetchPriority:C,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},yt.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var y=u(d.as,d.crossOrigin);G.d.M(f,{crossOrigin:y,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&G.d.M(f)},yt.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var y=d.as,h=u(y,d.crossOrigin);G.d.L(f,y,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},yt.preloadModule=function(f,d){if(typeof f=="string")if(d){var y=u(d.as,d.crossOrigin);G.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:y,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else G.d.m(f)},yt.requestFormReset=function(f){G.d.r(f)},yt.unstable_batchedUpdates=function(f,d){return f(d)},yt.useFormState=function(f,d,y){return ee.H.useFormState(f,d,y)},yt.useFormStatus=function(){return ee.H.useHostTransitionStatus()},yt.version="19.2.4",yt}var jf;function fv(){if(jf)return zo.exports;jf=1;function q(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q)}catch(ce){console.error(ce)}}return q(),zo.exports=hv(),zo.exports}var qf;function dv(){if(qf)return rn;qf=1;var q=uv(),ce=jo(),ge=fv();function G(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 oe(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function me(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 ee(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 f(e){if(me(e)!==e)throw Error(G(188))}function d(e){var t=e.alternate;if(!t){if(t=me(e),t===null)throw Error(G(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 f(r),e;if(n===s)return f(r),t;n=n.sibling}throw Error(G(188))}if(i.return!==s.return)i=r,s=n;else{for(var g=!1,R=r.child;R;){if(R===i){g=!0,i=r,s=n;break}if(R===s){g=!0,s=r,i=n;break}R=R.sibling}if(!g){for(R=n.child;R;){if(R===i){g=!0,i=n,s=r;break}if(R===s){g=!0,s=n,i=r;break}R=R.sibling}if(!g)throw Error(G(189))}}if(i.alternate!==s)throw Error(G(190))}if(i.tag!==3)throw Error(G(188));return i.stateNode.current===i?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function O(e){return e===null||typeof e!="object"?null:(e=z&&e[z]||e["@@iterator"],typeof e=="function"?e:null)}var U=Symbol.for("react.client.reference");function V(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===U?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case c:return"Profiler";case l:return"StrictMode";case m:return"Suspense";case b:return"SuspenseList";case E:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case o:return e.displayName||"Context";case a:return(e._context.displayName||"Context")+".Consumer";case _: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:V(e.type)||"Memo";case v:t=e._payload,e=e._init;try{return V(e(t))}catch{}}return null}var J=Array.isArray,k=ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=ge.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,x={pending:!1,data:null,method:null,action:null},M=[],B=-1;function w(e){return{current:e}}function N(e){0>B||(e.current=M[B],M[B]=null,B--)}function Q(e,t){B++,M[B]=e.current,e.current=t}var se=w(null),ne=w(null),fe=w(null),T=w(null);function K(e,t){switch(Q(fe,t),Q(ne,e),Q(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}N(se),Q(se,e)}function Z(){N(se),N(ne),N(fe)}function te(e){e.memoizedState!==null&&Q(T,e);var t=se.current,i=tf(t,e.type);t!==i&&(Q(ne,e),Q(se,i))}function ye(e){ne.current===e&&(N(se),N(ne)),T.current===e&&(N(T),Jr._currentValue=x)}var ae,Re;function He(e){if(ae===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);ae=t&&t[1]||"",Re=-1<i.stack.indexOf(`
|
|
1
|
+
(function(){const ue=document.createElement("link").relList;if(ue&&ue.supports&&ue.supports("modulepreload"))return;for(const oe of document.querySelectorAll('link[rel="modulepreload"]'))G(oe);new MutationObserver(oe=>{for(const ge of oe)if(ge.type==="childList")for(const ee of ge.addedNodes)ee.tagName==="LINK"&&ee.rel==="modulepreload"&&G(ee)}).observe(document,{childList:!0,subtree:!0});function pe(oe){const ge={};return oe.integrity&&(ge.integrity=oe.integrity),oe.referrerPolicy&&(ge.referrerPolicy=oe.referrerPolicy),oe.crossOrigin==="use-credentials"?ge.credentials="include":oe.crossOrigin==="anonymous"?ge.credentials="omit":ge.credentials="same-origin",ge}function G(oe){if(oe.ep)return;oe.ep=!0;const ge=pe(oe);fetch(oe.href,ge)}})();function Wf(q){return q&&q.__esModule&&Object.prototype.hasOwnProperty.call(q,"default")?q.default:q}var Oo={exports:{}},tn={};var Of;function cv(){if(Of)return tn;Of=1;var q=Symbol.for("react.transitional.element"),ue=Symbol.for("react.fragment");function pe(G,oe,ge){var ee=null;if(ge!==void 0&&(ee=""+ge),oe.key!==void 0&&(ee=""+oe.key),"key"in oe){ge={};for(var u in oe)u!=="key"&&(ge[u]=oe[u])}else ge=oe;return oe=ge.ref,{$$typeof:q,type:G,key:ee,ref:oe!==void 0?oe:null,props:ge}}return tn.Fragment=ue,tn.jsx=pe,tn.jsxs=pe,tn}var Bf;function uv(){return Bf||(Bf=1,Oo.exports=cv()),Oo.exports}var se=uv(),Bo={exports:{}},be={};var kf;function hv(){if(kf)return be;kf=1;var q=Symbol.for("react.transitional.element"),ue=Symbol.for("react.portal"),pe=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),ge=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),p=Symbol.iterator;function C(w){return w===null||typeof w!="object"?null:(w=p&&w[p]||w["@@iterator"],typeof w=="function"?w:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,l={};function c(w,N,Q){this.props=w,this.context=N,this.refs=l,this.updater=Q||x}c.prototype.isReactComponent={},c.prototype.setState=function(w,N){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,N,"setState")},c.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function a(){}a.prototype=c.prototype;function o(w,N,Q){this.props=w,this.context=N,this.refs=l,this.updater=Q||x}var _=o.prototype=new a;_.constructor=o,S(_,c.prototype),_.isPureReactComponent=!0;var m=Array.isArray;function b(){}var D={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function E(w,N,Q){var ie=Q.ref;return{$$typeof:q,type:w,key:N,ref:ie!==void 0?ie:null,props:Q}}function L(w,N){return E(w.type,N,w.props)}function z(w){return typeof w=="object"&&w!==null&&w.$$typeof===q}function O(w){var N={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(Q){return N[Q]})}var U=/\/+/g;function V(w,N){return typeof w=="object"&&w!==null&&w.key!=null?O(""+w.key):N.toString(36)}function J(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(b,b):(w.status="pending",w.then(function(N){w.status==="pending"&&(w.status="fulfilled",w.value=N)},function(N){w.status==="pending"&&(w.status="rejected",w.reason=N)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function k(w,N,Q,ie,le){var he=typeof w;(he==="undefined"||he==="boolean")&&(w=null);var T=!1;if(w===null)T=!0;else switch(he){case"bigint":case"string":case"number":T=!0;break;case"object":switch(w.$$typeof){case q:case ue:T=!0;break;case y:return T=w._init,k(T(w._payload),N,Q,ie,le)}}if(T)return le=le(w),T=ie===""?"."+V(w,0):ie,m(le)?(Q="",T!=null&&(Q=T.replace(U,"$&/")+"/"),k(le,N,Q,"",function(te){return te})):le!=null&&(z(le)&&(le=L(le,Q+(le.key==null||w&&w.key===le.key?"":(""+le.key).replace(U,"$&/")+"/")+T)),N.push(le)),1;T=0;var Y=ie===""?".":ie+":";if(m(w))for(var Z=0;Z<w.length;Z++)ie=w[Z],he=Y+V(ie,Z),T+=k(ie,N,Q,he,le);else if(Z=C(w),typeof Z=="function")for(w=Z.call(w),Z=0;!(ie=w.next()).done;)ie=ie.value,he=Y+V(ie,Z++),T+=k(ie,N,Q,he,le);else if(he==="object"){if(typeof w.then=="function")return k(J(w),N,Q,ie,le);throw N=String(w),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return T}function I(w,N,Q){if(w==null)return w;var ie=[],le=0;return k(w,ie,"","",function(he){return N.call(Q,he,le++)}),ie}function A(w){if(w._status===-1){var N=w._result;N=N(),N.then(function(Q){(w._status===0||w._status===-1)&&(w._status=1,w._result=Q)},function(Q){(w._status===0||w._status===-1)&&(w._status=2,w._result=Q)}),w._status===-1&&(w._status=0,w._result=N)}if(w._status===1)return w._result.default;throw w._result}var M=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},B={map:I,forEach:function(w,N,Q){I(w,function(){N.apply(this,arguments)},Q)},count:function(w){var N=0;return I(w,function(){N++}),N},toArray:function(w){return I(w,function(N){return N})||[]},only:function(w){if(!z(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return be.Activity=h,be.Children=B,be.Component=c,be.Fragment=pe,be.Profiler=oe,be.PureComponent=o,be.StrictMode=G,be.Suspense=d,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,be.__COMPILER_RUNTIME={__proto__:null,c:function(w){return D.H.useMemoCache(w)}},be.cache=function(w){return function(){return w.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(w,N,Q){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var ie=S({},w.props),le=w.key;if(N!=null)for(he in N.key!==void 0&&(le=""+N.key),N)!v.call(N,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&N.ref===void 0||(ie[he]=N[he]);var he=arguments.length-2;if(he===1)ie.children=Q;else if(1<he){for(var T=Array(he),Y=0;Y<he;Y++)T[Y]=arguments[Y+2];ie.children=T}return E(w.type,le,ie)},be.createContext=function(w){return w={$$typeof:ee,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:ge,_context:w},w},be.createElement=function(w,N,Q){var ie,le={},he=null;if(N!=null)for(ie in N.key!==void 0&&(he=""+N.key),N)v.call(N,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(le[ie]=N[ie]);var T=arguments.length-2;if(T===1)le.children=Q;else if(1<T){for(var Y=Array(T),Z=0;Z<T;Z++)Y[Z]=arguments[Z+2];le.children=Y}if(w&&w.defaultProps)for(ie in T=w.defaultProps,T)le[ie]===void 0&&(le[ie]=T[ie]);return E(w,he,le)},be.createRef=function(){return{current:null}},be.forwardRef=function(w){return{$$typeof:u,render:w}},be.isValidElement=z,be.lazy=function(w){return{$$typeof:y,_payload:{_status:-1,_result:w},_init:A}},be.memo=function(w,N){return{$$typeof:f,type:w,compare:N===void 0?null:N}},be.startTransition=function(w){var N=D.T,Q={};D.T=Q;try{var ie=w(),le=D.S;le!==null&&le(Q,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(b,M)}catch(he){M(he)}finally{N!==null&&Q.types!==null&&(N.types=Q.types),D.T=N}},be.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},be.use=function(w){return D.H.use(w)},be.useActionState=function(w,N,Q){return D.H.useActionState(w,N,Q)},be.useCallback=function(w,N){return D.H.useCallback(w,N)},be.useContext=function(w){return D.H.useContext(w)},be.useDebugValue=function(){},be.useDeferredValue=function(w,N){return D.H.useDeferredValue(w,N)},be.useEffect=function(w,N){return D.H.useEffect(w,N)},be.useEffectEvent=function(w){return D.H.useEffectEvent(w)},be.useId=function(){return D.H.useId()},be.useImperativeHandle=function(w,N,Q){return D.H.useImperativeHandle(w,N,Q)},be.useInsertionEffect=function(w,N){return D.H.useInsertionEffect(w,N)},be.useLayoutEffect=function(w,N){return D.H.useLayoutEffect(w,N)},be.useMemo=function(w,N){return D.H.useMemo(w,N)},be.useOptimistic=function(w,N){return D.H.useOptimistic(w,N)},be.useReducer=function(w,N,Q){return D.H.useReducer(w,N,Q)},be.useRef=function(w){return D.H.useRef(w)},be.useState=function(w){return D.H.useState(w)},be.useSyncExternalStore=function(w,N,Q){return D.H.useSyncExternalStore(w,N,Q)},be.useTransition=function(){return D.H.useTransition()},be.version="19.2.4",be}var Hf;function qo(){return Hf||(Hf=1,Bo.exports=hv()),Bo.exports}var me=qo();const fv=Wf(me);var ko={exports:{}},sn={},Ho={exports:{}},zo={};var zf;function dv(){return zf||(zf=1,(function(q){function ue(k,I){var A=k.length;k.push(I);e:for(;0<A;){var M=A-1>>>1,B=k[M];if(0<oe(B,I))k[M]=I,k[A]=B,A=M;else break e}}function pe(k){return k.length===0?null:k[0]}function G(k){if(k.length===0)return null;var I=k[0],A=k.pop();if(A!==I){k[0]=A;e:for(var M=0,B=k.length,w=B>>>1;M<w;){var N=2*(M+1)-1,Q=k[N],ie=N+1,le=k[ie];if(0>oe(Q,A))ie<B&&0>oe(le,Q)?(k[M]=le,k[ie]=A,M=ie):(k[M]=Q,k[N]=A,M=N);else if(ie<B&&0>oe(le,A))k[M]=le,k[ie]=A,M=ie;else break e}}return I}function oe(k,I){var A=k.sortIndex-I.sortIndex;return A!==0?A:k.id-I.id}if(q.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ge=performance;q.unstable_now=function(){return ge.now()}}else{var ee=Date,u=ee.now();q.unstable_now=function(){return ee.now()-u}}var d=[],f=[],y=1,h=null,p=3,C=!1,x=!1,S=!1,l=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,o=typeof setImmediate<"u"?setImmediate:null;function _(k){for(var I=pe(f);I!==null;){if(I.callback===null)G(f);else if(I.startTime<=k)G(f),I.sortIndex=I.expirationTime,ue(d,I);else break;I=pe(f)}}function m(k){if(S=!1,_(k),!x)if(pe(d)!==null)x=!0,b||(b=!0,O());else{var I=pe(f);I!==null&&J(m,I.startTime-k)}}var b=!1,D=-1,v=5,E=-1;function L(){return l?!0:!(q.unstable_now()-E<v)}function z(){if(l=!1,b){var k=q.unstable_now();E=k;var I=!0;try{e:{x=!1,S&&(S=!1,a(D),D=-1),C=!0;var A=p;try{t:{for(_(k),h=pe(d);h!==null&&!(h.expirationTime>k&&L());){var M=h.callback;if(typeof M=="function"){h.callback=null,p=h.priorityLevel;var B=M(h.expirationTime<=k);if(k=q.unstable_now(),typeof B=="function"){h.callback=B,_(k),I=!0;break t}h===pe(d)&&G(d),_(k)}else G(d);h=pe(d)}if(h!==null)I=!0;else{var w=pe(f);w!==null&&J(m,w.startTime-k),I=!1}}break e}finally{h=null,p=A,C=!1}I=void 0}}finally{I?O():b=!1}}}var O;if(typeof o=="function")O=function(){o(z)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,V=U.port2;U.port1.onmessage=z,O=function(){V.postMessage(null)}}else O=function(){c(z,0)};function J(k,I){D=c(function(){k(q.unstable_now())},I)}q.unstable_IdlePriority=5,q.unstable_ImmediatePriority=1,q.unstable_LowPriority=4,q.unstable_NormalPriority=3,q.unstable_Profiling=null,q.unstable_UserBlockingPriority=2,q.unstable_cancelCallback=function(k){k.callback=null},q.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<k?Math.floor(1e3/k):5},q.unstable_getCurrentPriorityLevel=function(){return p},q.unstable_next=function(k){switch(p){case 1:case 2:case 3:var I=3;break;default:I=p}var A=p;p=I;try{return k()}finally{p=A}},q.unstable_requestPaint=function(){l=!0},q.unstable_runWithPriority=function(k,I){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var A=p;p=k;try{return I()}finally{p=A}},q.unstable_scheduleCallback=function(k,I,A){var M=q.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?M+A:M):A=M,k){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=A+B,k={id:y++,callback:I,priorityLevel:k,startTime:A,expirationTime:B,sortIndex:-1},A>M?(k.sortIndex=A,ue(f,k),pe(d)===null&&k===pe(f)&&(S?(a(D),D=-1):S=!0,J(m,A-M))):(k.sortIndex=B,ue(d,k),x||C||(x=!0,b||(b=!0,O()))),k},q.unstable_shouldYield=L,q.unstable_wrapCallback=function(k){var I=p;return function(){var A=p;p=I;try{return k.apply(this,arguments)}finally{p=A}}}})(zo)),zo}var Uf;function _v(){return Uf||(Uf=1,Ho.exports=dv()),Ho.exports}var Uo={exports:{}},bt={};var Nf;function vv(){if(Nf)return bt;Nf=1;var q=qo();function ue(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)f+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function pe(){}var G={d:{f:pe,r:function(){throw Error(ue(522))},D:pe,C:pe,L:pe,m:pe,X:pe,S:pe,M:pe},p:0,findDOMNode:null},oe=Symbol.for("react.portal");function ge(d,f,y){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:oe,key:h==null?null:""+h,children:d,containerInfo:f,implementation:y}}var ee=q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,bt.createPortal=function(d,f){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(ue(299));return ge(d,f,null,y)},bt.flushSync=function(d){var f=ee.T,y=G.p;try{if(ee.T=null,G.p=2,d)return d()}finally{ee.T=f,G.p=y,G.d.f()}},bt.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,G.d.C(d,f))},bt.prefetchDNS=function(d){typeof d=="string"&&G.d.D(d)},bt.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var y=f.as,h=u(y,f.crossOrigin),p=typeof f.integrity=="string"?f.integrity:void 0,C=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;y==="style"?G.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:p,fetchPriority:C}):y==="script"&&G.d.X(d,{crossOrigin:h,integrity:p,fetchPriority:C,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},bt.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var y=u(f.as,f.crossOrigin);G.d.M(d,{crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&G.d.M(d)},bt.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var y=f.as,h=u(y,f.crossOrigin);G.d.L(d,y,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},bt.preloadModule=function(d,f){if(typeof d=="string")if(f){var y=u(f.as,f.crossOrigin);G.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else G.d.m(d)},bt.requestFormReset=function(d){G.d.r(d)},bt.unstable_batchedUpdates=function(d,f){return d(f)},bt.useFormState=function(d,f,y){return ee.H.useFormState(d,f,y)},bt.useFormStatus=function(){return ee.H.useHostTransitionStatus()},bt.version="19.2.4",bt}var jf;function gv(){if(jf)return Uo.exports;jf=1;function q(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q)}catch(ue){console.error(ue)}}return q(),Uo.exports=vv(),Uo.exports}var qf;function mv(){if(qf)return sn;qf=1;var q=_v(),ue=qo(),pe=gv();function G(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 oe(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ge(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 ee(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(ge(e)!==e)throw Error(G(188))}function f(e){var t=e.alternate;if(!t){if(t=ge(e),t===null)throw Error(G(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(G(188))}if(i.return!==s.return)i=r,s=n;else{for(var g=!1,R=r.child;R;){if(R===i){g=!0,i=r,s=n;break}if(R===s){g=!0,s=r,i=n;break}R=R.sibling}if(!g){for(R=n.child;R;){if(R===i){g=!0,i=n,s=r;break}if(R===s){g=!0,s=n,i=r;break}R=R.sibling}if(!g)throw Error(G(189))}}if(i.alternate!==s)throw Error(G(190))}if(i.tag!==3)throw Error(G(188));return i.stateNode.current===i?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function O(e){return e===null||typeof e!="object"?null:(e=z&&e[z]||e["@@iterator"],typeof e=="function"?e:null)}var U=Symbol.for("react.client.reference");function V(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===U?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case c:return"Profiler";case l:return"StrictMode";case m:return"Suspense";case b:return"SuspenseList";case E:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case o:return e.displayName||"Context";case a:return(e._context.displayName||"Context")+".Consumer";case _: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:V(e.type)||"Memo";case v:t=e._payload,e=e._init;try{return V(e(t))}catch{}}return null}var J=Array.isArray,k=ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A={pending:!1,data:null,method:null,action:null},M=[],B=-1;function w(e){return{current:e}}function N(e){0>B||(e.current=M[B],M[B]=null,B--)}function Q(e,t){B++,M[B]=e.current,e.current=t}var ie=w(null),le=w(null),he=w(null),T=w(null);function Y(e,t){switch(Q(he,t),Q(le,e),Q(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}N(ie),Q(ie,e)}function Z(){N(ie),N(le),N(he)}function te(e){e.memoizedState!==null&&Q(T,e);var t=ie.current,i=tf(t,e.type);t!==i&&(Q(le,e),Q(ie,i))}function ye(e){le.current===e&&(N(ie),N(le)),T.current===e&&(N(T),Zr._currentValue=A)}var ae,Ae;function ke(e){if(ae===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);ae=t&&t[1]||"",Ae=-1<i.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+ae+e+
|
|
3
|
+
`+ae+e+Ae}var Je=!1;function wt(e,t){if(!e||Je)return"";Je=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(W){var P=W}Reflect.construct(e,[],ne)}else{try{ne.call()}catch(W){P=W}e.call(ne.prototype)}}else{try{throw Error()}catch(W){P=W}(ne=e())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(W){if(W&&P&&typeof W.stack=="string")return[W.stack,P.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(),g=n[0],R=n[1];if(g&&R){var H=g.split(`
|
|
4
4
|
`),F=R.split(`
|
|
5
5
|
`);for(r=s=0;s<H.length&&!H[s].includes("DetermineComponentFrameRoot");)s++;for(;r<F.length&&!F[r].includes("DetermineComponentFrameRoot");)r++;if(s===H.length||r===F.length)for(s=H.length-1,r=F.length-1;1<=s&&0<=r&&H[s]!==F[r];)r--;for(;1<=s&&0<=r;s--,r--)if(H[s]!==F[r]){if(s!==1||r!==1)do if(s--,r--,0>r||H[s]!==F[r]){var $=`
|
|
6
|
-
`+H[s].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=s&&0<=r);break}}}finally{
|
|
6
|
+
`+H[s].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=s&&0<=r);break}}}finally{Je=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ke(i):""}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke("Lazy");case 13:return e.child!==t&&t!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return wt(e.type,!1);case 11:return wt(e.type.render,!1);case 1:return wt(e.type,!0);case 31:return ke("Activity");default:return""}}function It(e){try{var t="",i=null;do t+=Ce(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
7
|
Error generating stack: `+s.message+`
|
|
8
|
-
`+s.stack}}var ai=Object.prototype.hasOwnProperty,ii=q.unstable_scheduleCallback,oi=q.unstable_cancelCallback,Ri=q.unstable_shouldYield,We=q.unstable_requestPaint,Ne=q.unstable_now,ot=q.unstable_getCurrentPriorityLevel,Zt=q.unstable_ImmediatePriority,Mi=q.unstable_UserBlockingPriority,pt=q.unstable_NormalPriority,ut=q.unstable_LowPriority,it=q.unstable_IdlePriority,jt=q.log,ze=q.unstable_setDisableYieldValue,ci=null,St=null;function Jt(e){if(typeof jt=="function"&&ze(e),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(ci,e)}catch{}}var bt=Math.clz32?Math.clz32:fr,Sl=Math.log,yl=Math.LN2;function fr(e){return e>>>=0,e===0?32:31-(Sl(e)/yl|0)|0}var Es=256,ws=262144,Ds=4194304;function ui(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 As(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var R=s&134217727;return R!==0?(s=R&~n,s!==0?r=ui(s):(g&=R,g!==0?r=ui(g):i||(i=R&~e,i!==0&&(r=ui(i))))):(R=s&~n,R!==0?r=ui(R):g!==0?r=ui(g):i||(i=s&~e,i!==0&&(r=ui(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 is(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ue(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 _e(){var e=Ds;return Ds<<=1,(Ds&62914560)===0&&(Ds=4194304),e}function Me(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Ue(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ss(e,t,i,s,r,n){var g=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 R=e.entanglements,H=e.expirationTimes,F=e.hiddenUpdates;for(i=g&~i;0<i;){var $=31-bt(i),re=1<<$;R[$]=0,H[$]=-1;var P=F[$];if(P!==null)for(F[$]=null,$=0;$<P.length;$++){var W=P[$];W!==null&&(W.lane&=-536870913)}i&=~re}s!==0&&Fe(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(g&~t))}function Fe(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-bt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Ge(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-bt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function st(e,t){var i=t&-t;return i=(i&42)!==0?1:Ct(i),(i&(e.suspendedLanes|t))!==0?0:i}function Ct(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 rs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function nn(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Df(e.type))}function qo(e,t){var i=I.p;try{return I.p=e,t()}finally{I.p=i}}var Li=Math.random().toString(36).slice(2),dt="__reactFiber$"+Li,wt="__reactProps$"+Li,xs="__reactContainer$"+Li,bl="__reactEvents$"+Li,Pf="__reactListeners$"+Li,Qf="__reactHandles$"+Li,Io="__reactResources$"+Li,dr="__reactMarker$"+Li;function Cl(e){delete e[dt],delete e[wt],delete e[bl],delete e[Pf],delete e[Qf]}function Ts(e){var t=e[dt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[xs]||i[dt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=cf(e);e!==null;){if(i=e[dt])return i;e=cf(e)}return t}e=i,i=e.parentNode}return null}function Rs(e){if(e=e[dt]||e[xs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function _r(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(G(33))}function Ms(e){var t=e[Io];return t||(t=e[Io]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ht(e){e[dr]=!0}var Yo=new Set,Ko={};function ns(e,t){Ls(e,t),Ls(e+"Capture",t)}function Ls(e,t){for(Ko[e]=t,e=0;e<t.length;e++)Yo.add(t[e])}var Wf=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]*$"),Go={},Xo={};function Zf(e){return ai.call(Xo,e)?!0:ai.call(Go,e)?!1:Wf.test(e)?Xo[e]=!0:(Go[e]=!0,!1)}function ln(e,t,i){if(Zf(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 an(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 hi(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 qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Jf(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(g){i=""+g,n.call(this,g)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function El(e){if(!e._valueTracker){var t=Fo(e)?"checked":"value";e._valueTracker=Jf(e,t,""+e[t])}}function Vo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Fo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function on(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 $f=/[\n"\\]/g;function It(e){return e.replace($f,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function wl(e,t,i,s,r,n,g,R){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+qt(t)):e.value!==""+qt(t)&&(e.value=""+qt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Dl(e,g,qt(t)):i!=null?Dl(e,g,qt(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+qt(R):e.removeAttribute("name")}function Po(e,t,i,s,r,n,g,R){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)){El(e);return}i=i!=null?""+qt(i):"",t=t!=null?""+qt(t):i,R||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=R?e.checked:!!s,e.defaultChecked=!!s,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),El(e)}function Dl(e,t,i){t==="number"&&on(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Os(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=""+qt(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 Qo(e,t,i){if(t!=null&&(t=""+qt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+qt(i):""}function Wo(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(G(92));if(J(s)){if(1<s.length)throw Error(G(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=qt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),El(e)}function Bs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var ed=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 Zo(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||ed.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Jo(e,t,i){if(t!=null&&typeof t!="object")throw Error(G(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&&Zo(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&Zo(e,n,t[n])}function Al(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 td=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"]]),id=/^[\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 cn(e){return id.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function fi(){}var xl=null;function Tl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ks=null,Hs=null;function $o(e){var t=Rs(e);if(t&&(e=t.stateNode)){var i=e[wt]||null;e:switch(e=t.stateNode,t.type){case"input":if(wl(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+It(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[wt]||null;if(!r)throw Error(G(90));wl(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&&Vo(s)}break e;case"textarea":Qo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Os(e,!!i.multiple,t,!1)}}}var Rl=!1;function ec(e,t,i){if(Rl)return e(t,i);Rl=!0;try{var s=e(t);return s}finally{if(Rl=!1,(ks!==null||Hs!==null)&&(Wn(),ks&&(t=ks,e=Hs,Hs=ks=null,$o(t),e)))for(t=0;t<e.length;t++)$o(e[t])}}function vr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[wt]||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(G(231,t,typeof i));return i}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ml=!1;if(di)try{var gr={};Object.defineProperty(gr,"passive",{get:function(){Ml=!0}}),window.addEventListener("test",gr,gr),window.removeEventListener("test",gr,gr)}catch{Ml=!1}var Oi=null,Ll=null,un=null;function tc(){if(un)return un;var e,t=Ll,i=t.length,s,r="value"in Oi?Oi.value:Oi.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var g=i-e;for(s=1;s<=g&&t[i-s]===r[n-s];s++);return un=r.slice(e,1<s?1-s:void 0)}function hn(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 fn(){return!0}function ic(){return!1}function Dt(e){function t(i,s,r,n,g){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=g,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(i=e[R],this[R]=i?i(n):n[R]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?fn:ic,this.isPropagationStopped=ic,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=fn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=fn)},persist:function(){},isPersistent:fn}),t}var ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=Dt(ls),mr=h({},ls,{view:0,detail:0}),sd=Dt(mr),Ol,Bl,pr,_n=h({},mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hl,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!==pr&&(pr&&e.type==="mousemove"?(Ol=e.screenX-pr.screenX,Bl=e.screenY-pr.screenY):Bl=Ol=0,pr=e),Ol)},movementY:function(e){return"movementY"in e?e.movementY:Bl}}),sc=Dt(_n),rd=h({},_n,{dataTransfer:0}),nd=Dt(rd),ld=h({},mr,{relatedTarget:0}),kl=Dt(ld),ad=h({},ls,{animationName:0,elapsedTime:0,pseudoElement:0}),od=Dt(ad),cd=h({},ls,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ud=Dt(cd),hd=h({},ls,{data:0}),rc=Dt(hd),fd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dd={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"},_d={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_d[e])?!!t[e]:!1}function Hl(){return vd}var gd=h({},mr,{key:function(e){if(e.key){var t=fd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=hn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hl,charCode:function(e){return e.type==="keypress"?hn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),md=Dt(gd),pd=h({},_n,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nc=Dt(pd),Sd=h({},mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hl}),yd=Dt(Sd),bd=h({},ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cd=Dt(bd),Ed=h({},_n,{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}),wd=Dt(Ed),Dd=h({},ls,{newState:0,oldState:0}),Ad=Dt(Dd),xd=[9,13,27,32],zl=di&&"CompositionEvent"in window,Sr=null;di&&"documentMode"in document&&(Sr=document.documentMode);var Td=di&&"TextEvent"in window&&!Sr,lc=di&&(!zl||Sr&&8<Sr&&11>=Sr),ac=" ",oc=!1;function cc(e,t){switch(e){case"keyup":return xd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zs=!1;function Rd(e,t){switch(e){case"compositionend":return uc(t);case"keypress":return t.which!==32?null:(oc=!0,ac);case"textInput":return e=t.data,e===ac&&oc?null:e;default:return null}}function Md(e,t){if(zs)return e==="compositionend"||!zl&&cc(e,t)?(e=tc(),un=Ll=Oi=null,zs=!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 lc&&t.locale!=="ko"?null:t.data;default:return null}}var Ld={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 hc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ld[e.type]:t==="textarea"}function fc(e,t,i,s){ks?Hs?Hs.push(s):Hs=[s]:ks=s,t=sl(t,"onChange"),0<t.length&&(i=new dn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var yr=null,br=null;function Od(e){Ph(e,0)}function vn(e){var t=_r(e);if(Vo(t))return e}function dc(e,t){if(e==="change")return t}var _c=!1;if(di){var Ul;if(di){var Nl="oninput"in document;if(!Nl){var vc=document.createElement("div");vc.setAttribute("oninput","return;"),Nl=typeof vc.oninput=="function"}Ul=Nl}else Ul=!1;_c=Ul&&(!document.documentMode||9<document.documentMode)}function gc(){yr&&(yr.detachEvent("onpropertychange",mc),br=yr=null)}function mc(e){if(e.propertyName==="value"&&vn(br)){var t=[];fc(t,br,e,Tl(e)),ec(Od,t)}}function Bd(e,t,i){e==="focusin"?(gc(),yr=t,br=i,yr.attachEvent("onpropertychange",mc)):e==="focusout"&&gc()}function kd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vn(br)}function Hd(e,t){if(e==="click")return vn(t)}function zd(e,t){if(e==="input"||e==="change")return vn(t)}function Ud(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:Ud;function Cr(e,t){if(Ot(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(!ai.call(t,r)||!Ot(e[r],t[r]))return!1}return!0}function pc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sc(e,t){var i=pc(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=pc(i)}}function yc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=on(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=on(e.document)}return t}function jl(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 Nd=di&&"documentMode"in document&&11>=document.documentMode,Us=null,ql=null,Er=null,Il=!1;function Cc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Il||Us==null||Us!==on(s)||(s=Us,"selectionStart"in s&&jl(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}),Er&&Cr(Er,s)||(Er=s,s=sl(ql,"onSelect"),0<s.length&&(t=new dn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Us)))}function as(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ns={animationend:as("Animation","AnimationEnd"),animationiteration:as("Animation","AnimationIteration"),animationstart:as("Animation","AnimationStart"),transitionrun:as("Transition","TransitionRun"),transitionstart:as("Transition","TransitionStart"),transitioncancel:as("Transition","TransitionCancel"),transitionend:as("Transition","TransitionEnd")},Yl={},Ec={};di&&(Ec=document.createElement("div").style,"AnimationEvent"in window||(delete Ns.animationend.animation,delete Ns.animationiteration.animation,delete Ns.animationstart.animation),"TransitionEvent"in window||delete Ns.transitionend.transition);function os(e){if(Yl[e])return Yl[e];if(!Ns[e])return e;var t=Ns[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ec)return Yl[e]=t[i];return e}var wc=os("animationend"),Dc=os("animationiteration"),Ac=os("animationstart"),jd=os("transitionrun"),qd=os("transitionstart"),Id=os("transitioncancel"),xc=os("transitionend"),Tc=new Map,Kl="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(" ");Kl.push("scrollEnd");function $t(e,t){Tc.set(e,t),ns(t,[e])}var gn=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)},Yt=[],js=0,Gl=0;function mn(){for(var e=js,t=Gl=js=0;t<e;){var i=Yt[t];Yt[t++]=null;var s=Yt[t];Yt[t++]=null;var r=Yt[t];Yt[t++]=null;var n=Yt[t];if(Yt[t++]=null,s!==null&&r!==null){var g=s.pending;g===null?r.next=r:(r.next=g.next,g.next=r),s.pending=r}n!==0&&Rc(i,r,n)}}function pn(e,t,i,s){Yt[js++]=e,Yt[js++]=t,Yt[js++]=i,Yt[js++]=s,Gl|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Xl(e,t,i,s){return pn(e,t,i,s),Sn(e)}function cs(e,t){return pn(e,null,null,t),Sn(e)}function Rc(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-bt(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function Sn(e){if(50<Xr)throw Xr=0,eo=null,Error(G(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var qs={};function Yd(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,t,i,s){return new Yd(e,t,i,s)}function Fl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _i(e,t){var i=e.alternate;return i===null?(i=Bt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Mc(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 yn(e,t,i,s,r,n){var g=0;if(s=e,typeof e=="function")Fl(e)&&(g=1);else if(typeof e=="string")g=V_(e,i,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case E:return e=Bt(31,i,t,r),e.elementType=E,e.lanes=n,e;case S:return us(i.children,r,n,t);case l:g=8,r|=24;break;case c:return e=Bt(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case m:return e=Bt(13,i,t,r),e.elementType=m,e.lanes=n,e;case b:return e=Bt(19,i,t,r),e.elementType=b,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case o:g=10;break e;case a:g=9;break e;case _:g=11;break e;case D:g=14;break e;case v:g=16,s=null;break e}g=29,i=Error(G(130,e===null?"null":typeof e,"")),s=null}return t=Bt(g,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function us(e,t,i,s){return e=Bt(7,e,s,t),e.lanes=i,e}function Vl(e,t,i){return e=Bt(6,e,null,t),e.lanes=i,e}function Lc(e){var t=Bt(18,null,null,0);return t.stateNode=e,t}function Pl(e,t,i){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Oc=new WeakMap;function Kt(e,t){if(typeof e=="object"&&e!==null){var i=Oc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Wt(t)},Oc.set(e,t),t)}return{value:e,source:t,stack:Wt(t)}}var Is=[],Ys=0,bn=null,wr=0,Gt=[],Xt=0,Bi=null,si=1,ri="";function vi(e,t){Is[Ys++]=wr,Is[Ys++]=bn,bn=e,wr=t}function Bc(e,t,i){Gt[Xt++]=si,Gt[Xt++]=ri,Gt[Xt++]=Bi,Bi=e;var s=si;e=ri;var r=32-bt(s)-1;s&=~(1<<r),i+=1;var n=32-bt(t)+r;if(30<n){var g=r-r%5;n=(s&(1<<g)-1).toString(32),s>>=g,r-=g,si=1<<32-bt(t)+r|i<<r|s,ri=n+e}else si=1<<n|i<<r|s,ri=e}function Ql(e){e.return!==null&&(vi(e,1),Bc(e,1,0))}function Wl(e){for(;e===bn;)bn=Is[--Ys],Is[Ys]=null,wr=Is[--Ys],Is[Ys]=null;for(;e===Bi;)Bi=Gt[--Xt],Gt[Xt]=null,ri=Gt[--Xt],Gt[Xt]=null,si=Gt[--Xt],Gt[Xt]=null}function kc(e,t){Gt[Xt++]=si,Gt[Xt++]=ri,Gt[Xt++]=Bi,si=t.id,ri=t.overflow,Bi=e}var _t=null,Ve=null,Le=!1,ki=null,Ft=!1,Zl=Error(G(519));function Hi(e){var t=Error(G(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Dr(Kt(t,e)),Zl}function Hc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[dt]=e,t[wt]=s,i){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(i=0;i<Vr.length;i++)Ae(Vr[i],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Po(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Wo(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||Jh(t.textContent,i)?(s.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),s.onScroll!=null&&Ae("scroll",t),s.onScrollEnd!=null&&Ae("scrollend",t),s.onClick!=null&&(t.onclick=fi),t=!0):t=!1,t||Hi(e,!0)}function zc(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:Ft=!1;return;case 27:case 3:Ft=!0;return;default:_t=_t.return}}function Ks(e){if(e!==_t)return!1;if(!Le)return zc(e),Le=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||go(e.type,e.memoizedProps)),i=!i),i&&Ve&&Hi(e),zc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Ve=of(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Ve=of(e)}else t===27?(t=Ve,Qi(e.type)?(e=bo,bo=null,Ve=e):Ve=t):Ve=_t?Pt(e.stateNode.nextSibling):null;return!0}function hs(){Ve=_t=null,Le=!1}function Jl(){var e=ki;return e!==null&&(Rt===null?Rt=e:Rt.push.apply(Rt,e),ki=null),e}function Dr(e){ki===null?ki=[e]:ki.push(e)}var $l=w(null),fs=null,gi=null;function zi(e,t,i){Q($l,t._currentValue),t._currentValue=i}function mi(e){e._currentValue=$l.current,N($l)}function ea(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 ta(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var g=r.child;n=n.firstContext;e:for(;n!==null;){var R=n;n=r;for(var H=0;H<t.length;H++)if(R.context===t[H]){n.lanes|=i,R=n.alternate,R!==null&&(R.lanes|=i),ea(n.return,i,e),s||(g=null);break e}n=R.next}}else if(r.tag===18){if(g=r.return,g===null)throw Error(G(341));g.lanes|=i,n=g.alternate,n!==null&&(n.lanes|=i),ea(g,i,e),g=null}else g=r.child;if(g!==null)g.return=r;else for(g=r;g!==null;){if(g===e){g=null;break}if(r=g.sibling,r!==null){r.return=g.return,g=r;break}g=g.return}r=g}}function Gs(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 g=r.alternate;if(g===null)throw Error(G(387));if(g=g.memoizedProps,g!==null){var R=r.type;Ot(r.pendingProps.value,g.value)||(e!==null?e.push(R):e=[R])}}else if(r===T.current){if(g=r.alternate,g===null)throw Error(G(387));g.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Jr):e=[Jr])}r=r.return}e!==null&&ta(t,e,i,s),t.flags|=262144}function Cn(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ds(e){fs=e,gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return Uc(fs,e)}function En(e,t){return fs===null&&ds(e),Uc(e,t)}function Uc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},gi===null){if(e===null)throw Error(G(308));gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else gi=gi.next=t;return i}var Kd=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()})}},Gd=q.unstable_scheduleCallback,Xd=q.unstable_NormalPriority,rt={$$typeof:o,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ia(){return{controller:new Kd,data:new Map,refCount:0}}function Ar(e){e.refCount--,e.refCount===0&&Gd(Xd,function(){e.controller.abort()})}var xr=null,sa=0,Xs=0,Fs=null;function Fd(e,t){if(xr===null){var i=xr=[];sa=0,Xs=lo(),Fs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return sa++,t.then(Nc,Nc),t}function Nc(){if(--sa===0&&xr!==null){Fs!==null&&(Fs.status="fulfilled");var e=xr;xr=null,Xs=0,Fs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Vd(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 jc=k.S;k.S=function(e,t){Ch=Ne(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fd(e,t),jc!==null&&jc(e,t)};var _s=w(null);function ra(){var e=_s.current;return e!==null?e:Xe.pooledCache}function wn(e,t){t===null?Q(_s,_s.current):Q(_s,t.pool)}function qc(){var e=ra();return e===null?null:{parent:rt._currentValue,pool:e}}var Vs=Error(G(460)),na=Error(G(474)),Dn=Error(G(542)),An={then:function(){}};function Ic(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(fi,fi),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gc(e),e;default:if(typeof t.status=="string")t.then(fi,fi);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(G(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,Gc(e),e}throw gs=t,Vs}}function vs(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(gs=i,Vs):i}}var gs=null;function Kc(){if(gs===null)throw Error(G(459));var e=gs;return gs=null,e}function Gc(e){if(e===Vs||e===Dn)throw Error(G(483))}var Ps=null,Tr=0;function xn(e){var t=Tr;return Tr+=1,Ps===null&&(Ps=[]),Yc(Ps,e,t)}function Rr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Tn(e,t){throw t.$$typeof===p?Error(G(525)):(e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xc(e){function t(Y,j){if(e){var X=Y.deletions;X===null?(Y.deletions=[j],Y.flags|=16):X.push(j)}}function i(Y,j){if(!e)return null;for(;j!==null;)t(Y,j),j=j.sibling;return null}function s(Y){for(var j=new Map;Y!==null;)Y.key!==null?j.set(Y.key,Y):j.set(Y.index,Y),Y=Y.sibling;return j}function r(Y,j){return Y=_i(Y,j),Y.index=0,Y.sibling=null,Y}function n(Y,j,X){return Y.index=X,e?(X=Y.alternate,X!==null?(X=X.index,X<j?(Y.flags|=67108866,j):X):(Y.flags|=67108866,j)):(Y.flags|=1048576,j)}function g(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function R(Y,j,X,ie){return j===null||j.tag!==6?(j=Vl(X,Y.mode,ie),j.return=Y,j):(j=r(j,X),j.return=Y,j)}function H(Y,j,X,ie){var ve=X.type;return ve===S?$(Y,j,X.props.children,ie,X.key):j!==null&&(j.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===v&&vs(ve)===j.type)?(j=r(j,X.props),Rr(j,X),j.return=Y,j):(j=yn(X.type,X.key,X.props,null,Y.mode,ie),Rr(j,X),j.return=Y,j)}function F(Y,j,X,ie){return j===null||j.tag!==4||j.stateNode.containerInfo!==X.containerInfo||j.stateNode.implementation!==X.implementation?(j=Pl(X,Y.mode,ie),j.return=Y,j):(j=r(j,X.children||[]),j.return=Y,j)}function $(Y,j,X,ie,ve){return j===null||j.tag!==7?(j=us(X,Y.mode,ie,ve),j.return=Y,j):(j=r(j,X),j.return=Y,j)}function re(Y,j,X){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Vl(""+j,Y.mode,X),j.return=Y,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case C:return X=yn(j.type,j.key,j.props,null,Y.mode,X),Rr(X,j),X.return=Y,X;case A:return j=Pl(j,Y.mode,X),j.return=Y,j;case v:return j=vs(j),re(Y,j,X)}if(J(j)||O(j))return j=us(j,Y.mode,X,null),j.return=Y,j;if(typeof j.then=="function")return re(Y,xn(j),X);if(j.$$typeof===o)return re(Y,En(Y,j),X);Tn(Y,j)}return null}function P(Y,j,X,ie){var ve=j!==null?j.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return ve!==null?null:R(Y,j,""+X,ie);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case C:return X.key===ve?H(Y,j,X,ie):null;case A:return X.key===ve?F(Y,j,X,ie):null;case v:return X=vs(X),P(Y,j,X,ie)}if(J(X)||O(X))return ve!==null?null:$(Y,j,X,ie,null);if(typeof X.then=="function")return P(Y,j,xn(X),ie);if(X.$$typeof===o)return P(Y,j,En(Y,X),ie);Tn(Y,X)}return null}function W(Y,j,X,ie,ve){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Y=Y.get(X)||null,R(j,Y,""+ie,ve);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case C:return Y=Y.get(ie.key===null?X:ie.key)||null,H(j,Y,ie,ve);case A:return Y=Y.get(ie.key===null?X:ie.key)||null,F(j,Y,ie,ve);case v:return ie=vs(ie),W(Y,j,X,ie,ve)}if(J(ie)||O(ie))return Y=Y.get(X)||null,$(j,Y,ie,ve,null);if(typeof ie.then=="function")return W(Y,j,X,xn(ie),ve);if(ie.$$typeof===o)return W(Y,j,X,En(j,ie),ve);Tn(j,ie)}return null}function he(Y,j,X,ie){for(var ve=null,Oe=null,de=j,we=j=0,Te=null;de!==null&&we<X.length;we++){de.index>we?(Te=de,de=null):Te=de.sibling;var Be=P(Y,de,X[we],ie);if(Be===null){de===null&&(de=Te);break}e&&de&&Be.alternate===null&&t(Y,de),j=n(Be,j,we),Oe===null?ve=Be:Oe.sibling=Be,Oe=Be,de=Te}if(we===X.length)return i(Y,de),Le&&vi(Y,we),ve;if(de===null){for(;we<X.length;we++)de=re(Y,X[we],ie),de!==null&&(j=n(de,j,we),Oe===null?ve=de:Oe.sibling=de,Oe=de);return Le&&vi(Y,we),ve}for(de=s(de);we<X.length;we++)Te=W(de,Y,we,X[we],ie),Te!==null&&(e&&Te.alternate!==null&&de.delete(Te.key===null?we:Te.key),j=n(Te,j,we),Oe===null?ve=Te:Oe.sibling=Te,Oe=Te);return e&&de.forEach(function(es){return t(Y,es)}),Le&&vi(Y,we),ve}function Se(Y,j,X,ie){if(X==null)throw Error(G(151));for(var ve=null,Oe=null,de=j,we=j=0,Te=null,Be=X.next();de!==null&&!Be.done;we++,Be=X.next()){de.index>we?(Te=de,de=null):Te=de.sibling;var es=P(Y,de,Be.value,ie);if(es===null){de===null&&(de=Te);break}e&&de&&es.alternate===null&&t(Y,de),j=n(es,j,we),Oe===null?ve=es:Oe.sibling=es,Oe=es,de=Te}if(Be.done)return i(Y,de),Le&&vi(Y,we),ve;if(de===null){for(;!Be.done;we++,Be=X.next())Be=re(Y,Be.value,ie),Be!==null&&(j=n(Be,j,we),Oe===null?ve=Be:Oe.sibling=Be,Oe=Be);return Le&&vi(Y,we),ve}for(de=s(de);!Be.done;we++,Be=X.next())Be=W(de,Y,we,Be.value,ie),Be!==null&&(e&&Be.alternate!==null&&de.delete(Be.key===null?we:Be.key),j=n(Be,j,we),Oe===null?ve=Be:Oe.sibling=Be,Oe=Be);return e&&de.forEach(function(rv){return t(Y,rv)}),Le&&vi(Y,we),ve}function Ke(Y,j,X,ie){if(typeof X=="object"&&X!==null&&X.type===S&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case C:e:{for(var ve=X.key;j!==null;){if(j.key===ve){if(ve=X.type,ve===S){if(j.tag===7){i(Y,j.sibling),ie=r(j,X.props.children),ie.return=Y,Y=ie;break e}}else if(j.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===v&&vs(ve)===j.type){i(Y,j.sibling),ie=r(j,X.props),Rr(ie,X),ie.return=Y,Y=ie;break e}i(Y,j);break}else t(Y,j);j=j.sibling}X.type===S?(ie=us(X.props.children,Y.mode,ie,X.key),ie.return=Y,Y=ie):(ie=yn(X.type,X.key,X.props,null,Y.mode,ie),Rr(ie,X),ie.return=Y,Y=ie)}return g(Y);case A:e:{for(ve=X.key;j!==null;){if(j.key===ve)if(j.tag===4&&j.stateNode.containerInfo===X.containerInfo&&j.stateNode.implementation===X.implementation){i(Y,j.sibling),ie=r(j,X.children||[]),ie.return=Y,Y=ie;break e}else{i(Y,j);break}else t(Y,j);j=j.sibling}ie=Pl(X,Y.mode,ie),ie.return=Y,Y=ie}return g(Y);case v:return X=vs(X),Ke(Y,j,X,ie)}if(J(X))return he(Y,j,X,ie);if(O(X)){if(ve=O(X),typeof ve!="function")throw Error(G(150));return X=ve.call(X),Se(Y,j,X,ie)}if(typeof X.then=="function")return Ke(Y,j,xn(X),ie);if(X.$$typeof===o)return Ke(Y,j,En(Y,X),ie);Tn(Y,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,j!==null&&j.tag===6?(i(Y,j.sibling),ie=r(j,X),ie.return=Y,Y=ie):(i(Y,j),ie=Vl(X,Y.mode,ie),ie.return=Y,Y=ie),g(Y)):i(Y,j)}return function(Y,j,X,ie){try{Tr=0;var ve=Ke(Y,j,X,ie);return Ps=null,ve}catch(de){if(de===Vs||de===Dn)throw de;var Oe=Bt(29,de,null,Y.mode);return Oe.lanes=ie,Oe.return=Y,Oe}}}var ms=Xc(!0),Fc=Xc(!1),Ui=!1;function la(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function aa(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 Ni(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ji(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(ke&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Sn(e),Rc(e,null,i),t}return pn(e,s,t,i),Sn(e)}function Mr(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,Ge(e,i)}}function oa(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 g={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=g:n=n.next=g,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 ca=!1;function Lr(){if(ca){var e=Fs;if(e!==null)throw e}}function Or(e,t,i,s){ca=!1;var r=e.updateQueue;Ui=!1;var n=r.firstBaseUpdate,g=r.lastBaseUpdate,R=r.shared.pending;if(R!==null){r.shared.pending=null;var H=R,F=H.next;H.next=null,g===null?n=F:g.next=F,g=H;var $=e.alternate;$!==null&&($=$.updateQueue,R=$.lastBaseUpdate,R!==g&&(R===null?$.firstBaseUpdate=F:R.next=F,$.lastBaseUpdate=H))}if(n!==null){var re=r.baseState;g=0,$=F=H=null,R=n;do{var P=R.lane&-536870913,W=P!==R.lane;if(W?(xe&P)===P:(s&P)===P){P!==0&&P===Xs&&(ca=!0),$!==null&&($=$.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var he=e,Se=R;P=t;var Ke=i;switch(Se.tag){case 1:if(he=Se.payload,typeof he=="function"){re=he.call(Ke,re,P);break e}re=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=Se.payload,P=typeof he=="function"?he.call(Ke,re,P):he,P==null)break e;re=h({},re,P);break e;case 2:Ui=!0}}P=R.callback,P!==null&&(e.flags|=64,W&&(e.flags|=8192),W=r.callbacks,W===null?r.callbacks=[P]:W.push(P))}else W={lane:P,tag:R.tag,payload:R.payload,callback:R.callback,next:null},$===null?(F=$=W,H=re):$=$.next=W,g|=P;if(R=R.next,R===null){if(R=r.shared.pending,R===null)break;W=R,R=W.next,W.next=null,r.lastBaseUpdate=W,r.shared.pending=null}}while(!0);$===null&&(H=re),r.baseState=H,r.firstBaseUpdate=F,r.lastBaseUpdate=$,n===null&&(r.shared.lanes=0),Gi|=g,e.lanes=g,e.memoizedState=re}}function Vc(e,t){if(typeof e!="function")throw Error(G(191,e));e.call(t)}function Pc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Vc(i[e],t)}var Qs=w(null),Rn=w(0);function Qc(e,t){e=Ai,Q(Rn,e),Q(Qs,t),Ai=e|t.baseLanes}function ua(){Q(Rn,Ai),Q(Qs,Qs.current)}function ha(){Ai=Rn.current,N(Qs),N(Rn)}var kt=w(null),Vt=null;function qi(e){var t=e.alternate;Q(et,et.current&1),Q(kt,e),Vt===null&&(t===null||Qs.current!==null||t.memoizedState!==null)&&(Vt=e)}function fa(e){Q(et,et.current),Q(kt,e),Vt===null&&(Vt=e)}function Wc(e){e.tag===22?(Q(et,et.current),Q(kt,e),Vt===null&&(Vt=e)):Ii()}function Ii(){Q(et,et.current),Q(kt,kt.current)}function Ht(e){N(kt),Vt===e&&(Vt=null),N(et)}var et=w(0);function Mn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||So(i)||yo(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 pi=0,Ee=null,Ie=null,nt=null,Ln=!1,Ws=!1,ps=!1,On=0,Br=0,Zs=null,Pd=0;function Ze(){throw Error(G(321))}function da(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ot(e[i],t[i]))return!1;return!0}function _a(e,t,i,s,r,n){return pi=n,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Bu:Ra,ps=!1,n=i(s,r),ps=!1,Ws&&(n=Jc(t,i,s,r)),Zc(e),n}function Zc(e){k.H=zr;var t=Ie!==null&&Ie.next!==null;if(pi=0,nt=Ie=Ee=null,Ln=!1,Br=0,Zs=null,t)throw Error(G(300));e===null||lt||(e=e.dependencies,e!==null&&Cn(e)&&(lt=!0))}function Jc(e,t,i,s){Ee=e;var r=0;do{if(Ws&&(Zs=null),Br=0,Ws=!1,25<=r)throw Error(G(301));if(r+=1,nt=Ie=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}k.H=ku,n=t(i,s)}while(Ws);return n}function Qd(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?kr(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(Ee.flags|=1024),t}function va(){var e=On!==0;return On=0,e}function ga(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function ma(e){if(Ln){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ln=!1}pi=0,nt=Ie=Ee=null,Ws=!1,Br=On=0,Zs=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?Ee.memoizedState=nt=e:nt=nt.next=e,nt}function tt(){if(Ie===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=nt===null?Ee.memoizedState:nt.next;if(t!==null)nt=t,Ie=e;else{if(e===null)throw Ee.alternate===null?Error(G(467)):Error(G(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},nt===null?Ee.memoizedState=nt=e:nt=nt.next=e}return nt}function Bn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kr(e){var t=Br;return Br+=1,Zs===null&&(Zs=[]),e=Yc(Zs,e,t),t=Ee,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Bu:Ra),e}function kn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kr(e);if(e.$$typeof===o)return vt(e)}throw Error(G(438,String(e)))}function pa(e){var t=null,i=Ee.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ee.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=Bn(),Ee.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=L;return t.index++,i}function Si(e,t){return typeof t=="function"?t(e):t}function Hn(e){var t=tt();return Sa(t,Ie,e)}function Sa(e,t,i){var s=e.queue;if(s===null)throw Error(G(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var g=r.next;r.next=n.next,n.next=g}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var R=g=null,H=null,F=t,$=!1;do{var re=F.lane&-536870913;if(re!==F.lane?(xe&re)===re:(pi&re)===re){var P=F.revertLane;if(P===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),re===Xs&&($=!0);else if((pi&P)===P){F=F.next,P===Xs&&($=!0);continue}else re={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},H===null?(R=H=re,g=n):H=H.next=re,Ee.lanes|=P,Gi|=P;re=F.action,ps&&i(n,re),n=F.hasEagerState?F.eagerState:i(n,re)}else P={lane:re,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},H===null?(R=H=P,g=n):H=H.next=P,Ee.lanes|=re,Gi|=re;F=F.next}while(F!==null&&F!==t);if(H===null?g=n:H.next=R,!Ot(n,e.memoizedState)&&(lt=!0,$&&(i=Fs,i!==null)))throw i;e.memoizedState=n,e.baseState=g,e.baseQueue=H,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ya(e){var t=tt(),i=t.queue;if(i===null)throw Error(G(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var g=r=r.next;do n=e(n,g.action),g=g.next;while(g!==r);Ot(n,t.memoizedState)||(lt=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function $c(e,t,i){var s=Ee,r=tt(),n=Le;if(n){if(i===void 0)throw Error(G(407));i=i()}else i=t();var g=!Ot((Ie||r).memoizedState,i);if(g&&(r.memoizedState=i,lt=!0),r=r.queue,Ea(iu.bind(null,s,r,e),[e]),r.getSnapshot!==t||g||nt!==null&&nt.memoizedState.tag&1){if(s.flags|=2048,Js(9,{destroy:void 0},tu.bind(null,s,r,i,t),null),Xe===null)throw Error(G(349));n||(pi&127)!==0||eu(s,t,i)}return i}function eu(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ee.updateQueue,t===null?(t=Bn(),Ee.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function tu(e,t,i,s){t.value=i,t.getSnapshot=s,su(t)&&ru(e)}function iu(e,t,i){return i(function(){su(t)&&ru(e)})}function su(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ot(e,i)}catch{return!0}}function ru(e){var t=cs(e,2);t!==null&&Mt(t,e,2)}function ba(e){var t=Et();if(typeof e=="function"){var i=e;if(e=i(),ps){Jt(!0);try{i()}finally{Jt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:e},t}function nu(e,t,i,s){return e.baseState=i,Sa(e,Ie,typeof s=="function"?s:Si)}function Wd(e,t,i,s,r){if(Nn(e))throw Error(G(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(g){n.listeners.push(g)}};k.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,lu(t,n)):(n.next=i.next,t.pending=i.next=n)}}function lu(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=k.T,g={};k.T=g;try{var R=i(r,s),H=k.S;H!==null&&H(g,R),au(e,t,R)}catch(F){Ca(e,t,F)}finally{n!==null&&g.types!==null&&(n.types=g.types),k.T=n}}else try{n=i(r,s),au(e,t,n)}catch(F){Ca(e,t,F)}}function au(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){ou(e,t,s)},function(s){return Ca(e,t,s)}):ou(e,t,i)}function ou(e,t,i){t.status="fulfilled",t.value=i,cu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,lu(e,i)))}function Ca(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,cu(t),t=t.next;while(t!==s)}e.action=null}function cu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function uu(e,t){return t}function hu(e,t){if(Le){var i=Xe.formState;if(i!==null){e:{var s=Ee;if(Le){if(Ve){t:{for(var r=Ve,n=Ft;r.nodeType!==8;){if(!n){r=null;break t}if(r=Pt(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){Ve=Pt(r.nextSibling),s=r.data==="F!";break e}}Hi(s)}s=!1}s&&(t=i[0])}}return i=Et(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uu,lastRenderedState:t},i.queue=s,i=Mu.bind(null,Ee,s),s.dispatch=i,s=ba(!1),n=Ta.bind(null,Ee,!1,s.queue),s=Et(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=Wd.bind(null,Ee,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function fu(e){var t=tt();return du(t,Ie,e)}function du(e,t,i){if(t=Sa(e,t,uu)[0],e=Hn(Si)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=kr(t)}catch(g){throw g===Vs?Dn:g}else s=t;t=tt();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Ee.flags|=2048,Js(9,{destroy:void 0},Zd.bind(null,r,i),null)),[s,n,e]}function Zd(e,t){e.action=t}function _u(e){var t=tt(),i=Ie;if(i!==null)return du(t,i,e);tt(),t=t.memoizedState,i=tt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Js(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Bn(),Ee.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 vu(){return tt().memoizedState}function zn(e,t,i,s){var r=Et();Ee.flags|=e,r.memoizedState=Js(1|t,{destroy:void 0},i,s===void 0?null:s)}function Un(e,t,i,s){var r=tt();s=s===void 0?null:s;var n=r.memoizedState.inst;Ie!==null&&s!==null&&da(s,Ie.memoizedState.deps)?r.memoizedState=Js(t,n,i,s):(Ee.flags|=e,r.memoizedState=Js(1|t,n,i,s))}function gu(e,t){zn(8390656,8,e,t)}function Ea(e,t){Un(2048,8,e,t)}function Jd(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Bn(),Ee.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function mu(e){var t=tt().memoizedState;return Jd({ref:t,nextImpl:e}),function(){if((ke&2)!==0)throw Error(G(440));return t.impl.apply(void 0,arguments)}}function pu(e,t){return Un(4,2,e,t)}function Su(e,t){return Un(4,4,e,t)}function yu(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 bu(e,t,i){i=i!=null?i.concat([e]):null,Un(4,4,yu.bind(null,t,e),i)}function wa(){}function Cu(e,t){var i=tt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&da(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Eu(e,t){var i=tt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&da(t,s[1]))return s[0];if(s=e(),ps){Jt(!0);try{e()}finally{Jt(!1)}}return i.memoizedState=[s,t],s}function Da(e,t,i){return i===void 0||(pi&1073741824)!==0&&(xe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=wh(),Ee.lanes|=e,Gi|=e,i)}function wu(e,t,i,s){return Ot(i,t)?i:Qs.current!==null?(e=Da(e,i,s),Ot(e,t)||(lt=!0),e):(pi&42)===0||(pi&1073741824)!==0&&(xe&261930)===0?(lt=!0,e.memoizedState=i):(e=wh(),Ee.lanes|=e,Gi|=e,t)}function Du(e,t,i,s,r){var n=I.p;I.p=n!==0&&8>n?n:8;var g=k.T,R={};k.T=R,Ta(e,!1,t,i);try{var H=r(),F=k.S;if(F!==null&&F(R,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var $=Vd(H,s);Hr(e,t,$,Nt(e))}else Hr(e,t,s,Nt(e))}catch(re){Hr(e,t,{then:function(){},status:"rejected",reason:re},Nt())}finally{I.p=n,g!==null&&R.types!==null&&(g.types=R.types),k.T=g}}function $d(){}function Aa(e,t,i,s){if(e.tag!==5)throw Error(G(476));var r=Au(e).queue;Du(e,r,t,x,i===null?$d:function(){return xu(e),i(s)})}function Au(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:x,baseState:x,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:x},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xu(e){var t=Au(e);t.next===null&&(t=e.alternate.memoizedState),Hr(e,t.next.queue,{},Nt())}function xa(){return vt(Jr)}function Tu(){return tt().memoizedState}function Ru(){return tt().memoizedState}function e_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Nt();e=Ni(i);var s=ji(t,e,i);s!==null&&(Mt(s,t,i),Mr(s,t,i)),t={cache:ia()},e.payload=t;return}t=t.return}}function t_(e,t,i){var s=Nt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Nn(e)?Lu(t,i):(i=Xl(e,t,i,s),i!==null&&(Mt(i,e,s),Ou(i,t,s)))}function Mu(e,t,i){var s=Nt();Hr(e,t,i,s)}function Hr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Nn(e))Lu(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var g=t.lastRenderedState,R=n(g,i);if(r.hasEagerState=!0,r.eagerState=R,Ot(R,g))return pn(e,t,r,0),Xe===null&&mn(),!1}catch{}if(i=Xl(e,t,r,s),i!==null)return Mt(i,e,s),Ou(i,t,s),!0}return!1}function Ta(e,t,i,s){if(s={lane:2,revertLane:lo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Nn(e)){if(t)throw Error(G(479))}else t=Xl(e,i,s,2),t!==null&&Mt(t,e,2)}function Nn(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Lu(e,t){Ws=Ln=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Ou(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Ge(e,i)}}var zr={readContext:vt,use:kn,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useLayoutEffect:Ze,useInsertionEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useSyncExternalStore:Ze,useId:Ze,useHostTransitionStatus:Ze,useFormState:Ze,useActionState:Ze,useOptimistic:Ze,useMemoCache:Ze,useCacheRefresh:Ze};zr.useEffectEvent=Ze;var Bu={readContext:vt,use:kn,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:gu,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,zn(4194308,4,yu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return zn(4194308,4,e,t)},useInsertionEffect:function(e,t){zn(4,2,e,t)},useMemo:function(e,t){var i=Et();t=t===void 0?null:t;var s=e();if(ps){Jt(!0);try{e()}finally{Jt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Et();if(i!==void 0){var r=i(t);if(ps){Jt(!0);try{i(t)}finally{Jt(!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=t_.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=ba(e);var t=e.queue,i=Mu.bind(null,Ee,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:wa,useDeferredValue:function(e,t){var i=Et();return Da(i,e,t)},useTransition:function(){var e=ba(!1);return e=Du.bind(null,Ee,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Ee,r=Et();if(Le){if(i===void 0)throw Error(G(407));i=i()}else{if(i=t(),Xe===null)throw Error(G(349));(xe&127)!==0||eu(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,gu(iu.bind(null,s,n,e),[e]),s.flags|=2048,Js(9,{destroy:void 0},tu.bind(null,s,n,i,t),null),i},useId:function(){var e=Et(),t=Xe.identifierPrefix;if(Le){var i=ri,s=si;i=(s&~(1<<32-bt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=On++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Pd++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xa,useFormState:hu,useActionState:hu,useOptimistic:function(e){var t=Et();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ta.bind(null,Ee,!0,i),i.dispatch=t,[e,t]},useMemoCache:pa,useCacheRefresh:function(){return Et().memoizedState=e_.bind(null,Ee)},useEffectEvent:function(e){var t=Et(),i={impl:e};return t.memoizedState=i,function(){if((ke&2)!==0)throw Error(G(440));return i.impl.apply(void 0,arguments)}}},Ra={readContext:vt,use:kn,useCallback:Cu,useContext:vt,useEffect:Ea,useImperativeHandle:bu,useInsertionEffect:pu,useLayoutEffect:Su,useMemo:Eu,useReducer:Hn,useRef:vu,useState:function(){return Hn(Si)},useDebugValue:wa,useDeferredValue:function(e,t){var i=tt();return wu(i,Ie.memoizedState,e,t)},useTransition:function(){var e=Hn(Si)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:kr(e),t]},useSyncExternalStore:$c,useId:Tu,useHostTransitionStatus:xa,useFormState:fu,useActionState:fu,useOptimistic:function(e,t){var i=tt();return nu(i,Ie,e,t)},useMemoCache:pa,useCacheRefresh:Ru};Ra.useEffectEvent=mu;var ku={readContext:vt,use:kn,useCallback:Cu,useContext:vt,useEffect:Ea,useImperativeHandle:bu,useInsertionEffect:pu,useLayoutEffect:Su,useMemo:Eu,useReducer:ya,useRef:vu,useState:function(){return ya(Si)},useDebugValue:wa,useDeferredValue:function(e,t){var i=tt();return Ie===null?Da(i,e,t):wu(i,Ie.memoizedState,e,t)},useTransition:function(){var e=ya(Si)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:kr(e),t]},useSyncExternalStore:$c,useId:Tu,useHostTransitionStatus:xa,useFormState:_u,useActionState:_u,useOptimistic:function(e,t){var i=tt();return Ie!==null?nu(i,Ie,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:pa,useCacheRefresh:Ru};ku.useEffectEvent=mu;function Ma(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 La={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Nt(),r=Ni(s);r.payload=t,i!=null&&(r.callback=i),t=ji(e,r,s),t!==null&&(Mt(t,e,s),Mr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Nt(),r=Ni(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=ji(e,r,s),t!==null&&(Mt(t,e,s),Mr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Nt(),s=Ni(i);s.tag=2,t!=null&&(s.callback=t),t=ji(e,s,i),t!==null&&(Mt(t,e,i),Mr(t,e,i))}};function Hu(e,t,i,s,r,n,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,g):t.prototype&&t.prototype.isPureReactComponent?!Cr(i,s)||!Cr(r,n):!0}function zu(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&&La.enqueueReplaceState(t,t.state,null)}function Ss(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 Uu(e){gn(e)}function Nu(e){console.error(e)}function ju(e){gn(e)}function jn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function qu(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 Oa(e,t,i){return i=Ni(i),i.tag=3,i.payload={element:null},i.callback=function(){jn(e,t)},i}function Iu(e){return e=Ni(e),e.tag=3,e}function Yu(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(){qu(t,i,s)}}var g=i.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){qu(t,i,s),typeof r!="function"&&(Xi===null?Xi=new Set([this]):Xi.add(this));var R=s.stack;this.componentDidCatch(s.value,{componentStack:R!==null?R:""})})}function i_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Gs(t,i,r,!0),i=kt.current,i!==null){switch(i.tag){case 31:case 13:return Vt===null?Zn():i.alternate===null&&Je===0&&(Je=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===An?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),so(e,s,r)),!1;case 22:return i.flags|=65536,s===An?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)),so(e,s,r)),!1}throw Error(G(435,i.tag))}return so(e,s,r),Zn(),!1}if(Le)return t=kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Zl&&(e=Error(G(422),{cause:s}),Dr(Kt(e,i)))):(s!==Zl&&(t=Error(G(423),{cause:s}),Dr(Kt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Kt(s,i),r=Oa(e.stateNode,s,r),oa(e,r),Je!==4&&(Je=2)),!1;var n=Error(G(520),{cause:s});if(n=Kt(n,i),Gr===null?Gr=[n]:Gr.push(n),Je!==4&&(Je=2),t===null)return!0;s=Kt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=Oa(i.stateNode,s,e),oa(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"&&(Xi===null||!Xi.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Iu(r),Yu(r,e,i,s),oa(i,r),!1}i=i.return}while(i!==null);return!1}var Ba=Error(G(461)),lt=!1;function gt(e,t,i,s){t.child=e===null?Fc(t,null,i,s):ms(t,e.child,i,s)}function Ku(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var g={};for(var R in s)R!=="ref"&&(g[R]=s[R])}else g=s;return ds(t),s=_a(e,t,i,g,n,r),R=va(),e!==null&&!lt?(ga(e,t,r),yi(e,t,r)):(Le&&R&&Ql(t),t.flags|=1,gt(e,t,s,r),t.child)}function Gu(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!Fl(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Xu(e,t,n,s,r)):(e=yn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Ia(e,r)){var g=n.memoizedProps;if(i=i.compare,i=i!==null?i:Cr,i(g,s)&&e.ref===t.ref)return yi(e,t,r)}return t.flags|=1,e=_i(n,s),e.ref=t.ref,e.return=t,t.child=e}function Xu(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(Cr(n,s)&&e.ref===t.ref)if(lt=!1,t.pendingProps=s=n,Ia(e,r))(e.flags&131072)!==0&&(lt=!0);else return t.lanes=e.lanes,yi(e,t,r)}return ka(e,t,i,s,r)}function Fu(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 Vu(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wn(t,n!==null?n.cachePool:null),n!==null?Qc(t,n):ua(),Wc(t);else return s=t.lanes=536870912,Vu(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(wn(t,n.cachePool),Qc(t,n),Ii(),t.memoizedState=null):(e!==null&&wn(t,null),ua(),Ii());return gt(e,t,r,i),t.child}function Ur(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vu(e,t,i,s,r){var n=ra();return n=n===null?null:{parent:rt._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&wn(t,null),ua(),Wc(t),e!==null&&Gs(e,t,s,!0),t.childLanes=r,null}function qn(e,t){return t=Yn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pu(e,t,i){return ms(t,e.child,null,i),e=qn(t,t.pendingProps),e.flags|=2,Ht(t),t.memoizedState=null,e}function s_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(s.mode==="hidden")return e=qn(t,s),t.lanes=536870912,Ur(null,e);if(fa(t),(e=Ve)?(e=af(e,Ft),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Bi!==null?{id:si,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},i=Lc(e),i.return=t,t.child=i,_t=t,Ve=null)):e=null,e===null)throw Hi(t);return t.lanes=536870912,null}return qn(t,s)}var n=e.memoizedState;if(n!==null){var g=n.dehydrated;if(fa(t),r)if(t.flags&256)t.flags&=-257,t=Pu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(G(558));else if(lt||Gs(e,t,i,!1),r=(i&e.childLanes)!==0,lt||r){if(s=Xe,s!==null&&(g=st(s,i),g!==0&&g!==n.retryLane))throw n.retryLane=g,cs(e,g),Mt(s,e,g),Ba;Zn(),t=Pu(e,t,i)}else e=n.treeContext,Ve=Pt(g.nextSibling),_t=t,Le=!0,ki=null,Ft=!1,e!==null&&kc(t,e),t=qn(t,s),t.flags|=4096;return t}return e=_i(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function In(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(G(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function ka(e,t,i,s,r){return ds(t),i=_a(e,t,i,s,void 0,r),s=va(),e!==null&&!lt?(ga(e,t,r),yi(e,t,r)):(Le&&s&&Ql(t),t.flags|=1,gt(e,t,i,r),t.child)}function Qu(e,t,i,s,r,n){return ds(t),t.updateQueue=null,i=Jc(t,s,i,r),Zc(e),s=va(),e!==null&&!lt?(ga(e,t,n),yi(e,t,n)):(Le&&s&&Ql(t),t.flags|=1,gt(e,t,i,n),t.child)}function Wu(e,t,i,s,r){if(ds(t),t.stateNode===null){var n=qs,g=i.contextType;typeof g=="object"&&g!==null&&(n=vt(g)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=La,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},la(t),g=i.contextType,n.context=typeof g=="object"&&g!==null?vt(g):qs,n.state=t.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(Ma(t,i,g,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(g=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),g!==n.state&&La.enqueueReplaceState(n,n.state,null),Or(t,s,n,r),Lr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var R=t.memoizedProps,H=Ss(i,R);n.props=H;var F=n.context,$=i.contextType;g=qs,typeof $=="object"&&$!==null&&(g=vt($));var re=i.getDerivedStateFromProps;$=typeof re=="function"||typeof n.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,$||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(R||F!==g)&&zu(t,n,s,g),Ui=!1;var P=t.memoizedState;n.state=P,Or(t,s,n,r),Lr(),F=t.memoizedState,R||P!==F||Ui?(typeof re=="function"&&(Ma(t,i,re,s),F=t.memoizedState),(H=Ui||Hu(t,i,H,s,P,F,g))?($||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=F),n.props=s,n.state=F,n.context=g,s=H):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,aa(e,t),g=t.memoizedProps,$=Ss(i,g),n.props=$,re=t.pendingProps,P=n.context,F=i.contextType,H=qs,typeof F=="object"&&F!==null&&(H=vt(F)),R=i.getDerivedStateFromProps,(F=typeof R=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(g!==re||P!==H)&&zu(t,n,s,H),Ui=!1,P=t.memoizedState,n.state=P,Or(t,s,n,r),Lr();var W=t.memoizedState;g!==re||P!==W||Ui||e!==null&&e.dependencies!==null&&Cn(e.dependencies)?(typeof R=="function"&&(Ma(t,i,R,s),W=t.memoizedState),($=Ui||Hu(t,i,$,s,P,W,H)||e!==null&&e.dependencies!==null&&Cn(e.dependencies))?(F||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,W,H),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,W,H)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=W),n.props=s,n.state=W,n.context=H,s=$):(typeof n.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,In(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=ms(t,e.child,null,r),t.child=ms(t,null,i,r)):gt(e,t,i,r),t.memoizedState=n.state,e=t.child):e=yi(e,t,r),e}function Zu(e,t,i,s){return hs(),t.flags|=256,gt(e,t,i,s),t.child}var Ha={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function za(e){return{baseLanes:e,cachePool:qc()}}function Ua(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Ut),e}function Ju(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,g;if((g=n)||(g=e!==null&&e.memoizedState===null?!1:(et.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(r?qi(t):Ii(),(e=Ve)?(e=af(e,Ft),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Bi!==null?{id:si,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},i=Lc(e),i.return=t,t.child=i,_t=t,Ve=null)):e=null,e===null)throw Hi(t);return yo(e)?t.lanes=32:t.lanes=536870912,null}var R=s.children;return s=s.fallback,r?(Ii(),r=t.mode,R=Yn({mode:"hidden",children:R},r),s=us(s,r,i,null),R.return=t,s.return=t,R.sibling=s,t.child=R,s=t.child,s.memoizedState=za(i),s.childLanes=Ua(e,g,i),t.memoizedState=Ha,Ur(null,s)):(qi(t),Na(t,R))}var H=e.memoizedState;if(H!==null&&(R=H.dehydrated,R!==null)){if(n)t.flags&256?(qi(t),t.flags&=-257,t=ja(e,t,i)):t.memoizedState!==null?(Ii(),t.child=e.child,t.flags|=128,t=null):(Ii(),R=s.fallback,r=t.mode,s=Yn({mode:"visible",children:s.children},r),R=us(R,r,i,null),R.flags|=2,s.return=t,R.return=t,s.sibling=R,t.child=s,ms(t,e.child,null,i),s=t.child,s.memoizedState=za(i),s.childLanes=Ua(e,g,i),t.memoizedState=Ha,t=Ur(null,s));else if(qi(t),yo(R)){if(g=R.nextSibling&&R.nextSibling.dataset,g)var F=g.dgst;g=F,s=Error(G(419)),s.stack="",s.digest=g,Dr({value:s,source:null,stack:null}),t=ja(e,t,i)}else if(lt||Gs(e,t,i,!1),g=(i&e.childLanes)!==0,lt||g){if(g=Xe,g!==null&&(s=st(g,i),s!==0&&s!==H.retryLane))throw H.retryLane=s,cs(e,s),Mt(g,e,s),Ba;So(R)||Zn(),t=ja(e,t,i)}else So(R)?(t.flags|=192,t.child=e.child,t=null):(e=H.treeContext,Ve=Pt(R.nextSibling),_t=t,Le=!0,ki=null,Ft=!1,e!==null&&kc(t,e),t=Na(t,s.children),t.flags|=4096);return t}return r?(Ii(),R=s.fallback,r=t.mode,H=e.child,F=H.sibling,s=_i(H,{mode:"hidden",children:s.children}),s.subtreeFlags=H.subtreeFlags&65011712,F!==null?R=_i(F,R):(R=us(R,r,i,null),R.flags|=2),R.return=t,s.return=t,s.sibling=R,t.child=s,Ur(null,s),s=t.child,R=e.child.memoizedState,R===null?R=za(i):(r=R.cachePool,r!==null?(H=rt._currentValue,r=r.parent!==H?{parent:H,pool:H}:r):r=qc(),R={baseLanes:R.baseLanes|i,cachePool:r}),s.memoizedState=R,s.childLanes=Ua(e,g,i),t.memoizedState=Ha,Ur(e.child,s)):(qi(t),i=e.child,e=i.sibling,i=_i(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=i,t.memoizedState=null,i)}function Na(e,t){return t=Yn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Yn(e,t){return e=Bt(22,e,null,t),e.lanes=0,e}function ja(e,t,i){return ms(t,e.child,null,i),e=Na(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $u(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),ea(e.return,t,i)}function qa(e,t,i,s,r,n){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=s,g.tail=i,g.tailMode=r,g.treeForkCount=n)}function eh(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var g=et.current,R=(g&2)!==0;if(R?(g=g&1|2,t.flags|=128):g&=1,Q(et,g),gt(e,t,s,i),s=Le?wr:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$u(e,i,t);else if(e.tag===19)$u(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&&Mn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),qa(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&&Mn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}qa(t,!0,i,null,n,s);break;case"together":qa(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function yi(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Gi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Gs(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,i=_i(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=_i(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ia(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Cn(e)))}function r_(e,t,i){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),zi(t,rt,e.memoizedState.cache),hs();break;case 27:case 5:te(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,fa(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(qi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Ju(e,t,i):(qi(t),e=yi(e,t,i),e!==null?e.sibling:null);qi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Gs(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return eh(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Q(et,et.current),s)break;return null;case 22:return t.lanes=0,Fu(e,t,i,t.pendingProps);case 24:zi(t,rt,e.memoizedState.cache)}return yi(e,t,i)}function th(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)lt=!0;else{if(!Ia(e,i)&&(t.flags&128)===0)return lt=!1,r_(e,t,i);lt=(e.flags&131072)!==0}else lt=!1,Le&&(t.flags&1048576)!==0&&Bc(t,wr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=vs(t.elementType),t.type=e,typeof e=="function")Fl(e)?(s=Ss(e,s),t.tag=1,t=Wu(null,t,e,s,i)):(t.tag=0,t=ka(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=Ku(null,t,e,s,i);break e}else if(r===D){t.tag=14,t=Gu(null,t,e,s,i);break e}}throw t=V(e)||e,Error(G(306,t,""))}}return t;case 0:return ka(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Ss(s,t.pendingProps),Wu(e,t,s,r,i);case 3:e:{if(K(t,t.stateNode.containerInfo),e===null)throw Error(G(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,aa(e,t),Or(t,s,null,i);var g=t.memoizedState;if(s=g.cache,zi(t,rt,s),s!==n.cache&&ta(t,[rt],i,!0),Lr(),s=g.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=Zu(e,t,s,i);break e}else if(s!==r){r=Kt(Error(G(424)),t),Dr(r),t=Zu(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,Ve=Pt(e.firstChild),_t=t,Le=!0,ki=null,Ft=!0,i=Fc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(hs(),s===r){t=yi(e,t,i);break e}gt(e,t,s,i)}t=t.child}return t;case 26:return In(e,t),e===null?(i=df(t.type,null,t.pendingProps,null))?t.memoizedState=i:Le||(i=t.type,e=t.pendingProps,s=rl(fe.current).createElement(i),s[dt]=t,s[wt]=e,mt(s,i,e),ht(s),t.stateNode=s):t.memoizedState=df(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),e===null&&Le&&(s=t.stateNode=uf(t.type,t.pendingProps,fe.current),_t=t,Ft=!0,r=Ve,Qi(t.type)?(bo=r,Ve=Pt(s.firstChild)):Ve=r),gt(e,t,t.pendingProps.children,i),In(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((r=s=Ve)&&(s=k_(s,t.type,t.pendingProps,Ft),s!==null?(t.stateNode=s,_t=t,Ve=Pt(s.firstChild),Ft=!1,r=!0):r=!1),r||Hi(t)),te(t),r=t.type,n=t.pendingProps,g=e!==null?e.memoizedProps:null,s=n.children,go(r,n)?s=null:g!==null&&go(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=_a(e,t,Qd,null,null,i),Jr._currentValue=r),In(e,t),gt(e,t,s,i),t.child;case 6:return e===null&&Le&&((e=i=Ve)&&(i=H_(i,t.pendingProps,Ft),i!==null?(t.stateNode=i,_t=t,Ve=null,e=!0):e=!1),e||Hi(t)),null;case 13:return Ju(e,t,i);case 4:return K(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ms(t,null,s,i):gt(e,t,s,i),t.child;case 11:return Ku(e,t,t.type,t.pendingProps,i);case 7:return gt(e,t,t.pendingProps,i),t.child;case 8:return gt(e,t,t.pendingProps.children,i),t.child;case 12:return gt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,zi(t,t.type,s.value),gt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,ds(t),r=vt(r),s=s(r),t.flags|=1,gt(e,t,s,i),t.child;case 14:return Gu(e,t,t.type,t.pendingProps,i);case 15:return Xu(e,t,t.type,t.pendingProps,i);case 19:return eh(e,t,i);case 31:return s_(e,t,i);case 22:return Fu(e,t,i,t.pendingProps);case 24:return ds(t),s=vt(rt),e===null?(r=ra(),r===null&&(r=Xe,n=ia(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},la(t),zi(t,rt,r)):((e.lanes&i)!==0&&(aa(e,t),Or(t,null,null,i),Lr()),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),zi(t,rt,s)):(s=n.cache,zi(t,rt,s),s!==r.cache&&ta(t,[rt],i,!0))),gt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(G(156,t.tag))}function bi(e){e.flags|=4}function Ya(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(Th())e.flags|=8192;else throw gs=An,na}else e.flags&=-16777217}function ih(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!pf(t))if(Th())e.flags|=8192;else throw gs=An,na}function Kn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?_e():536870912,e.lanes|=t,ir|=t)}function Nr(e,t){if(!Le)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 Pe(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 n_(e,t,i){var s=t.pendingProps;switch(Wl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),mi(rt),Z(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ks(t)?bi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Jl())),Pe(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(bi(t),n!==null?(Pe(t),ih(t,n)):(Pe(t),Ya(t,r,null,s,i))):n?n!==e.memoizedState?(bi(t),Pe(t),ih(t,n)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&bi(t),Pe(t),Ya(t,r,e,s,i)),null;case 27:if(ye(t),i=fe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&bi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return Pe(t),null}e=se.current,Ks(t)?Hc(t):(e=uf(r,s,i),t.stateNode=e,bi(t))}return Pe(t),null;case 5:if(ye(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&bi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return Pe(t),null}if(n=se.current,Ks(t))Hc(t);else{var g=rl(fe.current);switch(n){case 1:n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=g.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?g.createElement("select",{is:s.is}):g.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?g.createElement(r,{is:s.is}):g.createElement(r)}}n[dt]=t,n[wt]=s;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)n.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=n;e:switch(mt(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&&bi(t)}}return Pe(t),Ya(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&bi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(G(166));if(e=fe.current,Ks(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=_t,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[dt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Jh(e.nodeValue,i)),e||Hi(t,!0)}else e=rl(e).createTextNode(s),e[dt]=t,t.stateNode=e}return Pe(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ks(t),i!==null){if(e===null){if(!s)throw Error(G(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(557));e[dt]=t}else hs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else i=Jl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Ht(t),t):(Ht(t),null);if((t.flags&128)!==0)throw Error(G(558))}return Pe(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ks(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(G(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(G(317));r[dt]=t}else hs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),r=!1}else r=Jl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Ht(t),t):(Ht(t),null)}return Ht(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),Kn(t,t.updateQueue),Pe(t),null);case 4:return Z(),e===null&&uo(t.stateNode.containerInfo),Pe(t),null;case 10:return mi(t.type),Pe(t),null;case 19:if(N(et),s=t.memoizedState,s===null)return Pe(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)Nr(s,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=Mn(e),n!==null){for(t.flags|=128,Nr(s,!1),e=n.updateQueue,t.updateQueue=e,Kn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Mc(i,e),i=i.sibling;return Q(et,et.current&1|2),Le&&vi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ne()>Pn&&(t.flags|=128,r=!0,Nr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Mn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Kn(t,e),Nr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Le)return Pe(t),null}else 2*Ne()-s.renderingStartTime>Pn&&i!==536870912&&(t.flags|=128,r=!0,Nr(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=Ne(),e.sibling=null,i=et.current,Q(et,r?i&1|2:i&1),Le&&vi(t,s.treeForkCount),e):(Pe(t),null);case 22:case 23:return Ht(t),ha(),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&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),i=t.updateQueue,i!==null&&Kn(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&N(_s),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),mi(rt),Pe(t),null;case 25:return null;case 30:return null}throw Error(G(156,t.tag))}function l_(e,t){switch(Wl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mi(rt),Z(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(Ht(t),t.alternate===null)throw Error(G(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(et),null;case 4:return Z(),null;case 10:return mi(t.type),null;case 22:case 23:return Ht(t),ha(),e!==null&&N(_s),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return mi(rt),null;case 25:return null;default:return null}}function sh(e,t){switch(Wl(t),t.tag){case 3:mi(rt),Z();break;case 26:case 27:case 5:ye(t);break;case 4:Z();break;case 31:t.memoizedState!==null&&Ht(t);break;case 13:Ht(t);break;case 19:N(et);break;case 10:mi(t.type);break;case 22:case 23:Ht(t),ha(),e!==null&&N(_s);break;case 24:mi(rt)}}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,g=i.inst;s=n(),g.destroy=s}i=i.next}while(i!==r)}}catch(R){qe(t,t.return,R)}}function Yi(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 g=s.inst,R=g.destroy;if(R!==void 0){g.destroy=void 0,r=t;var H=i,F=R;try{F()}catch($){qe(r,H,$)}}}s=s.next}while(s!==n)}}catch($){qe(t,t.return,$)}}function rh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Pc(t,i)}catch(s){qe(e,e.return,s)}}}function nh(e,t,i){i.props=Ss(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){qe(e,t,s)}}function qr(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){qe(e,t,r)}}function ni(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){qe(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){qe(e,t,r)}else i.current=null}function lh(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){qe(e,e.return,r)}}function Ka(e,t,i){try{var s=e.stateNode;T_(s,e.type,i,t),s[wt]=t}catch(r){qe(e,e.return,r)}}function ah(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qi(e.type)||e.tag===4}function Ga(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ah(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&&Qi(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 Xa(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=fi));else if(s!==4&&(s===27&&Qi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Xa(e,t,i),e=e.sibling;e!==null;)Xa(e,t,i),e=e.sibling}function Gn(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&&Qi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Gn(e,t,i),e=e.sibling;e!==null;)Gn(e,t,i),e=e.sibling}function oh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);mt(t,s,i),t[dt]=e,t[wt]=i}catch(n){qe(e,e.return,n)}}var Ci=!1,at=!1,Fa=!1,ch=typeof WeakSet=="function"?WeakSet:Set,ft=null;function a_(e,t){if(e=e.containerInfo,_o=hl,e=bc(e),jl(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 g=0,R=-1,H=-1,F=0,$=0,re=e,P=null;t:for(;;){for(var W;re!==i||r!==0&&re.nodeType!==3||(R=g+r),re!==n||s!==0&&re.nodeType!==3||(H=g+s),re.nodeType===3&&(g+=re.nodeValue.length),(W=re.firstChild)!==null;)P=re,re=W;for(;;){if(re===e)break t;if(P===i&&++F===r&&(R=g),P===n&&++$===s&&(H=g),(W=re.nextSibling)!==null)break;re=P,P=re.parentNode}re=W}i=R===-1||H===-1?null:{start:R,end:H}}else i=null}i=i||{start:0,end:0}}else i=null;for(vo={focusedElem:e,selectionRange:i},hl=!1,ft=t;ft!==null;)if(t=ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ft=e;else for(;ft!==null;){switch(t=ft,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 he=Ss(i.type,r);e=s.getSnapshotBeforeUpdate(he,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(Se){qe(i,i.return,Se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)po(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":po(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(G(163))}if(e=t.sibling,e!==null){e.return=t.return,ft=e;break}ft=t.return}}function uh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:wi(e,i),s&4&&jr(5,i);break;case 1:if(wi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(g){qe(i,i.return,g)}else{var r=Ss(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){qe(i,i.return,g)}}s&64&&rh(i),s&512&&qr(i,i.return);break;case 3:if(wi(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{Pc(e,t)}catch(g){qe(i,i.return,g)}}break;case 27:t===null&&s&4&&oh(i);case 26:case 5:wi(e,i),t===null&&s&4&&lh(i),s&512&&qr(i,i.return);break;case 12:wi(e,i);break;case 31:wi(e,i),s&4&&dh(e,i);break;case 13:wi(e,i),s&4&&_h(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=g_.bind(null,i),z_(e,i))));break;case 22:if(s=i.memoizedState!==null||Ci,!s){t=t!==null&&t.memoizedState!==null||at,r=Ci;var n=at;Ci=s,(at=t)&&!n?Di(e,i,(i.subtreeFlags&8772)!==0):wi(e,i),Ci=r,at=n}break;case 30:break;default:wi(e,i)}}function hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Cl(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 Qe=null,At=!1;function Ei(e,t,i){for(i=i.child;i!==null;)fh(e,t,i),i=i.sibling}function fh(e,t,i){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(ci,i)}catch{}switch(i.tag){case 26:at||ni(i,t),Ei(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:at||ni(i,t);var s=Qe,r=At;Qi(i.type)&&(Qe=i.stateNode,At=!1),Ei(e,t,i),Qr(i.stateNode),Qe=s,At=r;break;case 5:at||ni(i,t);case 6:if(s=Qe,r=At,Qe=null,Ei(e,t,i),Qe=s,At=r,Qe!==null)if(At)try{(Qe.nodeType===9?Qe.body:Qe.nodeName==="HTML"?Qe.ownerDocument.body:Qe).removeChild(i.stateNode)}catch(n){qe(i,t,n)}else try{Qe.removeChild(i.stateNode)}catch(n){qe(i,t,n)}break;case 18:Qe!==null&&(At?(e=Qe,nf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),ur(e)):nf(Qe,i.stateNode));break;case 4:s=Qe,r=At,Qe=i.stateNode.containerInfo,At=!0,Ei(e,t,i),Qe=s,At=r;break;case 0:case 11:case 14:case 15:Yi(2,i,t),at||Yi(4,i,t),Ei(e,t,i);break;case 1:at||(ni(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&nh(i,t,s)),Ei(e,t,i);break;case 21:Ei(e,t,i);break;case 22:at=(s=at)||i.memoizedState!==null,Ei(e,t,i),at=s;break;default:Ei(e,t,i)}}function dh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ur(e)}catch(i){qe(t,t.return,i)}}}function _h(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ur(e)}catch(i){qe(t,t.return,i)}}function o_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ch),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ch),t;default:throw Error(G(435,e.tag))}}function Xn(e,t){var i=o_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=m_.bind(null,e,s);s.then(r,r)}})}function xt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],n=e,g=t,R=g;e:for(;R!==null;){switch(R.tag){case 27:if(Qi(R.type)){Qe=R.stateNode,At=!1;break e}break;case 5:Qe=R.stateNode,At=!1;break e;case 3:case 4:Qe=R.stateNode.containerInfo,At=!0;break e}R=R.return}if(Qe===null)throw Error(G(160));fh(n,g,r),Qe=null,At=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vh(t,e),t=t.sibling}var ei=null;function vh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xt(t,e),Tt(e),s&4&&(Yi(3,e,e.return),jr(3,e),Yi(5,e,e.return));break;case 1:xt(t,e),Tt(e),s&512&&(at||i===null||ni(i,i.return)),s&64&&Ci&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=ei;if(xt(t,e),Tt(e),s&512&&(at||i===null||ni(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[dr]||n[dt]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),mt(n,s,i),n[dt]=e,ht(n),s=n;break e;case"link":var g=gf("link","href",r).get(s+(i.href||""));if(g){for(var R=0;R<g.length;R++)if(n=g[R],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)){g.splice(R,1);break t}}n=r.createElement(s),mt(n,s,i),r.head.appendChild(n);break;case"meta":if(g=gf("meta","content",r).get(s+(i.content||""))){for(R=0;R<g.length;R++)if(n=g[R],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)){g.splice(R,1);break t}}n=r.createElement(s),mt(n,s,i),r.head.appendChild(n);break;default:throw Error(G(468,s))}n[dt]=e,ht(n),s=n}e.stateNode=s}else mf(r,e.type,e.stateNode);else e.stateNode=vf(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?mf(r,e.type,e.stateNode):vf(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ka(e,e.memoizedProps,i.memoizedProps)}break;case 27:xt(t,e),Tt(e),s&512&&(at||i===null||ni(i,i.return)),i!==null&&s&4&&Ka(e,e.memoizedProps,i.memoizedProps);break;case 5:if(xt(t,e),Tt(e),s&512&&(at||i===null||ni(i,i.return)),e.flags&32){r=e.stateNode;try{Bs(r,"")}catch(he){qe(e,e.return,he)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Ka(e,r,i!==null?i.memoizedProps:r)),s&1024&&(Fa=!0);break;case 6:if(xt(t,e),Tt(e),s&4){if(e.stateNode===null)throw Error(G(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(he){qe(e,e.return,he)}}break;case 3:if(al=null,r=ei,ei=nl(t.containerInfo),xt(t,e),ei=r,Tt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{ur(t.containerInfo)}catch(he){qe(e,e.return,he)}Fa&&(Fa=!1,gh(e));break;case 4:s=ei,ei=nl(e.stateNode.containerInfo),xt(t,e),Tt(e),ei=s;break;case 12:xt(t,e),Tt(e);break;case 31:xt(t,e),Tt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Xn(e,s)));break;case 13:xt(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Vn=Ne()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Xn(e,s)));break;case 22:r=e.memoizedState!==null;var H=i!==null&&i.memoizedState!==null,F=Ci,$=at;if(Ci=F||r,at=$||H,xt(t,e),at=$,Ci=F,Tt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||H||Ci||at||ys(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){H=i=t;try{if(n=H.stateNode,r)g=n.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{R=H.stateNode;var re=H.memoizedProps.style,P=re!=null&&re.hasOwnProperty("display")?re.display:null;R.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(he){qe(H,H.return,he)}}}else if(t.tag===6){if(i===null){H=t;try{H.stateNode.nodeValue=r?"":H.memoizedProps}catch(he){qe(H,H.return,he)}}}else if(t.tag===18){if(i===null){H=t;try{var W=H.stateNode;r?lf(W,!0):lf(H.stateNode,!1)}catch(he){qe(H,H.return,he)}}}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,Xn(e,i))));break;case 19:xt(t,e),Tt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Xn(e,s)));break;case 30:break;case 21:break;default:xt(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(ah(s)){i=s;break}s=s.return}if(i==null)throw Error(G(160));switch(i.tag){case 27:var r=i.stateNode,n=Ga(e);Gn(e,n,r);break;case 5:var g=i.stateNode;i.flags&32&&(Bs(g,""),i.flags&=-33);var R=Ga(e);Gn(e,R,g);break;case 3:case 4:var H=i.stateNode.containerInfo,F=Ga(e);Xa(e,F,H);break;default:throw Error(G(161))}}catch($){qe(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)uh(e,t.alternate,t),t=t.sibling}function ys(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Yi(4,t,t.return),ys(t);break;case 1:ni(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&nh(t,t.return,i),ys(t);break;case 27:Qr(t.stateNode);case 26:case 5:ni(t,t.return),ys(t);break;case 22:t.memoizedState===null&&ys(t);break;case 30:ys(t);break;default:ys(t)}e=e.sibling}}function Di(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,g=n.flags;switch(n.tag){case 0:case 11:case 15:Di(r,n,i),jr(4,n);break;case 1:if(Di(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(F){qe(s,s.return,F)}if(s=n,r=s.updateQueue,r!==null){var R=s.stateNode;try{var H=r.shared.hiddenCallbacks;if(H!==null)for(r.shared.hiddenCallbacks=null,r=0;r<H.length;r++)Vc(H[r],R)}catch(F){qe(s,s.return,F)}}i&&g&64&&rh(n),qr(n,n.return);break;case 27:oh(n);case 26:case 5:Di(r,n,i),i&&s===null&&g&4&&lh(n),qr(n,n.return);break;case 12:Di(r,n,i);break;case 31:Di(r,n,i),i&&g&4&&dh(r,n);break;case 13:Di(r,n,i),i&&g&4&&_h(r,n);break;case 22:n.memoizedState===null&&Di(r,n,i),qr(n,n.return);break;case 30:break;default:Di(r,n,i)}t=t.sibling}}function Va(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&&Ar(i))}function Pa(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ar(e))}function ti(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)mh(e,t,i,s),t=t.sibling}function mh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:ti(e,t,i,s),r&2048&&jr(9,t);break;case 1:ti(e,t,i,s);break;case 3:ti(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&&Ar(e)));break;case 12:if(r&2048){ti(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,g=n.id,R=n.onPostCommit;typeof R=="function"&&R(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(H){qe(t,t.return,H)}}else ti(e,t,i,s);break;case 31:ti(e,t,i,s);break;case 13:ti(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,g=t.alternate,t.memoizedState!==null?n._visibility&2?ti(e,t,i,s):Ir(e,t):n._visibility&2?ti(e,t,i,s):(n._visibility|=2,$s(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Va(g,t);break;case 24:ti(e,t,i,s),r&2048&&Pa(t.alternate,t);break;default:ti(e,t,i,s)}}function $s(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,g=t,R=i,H=s,F=g.flags;switch(g.tag){case 0:case 11:case 15:$s(n,g,R,H,r),jr(8,g);break;case 23:break;case 22:var $=g.stateNode;g.memoizedState!==null?$._visibility&2?$s(n,g,R,H,r):Ir(n,g):($._visibility|=2,$s(n,g,R,H,r)),r&&F&2048&&Va(g.alternate,g);break;case 24:$s(n,g,R,H,r),r&&F&2048&&Pa(g.alternate,g);break;default:$s(n,g,R,H,r)}t=t.sibling}}function Ir(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:Ir(i,s),r&2048&&Va(s.alternate,s);break;case 24:Ir(i,s),r&2048&&Pa(s.alternate,s);break;default:Ir(i,s)}t=t.sibling}}var Yr=8192;function er(e,t,i){if(e.subtreeFlags&Yr)for(e=e.child;e!==null;)ph(e,t,i),e=e.sibling}function ph(e,t,i){switch(e.tag){case 26:er(e,t,i),e.flags&Yr&&e.memoizedState!==null&&P_(i,ei,e.memoizedState,e.memoizedProps);break;case 5:er(e,t,i);break;case 3:case 4:var s=ei;ei=nl(e.stateNode.containerInfo),er(e,t,i),ei=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Yr,Yr=16777216,er(e,t,i),Yr=s):er(e,t,i));break;default:er(e,t,i)}}function Sh(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 Kr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ft=s,bh(s,e)}Sh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)yh(e),e=e.sibling}function yh(e){switch(e.tag){case 0:case 11:case 15:Kr(e),e.flags&2048&&Yi(9,e,e.return);break;case 3:Kr(e);break;case 12:Kr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fn(e)):Kr(e);break;default:Kr(e)}}function Fn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ft=s,bh(s,e)}Sh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Yi(8,t,t.return),Fn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Fn(t));break;default:Fn(t)}e=e.sibling}}function bh(e,t){for(;ft!==null;){var i=ft;switch(i.tag){case 0:case 11:case 15:Yi(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:Ar(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ft=s;else e:for(i=e;ft!==null;){s=ft;var r=s.sibling,n=s.return;if(hh(s),s===i){ft=null;break e}if(r!==null){r.return=n,ft=r;break e}ft=n}}}var c_={getCacheForType:function(e){var t=vt(rt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return vt(rt).controller.signal}},u_=typeof WeakMap=="function"?WeakMap:Map,ke=0,Xe=null,De=null,xe=0,je=0,zt=null,Ki=!1,tr=!1,Qa=!1,Ai=0,Je=0,Gi=0,bs=0,Wa=0,Ut=0,ir=0,Gr=null,Rt=null,Za=!1,Vn=0,Ch=0,Pn=1/0,Qn=null,Xi=null,ct=0,Fi=null,sr=null,xi=0,Ja=0,$a=null,Eh=null,Xr=0,eo=null;function Nt(){return(ke&2)!==0&&xe!==0?xe&-xe:k.T!==null?lo():nn()}function wh(){if(Ut===0)if((xe&536870912)===0||Le){var e=ws;ws<<=1,(ws&3932160)===0&&(ws=262144),Ut=e}else Ut=536870912;return e=kt.current,e!==null&&(e.flags|=32),Ut}function Mt(e,t,i){(e===Xe&&(je===2||je===9)||e.cancelPendingCommit!==null)&&(rr(e,0),Vi(e,xe,Ut,!1)),Ue(e,i),((ke&2)===0||e!==Xe)&&(e===Xe&&((ke&2)===0&&(bs|=i),Je===4&&Vi(e,xe,Ut,!1)),li(e))}function Dh(e,t,i){if((ke&6)!==0)throw Error(G(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||is(e,t),r=s?d_(e,t):io(e,t,!0),n=s;do{if(r===0){tr&&!s&&Vi(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!h_(i)){r=io(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var R=e;r=Gr;var H=R.current.memoizedState.isDehydrated;if(H&&(rr(R,g).flags|=256),g=io(R,g,!1),g!==2){if(Qa&&!H){R.errorRecoveryDisabledLanes|=n,bs|=n,r=4;break e}n=Rt,Rt=r,n!==null&&(Rt===null?Rt=n:Rt.push.apply(Rt,n))}r=g}if(n=!1,r!==2)continue}}if(r===1){rr(e,0),Vi(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(G(345));case 4:if((t&4194048)!==t)break;case 6:Vi(s,t,Ut,!Ki);break e;case 2:Rt=null;break;case 3:case 5:break;default:throw Error(G(329))}if((t&62914560)===t&&(r=Vn+300-Ne(),10<r)){if(Vi(s,t,Ut,!Ki),As(s,0,!0)!==0)break e;xi=t,s.timeoutHandle=sf(Ah.bind(null,s,i,Rt,Qn,Za,t,Ut,bs,ir,Ki,n,"Throttled",-0,0),r);break e}Ah(s,i,Rt,Qn,Za,t,Ut,bs,ir,Ki,n,null,-0,0)}}break}while(!0);li(e)}function Ah(e,t,i,s,r,n,g,R,H,F,$,re,P,W){if(e.timeoutHandle=-1,re=t.subtreeFlags,re&8192||(re&16785408)===16785408){re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fi},ph(t,n,re);var he=(n&62914560)===n?Vn-Ne():(n&4194048)===n?Ch-Ne():0;if(he=Q_(re,he),he!==null){xi=n,e.cancelPendingCommit=he(kh.bind(null,e,t,n,i,s,r,g,R,H,$,re,null,P,W)),Vi(e,n,g,!F);return}}kh(e,t,n,i,s,r,g,R,H)}function h_(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(!Ot(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 Vi(e,t,i,s){t&=~Wa,t&=~bs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-bt(r),g=1<<n;s[n]=-1,r&=~g}i!==0&&Fe(e,i,t)}function Wn(){return(ke&6)===0?(Fr(0),!1):!0}function to(){if(De!==null){if(je===0)var e=De.return;else e=De,gi=fs=null,ma(e),Ps=null,Tr=0,e=De;for(;e!==null;)sh(e.alternate,e),e=e.return;De=null}}function rr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,L_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),xi=0,to(),Xe=e,De=i=_i(e.current,null),xe=t,je=0,zt=null,Ki=!1,tr=is(e,t),Qa=!1,ir=Ut=Wa=bs=Gi=Je=0,Rt=Gr=null,Za=!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-bt(s),n=1<<r;t|=e[r],s&=~n}return Ai=t,mn(),i}function xh(e,t){Ee=null,k.H=zr,t===Vs||t===Dn?(t=Kc(),je=3):t===na?(t=Kc(),je=4):je=t===Ba?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,zt=t,De===null&&(Je=1,jn(e,Kt(t,e.current)))}function Th(){var e=kt.current;return e===null?!0:(xe&4194048)===xe?Vt===null:(xe&62914560)===xe||(xe&536870912)!==0?e===Vt:!1}function Rh(){var e=k.H;return k.H=zr,e===null?zr:e}function Mh(){var e=k.A;return k.A=c_,e}function Zn(){Je=4,Ki||(xe&4194048)!==xe&&kt.current!==null||(tr=!0),(Gi&134217727)===0&&(bs&134217727)===0||Xe===null||Vi(Xe,xe,Ut,!1)}function io(e,t,i){var s=ke;ke|=2;var r=Rh(),n=Mh();(Xe!==e||xe!==t)&&(Qn=null,rr(e,t)),t=!1;var g=Je;e:do try{if(je!==0&&De!==null){var R=De,H=zt;switch(je){case 8:to(),g=6;break e;case 3:case 2:case 9:case 6:kt.current===null&&(t=!0);var F=je;if(je=0,zt=null,nr(e,R,H,F),i&&tr){g=0;break e}break;default:F=je,je=0,zt=null,nr(e,R,H,F)}}f_(),g=Je;break}catch($){xh(e,$)}while(!0);return t&&e.shellSuspendCounter++,gi=fs=null,ke=s,k.H=r,k.A=n,De===null&&(Xe=null,xe=0,mn()),g}function f_(){for(;De!==null;)Lh(De)}function d_(e,t){var i=ke;ke|=2;var s=Rh(),r=Mh();Xe!==e||xe!==t?(Qn=null,Pn=Ne()+500,rr(e,t)):tr=is(e,t);e:do try{if(je!==0&&De!==null){t=De;var n=zt;t:switch(je){case 1:je=0,zt=null,nr(e,t,n,1);break;case 2:case 9:if(Ic(n)){je=0,zt=null,Oh(t);break}t=function(){je!==2&&je!==9||Xe!==e||(je=7),li(e)},n.then(t,t);break e;case 3:je=7;break e;case 4:je=5;break e;case 7:Ic(n)?(je=0,zt=null,Oh(t)):(je=0,zt=null,nr(e,t,n,7));break;case 5:var g=null;switch(De.tag){case 26:g=De.memoizedState;case 5:case 27:var R=De;if(g?pf(g):R.stateNode.complete){je=0,zt=null;var H=R.sibling;if(H!==null)De=H;else{var F=R.return;F!==null?(De=F,Jn(F)):De=null}break t}}je=0,zt=null,nr(e,t,n,5);break;case 6:je=0,zt=null,nr(e,t,n,6);break;case 8:to(),Je=6;break e;default:throw Error(G(462))}}__();break}catch($){xh(e,$)}while(!0);return gi=fs=null,k.H=s,k.A=r,ke=i,De!==null?0:(Xe=null,xe=0,mn(),Je)}function __(){for(;De!==null&&!Ri();)Lh(De)}function Lh(e){var t=th(e.alternate,e,Ai);e.memoizedProps=e.pendingProps,t===null?Jn(e):De=t}function Oh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Qu(i,t,t.pendingProps,t.type,void 0,xe);break;case 11:t=Qu(i,t,t.pendingProps,t.type.render,t.ref,xe);break;case 5:ma(t);default:sh(i,t),t=De=Mc(t,Ai),t=th(i,t,Ai)}e.memoizedProps=e.pendingProps,t===null?Jn(e):De=t}function nr(e,t,i,s){gi=fs=null,ma(t),Ps=null,Tr=0;var r=t.return;try{if(i_(e,r,t,i,xe)){Je=1,jn(e,Kt(i,e.current)),De=null;return}}catch(n){if(r!==null)throw De=r,n;Je=1,jn(e,Kt(i,e.current)),De=null;return}t.flags&32768?(Le||s===1?e=!0:tr||(xe&536870912)!==0?e=!1:(Ki=e=!0,(s===2||s===9||s===3||s===6)&&(s=kt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Bh(t,e)):Jn(t)}function Jn(e){var t=e;do{if((t.flags&32768)!==0){Bh(t,Ki);return}e=t.return;var i=n_(t.alternate,t,Ai);if(i!==null){De=i;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);Je===0&&(Je=5)}function Bh(e,t){do{var i=l_(e.alternate,e);if(i!==null){i.flags&=32767,De=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=i}while(e!==null);Je=6,De=null}function kh(e,t,i,s,r,n,g,R,H){e.cancelPendingCommit=null;do $n();while(ct!==0);if((ke&6)!==0)throw Error(G(327));if(t!==null){if(t===e.current)throw Error(G(177));if(n=t.lanes|t.childLanes,n|=Gl,ss(e,i,n,g,R,H),e===Xe&&(De=Xe=null,xe=0),sr=t,Fi=e,xi=i,Ja=n,$a=r,Eh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,p_(pt,function(){return jh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=k.T,k.T=null,r=I.p,I.p=2,g=ke,ke|=4;try{a_(e,t,i)}finally{ke=g,I.p=r,k.T=s}}ct=1,Hh(),zh(),Uh()}}function Hh(){if(ct===1){ct=0;var e=Fi,t=sr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=k.T,k.T=null;var s=I.p;I.p=2;var r=ke;ke|=4;try{vh(t,e);var n=vo,g=bc(e.containerInfo),R=n.focusedElem,H=n.selectionRange;if(g!==R&&R&&R.ownerDocument&&yc(R.ownerDocument.documentElement,R)){if(H!==null&&jl(R)){var F=H.start,$=H.end;if($===void 0&&($=F),"selectionStart"in R)R.selectionStart=F,R.selectionEnd=Math.min($,R.value.length);else{var re=R.ownerDocument||document,P=re&&re.defaultView||window;if(P.getSelection){var W=P.getSelection(),he=R.textContent.length,Se=Math.min(H.start,he),Ke=H.end===void 0?Se:Math.min(H.end,he);!W.extend&&Se>Ke&&(g=Ke,Ke=Se,Se=g);var Y=Sc(R,Se),j=Sc(R,Ke);if(Y&&j&&(W.rangeCount!==1||W.anchorNode!==Y.node||W.anchorOffset!==Y.offset||W.focusNode!==j.node||W.focusOffset!==j.offset)){var X=re.createRange();X.setStart(Y.node,Y.offset),W.removeAllRanges(),Se>Ke?(W.addRange(X),W.extend(j.node,j.offset)):(X.setEnd(j.node,j.offset),W.addRange(X))}}}}for(re=[],W=R;W=W.parentNode;)W.nodeType===1&&re.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<re.length;R++){var ie=re[R];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}hl=!!_o,vo=_o=null}finally{ke=r,I.p=s,k.T=i}}e.current=t,ct=2}}function zh(){if(ct===2){ct=0;var e=Fi,t=sr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=k.T,k.T=null;var s=I.p;I.p=2;var r=ke;ke|=4;try{uh(e,t.alternate,t)}finally{ke=r,I.p=s,k.T=i}}ct=3}}function Uh(){if(ct===4||ct===3){ct=0,We();var e=Fi,t=sr,i=xi,s=Eh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,sr=Fi=null,Nh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Xi=null),rs(i),t=t.stateNode,St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(ci,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=k.T,r=I.p,I.p=2,k.T=null;try{for(var n=e.onRecoverableError,g=0;g<s.length;g++){var R=s[g];n(R.value,{componentStack:R.stack})}}finally{k.T=t,I.p=r}}(xi&3)!==0&&$n(),li(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===eo?Xr++:(Xr=0,eo=e):Xr=0,Fr(0)}}function Nh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ar(t)))}function $n(){return Hh(),zh(),Uh(),jh()}function jh(){if(ct!==5)return!1;var e=Fi,t=Ja;Ja=0;var i=rs(xi),s=k.T,r=I.p;try{I.p=32>i?32:i,k.T=null,i=$a,$a=null;var n=Fi,g=xi;if(ct=0,sr=Fi=null,xi=0,(ke&6)!==0)throw Error(G(331));var R=ke;if(ke|=4,yh(n.current),mh(n,n.current,g,i),ke=R,Fr(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(ci,n)}catch{}return!0}finally{I.p=r,k.T=s,Nh(e,t)}}function qh(e,t,i){t=Kt(i,t),t=Oa(e.stateNode,t,2),e=ji(e,t,2),e!==null&&(Ue(e,2),li(e))}function qe(e,t,i){if(e.tag===3)qh(e,e,i);else for(;t!==null;){if(t.tag===3){qh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Xi===null||!Xi.has(s))){e=Kt(i,e),i=Iu(2),s=ji(t,i,2),s!==null&&(Yu(i,s,t,e),Ue(s,2),li(s));break}}t=t.return}}function so(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new u_;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)||(Qa=!0,r.add(i),e=v_.bind(null,e,t,i),t.then(e,e))}function v_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Xe===e&&(xe&i)===i&&(Je===4||Je===3&&(xe&62914560)===xe&&300>Ne()-Vn?(ke&2)===0&&rr(e,0):Wa|=i,ir===xe&&(ir=0)),li(e)}function Ih(e,t){t===0&&(t=_e()),e=cs(e,t),e!==null&&(Ue(e,t),li(e))}function g_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ih(e,i)}function m_(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(G(314))}s!==null&&s.delete(t),Ih(e,i)}function p_(e,t){return ii(e,t)}var el=null,lr=null,ro=!1,tl=!1,no=!1,Pi=0;function li(e){e!==lr&&e.next===null&&(lr===null?el=lr=e:lr=lr.next=e),tl=!0,ro||(ro=!0,y_())}function Fr(e,t){if(!no&&tl){no=!0;do for(var i=!1,s=el;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var g=s.suspendedLanes,R=s.pingedLanes;n=(1<<31-bt(42|e)+1)-1,n&=r&~(g&~R),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Xh(s,n))}else n=xe,n=As(s,s===Xe?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||is(s,n)||(i=!0,Xh(s,n));s=s.next}while(i);no=!1}}function S_(){Yh()}function Yh(){tl=ro=!1;var e=0;Pi!==0&&M_()&&(e=Pi);for(var t=Ne(),i=null,s=el;s!==null;){var r=s.next,n=Kh(s,t);n===0?(s.next=null,i===null?el=r:i.next=r,r===null&&(lr=i)):(i=s,(e!==0||(n&3)!==0)&&(tl=!0)),s=r}ct!==0&&ct!==5||Fr(e),Pi!==0&&(Pi=0)}function Kh(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var g=31-bt(n),R=1<<g,H=r[g];H===-1?((R&i)===0||(R&s)!==0)&&(r[g]=ue(R,t)):H<=t&&(e.expiredLanes|=R),n&=~R}if(t=Xe,i=xe,i=As(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(je===2||je===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&oi(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||is(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&oi(s),rs(i)){case 2:case 8:i=Mi;break;case 32:i=pt;break;case 268435456:i=it;break;default:i=pt}return s=Gh.bind(null,e),i=ii(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&oi(s),e.callbackPriority=2,e.callbackNode=null,2}function Gh(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if($n()&&e.callbackNode!==i)return null;var s=xe;return s=As(e,e===Xe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Dh(e,s,t),Kh(e,Ne()),e.callbackNode!=null&&e.callbackNode===i?Gh.bind(null,e):null)}function Xh(e,t){if($n())return null;Dh(e,t,!0)}function y_(){O_(function(){(ke&6)!==0?ii(Zt,S_):Yh()})}function lo(){if(Pi===0){var e=Xs;e===0&&(e=Es,Es<<=1,(Es&261888)===0&&(Es=256)),Pi=e}return Pi}function Fh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:cn(""+e)}function Vh(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 b_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Fh((r[wt]||null).action),g=s.submitter;g&&(t=(t=g[wt]||null)?Fh(t.formAction):g.getAttribute("formAction"),t!==null&&(n=t,g=null));var R=new dn("action","action",null,s,r);e.push({event:R,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Pi!==0){var H=g?Vh(r,g):new FormData(r);Aa(i,{pending:!0,data:H,method:r.method,action:n},null,H)}}else typeof n=="function"&&(R.preventDefault(),H=g?Vh(r,g):new FormData(r),Aa(i,{pending:!0,data:H,method:r.method,action:n},n,H))},currentTarget:r}]})}}for(var ao=0;ao<Kl.length;ao++){var oo=Kl[ao],C_=oo.toLowerCase(),E_=oo[0].toUpperCase()+oo.slice(1);$t(C_,"on"+E_)}$t(wc,"onAnimationEnd"),$t(Dc,"onAnimationIteration"),$t(Ac,"onAnimationStart"),$t("dblclick","onDoubleClick"),$t("focusin","onFocus"),$t("focusout","onBlur"),$t(jd,"onTransitionRun"),$t(qd,"onTransitionStart"),$t(Id,"onTransitionCancel"),$t(xc,"onTransitionEnd"),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ns("onBeforeInput",["compositionend","keypress","textInput","paste"]),ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vr="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(" "),w_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vr));function Ph(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 g=s.length-1;0<=g;g--){var R=s[g],H=R.instance,F=R.currentTarget;if(R=R.listener,H!==n&&r.isPropagationStopped())break e;n=R,r.currentTarget=F;try{n(r)}catch($){gn($)}r.currentTarget=null,n=H}else for(g=0;g<s.length;g++){if(R=s[g],H=R.instance,F=R.currentTarget,R=R.listener,H!==n&&r.isPropagationStopped())break e;n=R,r.currentTarget=F;try{n(r)}catch($){gn($)}r.currentTarget=null,n=H}}}}function Ae(e,t){var i=t[bl];i===void 0&&(i=t[bl]=new Set);var s=e+"__bubble";i.has(s)||(Qh(t,e,2,!1),i.add(s))}function co(e,t,i){var s=0;t&&(s|=4),Qh(i,e,s,t)}var il="_reactListening"+Math.random().toString(36).slice(2);function uo(e){if(!e[il]){e[il]=!0,Yo.forEach(function(i){i!=="selectionchange"&&(w_.has(i)||co(i,!1,e),co(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[il]||(t[il]=!0,co("selectionchange",!1,t))}}function Qh(e,t,i,s){switch(Df(t)){case 2:var r=J_;break;case 8:r=$_;break;default:r=Ao}i=r.bind(null,t,i,e),r=void 0,!Ml||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 ho(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var g=s.tag;if(g===3||g===4){var R=s.stateNode.containerInfo;if(R===r)break;if(g===4)for(g=s.return;g!==null;){var H=g.tag;if((H===3||H===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;R!==null;){if(g=Ts(R),g===null)return;if(H=g.tag,H===5||H===6||H===26||H===27){s=n=g;continue e}R=R.parentNode}}s=s.return}ec(function(){var F=n,$=Tl(i),re=[];e:{var P=Tc.get(e);if(P!==void 0){var W=dn,he=e;switch(e){case"keypress":if(hn(i)===0)break e;case"keydown":case"keyup":W=md;break;case"focusin":he="focus",W=kl;break;case"focusout":he="blur",W=kl;break;case"beforeblur":case"afterblur":W=kl;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":W=sc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=nd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=yd;break;case wc:case Dc:case Ac:W=od;break;case xc:W=Cd;break;case"scroll":case"scrollend":W=sd;break;case"wheel":W=wd;break;case"copy":case"cut":case"paste":W=ud;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=nc;break;case"toggle":case"beforetoggle":W=Ad}var Se=(t&4)!==0,Ke=!Se&&(e==="scroll"||e==="scrollend"),Y=Se?P!==null?P+"Capture":null:P;Se=[];for(var j=F,X;j!==null;){var ie=j;if(X=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||X===null||Y===null||(ie=vr(j,Y),ie!=null&&Se.push(Pr(j,ie,X))),Ke)break;j=j.return}0<Se.length&&(P=new W(P,he,null,i,$),re.push({event:P,listeners:Se}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",W=e==="mouseout"||e==="pointerout",P&&i!==xl&&(he=i.relatedTarget||i.fromElement)&&(Ts(he)||he[xs]))break e;if((W||P)&&(P=$.window===$?$:(P=$.ownerDocument)?P.defaultView||P.parentWindow:window,W?(he=i.relatedTarget||i.toElement,W=F,he=he?Ts(he):null,he!==null&&(Ke=me(he),Se=he.tag,he!==Ke||Se!==5&&Se!==27&&Se!==6)&&(he=null)):(W=null,he=F),W!==he)){if(Se=sc,ie="onMouseLeave",Y="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(Se=nc,ie="onPointerLeave",Y="onPointerEnter",j="pointer"),Ke=W==null?P:_r(W),X=he==null?P:_r(he),P=new Se(ie,j+"leave",W,i,$),P.target=Ke,P.relatedTarget=X,ie=null,Ts($)===F&&(Se=new Se(Y,j+"enter",he,i,$),Se.target=X,Se.relatedTarget=Ke,ie=Se),Ke=ie,W&&he)t:{for(Se=D_,Y=W,j=he,X=0,ie=Y;ie;ie=Se(ie))X++;ie=0;for(var ve=j;ve;ve=Se(ve))ie++;for(;0<X-ie;)Y=Se(Y),X--;for(;0<ie-X;)j=Se(j),ie--;for(;X--;){if(Y===j||j!==null&&Y===j.alternate){Se=Y;break t}Y=Se(Y),j=Se(j)}Se=null}else Se=null;W!==null&&Wh(re,P,W,Se,!1),he!==null&&Ke!==null&&Wh(re,Ke,he,Se,!0)}}e:{if(P=F?_r(F):window,W=P.nodeName&&P.nodeName.toLowerCase(),W==="select"||W==="input"&&P.type==="file")var Oe=dc;else if(hc(P))if(_c)Oe=zd;else{Oe=kd;var de=Bd}else W=P.nodeName,!W||W.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?F&&Al(F.elementType)&&(Oe=dc):Oe=Hd;if(Oe&&(Oe=Oe(e,F))){fc(re,Oe,i,$);break e}de&&de(e,P,F),e==="focusout"&&F&&P.type==="number"&&F.memoizedProps.value!=null&&Dl(P,"number",P.value)}switch(de=F?_r(F):window,e){case"focusin":(hc(de)||de.contentEditable==="true")&&(Us=de,ql=F,Er=null);break;case"focusout":Er=ql=Us=null;break;case"mousedown":Il=!0;break;case"contextmenu":case"mouseup":case"dragend":Il=!1,Cc(re,i,$);break;case"selectionchange":if(Nd)break;case"keydown":case"keyup":Cc(re,i,$)}var we;if(zl)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 zs?cc(e,i)&&(Te="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Te="onCompositionStart");Te&&(lc&&i.locale!=="ko"&&(zs||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&zs&&(we=tc()):(Oi=$,Ll="value"in Oi?Oi.value:Oi.textContent,zs=!0)),de=sl(F,Te),0<de.length&&(Te=new rc(Te,e,null,i,$),re.push({event:Te,listeners:de}),we?Te.data=we:(we=uc(i),we!==null&&(Te.data=we)))),(we=Td?Rd(e,i):Md(e,i))&&(Te=sl(F,"onBeforeInput"),0<Te.length&&(de=new rc("onBeforeInput","beforeinput",null,i,$),re.push({event:de,listeners:Te}),de.data=we)),b_(re,e,F,i,$)}Ph(re,t)})}function Pr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function sl(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=vr(e,i),r!=null&&s.unshift(Pr(e,r,n)),r=vr(e,t),r!=null&&s.push(Pr(e,r,n))),e.tag===3)return s;e=e.return}return[]}function D_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wh(e,t,i,s,r){for(var n=t._reactName,g=[];i!==null&&i!==s;){var R=i,H=R.alternate,F=R.stateNode;if(R=R.tag,H!==null&&H===s)break;R!==5&&R!==26&&R!==27||F===null||(H=F,r?(F=vr(i,n),F!=null&&g.unshift(Pr(i,F,H))):r||(F=vr(i,n),F!=null&&g.push(Pr(i,F,H)))),i=i.return}g.length!==0&&e.push({event:t,listeners:g})}var A_=/\r\n?/g,x_=/\u0000|\uFFFD/g;function Zh(e){return(typeof e=="string"?e:""+e).replace(A_,`
|
|
9
|
-
`).replace(x_,"")}function Jh(e,t){return t=Zh(t),Zh(e)===t}function Ye(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Bs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Bs(e,""+s);break;case"className":an(e,"class",s);break;case"tabIndex":an(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":an(e,i,s);break;case"style":Jo(e,s,n);break;case"data":if(t!=="object"){an(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=cn(""+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"&&Ye(e,t,"name",r.name,r,null),Ye(e,t,"formEncType",r.formEncType,r,null),Ye(e,t,"formMethod",r.formMethod,r,null),Ye(e,t,"formTarget",r.formTarget,r,null)):(Ye(e,t,"encType",r.encType,r,null),Ye(e,t,"method",r.method,r,null),Ye(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=cn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=fi);break;case"onScroll":s!=null&&Ae("scroll",e);break;case"onScrollEnd":s!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(G(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(G(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=cn(""+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":Ae("beforetoggle",e),Ae("toggle",e),ln(e,"popover",s);break;case"xlinkActuate":hi(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":hi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":hi(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":hi(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":hi(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":hi(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":hi(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":hi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":hi(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":ln(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=td.get(i)||i,ln(e,i,s))}}function fo(e,t,i,s,r,n){switch(i){case"style":Jo(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(G(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(G(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Bs(e,s):(typeof s=="number"||typeof s=="bigint")&&Bs(e,""+s);break;case"onScroll":s!=null&&Ae("scroll",e);break;case"onScrollEnd":s!=null&&Ae("scrollend",e);break;case"onClick":s!=null&&(e.onclick=fi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ko.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[wt]||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,""):ln(e,i,s)}}}function mt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var g=i[n];if(g!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:Ye(e,t,n,g,i,null)}}r&&Ye(e,t,"srcSet",i.srcSet,i,null),s&&Ye(e,t,"src",i.src,i,null);return;case"input":Ae("invalid",e);var R=n=g=r=null,H=null,F=null;for(s in i)if(i.hasOwnProperty(s)){var $=i[s];if($!=null)switch(s){case"name":r=$;break;case"type":g=$;break;case"checked":H=$;break;case"defaultChecked":F=$;break;case"value":n=$;break;case"defaultValue":R=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(G(137,t));break;default:Ye(e,t,s,$,i,null)}}Po(e,n,R,H,F,g,r,!1);return;case"select":Ae("invalid",e),s=g=n=null;for(r in i)if(i.hasOwnProperty(r)&&(R=i[r],R!=null))switch(r){case"value":n=R;break;case"defaultValue":g=R;break;case"multiple":s=R;default:Ye(e,t,r,R,i,null)}t=n,i=g,e.multiple=!!s,t!=null?Os(e,!!s,t,!1):i!=null&&Os(e,!!s,i,!0);return;case"textarea":Ae("invalid",e),n=r=s=null;for(g in i)if(i.hasOwnProperty(g)&&(R=i[g],R!=null))switch(g){case"value":s=R;break;case"defaultValue":r=R;break;case"children":n=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(G(91));break;default:Ye(e,t,g,R,i,null)}Wo(e,s,r,n);return;case"option":for(H in i)i.hasOwnProperty(H)&&(s=i[H],s!=null)&&(H==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Ye(e,t,H,s,i,null));return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(s=0;s<Vr.length;s++)Ae(Vr[s],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(F in i)if(i.hasOwnProperty(F)&&(s=i[F],s!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:Ye(e,t,F,s,i,null)}return;default:if(Al(t)){for($ in i)i.hasOwnProperty($)&&(s=i[$],s!==void 0&&fo(e,t,$,s,i,void 0));return}}for(R in i)i.hasOwnProperty(R)&&(s=i[R],s!=null&&Ye(e,t,R,s,i,null))}function T_(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,g=null,R=null,H=null,F=null,$=null;for(W in i){var re=i[W];if(i.hasOwnProperty(W)&&re!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":H=re;default:s.hasOwnProperty(W)||Ye(e,t,W,null,s,re)}}for(var P in s){var W=s[P];if(re=i[P],s.hasOwnProperty(P)&&(W!=null||re!=null))switch(P){case"type":n=W;break;case"name":r=W;break;case"checked":F=W;break;case"defaultChecked":$=W;break;case"value":g=W;break;case"defaultValue":R=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(G(137,t));break;default:W!==re&&Ye(e,t,P,W,s,re)}}wl(e,g,R,H,F,$,n,r);return;case"select":W=g=R=P=null;for(n in i)if(H=i[n],i.hasOwnProperty(n)&&H!=null)switch(n){case"value":break;case"multiple":W=H;default:s.hasOwnProperty(n)||Ye(e,t,n,null,s,H)}for(r in s)if(n=s[r],H=i[r],s.hasOwnProperty(r)&&(n!=null||H!=null))switch(r){case"value":P=n;break;case"defaultValue":R=n;break;case"multiple":g=n;default:n!==H&&Ye(e,t,r,n,s,H)}t=R,i=g,s=W,P!=null?Os(e,!!i,P,!1):!!s!=!!i&&(t!=null?Os(e,!!i,t,!0):Os(e,!!i,i?[]:"",!1));return;case"textarea":W=P=null;for(R in i)if(r=i[R],i.hasOwnProperty(R)&&r!=null&&!s.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:Ye(e,t,R,null,s,r)}for(g in s)if(r=s[g],n=i[g],s.hasOwnProperty(g)&&(r!=null||n!=null))switch(g){case"value":P=r;break;case"defaultValue":W=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(G(91));break;default:r!==n&&Ye(e,t,g,r,s,n)}Qo(e,P,W);return;case"option":for(var he in i)P=i[he],i.hasOwnProperty(he)&&P!=null&&!s.hasOwnProperty(he)&&(he==="selected"?e.selected=!1:Ye(e,t,he,null,s,P));for(H in s)P=s[H],W=i[H],s.hasOwnProperty(H)&&P!==W&&(P!=null||W!=null)&&(H==="selected"?e.selected=P&&typeof P!="function"&&typeof P!="symbol":Ye(e,t,H,P,s,W));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 Se in i)P=i[Se],i.hasOwnProperty(Se)&&P!=null&&!s.hasOwnProperty(Se)&&Ye(e,t,Se,null,s,P);for(F in s)if(P=s[F],W=i[F],s.hasOwnProperty(F)&&P!==W&&(P!=null||W!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(G(137,t));break;default:Ye(e,t,F,P,s,W)}return;default:if(Al(t)){for(var Ke in i)P=i[Ke],i.hasOwnProperty(Ke)&&P!==void 0&&!s.hasOwnProperty(Ke)&&fo(e,t,Ke,void 0,s,P);for($ in s)P=s[$],W=i[$],!s.hasOwnProperty($)||P===W||P===void 0&&W===void 0||fo(e,t,$,P,s,W);return}}for(var Y in i)P=i[Y],i.hasOwnProperty(Y)&&P!=null&&!s.hasOwnProperty(Y)&&Ye(e,t,Y,null,s,P);for(re in s)P=s[re],W=i[re],!s.hasOwnProperty(re)||P===W||P==null&&W==null||Ye(e,t,re,P,s,W)}function $h(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function R_(){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,g=r.initiatorType,R=r.duration;if(n&&R&&$h(g)){for(g=0,R=r.responseEnd,s+=1;s<i.length;s++){var H=i[s],F=H.startTime;if(F>R)break;var $=H.transferSize,re=H.initiatorType;$&&$h(re)&&(H=H.responseEnd,g+=$*(H<R?1:(R-F)/(H-F)))}if(--s,t+=8*(n+g)/(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 _o=null,vo=null;function rl(e){return e.nodeType===9?e:e.ownerDocument}function ef(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 tf(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 go(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 M_(){var e=window.event;return e&&e.type==="popstate"?e===mo?!1:(mo=e,!0):(mo=null,!1)}var sf=typeof setTimeout=="function"?setTimeout:void 0,L_=typeof clearTimeout=="function"?clearTimeout:void 0,rf=typeof Promise=="function"?Promise:void 0,O_=typeof queueMicrotask=="function"?queueMicrotask:typeof rf<"u"?function(e){return rf.resolve(null).then(e).catch(B_)}:sf;function B_(e){setTimeout(function(){throw e})}function Qi(e){return e==="head"}function nf(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),ur(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Qr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Qr(i);for(var n=i.firstChild;n;){var g=n.nextSibling,R=n.nodeName;n[dr]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=g}}else i==="body"&&Qr(e.ownerDocument.body);i=r}while(i);ur(t)}function lf(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 po(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":po(i),Cl(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function k_(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[dr])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=Pt(e.nextSibling),e===null)break}return null}function H_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Pt(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Pt(e.nextSibling),e===null))return null;return e}function So(e){return e.data==="$?"||e.data==="$~"}function yo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function z_(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Pt(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 bo=null;function of(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Pt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function cf(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 uf(e,t,i){switch(t=rl(i),e){case"html":if(e=t.documentElement,!e)throw Error(G(452));return e;case"head":if(e=t.head,!e)throw Error(G(453));return e;case"body":if(e=t.body,!e)throw Error(G(454));return e;default:throw Error(G(451))}}function Qr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Cl(e)}var Qt=new Map,hf=new Set;function nl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ti=I.d;I.d={f:U_,r:N_,D:j_,C:q_,L:I_,m:Y_,X:G_,S:K_,M:X_};function U_(){var e=Ti.f(),t=Wn();return e||t}function N_(e){var t=Rs(e);t!==null&&t.tag===5&&t.type==="form"?xu(t):Ti.r(e)}var ar=typeof document>"u"?null:document;function ff(e,t,i){var s=ar;if(s&&typeof t=="string"&&t){var r=It(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),hf.has(r)||(hf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),mt(t,"link",e),ht(t),s.head.appendChild(t)))}}function j_(e){Ti.D(e),ff("dns-prefetch",e,null)}function q_(e,t){Ti.C(e,t),ff("preconnect",e,t)}function I_(e,t,i){Ti.L(e,t,i);var s=ar;if(s&&e&&t){var r='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+It(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+It(i.imageSizes)+'"]')):r+='[href="'+It(e)+'"]';var n=r;switch(t){case"style":n=or(e);break;case"script":n=cr(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(Wr(n))||t==="script"&&s.querySelector(Zr(n))||(t=s.createElement("link"),mt(t,"link",e),ht(t),s.head.appendChild(t)))}}function Y_(e,t){Ti.m(e,t);var i=ar;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+It(s)+'"][href="'+It(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=cr(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(Zr(n)))return}s=i.createElement("link"),mt(s,"link",e),ht(s),i.head.appendChild(s)}}}function K_(e,t,i){Ti.S(e,t,i);var s=ar;if(s&&e){var r=Ms(s).hoistableStyles,n=or(e);t=t||"default";var g=r.get(n);if(!g){var R={loading:0,preload:null};if(g=s.querySelector(Wr(n)))R.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qt.get(n))&&Co(e,i);var H=g=s.createElement("link");ht(H),mt(H,"link",e),H._p=new Promise(function(F,$){H.onload=F,H.onerror=$}),H.addEventListener("load",function(){R.loading|=1}),H.addEventListener("error",function(){R.loading|=2}),R.loading|=4,ll(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:R},r.set(n,g)}}}function G_(e,t){Ti.X(e,t);var i=ar;if(i&&e){var s=Ms(i).hoistableScripts,r=cr(e),n=s.get(r);n||(n=i.querySelector(Zr(r)),n||(e=h({src:e,async:!0},t),(t=Qt.get(r))&&Eo(e,t),n=i.createElement("script"),ht(n),mt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function X_(e,t){Ti.M(e,t);var i=ar;if(i&&e){var s=Ms(i).hoistableScripts,r=cr(e),n=s.get(r);n||(n=i.querySelector(Zr(r)),n||(e=h({src:e,async:!0,type:"module"},t),(t=Qt.get(r))&&Eo(e,t),n=i.createElement("script"),ht(n),mt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function df(e,t,i,s){var r=(r=fe.current)?nl(r):null;if(!r)throw Error(G(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=or(i.href),i=Ms(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=or(i.href);var n=Ms(r).hoistableStyles,g=n.get(e);if(g||(r=r.ownerDocument||r,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,g),(n=r.querySelector(Wr(e)))&&!n._p&&(g.instance=n,g.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||F_(r,e,i,g.state))),t&&s===null)throw Error(G(528,""));return g}if(t&&s!==null)throw Error(G(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=cr(i),i=Ms(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(G(444,e))}}function or(e){return'href="'+It(e)+'"'}function Wr(e){return'link[rel="stylesheet"]['+e+"]"}function _f(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function F_(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),mt(t,"link",i),ht(t),e.head.appendChild(t))}function cr(e){return'[src="'+It(e)+'"]'}function Zr(e){return"script[async]"+e}function vf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+It(i.href)+'"]');if(s)return t.instance=s,ht(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"),ht(s),mt(s,"style",r),ll(s,i.precedence,e),t.instance=s;case"stylesheet":r=or(i.href);var n=e.querySelector(Wr(r));if(n)return t.state.loading|=4,t.instance=n,ht(n),n;s=_f(i),(r=Qt.get(r))&&Co(s,r),n=(e.ownerDocument||e).createElement("link"),ht(n);var g=n;return g._p=new Promise(function(R,H){g.onload=R,g.onerror=H}),mt(n,"link",s),t.state.loading|=4,ll(n,i.precedence,e),t.instance=n;case"script":return n=cr(i.src),(r=e.querySelector(Zr(n)))?(t.instance=r,ht(r),r):(s=i,(r=Qt.get(n))&&(s=h({},i),Eo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),ht(r),mt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(G(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ll(s,i.precedence,e));return t.instance}function ll(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,g=0;g<s.length;g++){var R=s[g];if(R.dataset.precedence===t)n=R;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 Co(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Eo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var al=null;function gf(e,t,i){if(al===null){var s=new Map,r=al=new Map;r.set(i,s)}else r=al,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[dr]||n[dt]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var g=n.getAttribute(t)||"";g=e+g;var R=s.get(g);R?R.push(n):s.set(g,[n])}}return s}function mf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function V_(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 pf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function P_(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=or(s.href),n=t.querySelector(Wr(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ol.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,ht(n);return}n=t.ownerDocument||t,s=_f(s),(r=Qt.get(r))&&Co(s,r),n=n.createElement("link"),ht(n);var g=n;g._p=new Promise(function(R,H){g.onload=R,g.onerror=H}),mt(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=ol.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var wo=0;function Q_(e,t){return e.stylesheets&&e.count===0&&ul(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ul(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&wo===0&&(wo=62500*R_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ul(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>wo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function ol(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ul(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cl=null;function ul(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cl=new Map,t.forEach(W_,e),cl=null,ol.call(e))}function W_(e,t){if(!(t.state.loading&4)){var i=cl.get(e);if(i)var s=i.get(null);else{i=new Map,cl.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var g=r[n];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(i.set(g.dataset.precedence,g),s=g)}s&&i.set(null,s)}r=t.instance,g=r.getAttribute("data-precedence"),n=i.get(g)||s,n===s&&i.set(null,r),i.set(g,r),this.count++,s=ol.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 Jr={$$typeof:o,Provider:null,Consumer:null,_currentValue:x,_currentValue2:x,_threadCount:0};function Z_(e,t,i,s,r,n,g,R,H){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=Me(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Me(0),this.hiddenUpdates=Me(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function Sf(e,t,i,s,r,n,g,R,H,F,$,re){return e=new Z_(e,t,i,g,H,F,$,re,R),t=1,n===!0&&(t|=24),n=Bt(3,null,null,t),e.current=n,n.stateNode=e,t=ia(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},la(n),e}function yf(e){return e?(e=qs,e):qs}function bf(e,t,i,s,r,n){r=yf(r),s.context===null?s.context=r:s.pendingContext=r,s=Ni(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=ji(e,s,t),i!==null&&(Mt(i,e,t),Mr(i,e,t))}function Cf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Do(e,t){Cf(e,t),(e=e.alternate)&&Cf(e,t)}function Ef(e){if(e.tag===13||e.tag===31){var t=cs(e,67108864);t!==null&&Mt(t,e,67108864),Do(e,67108864)}}function wf(e){if(e.tag===13||e.tag===31){var t=Nt();t=Ct(t);var i=cs(e,t);i!==null&&Mt(i,e,t),Do(e,t)}}var hl=!0;function J_(e,t,i,s){var r=k.T;k.T=null;var n=I.p;try{I.p=2,Ao(e,t,i,s)}finally{I.p=n,k.T=r}}function $_(e,t,i,s){var r=k.T;k.T=null;var n=I.p;try{I.p=8,Ao(e,t,i,s)}finally{I.p=n,k.T=r}}function Ao(e,t,i,s){if(hl){var r=xo(s);if(r===null)ho(e,t,s,fl,i),Af(e,s);else if(tv(r,e,t,i,s))s.stopPropagation();else if(Af(e,s),t&4&&-1<ev.indexOf(e)){for(;r!==null;){var n=Rs(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var g=ui(n.pendingLanes);if(g!==0){var R=n;for(R.pendingLanes|=2,R.entangledLanes|=2;g;){var H=1<<31-bt(g);R.entanglements[1]|=H,g&=~H}li(n),(ke&6)===0&&(Pn=Ne()+500,Fr(0))}}break;case 31:case 13:R=cs(n,2),R!==null&&Mt(R,n,2),Wn(),Do(n,2)}if(n=xo(s),n===null&&ho(e,t,s,fl,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else ho(e,t,s,null,i)}}function xo(e){return e=Tl(e),To(e)}var fl=null;function To(e){if(fl=null,e=Ts(e),e!==null){var t=me(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=ee(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 fl=e,null}function Df(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ot()){case Zt:return 2;case Mi:return 8;case pt:case ut:return 32;case it:return 268435456;default:return 32}default:return 32}}var Ro=!1,Wi=null,Zi=null,Ji=null,$r=new Map,en=new Map,$i=[],ev="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 Af(e,t){switch(e){case"focusin":case"focusout":Wi=null;break;case"dragenter":case"dragleave":Zi=null;break;case"mouseover":case"mouseout":Ji=null;break;case"pointerover":case"pointerout":$r.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":en.delete(t.pointerId)}}function tn(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=Rs(t),t!==null&&Ef(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function tv(e,t,i,s,r){switch(t){case"focusin":return Wi=tn(Wi,e,t,i,s,r),!0;case"dragenter":return Zi=tn(Zi,e,t,i,s,r),!0;case"mouseover":return Ji=tn(Ji,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return $r.set(n,tn($r.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,en.set(n,tn(en.get(n)||null,e,t,i,s,r)),!0}return!1}function xf(e){var t=Ts(e.target);if(t!==null){var i=me(t);if(i!==null){if(t=i.tag,t===13){if(t=ee(i),t!==null){e.blockedOn=t,qo(e.priority,function(){wf(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,qo(e.priority,function(){wf(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 dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=xo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);xl=s,i.target.dispatchEvent(s),xl=null}else return t=Rs(i),t!==null&&Ef(t),e.blockedOn=i,!1;t.shift()}return!0}function Tf(e,t,i){dl(e)&&i.delete(t)}function iv(){Ro=!1,Wi!==null&&dl(Wi)&&(Wi=null),Zi!==null&&dl(Zi)&&(Zi=null),Ji!==null&&dl(Ji)&&(Ji=null),$r.forEach(Tf),en.forEach(Tf)}function _l(e,t){e.blockedOn===t&&(e.blockedOn=null,Ro||(Ro=!0,q.unstable_scheduleCallback(q.unstable_NormalPriority,iv)))}var vl=null;function Rf(e){vl!==e&&(vl=e,q.unstable_scheduleCallback(q.unstable_NormalPriority,function(){vl===e&&(vl=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(To(s||i)===null)continue;break}var n=Rs(i);n!==null&&(e.splice(t,3),t-=3,Aa(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function ur(e){function t(H){return _l(H,e)}Wi!==null&&_l(Wi,e),Zi!==null&&_l(Zi,e),Ji!==null&&_l(Ji,e),$r.forEach(t),en.forEach(t);for(var i=0;i<$i.length;i++){var s=$i[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<$i.length&&(i=$i[0],i.blockedOn===null);)xf(i),i.blockedOn===null&&$i.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],g=r[wt]||null;if(typeof n=="function")g||Rf(i);else if(g){var R=null;if(n&&n.hasAttribute("formAction")){if(r=n,g=n[wt]||null)R=g.formAction;else if(To(r)!==null)continue}else R=g.action;typeof R=="function"?i[s+1]=R:(i.splice(s,3),s-=3),Rf(i)}}}function Mf(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(g){return r=g})},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 Mo(e){this._internalRoot=e}gl.prototype.render=Mo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var i=t.current,s=Nt();bf(i,s,e,t,null,null)},gl.prototype.unmount=Mo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bf(e.current,2,null,e,null,null),Wn(),t[xs]=null}};function gl(e){this._internalRoot=e}gl.prototype.unstable_scheduleHydration=function(e){if(e){var t=nn();e={blockedOn:null,target:e,priority:t};for(var i=0;i<$i.length&&t!==0&&t<$i[i].priority;i++);$i.splice(i,0,e),i===0&&xf(e)}};var Lf=ce.version;if(Lf!=="19.2.4")throw Error(G(527,Lf,"19.2.4"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=d(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var sv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ml.isDisabled&&ml.supportsFiber)try{ci=ml.inject(sv),St=ml}catch{}}return rn.createRoot=function(e,t){if(!oe(e))throw Error(G(299));var i=!1,s="",r=Uu,n=Nu,g=ju;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&&(g=t.onRecoverableError)),t=Sf(e,1,!1,null,null,i,s,null,r,n,g,Mf),e[xs]=t.current,uo(e),new Mo(t)},rn.hydrateRoot=function(e,t,i){if(!oe(e))throw Error(G(299));var s=!1,r="",n=Uu,g=Nu,R=ju,H=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&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(R=i.onRecoverableError),i.formState!==void 0&&(H=i.formState)),t=Sf(e,1,!0,t,i??null,s,r,H,n,g,R,Mf),t.context=yf(null),i=t.current,s=Nt(),s=Ct(s),r=Ni(s),r.callback=null,ji(i,r,s),i=s,t.current.lanes=i,Ue(t,i),li(t),e[xs]=t.current,uo(e),new gl(t)},rn.version="19.2.4",rn}var If;function _v(){if(If)return Bo.exports;If=1;function q(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q)}catch(ce){console.error(ce)}}return q(),Bo.exports=dv(),Bo.exports}var vv=_v();const gv=Ff(vv);var Uo={exports:{}},Yf;function mv(){return Yf||(Yf=1,(function(q,ce){(function(ge,G){q.exports=G()})(self,(()=>(()=>{var ge={};return(()=>{var G=ge;Object.defineProperty(G,"__esModule",{value:!0}),G.FitAddon=void 0,G.FitAddon=class{activate(oe){this._terminal=oe}dispose(){}fit(){const oe=this.proposeDimensions();if(!oe||!this._terminal||isNaN(oe.cols)||isNaN(oe.rows))return;const me=this._terminal._core;this._terminal.rows===oe.rows&&this._terminal.cols===oe.cols||(me._renderService.clear(),this._terminal.resize(oe.cols,oe.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const oe=this._terminal._core,me=oe._renderService.dimensions;if(me.css.cell.width===0||me.css.cell.height===0)return;const ee=this._terminal.options.scrollback===0?0:oe.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),f=parseInt(u.getPropertyValue("height")),d=Math.max(0,parseInt(u.getPropertyValue("width"))),y=window.getComputedStyle(this._terminal.element),h=f-(parseInt(y.getPropertyValue("padding-top"))+parseInt(y.getPropertyValue("padding-bottom"))),p=d-(parseInt(y.getPropertyValue("padding-right"))+parseInt(y.getPropertyValue("padding-left")))-ee;return{cols:Math.max(2,Math.floor(p/me.css.cell.width)),rows:Math.max(1,Math.floor(h/me.css.cell.height))}}}})(),ge})()))})(Uo)),Uo.exports}var pv=mv(),No={exports:{}},Kf;function Sv(){return Kf||(Kf=1,(function(q,ce){(function(ge,G){q.exports=G()})(self,(()=>(()=>{var ge={4567:function(ee,u,f){var d=this&&this.__decorate||function(o,_,m,b){var D,v=arguments.length,E=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,m):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,_,m,b);else for(var L=o.length-1;L>=0;L--)(D=o[L])&&(E=(v<3?D(E):v>3?D(_,m,E):D(_,m))||E);return v>3&&E&&Object.defineProperty(_,m,E),E},y=this&&this.__param||function(o,_){return function(m,b){_(m,b,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const h=f(9042),p=f(6114),C=f(9924),A=f(844),S=f(5596),l=f(4725),c=f(3656);let a=u.AccessibilityManager=class extends A.Disposable{constructor(o,_){super(),this._terminal=o,this._renderService=_,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 m=0;m<this._terminal.rows;m++)this._rowElements[m]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[m]);if(this._topBoundaryFocusListener=m=>this._handleBoundaryFocus(m,0),this._bottomBoundaryFocusListener=m=>this._handleBoundaryFocus(m,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 C.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((m=>this._handleResize(m.rows)))),this.register(this._terminal.onRender((m=>this._refreshRows(m.start,m.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((m=>this._handleChar(m)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
10
|
-
`)))),this.register(this._terminal.onA11yTab((m=>this._handleTab(m)))),this.register(this._terminal.onKey((m=>this._handleKey(m.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this._screenDprMonitor=new S.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,
|
|
11
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),p.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,p.isMac&&this._liveRegion.remove()}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,_){this._liveRegionDebouncer.refresh(o,_,this._terminal.rows)}_renderRows(o,_){const m=this._terminal.buffer,b=m.lines.length.toString();for(let D=o;D<=_;D++){const v=m.translateBufferLineToString(m.ydisp+D,!0),E=(m.ydisp+D+1).toString(),L=this._rowElements[D];L&&(v.length===0?L.innerText=" ":L.textContent=v,L.setAttribute("aria-posinset",E),L.setAttribute("aria-setsize",b))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,_){const m=o.target,b=this._rowElements[_===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(_===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==b)return;let D,v;if(_===0?(D=m,v=this._rowElements.pop(),this._rowContainer.removeChild(v)):(D=this._rowElements.shift(),v=m,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),v.removeEventListener("focus",this._bottomBoundaryFocusListener),_===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(_===0?-1:1),this._rowElements[_===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 _=this._rowContainer.children.length;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);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=a=d([y(1,l.IRenderService)],a)},3614:(ee,u)=>{function f(p){return p.replace(/\r?\n/g,"\r")}function d(p,C){return C?"\x1B[200~"+p+"\x1B[201~":p}function y(p,C,A,S){p=d(p=f(p),A.decPrivateModes.bracketedPasteMode&&S.rawOptions.ignoreBracketedPasteMode!==!0),A.triggerDataEvent(p,!0),C.value=""}function h(p,C,A){const S=A.getBoundingClientRect(),l=p.clientX-S.left-10,c=p.clientY-S.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${l}px`,C.style.top=`${c}px`,C.style.zIndex="1000",C.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=f,u.bracketTextForPaste=d,u.copyHandler=function(p,C){p.clipboardData&&p.clipboardData.setData("text/plain",C.selectionText),p.preventDefault()},u.handlePasteEvent=function(p,C,A,S){p.stopPropagation(),p.clipboardData&&y(p.clipboardData.getData("text/plain"),C,A,S)},u.paste=y,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(p,C,A,S,l){h(p,C,A),l&&S.rightClickSelect(p),C.value=S.selectionText,C.select()}},7239:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const d=f(1505);u.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(y,h,p){this._css.set(y,h,p)}getCss(y,h){return this._css.get(y,h)}setColor(y,h,p){this._color.set(y,h,p)}getColor(y,h){return this._color.get(y,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(f,d,y,h){f.addEventListener(d,y,h);let p=!1;return{dispose:()=>{p||(p=!0,f.removeEventListener(d,y,h))}}}},6465:function(ee,u,f){var d=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier2=void 0;const h=f(3656),p=f(8460),C=f(844),A=f(2585);let S=u.Linkifier2=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(l){super(),this._bufferService=l,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{this._lastMouseEvent=void 0}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0})))}registerLinkProvider(l){return this._linkProviders.push(l),{dispose:()=>{const c=this._linkProviders.indexOf(l);c!==-1&&this._linkProviders.splice(c,1)}}}attachToDom(l,c,a){this._element=l,this._mouseService=c,this._renderService=a,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(l){if(this._lastMouseEvent=l,!this._element||!this._mouseService)return;const c=this._positionFromMouseEvent(l,this._element,this._mouseService);if(!c)return;this._isMouseOut=!1;const a=l.composedPath();for(let o=0;o<a.length;o++){const _=a[o];if(_.classList.contains("xterm"))break;if(_.classList.contains("xterm-hover"))return}this._lastBufferCell&&c.x===this._lastBufferCell.x&&c.y===this._lastBufferCell.y||(this._handleHover(c),this._lastBufferCell=c)}_handleHover(l){if(this._activeLine!==l.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(l,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,l)||(this._clearCurrentLink(),this._askForLink(l,!0))}_askForLink(l,c){var a,o;this._activeProviderReplies&&c||((a=this._activeProviderReplies)===null||a===void 0||a.forEach((m=>{m?.forEach((b=>{b.link.dispose&&b.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=l.y);let _=!1;for(const[m,b]of this._linkProviders.entries())c?!((o=this._activeProviderReplies)===null||o===void 0)&&o.get(m)&&(_=this._checkLinkProviderResult(m,l,_)):b.provideLinks(l.y,(D=>{var v,E;if(this._isMouseOut)return;const L=D?.map((z=>({link:z})));(v=this._activeProviderReplies)===null||v===void 0||v.set(m,L),_=this._checkLinkProviderResult(m,l,_),((E=this._activeProviderReplies)===null||E===void 0?void 0:E.size)===this._linkProviders.length&&this._removeIntersectingLinks(l.y,this._activeProviderReplies)}))}_removeIntersectingLinks(l,c){const a=new Set;for(let o=0;o<c.size;o++){const _=c.get(o);if(_)for(let m=0;m<_.length;m++){const b=_[m],D=b.link.range.start.y<l?0:b.link.range.start.x,v=b.link.range.end.y>l?this._bufferService.cols:b.link.range.end.x;for(let E=D;E<=v;E++){if(a.has(E)){_.splice(m--,1);break}a.add(E)}}}}_checkLinkProviderResult(l,c,a){var o;if(!this._activeProviderReplies)return a;const _=this._activeProviderReplies.get(l);let m=!1;for(let b=0;b<l;b++)this._activeProviderReplies.has(b)&&!this._activeProviderReplies.get(b)||(m=!0);if(!m&&_){const b=_.find((D=>this._linkAtPosition(D.link,c)));b&&(a=!0,this._handleNewLink(b))}if(this._activeProviderReplies.size===this._linkProviders.length&&!a)for(let b=0;b<this._activeProviderReplies.size;b++){const D=(o=this._activeProviderReplies.get(b))===null||o===void 0?void 0:o.find((v=>this._linkAtPosition(v.link,c)));if(D){a=!0,this._handleNewLink(D);break}}return a}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(l){if(!this._element||!this._mouseService||!this._currentLink)return;const c=this._positionFromMouseEvent(l,this._element,this._mouseService);c&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,c)&&this._currentLink.link.activate(l,this._currentLink.link.text)}_clearCurrentLink(l,c){this._element&&this._currentLink&&this._lastMouseEvent&&(!l||!c||this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=c)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(l){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._linkAtPosition(l.link,c)&&(this._currentLink=l,this._currentLink.state={decorations:{underline:l.link.decorations===void 0||l.link.decorations.underline,pointerCursor:l.link.decorations===void 0||l.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,l.link,this._lastMouseEvent),l.link.decorations={},Object.defineProperties(l.link.decorations,{pointerCursor:{get:()=>{var a,o;return(o=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||o===void 0?void 0:o.decorations.pointerCursor},set:a=>{var o,_;!((o=this._currentLink)===null||o===void 0)&&o.state&&this._currentLink.state.decorations.pointerCursor!==a&&(this._currentLink.state.decorations.pointerCursor=a,this._currentLink.state.isHovered&&((_=this._element)===null||_===void 0||_.classList.toggle("xterm-cursor-pointer",a)))}},underline:{get:()=>{var a,o;return(o=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||o===void 0?void 0:o.decorations.underline},set:a=>{var o,_,m;!((o=this._currentLink)===null||o===void 0)&&o.state&&((m=(_=this._currentLink)===null||_===void 0?void 0:_.state)===null||m===void 0?void 0:m.decorations.underline)!==a&&(this._currentLink.state.decorations.underline=a,this._currentLink.state.isHovered&&this._fireUnderlineEvent(l.link,a))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((a=>{if(!this._currentLink)return;const o=a.start===0?0:a.start+1+this._bufferService.buffer.ydisp,_=this._bufferService.buffer.ydisp+1+a.end;if(this._currentLink.link.range.start.y>=o&&this._currentLink.link.range.end.y<=_&&(this._clearCurrentLink(o,_),this._lastMouseEvent&&this._element)){const m=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);m&&this._askForLink(m,!1)}}))))}_linkHover(l,c,a){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&&l.classList.add("xterm-cursor-pointer")),c.hover&&c.hover(a,c.text)}_fireUnderlineEvent(l,c){const a=l.range,o=this._bufferService.buffer.ydisp,_=this._createLinkUnderlineEvent(a.start.x-1,a.start.y-o-1,a.end.x,a.end.y-o-1,void 0);(c?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(_)}_linkLeave(l,c,a){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&&l.classList.remove("xterm-cursor-pointer")),c.leave&&c.leave(a,c.text)}_linkAtPosition(l,c){const a=l.range.start.y*this._bufferService.cols+l.range.start.x,o=l.range.end.y*this._bufferService.cols+l.range.end.x,_=c.y*this._bufferService.cols+c.x;return a<=_&&_<=o}_positionFromMouseEvent(l,c,a){const o=a.getCoords(l,c,this._bufferService.cols,this._bufferService.rows);if(o)return{x:o[0],y:o[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(l,c,a,o,_){return{x1:l,y1:c,x2:a,y2:o,cols:this._bufferService.cols,fg:_}}};u.Linkifier2=S=d([y(0,A.IBufferService)],S)},9042:(ee,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(ee,u,f){var d=this&&this.__decorate||function(S,l,c,a){var o,_=arguments.length,m=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(S,l,c,a);else for(var b=S.length-1;b>=0;b--)(o=S[b])&&(m=(_<3?o(m):_>3?o(l,c,m):o(l,c))||m);return _>3&&m&&Object.defineProperty(l,c,m),m},y=this&&this.__param||function(S,l){return function(c,a){l(c,a,S)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const h=f(511),p=f(2585);let C=u.OscLinkProvider=class{constructor(S,l,c){this._bufferService=S,this._optionsService=l,this._oscLinkService=c}provideLinks(S,l){var c;const a=this._bufferService.buffer.lines.get(S-1);if(!a)return void l(void 0);const o=[],_=this._optionsService.rawOptions.linkHandler,m=new h.CellData,b=a.getTrimmedLength();let D=-1,v=-1,E=!1;for(let L=0;L<b;L++)if(v!==-1||a.hasContent(L)){if(a.loadCell(L,m),m.hasExtendedAttrs()&&m.extended.urlId){if(v===-1){v=L,D=m.extended.urlId;continue}E=m.extended.urlId!==D}else v!==-1&&(E=!0);if(E||v!==-1&&L===b-1){const z=(c=this._oscLinkService.getLinkData(D))===null||c===void 0?void 0:c.uri;if(z){const O={start:{x:v+1,y:S},end:{x:L+(E||L!==b-1?0:1),y:S}};let U=!1;if(!_?.allowNonHttpProtocols)try{const V=new URL(z);["http:","https:"].includes(V.protocol)||(U=!0)}catch{U=!0}U||o.push({text:z,range:O,activate:(V,J)=>_?_.activate(V,J,O):A(0,J),hover:(V,J)=>{var k;return(k=_?.hover)===null||k===void 0?void 0:k.call(_,V,J,O)},leave:(V,J)=>{var k;return(k=_?.leave)===null||k===void 0?void 0:k.call(_,V,J,O)}})}E=!1,m.hasExtendedAttrs()&&m.extended.urlId?(v=L,D=m.extended.urlId):(v=-1,D=-1)}}l(o)}};function A(S,l){if(confirm(`Do you want to navigate to ${l}?
|
|
8
|
+
`+s.stack}}var si=Object.prototype.hasOwnProperty,Jt=q.unstable_scheduleCallback,ri=q.unstable_cancelCallback,ni=q.unstable_shouldYield,ot=q.unstable_requestPaint,Xe=q.unstable_now,Fe=q.unstable_getCurrentPriorityLevel,ct=q.unstable_ImmediatePriority,di=q.unstable_UserBlockingPriority,St=q.unstable_NormalPriority,Oi=q.unstable_LowPriority,Ve=q.unstable_IdlePriority,yt=q.log,He=q.unstable_setDisableYieldValue,Bt=null,Ct=null;function $t(e){if(typeof yt=="function"&&He(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Bt,e)}catch{}}var dt=Math.clz32?Math.clz32:an,nn=Math.log,ln=Math.LN2;function an(e){return e>>>=0,e===0?32:31-(nn(e)/ln|0)|0}var li=256,Bi=262144,ls=4194304;function ai(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 as(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var R=s&134217727;return R!==0?(s=R&~n,s!==0?r=ai(s):(g&=R,g!==0?r=ai(g):i||(i=R&~e,i!==0&&(r=ai(i))))):(R=s&~n,R!==0?r=ai(R):g!==0?r=ai(g):i||(i=s&~e,i!==0&&(r=ai(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 ki(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function on(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 cn(){var e=ls;return ls<<=1,(ls&62914560)===0&&(ls=4194304),e}function ce(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function de(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Le(e,t,i,s,r,n){var g=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 R=e.entanglements,H=e.expirationTimes,F=e.hiddenUpdates;for(i=g&~i;0<i;){var $=31-dt(i),ne=1<<$;R[$]=0,H[$]=-1;var P=F[$];if(P!==null)for(F[$]=null,$=0;$<P.length;$++){var W=P[$];W!==null&&(W.lane&=-536870913)}i&=~ne}s!==0&&Ye(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(g&~t))}function Ye(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-dt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Hi(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-dt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function We(e,t){var i=t&-t;return i=(i&42)!==0?1:je(i),(i&(e.suspendedLanes|t))!==0?0:i}function je(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 tt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function xt(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:xf(e.type))}function Ds(e,t){var i=I.p;try{return I.p=e,t()}finally{I.p=i}}var oi=Math.random().toString(36).slice(2),_t="__reactFiber$"+oi,Dt="__reactProps$"+oi,As="__reactContainer$"+oi,Cl="__reactEvents$"+oi,Jf="__reactListeners$"+oi,$f="__reactHandles$"+oi,Io="__reactResources$"+oi,fr="__reactMarker$"+oi;function El(e){delete e[_t],delete e[Dt],delete e[Cl],delete e[Jf],delete e[$f]}function Ts(e){var t=e[_t];if(t)return t;for(var i=e.parentNode;i;){if(t=i[As]||i[_t]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=cf(e);e!==null;){if(i=e[_t])return i;e=cf(e)}return t}e=i,i=e.parentNode}return null}function Rs(e){if(e=e[_t]||e[As]){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(G(33))}function Ms(e){var t=e[Io];return t||(t=e[Io]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ht(e){e[fr]=!0}var Ko=new Set,Yo={};function os(e,t){Ls(e,t),Ls(e+"Capture",t)}function Ls(e,t){for(Yo[e]=t,e=0;e<t.length;e++)Ko.add(t[e])}var ed=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]*$"),Go={},Xo={};function td(e){return si.call(Xo,e)?!0:si.call(Go,e)?!1:ed.test(e)?Xo[e]=!0:(Go[e]=!0,!1)}function un(e,t,i){if(td(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 hn(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 _i(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 Kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function id(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(g){i=""+g,n.call(this,g)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wl(e){if(!e._valueTracker){var t=Fo(e)?"checked":"value";e._valueTracker=id(e,t,""+e[t])}}function Vo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Fo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function fn(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 sd=/[\n"\\]/g;function Yt(e){return e.replace(sd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xl(e,t,i,s,r,n,g,R){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Kt(t)):e.value!==""+Kt(t)&&(e.value=""+Kt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Dl(e,g,Kt(t)):i!=null?Dl(e,g,Kt(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+Kt(R):e.removeAttribute("name")}function Po(e,t,i,s,r,n,g,R){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)){wl(e);return}i=i!=null?""+Kt(i):"",t=t!=null?""+Kt(t):i,R||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=R?e.checked:!!s,e.defaultChecked=!!s,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),wl(e)}function Dl(e,t,i){t==="number"&&fn(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Os(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=""+Kt(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 Qo(e,t,i){if(t!=null&&(t=""+Kt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Kt(i):""}function Wo(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(G(92));if(J(s)){if(1<s.length)throw Error(G(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Kt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),wl(e)}function Bs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var rd=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 Zo(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||rd.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Jo(e,t,i){if(t!=null&&typeof t!="object")throw Error(G(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&&Zo(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&Zo(e,n,t[n])}function Al(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 nd=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"]]),ld=/^[\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 dn(e){return ld.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function vi(){}var Tl=null;function Rl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ks=null,Hs=null;function $o(e){var t=Rs(e);if(t&&(e=t.stateNode)){var i=e[Dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(xl(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="'+Yt(""+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(G(90));xl(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&&Vo(s)}break e;case"textarea":Qo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Os(e,!!i.multiple,t,!1)}}}var Ml=!1;function ec(e,t,i){if(Ml)return e(t,i);Ml=!0;try{var s=e(t);return s}finally{if(Ml=!1,(ks!==null||Hs!==null)&&(el(),ks&&(t=ks,e=Hs,Hs=ks=null,$o(t),e)))for(t=0;t<e.length;t++)$o(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(G(231,t,typeof i));return i}var gi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ll=!1;if(gi)try{var vr={};Object.defineProperty(vr,"passive",{get:function(){Ll=!0}}),window.addEventListener("test",vr,vr),window.removeEventListener("test",vr,vr)}catch{Ll=!1}var zi=null,Ol=null,_n=null;function tc(){if(_n)return _n;var e,t=Ol,i=t.length,s,r="value"in zi?zi.value:zi.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var g=i-e;for(s=1;s<=g&&t[i-s]===r[n-s];s++);return _n=r.slice(e,1<s?1-s:void 0)}function vn(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 ic(){return!1}function At(e){function t(i,s,r,n,g){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=g,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(i=e[R],this[R]=i?i(n):n[R]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?gn:ic,this.isPropagationStopped=ic,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 cs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mn=At(cs),gr=h({},cs,{view:0,detail:0}),ad=At(gr),Bl,kl,mr,pn=h({},gr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zl,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"?(Bl=e.screenX-mr.screenX,kl=e.screenY-mr.screenY):kl=Bl=0,mr=e),Bl)},movementY:function(e){return"movementY"in e?e.movementY:kl}}),sc=At(pn),od=h({},pn,{dataTransfer:0}),cd=At(od),ud=h({},gr,{relatedTarget:0}),Hl=At(ud),hd=h({},cs,{animationName:0,elapsedTime:0,pseudoElement:0}),fd=At(hd),dd=h({},cs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_d=At(dd),vd=h({},cs,{data:0}),rc=At(vd),gd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},md={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"},pd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pd[e])?!!t[e]:!1}function zl(){return Sd}var yd=h({},gr,{key:function(e){if(e.key){var t=gd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?md[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zl,charCode:function(e){return e.type==="keypress"?vn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bd=At(yd),Cd=h({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nc=At(Cd),Ed=h({},gr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zl}),wd=At(Ed),xd=h({},cs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dd=At(xd),Ad=h({},pn,{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}),Td=At(Ad),Rd=h({},cs,{newState:0,oldState:0}),Md=At(Rd),Ld=[9,13,27,32],Ul=gi&&"CompositionEvent"in window,pr=null;gi&&"documentMode"in document&&(pr=document.documentMode);var Od=gi&&"TextEvent"in window&&!pr,lc=gi&&(!Ul||pr&&8<pr&&11>=pr),ac=" ",oc=!1;function cc(e,t){switch(e){case"keyup":return Ld.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zs=!1;function Bd(e,t){switch(e){case"compositionend":return uc(t);case"keypress":return t.which!==32?null:(oc=!0,ac);case"textInput":return e=t.data,e===ac&&oc?null:e;default:return null}}function kd(e,t){if(zs)return e==="compositionend"||!Ul&&cc(e,t)?(e=tc(),_n=Ol=zi=null,zs=!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 lc&&t.locale!=="ko"?null:t.data;default:return null}}var Hd={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 hc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hd[e.type]:t==="textarea"}function fc(e,t,i,s){ks?Hs?Hs.push(s):Hs=[s]:ks=s,t=al(t,"onChange"),0<t.length&&(i=new mn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Sr=null,yr=null;function zd(e){Ph(e,0)}function Sn(e){var t=dr(e);if(Vo(t))return e}function dc(e,t){if(e==="change")return t}var _c=!1;if(gi){var Nl;if(gi){var jl="oninput"in document;if(!jl){var vc=document.createElement("div");vc.setAttribute("oninput","return;"),jl=typeof vc.oninput=="function"}Nl=jl}else Nl=!1;_c=Nl&&(!document.documentMode||9<document.documentMode)}function gc(){Sr&&(Sr.detachEvent("onpropertychange",mc),yr=Sr=null)}function mc(e){if(e.propertyName==="value"&&Sn(yr)){var t=[];fc(t,yr,e,Rl(e)),ec(zd,t)}}function Ud(e,t,i){e==="focusin"?(gc(),Sr=t,yr=i,Sr.attachEvent("onpropertychange",mc)):e==="focusout"&&gc()}function Nd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sn(yr)}function jd(e,t){if(e==="click")return Sn(t)}function qd(e,t){if(e==="input"||e==="change")return Sn(t)}function Id(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:Id;function br(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!si.call(t,r)||!kt(e[r],t[r]))return!1}return!0}function pc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sc(e,t){var i=pc(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=pc(i)}}function yc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fn(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=fn(e.document)}return t}function ql(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 Kd=gi&&"documentMode"in document&&11>=document.documentMode,Us=null,Il=null,Cr=null,Kl=!1;function Cc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Kl||Us==null||Us!==fn(s)||(s=Us,"selectionStart"in s&&ql(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=al(Il,"onSelect"),0<s.length&&(t=new mn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Us)))}function us(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ns={animationend:us("Animation","AnimationEnd"),animationiteration:us("Animation","AnimationIteration"),animationstart:us("Animation","AnimationStart"),transitionrun:us("Transition","TransitionRun"),transitionstart:us("Transition","TransitionStart"),transitioncancel:us("Transition","TransitionCancel"),transitionend:us("Transition","TransitionEnd")},Yl={},Ec={};gi&&(Ec=document.createElement("div").style,"AnimationEvent"in window||(delete Ns.animationend.animation,delete Ns.animationiteration.animation,delete Ns.animationstart.animation),"TransitionEvent"in window||delete Ns.transitionend.transition);function hs(e){if(Yl[e])return Yl[e];if(!Ns[e])return e;var t=Ns[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ec)return Yl[e]=t[i];return e}var wc=hs("animationend"),xc=hs("animationiteration"),Dc=hs("animationstart"),Yd=hs("transitionrun"),Gd=hs("transitionstart"),Xd=hs("transitioncancel"),Ac=hs("transitionend"),Tc=new Map,Gl="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(" ");Gl.push("scrollEnd");function ei(e,t){Tc.set(e,t),os(t,[e])}var yn=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)},Gt=[],js=0,Xl=0;function bn(){for(var e=js,t=Xl=js=0;t<e;){var i=Gt[t];Gt[t++]=null;var s=Gt[t];Gt[t++]=null;var r=Gt[t];Gt[t++]=null;var n=Gt[t];if(Gt[t++]=null,s!==null&&r!==null){var g=s.pending;g===null?r.next=r:(r.next=g.next,g.next=r),s.pending=r}n!==0&&Rc(i,r,n)}}function Cn(e,t,i,s){Gt[js++]=e,Gt[js++]=t,Gt[js++]=i,Gt[js++]=s,Xl|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Fl(e,t,i,s){return Cn(e,t,i,s),En(e)}function fs(e,t){return Cn(e,null,null,t),En(e)}function Rc(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-dt(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function En(e){if(50<Gr)throw Gr=0,to=null,Error(G(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var qs={};function Fd(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(e,t,i,s){return new Fd(e,t,i,s)}function Vl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mi(e,t){var i=e.alternate;return i===null?(i=Ht(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Mc(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 wn(e,t,i,s,r,n){var g=0;if(s=e,typeof e=="function")Vl(e)&&(g=1);else if(typeof e=="string")g=Z_(e,i,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case E:return e=Ht(31,i,t,r),e.elementType=E,e.lanes=n,e;case S:return ds(i.children,r,n,t);case l:g=8,r|=24;break;case c:return e=Ht(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case m:return e=Ht(13,i,t,r),e.elementType=m,e.lanes=n,e;case b:return e=Ht(19,i,t,r),e.elementType=b,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case o:g=10;break e;case a:g=9;break e;case _:g=11;break e;case D:g=14;break e;case v:g=16,s=null;break e}g=29,i=Error(G(130,e===null?"null":typeof e,"")),s=null}return t=Ht(g,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function ds(e,t,i,s){return e=Ht(7,e,s,t),e.lanes=i,e}function Pl(e,t,i){return e=Ht(6,e,null,t),e.lanes=i,e}function Lc(e){var t=Ht(18,null,null,0);return t.stateNode=e,t}function Ql(e,t,i){return t=Ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Oc=new WeakMap;function Xt(e,t){if(typeof e=="object"&&e!==null){var i=Oc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:It(t)},Oc.set(e,t),t)}return{value:e,source:t,stack:It(t)}}var Is=[],Ks=0,xn=null,Er=0,Ft=[],Vt=0,Ui=null,ci=1,ui="";function pi(e,t){Is[Ks++]=Er,Is[Ks++]=xn,xn=e,Er=t}function Bc(e,t,i){Ft[Vt++]=ci,Ft[Vt++]=ui,Ft[Vt++]=Ui,Ui=e;var s=ci;e=ui;var r=32-dt(s)-1;s&=~(1<<r),i+=1;var n=32-dt(t)+r;if(30<n){var g=r-r%5;n=(s&(1<<g)-1).toString(32),s>>=g,r-=g,ci=1<<32-dt(t)+r|i<<r|s,ui=n+e}else ci=1<<n|i<<r|s,ui=e}function Wl(e){e.return!==null&&(pi(e,1),Bc(e,1,0))}function Zl(e){for(;e===xn;)xn=Is[--Ks],Is[Ks]=null,Er=Is[--Ks],Is[Ks]=null;for(;e===Ui;)Ui=Ft[--Vt],Ft[Vt]=null,ui=Ft[--Vt],Ft[Vt]=null,ci=Ft[--Vt],Ft[Vt]=null}function kc(e,t){Ft[Vt++]=ci,Ft[Vt++]=ui,Ft[Vt++]=Ui,ci=t.id,ui=t.overflow,Ui=e}var vt=null,Pe=null,Me=!1,Ni=null,Pt=!1,Jl=Error(G(519));function ji(e){var t=Error(G(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wr(Xt(t,e)),Jl}function Hc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[_t]=e,t[Dt]=s,i){case"dialog":De("cancel",t),De("close",t);break;case"iframe":case"object":case"embed":De("load",t);break;case"video":case"audio":for(i=0;i<Fr.length;i++)De(Fr[i],t);break;case"source":De("error",t);break;case"img":case"image":case"link":De("error",t),De("load",t);break;case"details":De("toggle",t);break;case"input":De("invalid",t),Po(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":De("invalid",t);break;case"textarea":De("invalid",t),Wo(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||Jh(t.textContent,i)?(s.popover!=null&&(De("beforetoggle",t),De("toggle",t)),s.onScroll!=null&&De("scroll",t),s.onScrollEnd!=null&&De("scrollend",t),s.onClick!=null&&(t.onclick=vi),t=!0):t=!1,t||ji(e,!0)}function zc(e){for(vt=e.return;vt;)switch(vt.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:vt=vt.return}}function Ys(e){if(e!==vt)return!1;if(!Me)return zc(e),Me=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||mo(e.type,e.memoizedProps)),i=!i),i&&Pe&&ji(e),zc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Pe=of(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Pe=of(e)}else t===27?(t=Pe,$i(e.type)?(e=Co,Co=null,Pe=e):Pe=t):Pe=vt?Wt(e.stateNode.nextSibling):null;return!0}function _s(){Pe=vt=null,Me=!1}function $l(){var e=Ni;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),Ni=null),e}function wr(e){Ni===null?Ni=[e]:Ni.push(e)}var ea=w(null),vs=null,Si=null;function qi(e,t,i){Q(ea,t._currentValue),t._currentValue=i}function yi(e){e._currentValue=ea.current,N(ea)}function ta(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 ia(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var g=r.child;n=n.firstContext;e:for(;n!==null;){var R=n;n=r;for(var H=0;H<t.length;H++)if(R.context===t[H]){n.lanes|=i,R=n.alternate,R!==null&&(R.lanes|=i),ta(n.return,i,e),s||(g=null);break e}n=R.next}}else if(r.tag===18){if(g=r.return,g===null)throw Error(G(341));g.lanes|=i,n=g.alternate,n!==null&&(n.lanes|=i),ta(g,i,e),g=null}else g=r.child;if(g!==null)g.return=r;else for(g=r;g!==null;){if(g===e){g=null;break}if(r=g.sibling,r!==null){r.return=g.return,g=r;break}g=g.return}r=g}}function Gs(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 g=r.alternate;if(g===null)throw Error(G(387));if(g=g.memoizedProps,g!==null){var R=r.type;kt(r.pendingProps.value,g.value)||(e!==null?e.push(R):e=[R])}}else if(r===T.current){if(g=r.alternate,g===null)throw Error(G(387));g.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Zr):e=[Zr])}r=r.return}e!==null&&ia(t,e,i,s),t.flags|=262144}function Dn(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gs(e){vs=e,Si=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return Uc(vs,e)}function An(e,t){return vs===null&&gs(e),Uc(e,t)}function Uc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Si===null){if(e===null)throw Error(G(308));Si=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Si=Si.next=t;return i}var Vd=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()})}},Pd=q.unstable_scheduleCallback,Qd=q.unstable_NormalPriority,rt={$$typeof:o,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new Vd,data:new Map,refCount:0}}function xr(e){e.refCount--,e.refCount===0&&Pd(Qd,function(){e.controller.abort()})}var Dr=null,ra=0,Xs=0,Fs=null;function Wd(e,t){if(Dr===null){var i=Dr=[];ra=0,Xs=ao(),Fs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return ra++,t.then(Nc,Nc),t}function Nc(){if(--ra===0&&Dr!==null){Fs!==null&&(Fs.status="fulfilled");var e=Dr;Dr=null,Xs=0,Fs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Zd(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 jc=k.S;k.S=function(e,t){Ch=Xe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Wd(e,t),jc!==null&&jc(e,t)};var ms=w(null);function na(){var e=ms.current;return e!==null?e:Ge.pooledCache}function Tn(e,t){t===null?Q(ms,ms.current):Q(ms,t.pool)}function qc(){var e=na();return e===null?null:{parent:rt._currentValue,pool:e}}var Vs=Error(G(460)),la=Error(G(474)),Rn=Error(G(542)),Mn={then:function(){}};function Ic(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Kc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(vi,vi),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gc(e),e;default:if(typeof t.status=="string")t.then(vi,vi);else{if(e=Ge,e!==null&&100<e.shellSuspendCounter)throw Error(G(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,Gc(e),e}throw Ss=t,Vs}}function ps(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ss=i,Vs):i}}var Ss=null;function Yc(){if(Ss===null)throw Error(G(459));var e=Ss;return Ss=null,e}function Gc(e){if(e===Vs||e===Rn)throw Error(G(483))}var Ps=null,Ar=0;function Ln(e){var t=Ar;return Ar+=1,Ps===null&&(Ps=[]),Kc(Ps,e,t)}function Tr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function On(e,t){throw t.$$typeof===p?Error(G(525)):(e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xc(e){function t(K,j){if(e){var X=K.deletions;X===null?(K.deletions=[j],K.flags|=16):X.push(j)}}function i(K,j){if(!e)return null;for(;j!==null;)t(K,j),j=j.sibling;return null}function s(K){for(var j=new Map;K!==null;)K.key!==null?j.set(K.key,K):j.set(K.index,K),K=K.sibling;return j}function r(K,j){return K=mi(K,j),K.index=0,K.sibling=null,K}function n(K,j,X){return K.index=X,e?(X=K.alternate,X!==null?(X=X.index,X<j?(K.flags|=67108866,j):X):(K.flags|=67108866,j)):(K.flags|=1048576,j)}function g(K){return e&&K.alternate===null&&(K.flags|=67108866),K}function R(K,j,X,re){return j===null||j.tag!==6?(j=Pl(X,K.mode,re),j.return=K,j):(j=r(j,X),j.return=K,j)}function H(K,j,X,re){var ve=X.type;return ve===S?$(K,j,X.props.children,re,X.key):j!==null&&(j.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===v&&ps(ve)===j.type)?(j=r(j,X.props),Tr(j,X),j.return=K,j):(j=wn(X.type,X.key,X.props,null,K.mode,re),Tr(j,X),j.return=K,j)}function F(K,j,X,re){return j===null||j.tag!==4||j.stateNode.containerInfo!==X.containerInfo||j.stateNode.implementation!==X.implementation?(j=Ql(X,K.mode,re),j.return=K,j):(j=r(j,X.children||[]),j.return=K,j)}function $(K,j,X,re,ve){return j===null||j.tag!==7?(j=ds(X,K.mode,re,ve),j.return=K,j):(j=r(j,X),j.return=K,j)}function ne(K,j,X){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Pl(""+j,K.mode,X),j.return=K,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case C:return X=wn(j.type,j.key,j.props,null,K.mode,X),Tr(X,j),X.return=K,X;case x:return j=Ql(j,K.mode,X),j.return=K,j;case v:return j=ps(j),ne(K,j,X)}if(J(j)||O(j))return j=ds(j,K.mode,X,null),j.return=K,j;if(typeof j.then=="function")return ne(K,Ln(j),X);if(j.$$typeof===o)return ne(K,An(K,j),X);On(K,j)}return null}function P(K,j,X,re){var ve=j!==null?j.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return ve!==null?null:R(K,j,""+X,re);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case C:return X.key===ve?H(K,j,X,re):null;case x:return X.key===ve?F(K,j,X,re):null;case v:return X=ps(X),P(K,j,X,re)}if(J(X)||O(X))return ve!==null?null:$(K,j,X,re,null);if(typeof X.then=="function")return P(K,j,Ln(X),re);if(X.$$typeof===o)return P(K,j,An(K,X),re);On(K,X)}return null}function W(K,j,X,re,ve){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return K=K.get(X)||null,R(j,K,""+re,ve);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case C:return K=K.get(re.key===null?X:re.key)||null,H(j,K,re,ve);case x:return K=K.get(re.key===null?X:re.key)||null,F(j,K,re,ve);case v:return re=ps(re),W(K,j,X,re,ve)}if(J(re)||O(re))return K=K.get(X)||null,$(j,K,re,ve,null);if(typeof re.then=="function")return W(K,j,X,Ln(re),ve);if(re.$$typeof===o)return W(K,j,X,An(j,re),ve);On(j,re)}return null}function fe(K,j,X,re){for(var ve=null,Oe=null,_e=j,we=j=0,Re=null;_e!==null&&we<X.length;we++){_e.index>we?(Re=_e,_e=null):Re=_e.sibling;var Be=P(K,_e,X[we],re);if(Be===null){_e===null&&(_e=Re);break}e&&_e&&Be.alternate===null&&t(K,_e),j=n(Be,j,we),Oe===null?ve=Be:Oe.sibling=Be,Oe=Be,_e=Re}if(we===X.length)return i(K,_e),Me&&pi(K,we),ve;if(_e===null){for(;we<X.length;we++)_e=ne(K,X[we],re),_e!==null&&(j=n(_e,j,we),Oe===null?ve=_e:Oe.sibling=_e,Oe=_e);return Me&&pi(K,we),ve}for(_e=s(_e);we<X.length;we++)Re=W(_e,K,we,X[we],re),Re!==null&&(e&&Re.alternate!==null&&_e.delete(Re.key===null?we:Re.key),j=n(Re,j,we),Oe===null?ve=Re:Oe.sibling=Re,Oe=Re);return e&&_e.forEach(function(rs){return t(K,rs)}),Me&&pi(K,we),ve}function Se(K,j,X,re){if(X==null)throw Error(G(151));for(var ve=null,Oe=null,_e=j,we=j=0,Re=null,Be=X.next();_e!==null&&!Be.done;we++,Be=X.next()){_e.index>we?(Re=_e,_e=null):Re=_e.sibling;var rs=P(K,_e,Be.value,re);if(rs===null){_e===null&&(_e=Re);break}e&&_e&&rs.alternate===null&&t(K,_e),j=n(rs,j,we),Oe===null?ve=rs:Oe.sibling=rs,Oe=rs,_e=Re}if(Be.done)return i(K,_e),Me&&pi(K,we),ve;if(_e===null){for(;!Be.done;we++,Be=X.next())Be=ne(K,Be.value,re),Be!==null&&(j=n(Be,j,we),Oe===null?ve=Be:Oe.sibling=Be,Oe=Be);return Me&&pi(K,we),ve}for(_e=s(_e);!Be.done;we++,Be=X.next())Be=W(_e,K,we,Be.value,re),Be!==null&&(e&&Be.alternate!==null&&_e.delete(Be.key===null?we:Be.key),j=n(Be,j,we),Oe===null?ve=Be:Oe.sibling=Be,Oe=Be);return e&&_e.forEach(function(ov){return t(K,ov)}),Me&&pi(K,we),ve}function Ke(K,j,X,re){if(typeof X=="object"&&X!==null&&X.type===S&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case C:e:{for(var ve=X.key;j!==null;){if(j.key===ve){if(ve=X.type,ve===S){if(j.tag===7){i(K,j.sibling),re=r(j,X.props.children),re.return=K,K=re;break e}}else if(j.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===v&&ps(ve)===j.type){i(K,j.sibling),re=r(j,X.props),Tr(re,X),re.return=K,K=re;break e}i(K,j);break}else t(K,j);j=j.sibling}X.type===S?(re=ds(X.props.children,K.mode,re,X.key),re.return=K,K=re):(re=wn(X.type,X.key,X.props,null,K.mode,re),Tr(re,X),re.return=K,K=re)}return g(K);case x:e:{for(ve=X.key;j!==null;){if(j.key===ve)if(j.tag===4&&j.stateNode.containerInfo===X.containerInfo&&j.stateNode.implementation===X.implementation){i(K,j.sibling),re=r(j,X.children||[]),re.return=K,K=re;break e}else{i(K,j);break}else t(K,j);j=j.sibling}re=Ql(X,K.mode,re),re.return=K,K=re}return g(K);case v:return X=ps(X),Ke(K,j,X,re)}if(J(X))return fe(K,j,X,re);if(O(X)){if(ve=O(X),typeof ve!="function")throw Error(G(150));return X=ve.call(X),Se(K,j,X,re)}if(typeof X.then=="function")return Ke(K,j,Ln(X),re);if(X.$$typeof===o)return Ke(K,j,An(K,X),re);On(K,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,j!==null&&j.tag===6?(i(K,j.sibling),re=r(j,X),re.return=K,K=re):(i(K,j),re=Pl(X,K.mode,re),re.return=K,K=re),g(K)):i(K,j)}return function(K,j,X,re){try{Ar=0;var ve=Ke(K,j,X,re);return Ps=null,ve}catch(_e){if(_e===Vs||_e===Rn)throw _e;var Oe=Ht(29,_e,null,K.mode);return Oe.lanes=re,Oe.return=K,Oe}}}var ys=Xc(!0),Fc=Xc(!1),Ii=!1;function aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ki(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(ze&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=En(e),Rc(e,null,i),t}return Cn(e,s,t,i),En(e)}function Rr(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,Hi(e,i)}}function ca(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 g={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=g:n=n.next=g,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 ua=!1;function Mr(){if(ua){var e=Fs;if(e!==null)throw e}}function Lr(e,t,i,s){ua=!1;var r=e.updateQueue;Ii=!1;var n=r.firstBaseUpdate,g=r.lastBaseUpdate,R=r.shared.pending;if(R!==null){r.shared.pending=null;var H=R,F=H.next;H.next=null,g===null?n=F:g.next=F,g=H;var $=e.alternate;$!==null&&($=$.updateQueue,R=$.lastBaseUpdate,R!==g&&(R===null?$.firstBaseUpdate=F:R.next=F,$.lastBaseUpdate=H))}if(n!==null){var ne=r.baseState;g=0,$=F=H=null,R=n;do{var P=R.lane&-536870913,W=P!==R.lane;if(W?(Te&P)===P:(s&P)===P){P!==0&&P===Xs&&(ua=!0),$!==null&&($=$.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var fe=e,Se=R;P=t;var Ke=i;switch(Se.tag){case 1:if(fe=Se.payload,typeof fe=="function"){ne=fe.call(Ke,ne,P);break e}ne=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=Se.payload,P=typeof fe=="function"?fe.call(Ke,ne,P):fe,P==null)break e;ne=h({},ne,P);break e;case 2:Ii=!0}}P=R.callback,P!==null&&(e.flags|=64,W&&(e.flags|=8192),W=r.callbacks,W===null?r.callbacks=[P]:W.push(P))}else W={lane:P,tag:R.tag,payload:R.payload,callback:R.callback,next:null},$===null?(F=$=W,H=ne):$=$.next=W,g|=P;if(R=R.next,R===null){if(R=r.shared.pending,R===null)break;W=R,R=W.next,W.next=null,r.lastBaseUpdate=W,r.shared.pending=null}}while(!0);$===null&&(H=ne),r.baseState=H,r.firstBaseUpdate=F,r.lastBaseUpdate=$,n===null&&(r.shared.lanes=0),Pi|=g,e.lanes=g,e.memoizedState=ne}}function Vc(e,t){if(typeof e!="function")throw Error(G(191,e));e.call(t)}function Pc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Vc(i[e],t)}var Qs=w(null),Bn=w(0);function Qc(e,t){e=Ri,Q(Bn,e),Q(Qs,t),Ri=e|t.baseLanes}function ha(){Q(Bn,Ri),Q(Qs,Qs.current)}function fa(){Ri=Bn.current,N(Qs),N(Bn)}var zt=w(null),Qt=null;function Gi(e){var t=e.alternate;Q(it,it.current&1),Q(zt,e),Qt===null&&(t===null||Qs.current!==null||t.memoizedState!==null)&&(Qt=e)}function da(e){Q(it,it.current),Q(zt,e),Qt===null&&(Qt=e)}function Wc(e){e.tag===22?(Q(it,it.current),Q(zt,e),Qt===null&&(Qt=e)):Xi()}function Xi(){Q(it,it.current),Q(zt,zt.current)}function Ut(e){N(zt),Qt===e&&(Qt=null),N(it)}var it=w(0);function kn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||yo(i)||bo(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 bi=0,Ee=null,qe=null,nt=null,Hn=!1,Ws=!1,bs=!1,zn=0,Or=0,Zs=null,Jd=0;function $e(){throw Error(G(321))}function _a(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}function va(e,t,i,s,r,n){return bi=n,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Bu:Ma,bs=!1,n=i(s,r),bs=!1,Ws&&(n=Jc(t,i,s,r)),Zc(e),n}function Zc(e){k.H=Hr;var t=qe!==null&&qe.next!==null;if(bi=0,nt=qe=Ee=null,Hn=!1,Or=0,Zs=null,t)throw Error(G(300));e===null||lt||(e=e.dependencies,e!==null&&Dn(e)&&(lt=!0))}function Jc(e,t,i,s){Ee=e;var r=0;do{if(Ws&&(Zs=null),Or=0,Ws=!1,25<=r)throw Error(G(301));if(r+=1,nt=qe=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}k.H=ku,n=t(i,s)}while(Ws);return n}function $d(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Br(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(Ee.flags|=1024),t}function ga(){var e=zn!==0;return zn=0,e}function ma(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function pa(e){if(Hn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Hn=!1}bi=0,nt=qe=Ee=null,Ws=!1,Or=zn=0,Zs=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?Ee.memoizedState=nt=e:nt=nt.next=e,nt}function st(){if(qe===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=nt===null?Ee.memoizedState:nt.next;if(t!==null)nt=t,qe=e;else{if(e===null)throw Ee.alternate===null?Error(G(467)):Error(G(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},nt===null?Ee.memoizedState=nt=e:nt=nt.next=e}return nt}function Un(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Br(e){var t=Or;return Or+=1,Zs===null&&(Zs=[]),e=Kc(Zs,e,t),t=Ee,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Bu:Ma),e}function Nn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Br(e);if(e.$$typeof===o)return gt(e)}throw Error(G(438,String(e)))}function Sa(e){var t=null,i=Ee.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ee.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(),Ee.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=L;return t.index++,i}function Ci(e,t){return typeof t=="function"?t(e):t}function jn(e){var t=st();return ya(t,qe,e)}function ya(e,t,i){var s=e.queue;if(s===null)throw Error(G(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var g=r.next;r.next=n.next,n.next=g}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var R=g=null,H=null,F=t,$=!1;do{var ne=F.lane&-536870913;if(ne!==F.lane?(Te&ne)===ne:(bi&ne)===ne){var P=F.revertLane;if(P===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ne===Xs&&($=!0);else if((bi&P)===P){F=F.next,P===Xs&&($=!0);continue}else ne={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},H===null?(R=H=ne,g=n):H=H.next=ne,Ee.lanes|=P,Pi|=P;ne=F.action,bs&&i(n,ne),n=F.hasEagerState?F.eagerState:i(n,ne)}else P={lane:ne,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},H===null?(R=H=P,g=n):H=H.next=P,Ee.lanes|=ne,Pi|=ne;F=F.next}while(F!==null&&F!==t);if(H===null?g=n:H.next=R,!kt(n,e.memoizedState)&&(lt=!0,$&&(i=Fs,i!==null)))throw i;e.memoizedState=n,e.baseState=g,e.baseQueue=H,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ba(e){var t=st(),i=t.queue;if(i===null)throw Error(G(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var g=r=r.next;do n=e(n,g.action),g=g.next;while(g!==r);kt(n,t.memoizedState)||(lt=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function $c(e,t,i){var s=Ee,r=st(),n=Me;if(n){if(i===void 0)throw Error(G(407));i=i()}else i=t();var g=!kt((qe||r).memoizedState,i);if(g&&(r.memoizedState=i,lt=!0),r=r.queue,wa(iu.bind(null,s,r,e),[e]),r.getSnapshot!==t||g||nt!==null&&nt.memoizedState.tag&1){if(s.flags|=2048,Js(9,{destroy:void 0},tu.bind(null,s,r,i,t),null),Ge===null)throw Error(G(349));n||(bi&127)!==0||eu(s,t,i)}return i}function eu(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ee.updateQueue,t===null?(t=Un(),Ee.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function tu(e,t,i,s){t.value=i,t.getSnapshot=s,su(t)&&ru(e)}function iu(e,t,i){return i(function(){su(t)&&ru(e)})}function su(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function ru(e){var t=fs(e,2);t!==null&&Ot(t,e,2)}function Ca(e){var t=Et();if(typeof e=="function"){var i=e;if(e=i(),bs){$t(!0);try{i()}finally{$t(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ci,lastRenderedState:e},t}function nu(e,t,i,s){return e.baseState=i,ya(e,qe,typeof s=="function"?s:Ci)}function e_(e,t,i,s,r){if(Kn(e))throw Error(G(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(g){n.listeners.push(g)}};k.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,lu(t,n)):(n.next=i.next,t.pending=i.next=n)}}function lu(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=k.T,g={};k.T=g;try{var R=i(r,s),H=k.S;H!==null&&H(g,R),au(e,t,R)}catch(F){Ea(e,t,F)}finally{n!==null&&g.types!==null&&(n.types=g.types),k.T=n}}else try{n=i(r,s),au(e,t,n)}catch(F){Ea(e,t,F)}}function au(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){ou(e,t,s)},function(s){return Ea(e,t,s)}):ou(e,t,i)}function ou(e,t,i){t.status="fulfilled",t.value=i,cu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,lu(e,i)))}function Ea(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,cu(t),t=t.next;while(t!==s)}e.action=null}function cu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function uu(e,t){return t}function hu(e,t){if(Me){var i=Ge.formState;if(i!==null){e:{var s=Ee;if(Me){if(Pe){t:{for(var r=Pe,n=Pt;r.nodeType!==8;){if(!n){r=null;break t}if(r=Wt(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){Pe=Wt(r.nextSibling),s=r.data==="F!";break e}}ji(s)}s=!1}s&&(t=i[0])}}return i=Et(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uu,lastRenderedState:t},i.queue=s,i=Mu.bind(null,Ee,s),s.dispatch=i,s=Ca(!1),n=Ra.bind(null,Ee,!1,s.queue),s=Et(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=e_.bind(null,Ee,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function fu(e){var t=st();return du(t,qe,e)}function du(e,t,i){if(t=ya(e,t,uu)[0],e=jn(Ci)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Br(t)}catch(g){throw g===Vs?Rn:g}else s=t;t=st();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Ee.flags|=2048,Js(9,{destroy:void 0},t_.bind(null,r,i),null)),[s,n,e]}function t_(e,t){e.action=t}function _u(e){var t=st(),i=qe;if(i!==null)return du(t,i,e);st(),t=t.memoizedState,i=st();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Js(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Un(),Ee.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 vu(){return st().memoizedState}function qn(e,t,i,s){var r=Et();Ee.flags|=e,r.memoizedState=Js(1|t,{destroy:void 0},i,s===void 0?null:s)}function In(e,t,i,s){var r=st();s=s===void 0?null:s;var n=r.memoizedState.inst;qe!==null&&s!==null&&_a(s,qe.memoizedState.deps)?r.memoizedState=Js(t,n,i,s):(Ee.flags|=e,r.memoizedState=Js(1|t,n,i,s))}function gu(e,t){qn(8390656,8,e,t)}function wa(e,t){In(2048,8,e,t)}function i_(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Un(),Ee.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function mu(e){var t=st().memoizedState;return i_({ref:t,nextImpl:e}),function(){if((ze&2)!==0)throw Error(G(440));return t.impl.apply(void 0,arguments)}}function pu(e,t){return In(4,2,e,t)}function Su(e,t){return In(4,4,e,t)}function yu(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 bu(e,t,i){i=i!=null?i.concat([e]):null,In(4,4,yu.bind(null,t,e),i)}function xa(){}function Cu(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&_a(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Eu(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&_a(t,s[1]))return s[0];if(s=e(),bs){$t(!0);try{e()}finally{$t(!1)}}return i.memoizedState=[s,t],s}function Da(e,t,i){return i===void 0||(bi&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=wh(),Ee.lanes|=e,Pi|=e,i)}function wu(e,t,i,s){return kt(i,t)?i:Qs.current!==null?(e=Da(e,i,s),kt(e,t)||(lt=!0),e):(bi&42)===0||(bi&1073741824)!==0&&(Te&261930)===0?(lt=!0,e.memoizedState=i):(e=wh(),Ee.lanes|=e,Pi|=e,t)}function xu(e,t,i,s,r){var n=I.p;I.p=n!==0&&8>n?n:8;var g=k.T,R={};k.T=R,Ra(e,!1,t,i);try{var H=r(),F=k.S;if(F!==null&&F(R,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var $=Zd(H,s);kr(e,t,$,qt(e))}else kr(e,t,s,qt(e))}catch(ne){kr(e,t,{then:function(){},status:"rejected",reason:ne},qt())}finally{I.p=n,g!==null&&R.types!==null&&(g.types=R.types),k.T=g}}function s_(){}function Aa(e,t,i,s){if(e.tag!==5)throw Error(G(476));var r=Du(e).queue;xu(e,r,t,A,i===null?s_:function(){return Au(e),i(s)})}function Du(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:A,baseState:A,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ci,lastRenderedState:A},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ci,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Au(e){var t=Du(e);t.next===null&&(t=e.alternate.memoizedState),kr(e,t.next.queue,{},qt())}function Ta(){return gt(Zr)}function Tu(){return st().memoizedState}function Ru(){return st().memoizedState}function r_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=qt();e=Ki(i);var s=Yi(t,e,i);s!==null&&(Ot(s,t,i),Rr(s,t,i)),t={cache:sa()},e.payload=t;return}t=t.return}}function n_(e,t,i){var s=qt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Kn(e)?Lu(t,i):(i=Fl(e,t,i,s),i!==null&&(Ot(i,e,s),Ou(i,t,s)))}function Mu(e,t,i){var s=qt();kr(e,t,i,s)}function kr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Kn(e))Lu(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var g=t.lastRenderedState,R=n(g,i);if(r.hasEagerState=!0,r.eagerState=R,kt(R,g))return Cn(e,t,r,0),Ge===null&&bn(),!1}catch{}if(i=Fl(e,t,r,s),i!==null)return Ot(i,e,s),Ou(i,t,s),!0}return!1}function Ra(e,t,i,s){if(s={lane:2,revertLane:ao(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Kn(e)){if(t)throw Error(G(479))}else t=Fl(e,i,s,2),t!==null&&Ot(t,e,2)}function Kn(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Lu(e,t){Ws=Hn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Ou(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Hi(e,i)}}var Hr={readContext:gt,use:Nn,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};Hr.useEffectEvent=$e;var Bu={readContext:gt,use:Nn,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:gu,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,qn(4194308,4,yu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return qn(4194308,4,e,t)},useInsertionEffect:function(e,t){qn(4,2,e,t)},useMemo:function(e,t){var i=Et();t=t===void 0?null:t;var s=e();if(bs){$t(!0);try{e()}finally{$t(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Et();if(i!==void 0){var r=i(t);if(bs){$t(!0);try{i(t)}finally{$t(!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=n_.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=Ca(e);var t=e.queue,i=Mu.bind(null,Ee,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:xa,useDeferredValue:function(e,t){var i=Et();return Da(i,e,t)},useTransition:function(){var e=Ca(!1);return e=xu.bind(null,Ee,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Ee,r=Et();if(Me){if(i===void 0)throw Error(G(407));i=i()}else{if(i=t(),Ge===null)throw Error(G(349));(Te&127)!==0||eu(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,gu(iu.bind(null,s,n,e),[e]),s.flags|=2048,Js(9,{destroy:void 0},tu.bind(null,s,n,i,t),null),i},useId:function(){var e=Et(),t=Ge.identifierPrefix;if(Me){var i=ui,s=ci;i=(s&~(1<<32-dt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=zn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Jd++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ta,useFormState:hu,useActionState:hu,useOptimistic:function(e){var t=Et();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ra.bind(null,Ee,!0,i),i.dispatch=t,[e,t]},useMemoCache:Sa,useCacheRefresh:function(){return Et().memoizedState=r_.bind(null,Ee)},useEffectEvent:function(e){var t=Et(),i={impl:e};return t.memoizedState=i,function(){if((ze&2)!==0)throw Error(G(440));return i.impl.apply(void 0,arguments)}}},Ma={readContext:gt,use:Nn,useCallback:Cu,useContext:gt,useEffect:wa,useImperativeHandle:bu,useInsertionEffect:pu,useLayoutEffect:Su,useMemo:Eu,useReducer:jn,useRef:vu,useState:function(){return jn(Ci)},useDebugValue:xa,useDeferredValue:function(e,t){var i=st();return wu(i,qe.memoizedState,e,t)},useTransition:function(){var e=jn(Ci)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Br(e),t]},useSyncExternalStore:$c,useId:Tu,useHostTransitionStatus:Ta,useFormState:fu,useActionState:fu,useOptimistic:function(e,t){var i=st();return nu(i,qe,e,t)},useMemoCache:Sa,useCacheRefresh:Ru};Ma.useEffectEvent=mu;var ku={readContext:gt,use:Nn,useCallback:Cu,useContext:gt,useEffect:wa,useImperativeHandle:bu,useInsertionEffect:pu,useLayoutEffect:Su,useMemo:Eu,useReducer:ba,useRef:vu,useState:function(){return ba(Ci)},useDebugValue:xa,useDeferredValue:function(e,t){var i=st();return qe===null?Da(i,e,t):wu(i,qe.memoizedState,e,t)},useTransition:function(){var e=ba(Ci)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Br(e),t]},useSyncExternalStore:$c,useId:Tu,useHostTransitionStatus:Ta,useFormState:_u,useActionState:_u,useOptimistic:function(e,t){var i=st();return qe!==null?nu(i,qe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Sa,useCacheRefresh:Ru};ku.useEffectEvent=mu;function La(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 Oa={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=qt(),r=Ki(s);r.payload=t,i!=null&&(r.callback=i),t=Yi(e,r,s),t!==null&&(Ot(t,e,s),Rr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=qt(),r=Ki(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Yi(e,r,s),t!==null&&(Ot(t,e,s),Rr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=qt(),s=Ki(i);s.tag=2,t!=null&&(s.callback=t),t=Yi(e,s,i),t!==null&&(Ot(t,e,i),Rr(t,e,i))}};function Hu(e,t,i,s,r,n,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,g):t.prototype&&t.prototype.isPureReactComponent?!br(i,s)||!br(r,n):!0}function zu(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&&Oa.enqueueReplaceState(t,t.state,null)}function Cs(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 Uu(e){yn(e)}function Nu(e){console.error(e)}function ju(e){yn(e)}function Yn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function qu(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 Ba(e,t,i){return i=Ki(i),i.tag=3,i.payload={element:null},i.callback=function(){Yn(e,t)},i}function Iu(e){return e=Ki(e),e.tag=3,e}function Ku(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(){qu(t,i,s)}}var g=i.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){qu(t,i,s),typeof r!="function"&&(Qi===null?Qi=new Set([this]):Qi.add(this));var R=s.stack;this.componentDidCatch(s.value,{componentStack:R!==null?R:""})})}function l_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Gs(t,i,r,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Qt===null?tl():i.alternate===null&&et===0&&(et=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===Mn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),ro(e,s,r)),!1;case 22:return i.flags|=65536,s===Mn?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),ro(e,s,r)),!1}throw Error(G(435,i.tag))}return ro(e,s,r),tl(),!1}if(Me)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Jl&&(e=Error(G(422),{cause:s}),wr(Xt(e,i)))):(s!==Jl&&(t=Error(G(423),{cause:s}),wr(Xt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Xt(s,i),r=Ba(e.stateNode,s,r),ca(e,r),et!==4&&(et=2)),!1;var n=Error(G(520),{cause:s});if(n=Xt(n,i),Yr===null?Yr=[n]:Yr.push(n),et!==4&&(et=2),t===null)return!0;s=Xt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=Ba(i.stateNode,s,e),ca(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"&&(Qi===null||!Qi.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Iu(r),Ku(r,e,i,s),ca(i,r),!1}i=i.return}while(i!==null);return!1}var ka=Error(G(461)),lt=!1;function mt(e,t,i,s){t.child=e===null?Fc(t,null,i,s):ys(t,e.child,i,s)}function Yu(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var g={};for(var R in s)R!=="ref"&&(g[R]=s[R])}else g=s;return gs(t),s=va(e,t,i,g,n,r),R=ga(),e!==null&&!lt?(ma(e,t,r),Ei(e,t,r)):(Me&&R&&Wl(t),t.flags|=1,mt(e,t,s,r),t.child)}function Gu(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!Vl(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Xu(e,t,n,s,r)):(e=wn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Ka(e,r)){var g=n.memoizedProps;if(i=i.compare,i=i!==null?i:br,i(g,s)&&e.ref===t.ref)return Ei(e,t,r)}return t.flags|=1,e=mi(n,s),e.ref=t.ref,e.return=t,t.child=e}function Xu(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(br(n,s)&&e.ref===t.ref)if(lt=!1,t.pendingProps=s=n,Ka(e,r))(e.flags&131072)!==0&&(lt=!0);else return t.lanes=e.lanes,Ei(e,t,r)}return Ha(e,t,i,s,r)}function Fu(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 Vu(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Tn(t,n!==null?n.cachePool:null),n!==null?Qc(t,n):ha(),Wc(t);else return s=t.lanes=536870912,Vu(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(Tn(t,n.cachePool),Qc(t,n),Xi(),t.memoizedState=null):(e!==null&&Tn(t,null),ha(),Xi());return mt(e,t,r,i),t.child}function zr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vu(e,t,i,s,r){var n=na();return n=n===null?null:{parent:rt._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&Tn(t,null),ha(),Wc(t),e!==null&&Gs(e,t,s,!0),t.childLanes=r,null}function Gn(e,t){return t=Fn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pu(e,t,i){return ys(t,e.child,null,i),e=Gn(t,t.pendingProps),e.flags|=2,Ut(t),t.memoizedState=null,e}function a_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Me){if(s.mode==="hidden")return e=Gn(t,s),t.lanes=536870912,zr(null,e);if(da(t),(e=Pe)?(e=af(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui!==null?{id:ci,overflow:ui}:null,retryLane:536870912,hydrationErrors:null},i=Lc(e),i.return=t,t.child=i,vt=t,Pe=null)):e=null,e===null)throw ji(t);return t.lanes=536870912,null}return Gn(t,s)}var n=e.memoizedState;if(n!==null){var g=n.dehydrated;if(da(t),r)if(t.flags&256)t.flags&=-257,t=Pu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(G(558));else if(lt||Gs(e,t,i,!1),r=(i&e.childLanes)!==0,lt||r){if(s=Ge,s!==null&&(g=We(s,i),g!==0&&g!==n.retryLane))throw n.retryLane=g,fs(e,g),Ot(s,e,g),ka;tl(),t=Pu(e,t,i)}else e=n.treeContext,Pe=Wt(g.nextSibling),vt=t,Me=!0,Ni=null,Pt=!1,e!==null&&kc(t,e),t=Gn(t,s),t.flags|=4096;return t}return e=mi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Xn(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(G(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Ha(e,t,i,s,r){return gs(t),i=va(e,t,i,s,void 0,r),s=ga(),e!==null&&!lt?(ma(e,t,r),Ei(e,t,r)):(Me&&s&&Wl(t),t.flags|=1,mt(e,t,i,r),t.child)}function Qu(e,t,i,s,r,n){return gs(t),t.updateQueue=null,i=Jc(t,s,i,r),Zc(e),s=ga(),e!==null&&!lt?(ma(e,t,n),Ei(e,t,n)):(Me&&s&&Wl(t),t.flags|=1,mt(e,t,i,n),t.child)}function Wu(e,t,i,s,r){if(gs(t),t.stateNode===null){var n=qs,g=i.contextType;typeof g=="object"&&g!==null&&(n=gt(g)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Oa,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},aa(t),g=i.contextType,n.context=typeof g=="object"&&g!==null?gt(g):qs,n.state=t.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(La(t,i,g,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(g=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),g!==n.state&&Oa.enqueueReplaceState(n,n.state,null),Lr(t,s,n,r),Mr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var R=t.memoizedProps,H=Cs(i,R);n.props=H;var F=n.context,$=i.contextType;g=qs,typeof $=="object"&&$!==null&&(g=gt($));var ne=i.getDerivedStateFromProps;$=typeof ne=="function"||typeof n.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,$||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(R||F!==g)&&zu(t,n,s,g),Ii=!1;var P=t.memoizedState;n.state=P,Lr(t,s,n,r),Mr(),F=t.memoizedState,R||P!==F||Ii?(typeof ne=="function"&&(La(t,i,ne,s),F=t.memoizedState),(H=Ii||Hu(t,i,H,s,P,F,g))?($||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=F),n.props=s,n.state=F,n.context=g,s=H):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,oa(e,t),g=t.memoizedProps,$=Cs(i,g),n.props=$,ne=t.pendingProps,P=n.context,F=i.contextType,H=qs,typeof F=="object"&&F!==null&&(H=gt(F)),R=i.getDerivedStateFromProps,(F=typeof R=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(g!==ne||P!==H)&&zu(t,n,s,H),Ii=!1,P=t.memoizedState,n.state=P,Lr(t,s,n,r),Mr();var W=t.memoizedState;g!==ne||P!==W||Ii||e!==null&&e.dependencies!==null&&Dn(e.dependencies)?(typeof R=="function"&&(La(t,i,R,s),W=t.memoizedState),($=Ii||Hu(t,i,$,s,P,W,H)||e!==null&&e.dependencies!==null&&Dn(e.dependencies))?(F||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,W,H),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,W,H)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=W),n.props=s,n.state=W,n.context=H,s=$):(typeof n.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,Xn(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=ys(t,e.child,null,r),t.child=ys(t,null,i,r)):mt(e,t,i,r),t.memoizedState=n.state,e=t.child):e=Ei(e,t,r),e}function Zu(e,t,i,s){return _s(),t.flags|=256,mt(e,t,i,s),t.child}var za={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ua(e){return{baseLanes:e,cachePool:qc()}}function Na(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=jt),e}function Ju(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,g;if((g=n)||(g=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(r?Gi(t):Xi(),(e=Pe)?(e=af(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui!==null?{id:ci,overflow:ui}:null,retryLane:536870912,hydrationErrors:null},i=Lc(e),i.return=t,t.child=i,vt=t,Pe=null)):e=null,e===null)throw ji(t);return bo(e)?t.lanes=32:t.lanes=536870912,null}var R=s.children;return s=s.fallback,r?(Xi(),r=t.mode,R=Fn({mode:"hidden",children:R},r),s=ds(s,r,i,null),R.return=t,s.return=t,R.sibling=s,t.child=R,s=t.child,s.memoizedState=Ua(i),s.childLanes=Na(e,g,i),t.memoizedState=za,zr(null,s)):(Gi(t),ja(t,R))}var H=e.memoizedState;if(H!==null&&(R=H.dehydrated,R!==null)){if(n)t.flags&256?(Gi(t),t.flags&=-257,t=qa(e,t,i)):t.memoizedState!==null?(Xi(),t.child=e.child,t.flags|=128,t=null):(Xi(),R=s.fallback,r=t.mode,s=Fn({mode:"visible",children:s.children},r),R=ds(R,r,i,null),R.flags|=2,s.return=t,R.return=t,s.sibling=R,t.child=s,ys(t,e.child,null,i),s=t.child,s.memoizedState=Ua(i),s.childLanes=Na(e,g,i),t.memoizedState=za,t=zr(null,s));else if(Gi(t),bo(R)){if(g=R.nextSibling&&R.nextSibling.dataset,g)var F=g.dgst;g=F,s=Error(G(419)),s.stack="",s.digest=g,wr({value:s,source:null,stack:null}),t=qa(e,t,i)}else if(lt||Gs(e,t,i,!1),g=(i&e.childLanes)!==0,lt||g){if(g=Ge,g!==null&&(s=We(g,i),s!==0&&s!==H.retryLane))throw H.retryLane=s,fs(e,s),Ot(g,e,s),ka;yo(R)||tl(),t=qa(e,t,i)}else yo(R)?(t.flags|=192,t.child=e.child,t=null):(e=H.treeContext,Pe=Wt(R.nextSibling),vt=t,Me=!0,Ni=null,Pt=!1,e!==null&&kc(t,e),t=ja(t,s.children),t.flags|=4096);return t}return r?(Xi(),R=s.fallback,r=t.mode,H=e.child,F=H.sibling,s=mi(H,{mode:"hidden",children:s.children}),s.subtreeFlags=H.subtreeFlags&65011712,F!==null?R=mi(F,R):(R=ds(R,r,i,null),R.flags|=2),R.return=t,s.return=t,s.sibling=R,t.child=s,zr(null,s),s=t.child,R=e.child.memoizedState,R===null?R=Ua(i):(r=R.cachePool,r!==null?(H=rt._currentValue,r=r.parent!==H?{parent:H,pool:H}:r):r=qc(),R={baseLanes:R.baseLanes|i,cachePool:r}),s.memoizedState=R,s.childLanes=Na(e,g,i),t.memoizedState=za,zr(e.child,s)):(Gi(t),i=e.child,e=i.sibling,i=mi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=i,t.memoizedState=null,i)}function ja(e,t){return t=Fn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fn(e,t){return e=Ht(22,e,null,t),e.lanes=0,e}function qa(e,t,i){return ys(t,e.child,null,i),e=ja(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $u(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),ta(e.return,t,i)}function Ia(e,t,i,s,r,n){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=s,g.tail=i,g.tailMode=r,g.treeForkCount=n)}function eh(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var g=it.current,R=(g&2)!==0;if(R?(g=g&1|2,t.flags|=128):g&=1,Q(it,g),mt(e,t,s,i),s=Me?Er:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$u(e,i,t);else if(e.tag===19)$u(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&&kn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),Ia(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&&kn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}Ia(t,!0,i,null,n,s);break;case"together":Ia(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ei(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Gs(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,i=mi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=mi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ka(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Dn(e)))}function o_(e,t,i){switch(t.tag){case 3:Y(t,t.stateNode.containerInfo),qi(t,rt,e.memoizedState.cache),_s();break;case 27:case 5:te(t);break;case 4:Y(t,t.stateNode.containerInfo);break;case 10:qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,da(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Gi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Ju(e,t,i):(Gi(t),e=Ei(e,t,i),e!==null?e.sibling:null);Gi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Gs(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return eh(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Q(it,it.current),s)break;return null;case 22:return t.lanes=0,Fu(e,t,i,t.pendingProps);case 24:qi(t,rt,e.memoizedState.cache)}return Ei(e,t,i)}function th(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)lt=!0;else{if(!Ka(e,i)&&(t.flags&128)===0)return lt=!1,o_(e,t,i);lt=(e.flags&131072)!==0}else lt=!1,Me&&(t.flags&1048576)!==0&&Bc(t,Er,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ps(t.elementType),t.type=e,typeof e=="function")Vl(e)?(s=Cs(e,s),t.tag=1,t=Wu(null,t,e,s,i)):(t.tag=0,t=Ha(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=Yu(null,t,e,s,i);break e}else if(r===D){t.tag=14,t=Gu(null,t,e,s,i);break e}}throw t=V(e)||e,Error(G(306,t,""))}}return t;case 0:return Ha(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Cs(s,t.pendingProps),Wu(e,t,s,r,i);case 3:e:{if(Y(t,t.stateNode.containerInfo),e===null)throw Error(G(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,oa(e,t),Lr(t,s,null,i);var g=t.memoizedState;if(s=g.cache,qi(t,rt,s),s!==n.cache&&ia(t,[rt],i,!0),Mr(),s=g.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=Zu(e,t,s,i);break e}else if(s!==r){r=Xt(Error(G(424)),t),wr(r),t=Zu(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=Wt(e.firstChild),vt=t,Me=!0,Ni=null,Pt=!0,i=Fc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(_s(),s===r){t=Ei(e,t,i);break e}mt(e,t,s,i)}t=t.child}return t;case 26:return Xn(e,t),e===null?(i=df(t.type,null,t.pendingProps,null))?t.memoizedState=i:Me||(i=t.type,e=t.pendingProps,s=ol(he.current).createElement(i),s[_t]=t,s[Dt]=e,pt(s,i,e),ht(s),t.stateNode=s):t.memoizedState=df(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),e===null&&Me&&(s=t.stateNode=uf(t.type,t.pendingProps,he.current),vt=t,Pt=!0,r=Pe,$i(t.type)?(Co=r,Pe=Wt(s.firstChild)):Pe=r),mt(e,t,t.pendingProps.children,i),Xn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((r=s=Pe)&&(s=N_(s,t.type,t.pendingProps,Pt),s!==null?(t.stateNode=s,vt=t,Pe=Wt(s.firstChild),Pt=!1,r=!0):r=!1),r||ji(t)),te(t),r=t.type,n=t.pendingProps,g=e!==null?e.memoizedProps:null,s=n.children,mo(r,n)?s=null:g!==null&&mo(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=va(e,t,$d,null,null,i),Zr._currentValue=r),Xn(e,t),mt(e,t,s,i),t.child;case 6:return e===null&&Me&&((e=i=Pe)&&(i=j_(i,t.pendingProps,Pt),i!==null?(t.stateNode=i,vt=t,Pe=null,e=!0):e=!1),e||ji(t)),null;case 13:return Ju(e,t,i);case 4:return Y(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ys(t,null,s,i):mt(e,t,s,i),t.child;case 11:return Yu(e,t,t.type,t.pendingProps,i);case 7:return mt(e,t,t.pendingProps,i),t.child;case 8:return mt(e,t,t.pendingProps.children,i),t.child;case 12:return mt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,qi(t,t.type,s.value),mt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,gs(t),r=gt(r),s=s(r),t.flags|=1,mt(e,t,s,i),t.child;case 14:return Gu(e,t,t.type,t.pendingProps,i);case 15:return Xu(e,t,t.type,t.pendingProps,i);case 19:return eh(e,t,i);case 31:return a_(e,t,i);case 22:return Fu(e,t,i,t.pendingProps);case 24:return gs(t),s=gt(rt),e===null?(r=na(),r===null&&(r=Ge,n=sa(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},aa(t),qi(t,rt,r)):((e.lanes&i)!==0&&(oa(e,t),Lr(t,null,null,i),Mr()),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),qi(t,rt,s)):(s=n.cache,qi(t,rt,s),s!==r.cache&&ia(t,[rt],i,!0))),mt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(G(156,t.tag))}function wi(e){e.flags|=4}function Ya(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(Th())e.flags|=8192;else throw Ss=Mn,la}else e.flags&=-16777217}function ih(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!pf(t))if(Th())e.flags|=8192;else throw Ss=Mn,la}function Vn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?cn():536870912,e.lanes|=t,ir|=t)}function Ur(e,t){if(!Me)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 Qe(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 c_(e,t,i){var s=t.pendingProps;switch(Zl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return Qe(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),yi(rt),Z(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ys(t)?wi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$l())),Qe(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(wi(t),n!==null?(Qe(t),ih(t,n)):(Qe(t),Ya(t,r,null,s,i))):n?n!==e.memoizedState?(wi(t),Qe(t),ih(t,n)):(Qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&wi(t),Qe(t),Ya(t,r,e,s,i)),null;case 27:if(ye(t),i=he.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return Qe(t),null}e=ie.current,Ys(t)?Hc(t):(e=uf(r,s,i),t.stateNode=e,wi(t))}return Qe(t),null;case 5:if(ye(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return Qe(t),null}if(n=ie.current,Ys(t))Hc(t);else{var g=ol(he.current);switch(n){case 1:n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=g.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?g.createElement("select",{is:s.is}):g.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?g.createElement(r,{is:s.is}):g.createElement(r)}}n[_t]=t,n[Dt]=s;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)n.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=n;e:switch(pt(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&&wi(t)}}return Qe(t),Ya(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&wi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(G(166));if(e=he.current,Ys(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=vt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[_t]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Jh(e.nodeValue,i)),e||ji(t,!0)}else e=ol(e).createTextNode(s),e[_t]=t,t.stateNode=e}return Qe(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ys(t),i!==null){if(e===null){if(!s)throw Error(G(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(557));e[_t]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),e=!1}else i=$l(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Ut(t),t):(Ut(t),null);if((t.flags&128)!==0)throw Error(G(558))}return Qe(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ys(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(G(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(G(317));r[_t]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),r=!1}else r=$l(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Ut(t),t):(Ut(t),null)}return Ut(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),Vn(t,t.updateQueue),Qe(t),null);case 4:return Z(),e===null&&ho(t.stateNode.containerInfo),Qe(t),null;case 10:return yi(t.type),Qe(t),null;case 19:if(N(it),s=t.memoizedState,s===null)return Qe(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)Ur(s,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=kn(e),n!==null){for(t.flags|=128,Ur(s,!1),e=n.updateQueue,t.updateQueue=e,Vn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Mc(i,e),i=i.sibling;return Q(it,it.current&1|2),Me&&pi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Xe()>Jn&&(t.flags|=128,r=!0,Ur(s,!1),t.lanes=4194304)}else{if(!r)if(e=kn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Vn(t,e),Ur(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Me)return Qe(t),null}else 2*Xe()-s.renderingStartTime>Jn&&i!==536870912&&(t.flags|=128,r=!0,Ur(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=Xe(),e.sibling=null,i=it.current,Q(it,r?i&1|2:i&1),Me&&pi(t,s.treeForkCount),e):(Qe(t),null);case 22:case 23:return Ut(t),fa(),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&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),i=t.updateQueue,i!==null&&Vn(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&&N(ms),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),yi(rt),Qe(t),null;case 25:return null;case 30:return null}throw Error(G(156,t.tag))}function u_(e,t){switch(Zl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yi(rt),Z(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(Ut(t),t.alternate===null)throw Error(G(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ut(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(it),null;case 4:return Z(),null;case 10:return yi(t.type),null;case 22:case 23:return Ut(t),fa(),e!==null&&N(ms),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return yi(rt),null;case 25:return null;default:return null}}function sh(e,t){switch(Zl(t),t.tag){case 3:yi(rt),Z();break;case 26:case 27:case 5:ye(t);break;case 4:Z();break;case 31:t.memoizedState!==null&&Ut(t);break;case 13:Ut(t);break;case 19:N(it);break;case 10:yi(t.type);break;case 22:case 23:Ut(t),fa(),e!==null&&N(ms);break;case 24:yi(rt)}}function Nr(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,g=i.inst;s=n(),g.destroy=s}i=i.next}while(i!==r)}}catch(R){Ne(t,t.return,R)}}function Fi(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 g=s.inst,R=g.destroy;if(R!==void 0){g.destroy=void 0,r=t;var H=i,F=R;try{F()}catch($){Ne(r,H,$)}}}s=s.next}while(s!==n)}}catch($){Ne(t,t.return,$)}}function rh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Pc(t,i)}catch(s){Ne(e,e.return,s)}}}function nh(e,t,i){i.props=Cs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Ne(e,t,s)}}function jr(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 hi(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 lh(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 Ga(e,t,i){try{var s=e.stateNode;O_(s,e.type,i,t),s[Dt]=t}catch(r){Ne(e,e.return,r)}}function ah(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$i(e.type)||e.tag===4}function Xa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ah(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&&$i(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 Fa(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=vi));else if(s!==4&&(s===27&&$i(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Fa(e,t,i),e=e.sibling;e!==null;)Fa(e,t,i),e=e.sibling}function Pn(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&&$i(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Pn(e,t,i),e=e.sibling;e!==null;)Pn(e,t,i),e=e.sibling}function oh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);pt(t,s,i),t[_t]=e,t[Dt]=i}catch(n){Ne(e,e.return,n)}}var xi=!1,at=!1,Va=!1,ch=typeof WeakSet=="function"?WeakSet:Set,ft=null;function h_(e,t){if(e=e.containerInfo,vo=vl,e=bc(e),ql(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 g=0,R=-1,H=-1,F=0,$=0,ne=e,P=null;t:for(;;){for(var W;ne!==i||r!==0&&ne.nodeType!==3||(R=g+r),ne!==n||s!==0&&ne.nodeType!==3||(H=g+s),ne.nodeType===3&&(g+=ne.nodeValue.length),(W=ne.firstChild)!==null;)P=ne,ne=W;for(;;){if(ne===e)break t;if(P===i&&++F===r&&(R=g),P===n&&++$===s&&(H=g),(W=ne.nextSibling)!==null)break;ne=P,P=ne.parentNode}ne=W}i=R===-1||H===-1?null:{start:R,end:H}}else i=null}i=i||{start:0,end:0}}else i=null;for(go={focusedElem:e,selectionRange:i},vl=!1,ft=t;ft!==null;)if(t=ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ft=e;else for(;ft!==null;){switch(t=ft,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=Cs(i.type,r);e=s.getSnapshotBeforeUpdate(fe,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Ne(i,i.return,Se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)So(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":So(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(G(163))}if(e=t.sibling,e!==null){e.return=t.return,ft=e;break}ft=t.return}}function uh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Ai(e,i),s&4&&Nr(5,i);break;case 1:if(Ai(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(g){Ne(i,i.return,g)}else{var r=Cs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ne(i,i.return,g)}}s&64&&rh(i),s&512&&jr(i,i.return);break;case 3:if(Ai(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{Pc(e,t)}catch(g){Ne(i,i.return,g)}}break;case 27:t===null&&s&4&&oh(i);case 26:case 5:Ai(e,i),t===null&&s&4&&lh(i),s&512&&jr(i,i.return);break;case 12:Ai(e,i);break;case 31:Ai(e,i),s&4&&dh(e,i);break;case 13:Ai(e,i),s&4&&_h(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=y_.bind(null,i),q_(e,i))));break;case 22:if(s=i.memoizedState!==null||xi,!s){t=t!==null&&t.memoizedState!==null||at,r=xi;var n=at;xi=s,(at=t)&&!n?Ti(e,i,(i.subtreeFlags&8772)!==0):Ai(e,i),xi=r,at=n}break;case 30:break;default:Ai(e,i)}}function hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&El(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ze=null,Tt=!1;function Di(e,t,i){for(i=i.child;i!==null;)fh(e,t,i),i=i.sibling}function fh(e,t,i){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Bt,i)}catch{}switch(i.tag){case 26:at||hi(i,t),Di(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:at||hi(i,t);var s=Ze,r=Tt;$i(i.type)&&(Ze=i.stateNode,Tt=!1),Di(e,t,i),Pr(i.stateNode),Ze=s,Tt=r;break;case 5:at||hi(i,t);case 6:if(s=Ze,r=Tt,Ze=null,Di(e,t,i),Ze=s,Tt=r,Ze!==null)if(Tt)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(i.stateNode)}catch(n){Ne(i,t,n)}else try{Ze.removeChild(i.stateNode)}catch(n){Ne(i,t,n)}break;case 18:Ze!==null&&(Tt?(e=Ze,nf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),ur(e)):nf(Ze,i.stateNode));break;case 4:s=Ze,r=Tt,Ze=i.stateNode.containerInfo,Tt=!0,Di(e,t,i),Ze=s,Tt=r;break;case 0:case 11:case 14:case 15:Fi(2,i,t),at||Fi(4,i,t),Di(e,t,i);break;case 1:at||(hi(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&nh(i,t,s)),Di(e,t,i);break;case 21:Di(e,t,i);break;case 22:at=(s=at)||i.memoizedState!==null,Di(e,t,i),at=s;break;default:Di(e,t,i)}}function dh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ur(e)}catch(i){Ne(t,t.return,i)}}}function _h(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ur(e)}catch(i){Ne(t,t.return,i)}}function f_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ch),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ch),t;default:throw Error(G(435,e.tag))}}function Qn(e,t){var i=f_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=b_.bind(null,e,s);s.then(r,r)}})}function Rt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],n=e,g=t,R=g;e:for(;R!==null;){switch(R.tag){case 27:if($i(R.type)){Ze=R.stateNode,Tt=!1;break e}break;case 5:Ze=R.stateNode,Tt=!1;break e;case 3:case 4:Ze=R.stateNode.containerInfo,Tt=!0;break e}R=R.return}if(Ze===null)throw Error(G(160));fh(n,g,r),Ze=null,Tt=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vh(t,e),t=t.sibling}var ti=null;function vh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rt(t,e),Mt(e),s&4&&(Fi(3,e,e.return),Nr(3,e),Fi(5,e,e.return));break;case 1:Rt(t,e),Mt(e),s&512&&(at||i===null||hi(i,i.return)),s&64&&xi&&(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=ti;if(Rt(t,e),Mt(e),s&512&&(at||i===null||hi(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[_t]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),pt(n,s,i),n[_t]=e,ht(n),s=n;break e;case"link":var g=gf("link","href",r).get(s+(i.href||""));if(g){for(var R=0;R<g.length;R++)if(n=g[R],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)){g.splice(R,1);break t}}n=r.createElement(s),pt(n,s,i),r.head.appendChild(n);break;case"meta":if(g=gf("meta","content",r).get(s+(i.content||""))){for(R=0;R<g.length;R++)if(n=g[R],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)){g.splice(R,1);break t}}n=r.createElement(s),pt(n,s,i),r.head.appendChild(n);break;default:throw Error(G(468,s))}n[_t]=e,ht(n),s=n}e.stateNode=s}else mf(r,e.type,e.stateNode);else e.stateNode=vf(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?mf(r,e.type,e.stateNode):vf(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ga(e,e.memoizedProps,i.memoizedProps)}break;case 27:Rt(t,e),Mt(e),s&512&&(at||i===null||hi(i,i.return)),i!==null&&s&4&&Ga(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Rt(t,e),Mt(e),s&512&&(at||i===null||hi(i,i.return)),e.flags&32){r=e.stateNode;try{Bs(r,"")}catch(fe){Ne(e,e.return,fe)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Ga(e,r,i!==null?i.memoizedProps:r)),s&1024&&(Va=!0);break;case 6:if(Rt(t,e),Mt(e),s&4){if(e.stateNode===null)throw Error(G(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(fe){Ne(e,e.return,fe)}}break;case 3:if(hl=null,r=ti,ti=cl(t.containerInfo),Rt(t,e),ti=r,Mt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{ur(t.containerInfo)}catch(fe){Ne(e,e.return,fe)}Va&&(Va=!1,gh(e));break;case 4:s=ti,ti=cl(e.stateNode.containerInfo),Rt(t,e),Mt(e),ti=s;break;case 12:Rt(t,e),Mt(e);break;case 31:Rt(t,e),Mt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qn(e,s)));break;case 13:Rt(t,e),Mt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Zn=Xe()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qn(e,s)));break;case 22:r=e.memoizedState!==null;var H=i!==null&&i.memoizedState!==null,F=xi,$=at;if(xi=F||r,at=$||H,Rt(t,e),at=$,xi=F,Mt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||H||xi||at||Es(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){H=i=t;try{if(n=H.stateNode,r)g=n.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{R=H.stateNode;var ne=H.memoizedProps.style,P=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;R.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(fe){Ne(H,H.return,fe)}}}else if(t.tag===6){if(i===null){H=t;try{H.stateNode.nodeValue=r?"":H.memoizedProps}catch(fe){Ne(H,H.return,fe)}}}else if(t.tag===18){if(i===null){H=t;try{var W=H.stateNode;r?lf(W,!0):lf(H.stateNode,!1)}catch(fe){Ne(H,H.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,Qn(e,i))));break;case 19:Rt(t,e),Mt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qn(e,s)));break;case 30:break;case 21:break;default:Rt(t,e),Mt(e)}}function Mt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(ah(s)){i=s;break}s=s.return}if(i==null)throw Error(G(160));switch(i.tag){case 27:var r=i.stateNode,n=Xa(e);Pn(e,n,r);break;case 5:var g=i.stateNode;i.flags&32&&(Bs(g,""),i.flags&=-33);var R=Xa(e);Pn(e,R,g);break;case 3:case 4:var H=i.stateNode.containerInfo,F=Xa(e);Fa(e,F,H);break;default:throw Error(G(161))}}catch($){Ne(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ai(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)uh(e,t.alternate,t),t=t.sibling}function Es(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fi(4,t,t.return),Es(t);break;case 1:hi(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&nh(t,t.return,i),Es(t);break;case 27:Pr(t.stateNode);case 26:case 5:hi(t,t.return),Es(t);break;case 22:t.memoizedState===null&&Es(t);break;case 30:Es(t);break;default:Es(t)}e=e.sibling}}function Ti(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,g=n.flags;switch(n.tag){case 0:case 11:case 15:Ti(r,n,i),Nr(4,n);break;case 1:if(Ti(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(F){Ne(s,s.return,F)}if(s=n,r=s.updateQueue,r!==null){var R=s.stateNode;try{var H=r.shared.hiddenCallbacks;if(H!==null)for(r.shared.hiddenCallbacks=null,r=0;r<H.length;r++)Vc(H[r],R)}catch(F){Ne(s,s.return,F)}}i&&g&64&&rh(n),jr(n,n.return);break;case 27:oh(n);case 26:case 5:Ti(r,n,i),i&&s===null&&g&4&&lh(n),jr(n,n.return);break;case 12:Ti(r,n,i);break;case 31:Ti(r,n,i),i&&g&4&&dh(r,n);break;case 13:Ti(r,n,i),i&&g&4&&_h(r,n);break;case 22:n.memoizedState===null&&Ti(r,n,i),jr(n,n.return);break;case 30:break;default:Ti(r,n,i)}t=t.sibling}}function Pa(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 Qa(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 ii(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)mh(e,t,i,s),t=t.sibling}function mh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:ii(e,t,i,s),r&2048&&Nr(9,t);break;case 1:ii(e,t,i,s);break;case 3:ii(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){ii(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,g=n.id,R=n.onPostCommit;typeof R=="function"&&R(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(H){Ne(t,t.return,H)}}else ii(e,t,i,s);break;case 31:ii(e,t,i,s);break;case 13:ii(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,g=t.alternate,t.memoizedState!==null?n._visibility&2?ii(e,t,i,s):qr(e,t):n._visibility&2?ii(e,t,i,s):(n._visibility|=2,$s(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Pa(g,t);break;case 24:ii(e,t,i,s),r&2048&&Qa(t.alternate,t);break;default:ii(e,t,i,s)}}function $s(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,g=t,R=i,H=s,F=g.flags;switch(g.tag){case 0:case 11:case 15:$s(n,g,R,H,r),Nr(8,g);break;case 23:break;case 22:var $=g.stateNode;g.memoizedState!==null?$._visibility&2?$s(n,g,R,H,r):qr(n,g):($._visibility|=2,$s(n,g,R,H,r)),r&&F&2048&&Pa(g.alternate,g);break;case 24:$s(n,g,R,H,r),r&&F&2048&&Qa(g.alternate,g);break;default:$s(n,g,R,H,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&&Pa(s.alternate,s);break;case 24:qr(i,s),r&2048&&Qa(s.alternate,s);break;default:qr(i,s)}t=t.sibling}}var Ir=8192;function er(e,t,i){if(e.subtreeFlags&Ir)for(e=e.child;e!==null;)ph(e,t,i),e=e.sibling}function ph(e,t,i){switch(e.tag){case 26:er(e,t,i),e.flags&Ir&&e.memoizedState!==null&&J_(i,ti,e.memoizedState,e.memoizedProps);break;case 5:er(e,t,i);break;case 3:case 4:var s=ti;ti=cl(e.stateNode.containerInfo),er(e,t,i),ti=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Ir,Ir=16777216,er(e,t,i),Ir=s):er(e,t,i));break;default:er(e,t,i)}}function Sh(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 Kr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ft=s,bh(s,e)}Sh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)yh(e),e=e.sibling}function yh(e){switch(e.tag){case 0:case 11:case 15:Kr(e),e.flags&2048&&Fi(9,e,e.return);break;case 3:Kr(e);break;case 12:Kr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wn(e)):Kr(e);break;default:Kr(e)}}function Wn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ft=s,bh(s,e)}Sh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fi(8,t,t.return),Wn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Wn(t));break;default:Wn(t)}e=e.sibling}}function bh(e,t){for(;ft!==null;){var i=ft;switch(i.tag){case 0:case 11:case 15:Fi(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,ft=s;else e:for(i=e;ft!==null;){s=ft;var r=s.sibling,n=s.return;if(hh(s),s===i){ft=null;break e}if(r!==null){r.return=n,ft=r;break e}ft=n}}}var d_={getCacheForType:function(e){var t=gt(rt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return gt(rt).controller.signal}},__=typeof WeakMap=="function"?WeakMap:Map,ze=0,Ge=null,xe=null,Te=0,Ue=0,Nt=null,Vi=!1,tr=!1,Wa=!1,Ri=0,et=0,Pi=0,ws=0,Za=0,jt=0,ir=0,Yr=null,Lt=null,Ja=!1,Zn=0,Ch=0,Jn=1/0,$n=null,Qi=null,ut=0,Wi=null,sr=null,Mi=0,$a=0,eo=null,Eh=null,Gr=0,to=null;function qt(){return(ze&2)!==0&&Te!==0?Te&-Te:k.T!==null?ao():xt()}function wh(){if(jt===0)if((Te&536870912)===0||Me){var e=Bi;Bi<<=1,(Bi&3932160)===0&&(Bi=262144),jt=e}else jt=536870912;return e=zt.current,e!==null&&(e.flags|=32),jt}function Ot(e,t,i){(e===Ge&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(rr(e,0),Zi(e,Te,jt,!1)),de(e,i),((ze&2)===0||e!==Ge)&&(e===Ge&&((ze&2)===0&&(ws|=i),et===4&&Zi(e,Te,jt,!1)),fi(e))}function xh(e,t,i){if((ze&6)!==0)throw Error(G(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||ki(e,t),r=s?m_(e,t):so(e,t,!0),n=s;do{if(r===0){tr&&!s&&Zi(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!v_(i)){r=so(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var R=e;r=Yr;var H=R.current.memoizedState.isDehydrated;if(H&&(rr(R,g).flags|=256),g=so(R,g,!1),g!==2){if(Wa&&!H){R.errorRecoveryDisabledLanes|=n,ws|=n,r=4;break e}n=Lt,Lt=r,n!==null&&(Lt===null?Lt=n:Lt.push.apply(Lt,n))}r=g}if(n=!1,r!==2)continue}}if(r===1){rr(e,0),Zi(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(G(345));case 4:if((t&4194048)!==t)break;case 6:Zi(s,t,jt,!Vi);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(G(329))}if((t&62914560)===t&&(r=Zn+300-Xe(),10<r)){if(Zi(s,t,jt,!Vi),as(s,0,!0)!==0)break e;Mi=t,s.timeoutHandle=sf(Dh.bind(null,s,i,Lt,$n,Ja,t,jt,ws,ir,Vi,n,"Throttled",-0,0),r);break e}Dh(s,i,Lt,$n,Ja,t,jt,ws,ir,Vi,n,null,-0,0)}}break}while(!0);fi(e)}function Dh(e,t,i,s,r,n,g,R,H,F,$,ne,P,W){if(e.timeoutHandle=-1,ne=t.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vi},ph(t,n,ne);var fe=(n&62914560)===n?Zn-Xe():(n&4194048)===n?Ch-Xe():0;if(fe=$_(ne,fe),fe!==null){Mi=n,e.cancelPendingCommit=fe(kh.bind(null,e,t,n,i,s,r,g,R,H,$,ne,null,P,W)),Zi(e,n,g,!F);return}}kh(e,t,n,i,s,r,g,R,H)}function v_(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(!kt(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 Zi(e,t,i,s){t&=~Za,t&=~ws,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-dt(r),g=1<<n;s[n]=-1,r&=~g}i!==0&&Ye(e,i,t)}function el(){return(ze&6)===0?(Xr(0),!1):!0}function io(){if(xe!==null){if(Ue===0)var e=xe.return;else e=xe,Si=vs=null,pa(e),Ps=null,Ar=0,e=xe;for(;e!==null;)sh(e.alternate,e),e=e.return;xe=null}}function rr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,H_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Mi=0,io(),Ge=e,xe=i=mi(e.current,null),Te=t,Ue=0,Nt=null,Vi=!1,tr=ki(e,t),Wa=!1,ir=jt=Za=ws=Pi=et=0,Lt=Yr=null,Ja=!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-dt(s),n=1<<r;t|=e[r],s&=~n}return Ri=t,bn(),i}function Ah(e,t){Ee=null,k.H=Hr,t===Vs||t===Rn?(t=Yc(),Ue=3):t===la?(t=Yc(),Ue=4):Ue=t===ka?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Nt=t,xe===null&&(et=1,Yn(e,Xt(t,e.current)))}function Th(){var e=zt.current;return e===null?!0:(Te&4194048)===Te?Qt===null:(Te&62914560)===Te||(Te&536870912)!==0?e===Qt:!1}function Rh(){var e=k.H;return k.H=Hr,e===null?Hr:e}function Mh(){var e=k.A;return k.A=d_,e}function tl(){et=4,Vi||(Te&4194048)!==Te&&zt.current!==null||(tr=!0),(Pi&134217727)===0&&(ws&134217727)===0||Ge===null||Zi(Ge,Te,jt,!1)}function so(e,t,i){var s=ze;ze|=2;var r=Rh(),n=Mh();(Ge!==e||Te!==t)&&($n=null,rr(e,t)),t=!1;var g=et;e:do try{if(Ue!==0&&xe!==null){var R=xe,H=Nt;switch(Ue){case 8:io(),g=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var F=Ue;if(Ue=0,Nt=null,nr(e,R,H,F),i&&tr){g=0;break e}break;default:F=Ue,Ue=0,Nt=null,nr(e,R,H,F)}}g_(),g=et;break}catch($){Ah(e,$)}while(!0);return t&&e.shellSuspendCounter++,Si=vs=null,ze=s,k.H=r,k.A=n,xe===null&&(Ge=null,Te=0,bn()),g}function g_(){for(;xe!==null;)Lh(xe)}function m_(e,t){var i=ze;ze|=2;var s=Rh(),r=Mh();Ge!==e||Te!==t?($n=null,Jn=Xe()+500,rr(e,t)):tr=ki(e,t);e:do try{if(Ue!==0&&xe!==null){t=xe;var n=Nt;t:switch(Ue){case 1:Ue=0,Nt=null,nr(e,t,n,1);break;case 2:case 9:if(Ic(n)){Ue=0,Nt=null,Oh(t);break}t=function(){Ue!==2&&Ue!==9||Ge!==e||(Ue=7),fi(e)},n.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:Ic(n)?(Ue=0,Nt=null,Oh(t)):(Ue=0,Nt=null,nr(e,t,n,7));break;case 5:var g=null;switch(xe.tag){case 26:g=xe.memoizedState;case 5:case 27:var R=xe;if(g?pf(g):R.stateNode.complete){Ue=0,Nt=null;var H=R.sibling;if(H!==null)xe=H;else{var F=R.return;F!==null?(xe=F,il(F)):xe=null}break t}}Ue=0,Nt=null,nr(e,t,n,5);break;case 6:Ue=0,Nt=null,nr(e,t,n,6);break;case 8:io(),et=6;break e;default:throw Error(G(462))}}p_();break}catch($){Ah(e,$)}while(!0);return Si=vs=null,k.H=s,k.A=r,ze=i,xe!==null?0:(Ge=null,Te=0,bn(),et)}function p_(){for(;xe!==null&&!ni();)Lh(xe)}function Lh(e){var t=th(e.alternate,e,Ri);e.memoizedProps=e.pendingProps,t===null?il(e):xe=t}function Oh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Qu(i,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Qu(i,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:pa(t);default:sh(i,t),t=xe=Mc(t,Ri),t=th(i,t,Ri)}e.memoizedProps=e.pendingProps,t===null?il(e):xe=t}function nr(e,t,i,s){Si=vs=null,pa(t),Ps=null,Ar=0;var r=t.return;try{if(l_(e,r,t,i,Te)){et=1,Yn(e,Xt(i,e.current)),xe=null;return}}catch(n){if(r!==null)throw xe=r,n;et=1,Yn(e,Xt(i,e.current)),xe=null;return}t.flags&32768?(Me||s===1?e=!0:tr||(Te&536870912)!==0?e=!1:(Vi=e=!0,(s===2||s===9||s===3||s===6)&&(s=zt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Bh(t,e)):il(t)}function il(e){var t=e;do{if((t.flags&32768)!==0){Bh(t,Vi);return}e=t.return;var i=c_(t.alternate,t,Ri);if(i!==null){xe=i;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);et===0&&(et=5)}function Bh(e,t){do{var i=u_(e.alternate,e);if(i!==null){i.flags&=32767,xe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){xe=e;return}xe=e=i}while(e!==null);et=6,xe=null}function kh(e,t,i,s,r,n,g,R,H){e.cancelPendingCommit=null;do sl();while(ut!==0);if((ze&6)!==0)throw Error(G(327));if(t!==null){if(t===e.current)throw Error(G(177));if(n=t.lanes|t.childLanes,n|=Xl,Le(e,i,n,g,R,H),e===Ge&&(xe=Ge=null,Te=0),sr=t,Wi=e,Mi=i,$a=n,eo=r,Eh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,C_(St,function(){return jh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=k.T,k.T=null,r=I.p,I.p=2,g=ze,ze|=4;try{h_(e,t,i)}finally{ze=g,I.p=r,k.T=s}}ut=1,Hh(),zh(),Uh()}}function Hh(){if(ut===1){ut=0;var e=Wi,t=sr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=k.T,k.T=null;var s=I.p;I.p=2;var r=ze;ze|=4;try{vh(t,e);var n=go,g=bc(e.containerInfo),R=n.focusedElem,H=n.selectionRange;if(g!==R&&R&&R.ownerDocument&&yc(R.ownerDocument.documentElement,R)){if(H!==null&&ql(R)){var F=H.start,$=H.end;if($===void 0&&($=F),"selectionStart"in R)R.selectionStart=F,R.selectionEnd=Math.min($,R.value.length);else{var ne=R.ownerDocument||document,P=ne&&ne.defaultView||window;if(P.getSelection){var W=P.getSelection(),fe=R.textContent.length,Se=Math.min(H.start,fe),Ke=H.end===void 0?Se:Math.min(H.end,fe);!W.extend&&Se>Ke&&(g=Ke,Ke=Se,Se=g);var K=Sc(R,Se),j=Sc(R,Ke);if(K&&j&&(W.rangeCount!==1||W.anchorNode!==K.node||W.anchorOffset!==K.offset||W.focusNode!==j.node||W.focusOffset!==j.offset)){var X=ne.createRange();X.setStart(K.node,K.offset),W.removeAllRanges(),Se>Ke?(W.addRange(X),W.extend(j.node,j.offset)):(X.setEnd(j.node,j.offset),W.addRange(X))}}}}for(ne=[],W=R;W=W.parentNode;)W.nodeType===1&&ne.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ne.length;R++){var re=ne[R];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}vl=!!vo,go=vo=null}finally{ze=r,I.p=s,k.T=i}}e.current=t,ut=2}}function zh(){if(ut===2){ut=0;var e=Wi,t=sr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=k.T,k.T=null;var s=I.p;I.p=2;var r=ze;ze|=4;try{uh(e,t.alternate,t)}finally{ze=r,I.p=s,k.T=i}}ut=3}}function Uh(){if(ut===4||ut===3){ut=0,ot();var e=Wi,t=sr,i=Mi,s=Eh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,sr=Wi=null,Nh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Qi=null),tt(i),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Bt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=k.T,r=I.p,I.p=2,k.T=null;try{for(var n=e.onRecoverableError,g=0;g<s.length;g++){var R=s[g];n(R.value,{componentStack:R.stack})}}finally{k.T=t,I.p=r}}(Mi&3)!==0&&sl(),fi(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===to?Gr++:(Gr=0,to=e):Gr=0,Xr(0)}}function Nh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xr(t)))}function sl(){return Hh(),zh(),Uh(),jh()}function jh(){if(ut!==5)return!1;var e=Wi,t=$a;$a=0;var i=tt(Mi),s=k.T,r=I.p;try{I.p=32>i?32:i,k.T=null,i=eo,eo=null;var n=Wi,g=Mi;if(ut=0,sr=Wi=null,Mi=0,(ze&6)!==0)throw Error(G(331));var R=ze;if(ze|=4,yh(n.current),mh(n,n.current,g,i),ze=R,Xr(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Bt,n)}catch{}return!0}finally{I.p=r,k.T=s,Nh(e,t)}}function qh(e,t,i){t=Xt(i,t),t=Ba(e.stateNode,t,2),e=Yi(e,t,2),e!==null&&(de(e,2),fi(e))}function Ne(e,t,i){if(e.tag===3)qh(e,e,i);else for(;t!==null;){if(t.tag===3){qh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Qi===null||!Qi.has(s))){e=Xt(i,e),i=Iu(2),s=Yi(t,i,2),s!==null&&(Ku(i,s,t,e),de(s,2),fi(s));break}}t=t.return}}function ro(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new __;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)||(Wa=!0,r.add(i),e=S_.bind(null,e,t,i),t.then(e,e))}function S_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ge===e&&(Te&i)===i&&(et===4||et===3&&(Te&62914560)===Te&&300>Xe()-Zn?(ze&2)===0&&rr(e,0):Za|=i,ir===Te&&(ir=0)),fi(e)}function Ih(e,t){t===0&&(t=cn()),e=fs(e,t),e!==null&&(de(e,t),fi(e))}function y_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ih(e,i)}function b_(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(G(314))}s!==null&&s.delete(t),Ih(e,i)}function C_(e,t){return Jt(e,t)}var rl=null,lr=null,no=!1,nl=!1,lo=!1,Ji=0;function fi(e){e!==lr&&e.next===null&&(lr===null?rl=lr=e:lr=lr.next=e),nl=!0,no||(no=!0,w_())}function Xr(e,t){if(!lo&&nl){lo=!0;do for(var i=!1,s=rl;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var g=s.suspendedLanes,R=s.pingedLanes;n=(1<<31-dt(42|e)+1)-1,n&=r&~(g&~R),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Xh(s,n))}else n=Te,n=as(s,s===Ge?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||ki(s,n)||(i=!0,Xh(s,n));s=s.next}while(i);lo=!1}}function E_(){Kh()}function Kh(){nl=no=!1;var e=0;Ji!==0&&k_()&&(e=Ji);for(var t=Xe(),i=null,s=rl;s!==null;){var r=s.next,n=Yh(s,t);n===0?(s.next=null,i===null?rl=r:i.next=r,r===null&&(lr=i)):(i=s,(e!==0||(n&3)!==0)&&(nl=!0)),s=r}ut!==0&&ut!==5||Xr(e),Ji!==0&&(Ji=0)}function Yh(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var g=31-dt(n),R=1<<g,H=r[g];H===-1?((R&i)===0||(R&s)!==0)&&(r[g]=on(R,t)):H<=t&&(e.expiredLanes|=R),n&=~R}if(t=Ge,i=Te,i=as(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&ri(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||ki(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&ri(s),tt(i)){case 2:case 8:i=di;break;case 32:i=St;break;case 268435456:i=Ve;break;default:i=St}return s=Gh.bind(null,e),i=Jt(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&ri(s),e.callbackPriority=2,e.callbackNode=null,2}function Gh(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(sl()&&e.callbackNode!==i)return null;var s=Te;return s=as(e,e===Ge?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(xh(e,s,t),Yh(e,Xe()),e.callbackNode!=null&&e.callbackNode===i?Gh.bind(null,e):null)}function Xh(e,t){if(sl())return null;xh(e,t,!0)}function w_(){z_(function(){(ze&6)!==0?Jt(ct,E_):Kh()})}function ao(){if(Ji===0){var e=Xs;e===0&&(e=li,li<<=1,(li&261888)===0&&(li=256)),Ji=e}return Ji}function Fh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:dn(""+e)}function Vh(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 x_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Fh((r[Dt]||null).action),g=s.submitter;g&&(t=(t=g[Dt]||null)?Fh(t.formAction):g.getAttribute("formAction"),t!==null&&(n=t,g=null));var R=new mn("action","action",null,s,r);e.push({event:R,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ji!==0){var H=g?Vh(r,g):new FormData(r);Aa(i,{pending:!0,data:H,method:r.method,action:n},null,H)}}else typeof n=="function"&&(R.preventDefault(),H=g?Vh(r,g):new FormData(r),Aa(i,{pending:!0,data:H,method:r.method,action:n},n,H))},currentTarget:r}]})}}for(var oo=0;oo<Gl.length;oo++){var co=Gl[oo],D_=co.toLowerCase(),A_=co[0].toUpperCase()+co.slice(1);ei(D_,"on"+A_)}ei(wc,"onAnimationEnd"),ei(xc,"onAnimationIteration"),ei(Dc,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(Yd,"onTransitionRun"),ei(Gd,"onTransitionStart"),ei(Xd,"onTransitionCancel"),ei(Ac,"onTransitionEnd"),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),os("onBeforeInput",["compositionend","keypress","textInput","paste"]),os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),os("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(" "),T_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fr));function Ph(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 g=s.length-1;0<=g;g--){var R=s[g],H=R.instance,F=R.currentTarget;if(R=R.listener,H!==n&&r.isPropagationStopped())break e;n=R,r.currentTarget=F;try{n(r)}catch($){yn($)}r.currentTarget=null,n=H}else for(g=0;g<s.length;g++){if(R=s[g],H=R.instance,F=R.currentTarget,R=R.listener,H!==n&&r.isPropagationStopped())break e;n=R,r.currentTarget=F;try{n(r)}catch($){yn($)}r.currentTarget=null,n=H}}}}function De(e,t){var i=t[Cl];i===void 0&&(i=t[Cl]=new Set);var s=e+"__bubble";i.has(s)||(Qh(t,e,2,!1),i.add(s))}function uo(e,t,i){var s=0;t&&(s|=4),Qh(i,e,s,t)}var ll="_reactListening"+Math.random().toString(36).slice(2);function ho(e){if(!e[ll]){e[ll]=!0,Ko.forEach(function(i){i!=="selectionchange"&&(T_.has(i)||uo(i,!1,e),uo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ll]||(t[ll]=!0,uo("selectionchange",!1,t))}}function Qh(e,t,i,s){switch(xf(t)){case 2:var r=iv;break;case 8:r=sv;break;default:r=Ao}i=r.bind(null,t,i,e),r=void 0,!Ll||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 fo(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var g=s.tag;if(g===3||g===4){var R=s.stateNode.containerInfo;if(R===r)break;if(g===4)for(g=s.return;g!==null;){var H=g.tag;if((H===3||H===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;R!==null;){if(g=Ts(R),g===null)return;if(H=g.tag,H===5||H===6||H===26||H===27){s=n=g;continue e}R=R.parentNode}}s=s.return}ec(function(){var F=n,$=Rl(i),ne=[];e:{var P=Tc.get(e);if(P!==void 0){var W=mn,fe=e;switch(e){case"keypress":if(vn(i)===0)break e;case"keydown":case"keyup":W=bd;break;case"focusin":fe="focus",W=Hl;break;case"focusout":fe="blur",W=Hl;break;case"beforeblur":case"afterblur":W=Hl;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":W=sc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=cd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=wd;break;case wc:case xc:case Dc:W=fd;break;case Ac:W=Dd;break;case"scroll":case"scrollend":W=ad;break;case"wheel":W=Td;break;case"copy":case"cut":case"paste":W=_d;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=nc;break;case"toggle":case"beforetoggle":W=Md}var Se=(t&4)!==0,Ke=!Se&&(e==="scroll"||e==="scrollend"),K=Se?P!==null?P+"Capture":null:P;Se=[];for(var j=F,X;j!==null;){var re=j;if(X=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||X===null||K===null||(re=_r(j,K),re!=null&&Se.push(Vr(j,re,X))),Ke)break;j=j.return}0<Se.length&&(P=new W(P,fe,null,i,$),ne.push({event:P,listeners:Se}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",W=e==="mouseout"||e==="pointerout",P&&i!==Tl&&(fe=i.relatedTarget||i.fromElement)&&(Ts(fe)||fe[As]))break e;if((W||P)&&(P=$.window===$?$:(P=$.ownerDocument)?P.defaultView||P.parentWindow:window,W?(fe=i.relatedTarget||i.toElement,W=F,fe=fe?Ts(fe):null,fe!==null&&(Ke=ge(fe),Se=fe.tag,fe!==Ke||Se!==5&&Se!==27&&Se!==6)&&(fe=null)):(W=null,fe=F),W!==fe)){if(Se=sc,re="onMouseLeave",K="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(Se=nc,re="onPointerLeave",K="onPointerEnter",j="pointer"),Ke=W==null?P:dr(W),X=fe==null?P:dr(fe),P=new Se(re,j+"leave",W,i,$),P.target=Ke,P.relatedTarget=X,re=null,Ts($)===F&&(Se=new Se(K,j+"enter",fe,i,$),Se.target=X,Se.relatedTarget=Ke,re=Se),Ke=re,W&&fe)t:{for(Se=R_,K=W,j=fe,X=0,re=K;re;re=Se(re))X++;re=0;for(var ve=j;ve;ve=Se(ve))re++;for(;0<X-re;)K=Se(K),X--;for(;0<re-X;)j=Se(j),re--;for(;X--;){if(K===j||j!==null&&K===j.alternate){Se=K;break t}K=Se(K),j=Se(j)}Se=null}else Se=null;W!==null&&Wh(ne,P,W,Se,!1),fe!==null&&Ke!==null&&Wh(ne,Ke,fe,Se,!0)}}e:{if(P=F?dr(F):window,W=P.nodeName&&P.nodeName.toLowerCase(),W==="select"||W==="input"&&P.type==="file")var Oe=dc;else if(hc(P))if(_c)Oe=qd;else{Oe=Nd;var _e=Ud}else W=P.nodeName,!W||W.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?F&&Al(F.elementType)&&(Oe=dc):Oe=jd;if(Oe&&(Oe=Oe(e,F))){fc(ne,Oe,i,$);break e}_e&&_e(e,P,F),e==="focusout"&&F&&P.type==="number"&&F.memoizedProps.value!=null&&Dl(P,"number",P.value)}switch(_e=F?dr(F):window,e){case"focusin":(hc(_e)||_e.contentEditable==="true")&&(Us=_e,Il=F,Cr=null);break;case"focusout":Cr=Il=Us=null;break;case"mousedown":Kl=!0;break;case"contextmenu":case"mouseup":case"dragend":Kl=!1,Cc(ne,i,$);break;case"selectionchange":if(Kd)break;case"keydown":case"keyup":Cc(ne,i,$)}var we;if(Ul)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else zs?cc(e,i)&&(Re="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Re="onCompositionStart");Re&&(lc&&i.locale!=="ko"&&(zs||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&zs&&(we=tc()):(zi=$,Ol="value"in zi?zi.value:zi.textContent,zs=!0)),_e=al(F,Re),0<_e.length&&(Re=new rc(Re,e,null,i,$),ne.push({event:Re,listeners:_e}),we?Re.data=we:(we=uc(i),we!==null&&(Re.data=we)))),(we=Od?Bd(e,i):kd(e,i))&&(Re=al(F,"onBeforeInput"),0<Re.length&&(_e=new rc("onBeforeInput","beforeinput",null,i,$),ne.push({event:_e,listeners:Re}),_e.data=we)),x_(ne,e,F,i,$)}Ph(ne,t)})}function Vr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function al(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(Vr(e,r,n)),r=_r(e,t),r!=null&&s.push(Vr(e,r,n))),e.tag===3)return s;e=e.return}return[]}function R_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wh(e,t,i,s,r){for(var n=t._reactName,g=[];i!==null&&i!==s;){var R=i,H=R.alternate,F=R.stateNode;if(R=R.tag,H!==null&&H===s)break;R!==5&&R!==26&&R!==27||F===null||(H=F,r?(F=_r(i,n),F!=null&&g.unshift(Vr(i,F,H))):r||(F=_r(i,n),F!=null&&g.push(Vr(i,F,H)))),i=i.return}g.length!==0&&e.push({event:t,listeners:g})}var M_=/\r\n?/g,L_=/\u0000|\uFFFD/g;function Zh(e){return(typeof e=="string"?e:""+e).replace(M_,`
|
|
9
|
+
`).replace(L_,"")}function Jh(e,t){return t=Zh(t),Zh(e)===t}function Ie(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Bs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Bs(e,""+s);break;case"className":hn(e,"class",s);break;case"tabIndex":hn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":hn(e,i,s);break;case"style":Jo(e,s,n);break;case"data":if(t!=="object"){hn(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=dn(""+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"&&Ie(e,t,"name",r.name,r,null),Ie(e,t,"formEncType",r.formEncType,r,null),Ie(e,t,"formMethod",r.formMethod,r,null),Ie(e,t,"formTarget",r.formTarget,r,null)):(Ie(e,t,"encType",r.encType,r,null),Ie(e,t,"method",r.method,r,null),Ie(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=dn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=vi);break;case"onScroll":s!=null&&De("scroll",e);break;case"onScrollEnd":s!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(G(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(G(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=dn(""+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":De("beforetoggle",e),De("toggle",e),un(e,"popover",s);break;case"xlinkActuate":_i(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":_i(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":_i(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":_i(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":_i(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":_i(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":_i(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":_i(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":_i(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":un(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=nd.get(i)||i,un(e,i,s))}}function _o(e,t,i,s,r,n){switch(i){case"style":Jo(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(G(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(G(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Bs(e,s):(typeof s=="number"||typeof s=="bigint")&&Bs(e,""+s);break;case"onScroll":s!=null&&De("scroll",e);break;case"onScrollEnd":s!=null&&De("scrollend",e);break;case"onClick":s!=null&&(e.onclick=vi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(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,""):un(e,i,s)}}}function pt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var g=i[n];if(g!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:Ie(e,t,n,g,i,null)}}r&&Ie(e,t,"srcSet",i.srcSet,i,null),s&&Ie(e,t,"src",i.src,i,null);return;case"input":De("invalid",e);var R=n=g=r=null,H=null,F=null;for(s in i)if(i.hasOwnProperty(s)){var $=i[s];if($!=null)switch(s){case"name":r=$;break;case"type":g=$;break;case"checked":H=$;break;case"defaultChecked":F=$;break;case"value":n=$;break;case"defaultValue":R=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(G(137,t));break;default:Ie(e,t,s,$,i,null)}}Po(e,n,R,H,F,g,r,!1);return;case"select":De("invalid",e),s=g=n=null;for(r in i)if(i.hasOwnProperty(r)&&(R=i[r],R!=null))switch(r){case"value":n=R;break;case"defaultValue":g=R;break;case"multiple":s=R;default:Ie(e,t,r,R,i,null)}t=n,i=g,e.multiple=!!s,t!=null?Os(e,!!s,t,!1):i!=null&&Os(e,!!s,i,!0);return;case"textarea":De("invalid",e),n=r=s=null;for(g in i)if(i.hasOwnProperty(g)&&(R=i[g],R!=null))switch(g){case"value":s=R;break;case"defaultValue":r=R;break;case"children":n=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(G(91));break;default:Ie(e,t,g,R,i,null)}Wo(e,s,r,n);return;case"option":for(H in i)i.hasOwnProperty(H)&&(s=i[H],s!=null)&&(H==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Ie(e,t,H,s,i,null));return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(s=0;s<Fr.length;s++)De(Fr[s],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("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(F in i)if(i.hasOwnProperty(F)&&(s=i[F],s!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:Ie(e,t,F,s,i,null)}return;default:if(Al(t)){for($ in i)i.hasOwnProperty($)&&(s=i[$],s!==void 0&&_o(e,t,$,s,i,void 0));return}}for(R in i)i.hasOwnProperty(R)&&(s=i[R],s!=null&&Ie(e,t,R,s,i,null))}function O_(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,g=null,R=null,H=null,F=null,$=null;for(W in i){var ne=i[W];if(i.hasOwnProperty(W)&&ne!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":H=ne;default:s.hasOwnProperty(W)||Ie(e,t,W,null,s,ne)}}for(var P in s){var W=s[P];if(ne=i[P],s.hasOwnProperty(P)&&(W!=null||ne!=null))switch(P){case"type":n=W;break;case"name":r=W;break;case"checked":F=W;break;case"defaultChecked":$=W;break;case"value":g=W;break;case"defaultValue":R=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(G(137,t));break;default:W!==ne&&Ie(e,t,P,W,s,ne)}}xl(e,g,R,H,F,$,n,r);return;case"select":W=g=R=P=null;for(n in i)if(H=i[n],i.hasOwnProperty(n)&&H!=null)switch(n){case"value":break;case"multiple":W=H;default:s.hasOwnProperty(n)||Ie(e,t,n,null,s,H)}for(r in s)if(n=s[r],H=i[r],s.hasOwnProperty(r)&&(n!=null||H!=null))switch(r){case"value":P=n;break;case"defaultValue":R=n;break;case"multiple":g=n;default:n!==H&&Ie(e,t,r,n,s,H)}t=R,i=g,s=W,P!=null?Os(e,!!i,P,!1):!!s!=!!i&&(t!=null?Os(e,!!i,t,!0):Os(e,!!i,i?[]:"",!1));return;case"textarea":W=P=null;for(R in i)if(r=i[R],i.hasOwnProperty(R)&&r!=null&&!s.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:Ie(e,t,R,null,s,r)}for(g in s)if(r=s[g],n=i[g],s.hasOwnProperty(g)&&(r!=null||n!=null))switch(g){case"value":P=r;break;case"defaultValue":W=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(G(91));break;default:r!==n&&Ie(e,t,g,r,s,n)}Qo(e,P,W);return;case"option":for(var fe in i)P=i[fe],i.hasOwnProperty(fe)&&P!=null&&!s.hasOwnProperty(fe)&&(fe==="selected"?e.selected=!1:Ie(e,t,fe,null,s,P));for(H in s)P=s[H],W=i[H],s.hasOwnProperty(H)&&P!==W&&(P!=null||W!=null)&&(H==="selected"?e.selected=P&&typeof P!="function"&&typeof P!="symbol":Ie(e,t,H,P,s,W));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 Se in i)P=i[Se],i.hasOwnProperty(Se)&&P!=null&&!s.hasOwnProperty(Se)&&Ie(e,t,Se,null,s,P);for(F in s)if(P=s[F],W=i[F],s.hasOwnProperty(F)&&P!==W&&(P!=null||W!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(G(137,t));break;default:Ie(e,t,F,P,s,W)}return;default:if(Al(t)){for(var Ke in i)P=i[Ke],i.hasOwnProperty(Ke)&&P!==void 0&&!s.hasOwnProperty(Ke)&&_o(e,t,Ke,void 0,s,P);for($ in s)P=s[$],W=i[$],!s.hasOwnProperty($)||P===W||P===void 0&&W===void 0||_o(e,t,$,P,s,W);return}}for(var K in i)P=i[K],i.hasOwnProperty(K)&&P!=null&&!s.hasOwnProperty(K)&&Ie(e,t,K,null,s,P);for(ne in s)P=s[ne],W=i[ne],!s.hasOwnProperty(ne)||P===W||P==null&&W==null||Ie(e,t,ne,P,s,W)}function $h(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function B_(){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,g=r.initiatorType,R=r.duration;if(n&&R&&$h(g)){for(g=0,R=r.responseEnd,s+=1;s<i.length;s++){var H=i[s],F=H.startTime;if(F>R)break;var $=H.transferSize,ne=H.initiatorType;$&&$h(ne)&&(H=H.responseEnd,g+=$*(H<R?1:(R-F)/(H-F)))}if(--s,t+=8*(n+g)/(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 vo=null,go=null;function ol(e){return e.nodeType===9?e:e.ownerDocument}function ef(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 tf(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 mo(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 po=null;function k_(){var e=window.event;return e&&e.type==="popstate"?e===po?!1:(po=e,!0):(po=null,!1)}var sf=typeof setTimeout=="function"?setTimeout:void 0,H_=typeof clearTimeout=="function"?clearTimeout:void 0,rf=typeof Promise=="function"?Promise:void 0,z_=typeof queueMicrotask=="function"?queueMicrotask:typeof rf<"u"?function(e){return rf.resolve(null).then(e).catch(U_)}:sf;function U_(e){setTimeout(function(){throw e})}function $i(e){return e==="head"}function nf(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),ur(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Pr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Pr(i);for(var n=i.firstChild;n;){var g=n.nextSibling,R=n.nodeName;n[fr]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=g}}else i==="body"&&Pr(e.ownerDocument.body);i=r}while(i);ur(t)}function lf(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 So(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":So(i),El(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function N_(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=Wt(e.nextSibling),e===null)break}return null}function j_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Wt(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Wt(e.nextSibling),e===null))return null;return e}function yo(e){return e.data==="$?"||e.data==="$~"}function bo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function q_(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 Wt(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 Co=null;function of(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Wt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function cf(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 uf(e,t,i){switch(t=ol(i),e){case"html":if(e=t.documentElement,!e)throw Error(G(452));return e;case"head":if(e=t.head,!e)throw Error(G(453));return e;case"body":if(e=t.body,!e)throw Error(G(454));return e;default:throw Error(G(451))}}function Pr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);El(e)}var Zt=new Map,hf=new Set;function cl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Li=I.d;I.d={f:I_,r:K_,D:Y_,C:G_,L:X_,m:F_,X:P_,S:V_,M:Q_};function I_(){var e=Li.f(),t=el();return e||t}function K_(e){var t=Rs(e);t!==null&&t.tag===5&&t.type==="form"?Au(t):Li.r(e)}var ar=typeof document>"u"?null:document;function ff(e,t,i){var s=ar;if(s&&typeof t=="string"&&t){var r=Yt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),hf.has(r)||(hf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),pt(t,"link",e),ht(t),s.head.appendChild(t)))}}function Y_(e){Li.D(e),ff("dns-prefetch",e,null)}function G_(e,t){Li.C(e,t),ff("preconnect",e,t)}function X_(e,t,i){Li.L(e,t,i);var s=ar;if(s&&e&&t){var r='link[rel="preload"][as="'+Yt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Yt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Yt(i.imageSizes)+'"]')):r+='[href="'+Yt(e)+'"]';var n=r;switch(t){case"style":n=or(e);break;case"script":n=cr(e)}Zt.has(n)||(e=h({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Zt.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Qr(n))||t==="script"&&s.querySelector(Wr(n))||(t=s.createElement("link"),pt(t,"link",e),ht(t),s.head.appendChild(t)))}}function F_(e,t){Li.m(e,t);var i=ar;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Yt(s)+'"][href="'+Yt(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=cr(e)}if(!Zt.has(n)&&(e=h({rel:"modulepreload",href:e},t),Zt.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Wr(n)))return}s=i.createElement("link"),pt(s,"link",e),ht(s),i.head.appendChild(s)}}}function V_(e,t,i){Li.S(e,t,i);var s=ar;if(s&&e){var r=Ms(s).hoistableStyles,n=or(e);t=t||"default";var g=r.get(n);if(!g){var R={loading:0,preload:null};if(g=s.querySelector(Qr(n)))R.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(n))&&Eo(e,i);var H=g=s.createElement("link");ht(H),pt(H,"link",e),H._p=new Promise(function(F,$){H.onload=F,H.onerror=$}),H.addEventListener("load",function(){R.loading|=1}),H.addEventListener("error",function(){R.loading|=2}),R.loading|=4,ul(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:R},r.set(n,g)}}}function P_(e,t){Li.X(e,t);var i=ar;if(i&&e){var s=Ms(i).hoistableScripts,r=cr(e),n=s.get(r);n||(n=i.querySelector(Wr(r)),n||(e=h({src:e,async:!0},t),(t=Zt.get(r))&&wo(e,t),n=i.createElement("script"),ht(n),pt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function Q_(e,t){Li.M(e,t);var i=ar;if(i&&e){var s=Ms(i).hoistableScripts,r=cr(e),n=s.get(r);n||(n=i.querySelector(Wr(r)),n||(e=h({src:e,async:!0,type:"module"},t),(t=Zt.get(r))&&wo(e,t),n=i.createElement("script"),ht(n),pt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function df(e,t,i,s){var r=(r=he.current)?cl(r):null;if(!r)throw Error(G(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=or(i.href),i=Ms(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=or(i.href);var n=Ms(r).hoistableStyles,g=n.get(e);if(g||(r=r.ownerDocument||r,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,g),(n=r.querySelector(Qr(e)))&&!n._p&&(g.instance=n,g.state.loading=5),Zt.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},Zt.set(e,i),n||W_(r,e,i,g.state))),t&&s===null)throw Error(G(528,""));return g}if(t&&s!==null)throw Error(G(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=cr(i),i=Ms(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(G(444,e))}}function or(e){return'href="'+Yt(e)+'"'}function Qr(e){return'link[rel="stylesheet"]['+e+"]"}function _f(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function W_(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}),pt(t,"link",i),ht(t),e.head.appendChild(t))}function cr(e){return'[src="'+Yt(e)+'"]'}function Wr(e){return"script[async]"+e}function vf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Yt(i.href)+'"]');if(s)return t.instance=s,ht(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"),ht(s),pt(s,"style",r),ul(s,i.precedence,e),t.instance=s;case"stylesheet":r=or(i.href);var n=e.querySelector(Qr(r));if(n)return t.state.loading|=4,t.instance=n,ht(n),n;s=_f(i),(r=Zt.get(r))&&Eo(s,r),n=(e.ownerDocument||e).createElement("link"),ht(n);var g=n;return g._p=new Promise(function(R,H){g.onload=R,g.onerror=H}),pt(n,"link",s),t.state.loading|=4,ul(n,i.precedence,e),t.instance=n;case"script":return n=cr(i.src),(r=e.querySelector(Wr(n)))?(t.instance=r,ht(r),r):(s=i,(r=Zt.get(n))&&(s=h({},i),wo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),ht(r),pt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(G(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ul(s,i.precedence,e));return t.instance}function ul(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,g=0;g<s.length;g++){var R=s[g];if(R.dataset.precedence===t)n=R;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 Eo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function wo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hl=null;function gf(e,t,i){if(hl===null){var s=new Map,r=hl=new Map;r.set(i,s)}else r=hl,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[_t]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var g=n.getAttribute(t)||"";g=e+g;var R=s.get(g);R?R.push(n):s.set(g,[n])}}return s}function mf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Z_(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 pf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function J_(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=or(s.href),n=t.querySelector(Qr(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fl.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,ht(n);return}n=t.ownerDocument||t,s=_f(s),(r=Zt.get(r))&&Eo(s,r),n=n.createElement("link"),ht(n);var g=n;g._p=new Promise(function(R,H){g.onload=R,g.onerror=H}),pt(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=fl.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var xo=0;function $_(e,t){return e.stylesheets&&e.count===0&&_l(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&_l(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&xo===0&&(xo=62500*B_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&_l(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>xo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function fl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_l(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var dl=null;function _l(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,dl=new Map,t.forEach(ev,e),dl=null,fl.call(e))}function ev(e,t){if(!(t.state.loading&4)){var i=dl.get(e);if(i)var s=i.get(null);else{i=new Map,dl.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var g=r[n];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(i.set(g.dataset.precedence,g),s=g)}s&&i.set(null,s)}r=t.instance,g=r.getAttribute("data-precedence"),n=i.get(g)||s,n===s&&i.set(null,r),i.set(g,r),this.count++,s=fl.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:A,_currentValue2:A,_threadCount:0};function tv(e,t,i,s,r,n,g,R,H){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=ce(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ce(0),this.hiddenUpdates=ce(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function Sf(e,t,i,s,r,n,g,R,H,F,$,ne){return e=new tv(e,t,i,g,H,F,$,ne,R),t=1,n===!0&&(t|=24),n=Ht(3,null,null,t),e.current=n,n.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},aa(n),e}function yf(e){return e?(e=qs,e):qs}function bf(e,t,i,s,r,n){r=yf(r),s.context===null?s.context=r:s.pendingContext=r,s=Ki(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=Yi(e,s,t),i!==null&&(Ot(i,e,t),Rr(i,e,t))}function Cf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Do(e,t){Cf(e,t),(e=e.alternate)&&Cf(e,t)}function Ef(e){if(e.tag===13||e.tag===31){var t=fs(e,67108864);t!==null&&Ot(t,e,67108864),Do(e,67108864)}}function wf(e){if(e.tag===13||e.tag===31){var t=qt();t=je(t);var i=fs(e,t);i!==null&&Ot(i,e,t),Do(e,t)}}var vl=!0;function iv(e,t,i,s){var r=k.T;k.T=null;var n=I.p;try{I.p=2,Ao(e,t,i,s)}finally{I.p=n,k.T=r}}function sv(e,t,i,s){var r=k.T;k.T=null;var n=I.p;try{I.p=8,Ao(e,t,i,s)}finally{I.p=n,k.T=r}}function Ao(e,t,i,s){if(vl){var r=To(s);if(r===null)fo(e,t,s,gl,i),Df(e,s);else if(nv(r,e,t,i,s))s.stopPropagation();else if(Df(e,s),t&4&&-1<rv.indexOf(e)){for(;r!==null;){var n=Rs(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var g=ai(n.pendingLanes);if(g!==0){var R=n;for(R.pendingLanes|=2,R.entangledLanes|=2;g;){var H=1<<31-dt(g);R.entanglements[1]|=H,g&=~H}fi(n),(ze&6)===0&&(Jn=Xe()+500,Xr(0))}}break;case 31:case 13:R=fs(n,2),R!==null&&Ot(R,n,2),el(),Do(n,2)}if(n=To(s),n===null&&fo(e,t,s,gl,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else fo(e,t,s,null,i)}}function To(e){return e=Rl(e),Ro(e)}var gl=null;function Ro(e){if(gl=null,e=Ts(e),e!==null){var t=ge(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=ee(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 gl=e,null}function xf(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(Fe()){case ct:return 2;case di:return 8;case St:case Oi:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var Mo=!1,es=null,ts=null,is=null,Jr=new Map,$r=new Map,ss=[],rv="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 Df(e,t){switch(e){case"focusin":case"focusout":es=null;break;case"dragenter":case"dragleave":ts=null;break;case"mouseover":case"mouseout":is=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=Rs(t),t!==null&&Ef(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function nv(e,t,i,s,r){switch(t){case"focusin":return es=en(es,e,t,i,s,r),!0;case"dragenter":return ts=en(ts,e,t,i,s,r),!0;case"mouseover":return is=en(is,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 Af(e){var t=Ts(e.target);if(t!==null){var i=ge(t);if(i!==null){if(t=i.tag,t===13){if(t=ee(i),t!==null){e.blockedOn=t,Ds(e.priority,function(){wf(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,Ds(e.priority,function(){wf(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 ml(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=To(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Tl=s,i.target.dispatchEvent(s),Tl=null}else return t=Rs(i),t!==null&&Ef(t),e.blockedOn=i,!1;t.shift()}return!0}function Tf(e,t,i){ml(e)&&i.delete(t)}function lv(){Mo=!1,es!==null&&ml(es)&&(es=null),ts!==null&&ml(ts)&&(ts=null),is!==null&&ml(is)&&(is=null),Jr.forEach(Tf),$r.forEach(Tf)}function pl(e,t){e.blockedOn===t&&(e.blockedOn=null,Mo||(Mo=!0,q.unstable_scheduleCallback(q.unstable_NormalPriority,lv)))}var Sl=null;function Rf(e){Sl!==e&&(Sl=e,q.unstable_scheduleCallback(q.unstable_NormalPriority,function(){Sl===e&&(Sl=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(Ro(s||i)===null)continue;break}var n=Rs(i);n!==null&&(e.splice(t,3),t-=3,Aa(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function ur(e){function t(H){return pl(H,e)}es!==null&&pl(es,e),ts!==null&&pl(ts,e),is!==null&&pl(is,e),Jr.forEach(t),$r.forEach(t);for(var i=0;i<ss.length;i++){var s=ss[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ss.length&&(i=ss[0],i.blockedOn===null);)Af(i),i.blockedOn===null&&ss.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],g=r[Dt]||null;if(typeof n=="function")g||Rf(i);else if(g){var R=null;if(n&&n.hasAttribute("formAction")){if(r=n,g=n[Dt]||null)R=g.formAction;else if(Ro(r)!==null)continue}else R=g.action;typeof R=="function"?i[s+1]=R:(i.splice(s,3),s-=3),Rf(i)}}}function Mf(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(g){return r=g})},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 Lo(e){this._internalRoot=e}yl.prototype.render=Lo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var i=t.current,s=qt();bf(i,s,e,t,null,null)},yl.prototype.unmount=Lo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bf(e.current,2,null,e,null,null),el(),t[As]=null}};function yl(e){this._internalRoot=e}yl.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ss.length&&t!==0&&t<ss[i].priority;i++);ss.splice(i,0,e),i===0&&Af(e)}};var Lf=ue.version;if(Lf!=="19.2.4")throw Error(G(527,Lf,"19.2.4"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=f(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var av={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bl.isDisabled&&bl.supportsFiber)try{Bt=bl.inject(av),Ct=bl}catch{}}return sn.createRoot=function(e,t){if(!oe(e))throw Error(G(299));var i=!1,s="",r=Uu,n=Nu,g=ju;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&&(g=t.onRecoverableError)),t=Sf(e,1,!1,null,null,i,s,null,r,n,g,Mf),e[As]=t.current,ho(e),new Lo(t)},sn.hydrateRoot=function(e,t,i){if(!oe(e))throw Error(G(299));var s=!1,r="",n=Uu,g=Nu,R=ju,H=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&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(R=i.onRecoverableError),i.formState!==void 0&&(H=i.formState)),t=Sf(e,1,!0,t,i??null,s,r,H,n,g,R,Mf),t.context=yf(null),i=t.current,s=qt(),s=je(s),r=Ki(s),r.callback=null,Yi(i,r,s),i=s,t.current.lanes=i,de(t,i),fi(t),e[As]=t.current,ho(e),new yl(t)},sn.version="19.2.4",sn}var If;function pv(){if(If)return ko.exports;If=1;function q(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q)}catch(ue){console.error(ue)}}return q(),ko.exports=mv(),ko.exports}var Sv=pv();const yv=Wf(Sv);var No={exports:{}},Kf;function bv(){return Kf||(Kf=1,(function(q,ue){(function(pe,G){q.exports=G()})(self,(()=>(()=>{var pe={};return(()=>{var G=pe;Object.defineProperty(G,"__esModule",{value:!0}),G.FitAddon=void 0,G.FitAddon=class{activate(oe){this._terminal=oe}dispose(){}fit(){const oe=this.proposeDimensions();if(!oe||!this._terminal||isNaN(oe.cols)||isNaN(oe.rows))return;const ge=this._terminal._core;this._terminal.rows===oe.rows&&this._terminal.cols===oe.cols||(ge._renderService.clear(),this._terminal.resize(oe.cols,oe.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const oe=this._terminal._core,ge=oe._renderService.dimensions;if(ge.css.cell.width===0||ge.css.cell.height===0)return;const ee=this._terminal.options.scrollback===0?0:oe.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(u.getPropertyValue("height")),f=Math.max(0,parseInt(u.getPropertyValue("width"))),y=window.getComputedStyle(this._terminal.element),h=d-(parseInt(y.getPropertyValue("padding-top"))+parseInt(y.getPropertyValue("padding-bottom"))),p=f-(parseInt(y.getPropertyValue("padding-right"))+parseInt(y.getPropertyValue("padding-left")))-ee;return{cols:Math.max(2,Math.floor(p/ge.css.cell.width)),rows:Math.max(1,Math.floor(h/ge.css.cell.height))}}}})(),pe})()))})(No)),No.exports}var Cv=bv(),jo={exports:{}},Yf;function Ev(){return Yf||(Yf=1,(function(q,ue){(function(pe,G){q.exports=G()})(self,(()=>(()=>{var pe={4567:function(ee,u,d){var f=this&&this.__decorate||function(o,_,m,b){var D,v=arguments.length,E=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,m):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,_,m,b);else for(var L=o.length-1;L>=0;L--)(D=o[L])&&(E=(v<3?D(E):v>3?D(_,m,E):D(_,m))||E);return v>3&&E&&Object.defineProperty(_,m,E),E},y=this&&this.__param||function(o,_){return function(m,b){_(m,b,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const h=d(9042),p=d(6114),C=d(9924),x=d(844),S=d(5596),l=d(4725),c=d(3656);let a=u.AccessibilityManager=class extends x.Disposable{constructor(o,_){super(),this._terminal=o,this._renderService=_,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 m=0;m<this._terminal.rows;m++)this._rowElements[m]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[m]);if(this._topBoundaryFocusListener=m=>this._handleBoundaryFocus(m,0),this._bottomBoundaryFocusListener=m=>this._handleBoundaryFocus(m,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 C.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((m=>this._handleResize(m.rows)))),this.register(this._terminal.onRender((m=>this._refreshRows(m.start,m.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((m=>this._handleChar(m)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
10
|
+
`)))),this.register(this._terminal.onA11yTab((m=>this._handleTab(m)))),this.register(this._terminal.onKey((m=>this._handleKey(m.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this._screenDprMonitor=new S.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,x.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let _=0;_<o;_++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
|
|
11
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),p.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,p.isMac&&this._liveRegion.remove()}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,_){this._liveRegionDebouncer.refresh(o,_,this._terminal.rows)}_renderRows(o,_){const m=this._terminal.buffer,b=m.lines.length.toString();for(let D=o;D<=_;D++){const v=m.translateBufferLineToString(m.ydisp+D,!0),E=(m.ydisp+D+1).toString(),L=this._rowElements[D];L&&(v.length===0?L.innerText=" ":L.textContent=v,L.setAttribute("aria-posinset",E),L.setAttribute("aria-setsize",b))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,_){const m=o.target,b=this._rowElements[_===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(_===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==b)return;let D,v;if(_===0?(D=m,v=this._rowElements.pop(),this._rowContainer.removeChild(v)):(D=this._rowElements.shift(),v=m,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),v.removeEventListener("focus",this._bottomBoundaryFocusListener),_===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(_===0?-1:1),this._rowElements[_===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 _=this._rowContainer.children.length;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);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=a=f([y(1,l.IRenderService)],a)},3614:(ee,u)=>{function d(p){return p.replace(/\r?\n/g,"\r")}function f(p,C){return C?"\x1B[200~"+p+"\x1B[201~":p}function y(p,C,x,S){p=f(p=d(p),x.decPrivateModes.bracketedPasteMode&&S.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(p,!0),C.value=""}function h(p,C,x){const S=x.getBoundingClientRect(),l=p.clientX-S.left-10,c=p.clientY-S.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${l}px`,C.style.top=`${c}px`,C.style.zIndex="1000",C.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=f,u.copyHandler=function(p,C){p.clipboardData&&p.clipboardData.setData("text/plain",C.selectionText),p.preventDefault()},u.handlePasteEvent=function(p,C,x,S){p.stopPropagation(),p.clipboardData&&y(p.clipboardData.getData("text/plain"),C,x,S)},u.paste=y,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(p,C,x,S,l){h(p,C,x),l&&S.rightClickSelect(p),C.value=S.selectionText,C.select()}},7239:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const f=d(1505);u.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(y,h,p){this._css.set(y,h,p)}getCss(y,h){return this._css.get(y,h)}setColor(y,h,p){this._color.set(y,h,p)}getColor(y,h){return this._color.get(y,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(d,f,y,h){d.addEventListener(f,y,h);let p=!1;return{dispose:()=>{p||(p=!0,d.removeEventListener(f,y,h))}}}},6465:function(ee,u,d){var f=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier2=void 0;const h=d(3656),p=d(8460),C=d(844),x=d(2585);let S=u.Linkifier2=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(l){super(),this._bufferService=l,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{this._lastMouseEvent=void 0}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0})))}registerLinkProvider(l){return this._linkProviders.push(l),{dispose:()=>{const c=this._linkProviders.indexOf(l);c!==-1&&this._linkProviders.splice(c,1)}}}attachToDom(l,c,a){this._element=l,this._mouseService=c,this._renderService=a,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(l){if(this._lastMouseEvent=l,!this._element||!this._mouseService)return;const c=this._positionFromMouseEvent(l,this._element,this._mouseService);if(!c)return;this._isMouseOut=!1;const a=l.composedPath();for(let o=0;o<a.length;o++){const _=a[o];if(_.classList.contains("xterm"))break;if(_.classList.contains("xterm-hover"))return}this._lastBufferCell&&c.x===this._lastBufferCell.x&&c.y===this._lastBufferCell.y||(this._handleHover(c),this._lastBufferCell=c)}_handleHover(l){if(this._activeLine!==l.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(l,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,l)||(this._clearCurrentLink(),this._askForLink(l,!0))}_askForLink(l,c){var a,o;this._activeProviderReplies&&c||((a=this._activeProviderReplies)===null||a===void 0||a.forEach((m=>{m?.forEach((b=>{b.link.dispose&&b.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=l.y);let _=!1;for(const[m,b]of this._linkProviders.entries())c?!((o=this._activeProviderReplies)===null||o===void 0)&&o.get(m)&&(_=this._checkLinkProviderResult(m,l,_)):b.provideLinks(l.y,(D=>{var v,E;if(this._isMouseOut)return;const L=D?.map((z=>({link:z})));(v=this._activeProviderReplies)===null||v===void 0||v.set(m,L),_=this._checkLinkProviderResult(m,l,_),((E=this._activeProviderReplies)===null||E===void 0?void 0:E.size)===this._linkProviders.length&&this._removeIntersectingLinks(l.y,this._activeProviderReplies)}))}_removeIntersectingLinks(l,c){const a=new Set;for(let o=0;o<c.size;o++){const _=c.get(o);if(_)for(let m=0;m<_.length;m++){const b=_[m],D=b.link.range.start.y<l?0:b.link.range.start.x,v=b.link.range.end.y>l?this._bufferService.cols:b.link.range.end.x;for(let E=D;E<=v;E++){if(a.has(E)){_.splice(m--,1);break}a.add(E)}}}}_checkLinkProviderResult(l,c,a){var o;if(!this._activeProviderReplies)return a;const _=this._activeProviderReplies.get(l);let m=!1;for(let b=0;b<l;b++)this._activeProviderReplies.has(b)&&!this._activeProviderReplies.get(b)||(m=!0);if(!m&&_){const b=_.find((D=>this._linkAtPosition(D.link,c)));b&&(a=!0,this._handleNewLink(b))}if(this._activeProviderReplies.size===this._linkProviders.length&&!a)for(let b=0;b<this._activeProviderReplies.size;b++){const D=(o=this._activeProviderReplies.get(b))===null||o===void 0?void 0:o.find((v=>this._linkAtPosition(v.link,c)));if(D){a=!0,this._handleNewLink(D);break}}return a}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(l){if(!this._element||!this._mouseService||!this._currentLink)return;const c=this._positionFromMouseEvent(l,this._element,this._mouseService);c&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,c)&&this._currentLink.link.activate(l,this._currentLink.link.text)}_clearCurrentLink(l,c){this._element&&this._currentLink&&this._lastMouseEvent&&(!l||!c||this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=c)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(l){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._linkAtPosition(l.link,c)&&(this._currentLink=l,this._currentLink.state={decorations:{underline:l.link.decorations===void 0||l.link.decorations.underline,pointerCursor:l.link.decorations===void 0||l.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,l.link,this._lastMouseEvent),l.link.decorations={},Object.defineProperties(l.link.decorations,{pointerCursor:{get:()=>{var a,o;return(o=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||o===void 0?void 0:o.decorations.pointerCursor},set:a=>{var o,_;!((o=this._currentLink)===null||o===void 0)&&o.state&&this._currentLink.state.decorations.pointerCursor!==a&&(this._currentLink.state.decorations.pointerCursor=a,this._currentLink.state.isHovered&&((_=this._element)===null||_===void 0||_.classList.toggle("xterm-cursor-pointer",a)))}},underline:{get:()=>{var a,o;return(o=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||o===void 0?void 0:o.decorations.underline},set:a=>{var o,_,m;!((o=this._currentLink)===null||o===void 0)&&o.state&&((m=(_=this._currentLink)===null||_===void 0?void 0:_.state)===null||m===void 0?void 0:m.decorations.underline)!==a&&(this._currentLink.state.decorations.underline=a,this._currentLink.state.isHovered&&this._fireUnderlineEvent(l.link,a))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((a=>{if(!this._currentLink)return;const o=a.start===0?0:a.start+1+this._bufferService.buffer.ydisp,_=this._bufferService.buffer.ydisp+1+a.end;if(this._currentLink.link.range.start.y>=o&&this._currentLink.link.range.end.y<=_&&(this._clearCurrentLink(o,_),this._lastMouseEvent&&this._element)){const m=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);m&&this._askForLink(m,!1)}}))))}_linkHover(l,c,a){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&&l.classList.add("xterm-cursor-pointer")),c.hover&&c.hover(a,c.text)}_fireUnderlineEvent(l,c){const a=l.range,o=this._bufferService.buffer.ydisp,_=this._createLinkUnderlineEvent(a.start.x-1,a.start.y-o-1,a.end.x,a.end.y-o-1,void 0);(c?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(_)}_linkLeave(l,c,a){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&&l.classList.remove("xterm-cursor-pointer")),c.leave&&c.leave(a,c.text)}_linkAtPosition(l,c){const a=l.range.start.y*this._bufferService.cols+l.range.start.x,o=l.range.end.y*this._bufferService.cols+l.range.end.x,_=c.y*this._bufferService.cols+c.x;return a<=_&&_<=o}_positionFromMouseEvent(l,c,a){const o=a.getCoords(l,c,this._bufferService.cols,this._bufferService.rows);if(o)return{x:o[0],y:o[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(l,c,a,o,_){return{x1:l,y1:c,x2:a,y2:o,cols:this._bufferService.cols,fg:_}}};u.Linkifier2=S=f([y(0,x.IBufferService)],S)},9042:(ee,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(ee,u,d){var f=this&&this.__decorate||function(S,l,c,a){var o,_=arguments.length,m=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(S,l,c,a);else for(var b=S.length-1;b>=0;b--)(o=S[b])&&(m=(_<3?o(m):_>3?o(l,c,m):o(l,c))||m);return _>3&&m&&Object.defineProperty(l,c,m),m},y=this&&this.__param||function(S,l){return function(c,a){l(c,a,S)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const h=d(511),p=d(2585);let C=u.OscLinkProvider=class{constructor(S,l,c){this._bufferService=S,this._optionsService=l,this._oscLinkService=c}provideLinks(S,l){var c;const a=this._bufferService.buffer.lines.get(S-1);if(!a)return void l(void 0);const o=[],_=this._optionsService.rawOptions.linkHandler,m=new h.CellData,b=a.getTrimmedLength();let D=-1,v=-1,E=!1;for(let L=0;L<b;L++)if(v!==-1||a.hasContent(L)){if(a.loadCell(L,m),m.hasExtendedAttrs()&&m.extended.urlId){if(v===-1){v=L,D=m.extended.urlId;continue}E=m.extended.urlId!==D}else v!==-1&&(E=!0);if(E||v!==-1&&L===b-1){const z=(c=this._oscLinkService.getLinkData(D))===null||c===void 0?void 0:c.uri;if(z){const O={start:{x:v+1,y:S},end:{x:L+(E||L!==b-1?0:1),y:S}};let U=!1;if(!_?.allowNonHttpProtocols)try{const V=new URL(z);["http:","https:"].includes(V.protocol)||(U=!0)}catch{U=!0}U||o.push({text:z,range:O,activate:(V,J)=>_?_.activate(V,J,O):x(0,J),hover:(V,J)=>{var k;return(k=_?.hover)===null||k===void 0?void 0:k.call(_,V,J,O)},leave:(V,J)=>{var k;return(k=_?.leave)===null||k===void 0?void 0:k.call(_,V,J,O)}})}E=!1,m.hasExtendedAttrs()&&m.extended.urlId?(v=L,D=m.extended.urlId):(v=-1,D=-1)}}l(o)}};function x(S,l){if(confirm(`Do you want to navigate to ${l}?
|
|
12
12
|
|
|
13
|
-
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=C=d([y(0,p.IBufferService),y(1,p.IOptionsService),y(2,p.IOscLinkService)],C)},6193:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(f,d){this._parentWindow=f,this._renderCallback=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(f){return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(f,d,y){this._rowCount=y,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,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 f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const f of this._refreshCallbacks)f(0);this._refreshCallbacks=[]}}},5596:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ScreenDprMonitor=void 0;const d=f(844);class y extends d.Disposable{constructor(p){super(),this._parentWindow=p,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,d.toDisposable)((()=>{this.clearListener()})))}setListener(p){this._listener&&this.clearListener(),this._listener=p,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)===null||p===void 0||p.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=y},3236:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const d=f(3614),y=f(3656),h=f(6465),p=f(9042),C=f(3730),A=f(1680),S=f(3107),l=f(5744),c=f(2950),a=f(1296),o=f(428),_=f(4269),m=f(5114),b=f(8934),D=f(3230),v=f(9312),E=f(4725),L=f(6731),z=f(8055),O=f(8969),U=f(8460),V=f(844),J=f(6114),k=f(8437),I=f(2584),x=f(7399),M=f(5941),B=f(9074),w=f(2585),N=f(5435),Q=f(4567),se=typeof window<"u"?window.document:null;class ne extends O.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(T={}){super(T),this.browser=J,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new V.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(h.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(w.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((K,Z)=>this.refresh(K,Z)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((K=>this._reportWindowsOptions(K)))),this.register(this._inputHandler.onColor((K=>this._handleColorEvent(K)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((K=>this._afterResize(K.cols,K.rows)))),this.register((0,V.toDisposable)((()=>{var K,Z;this._customKeyEventHandler=void 0,(Z=(K=this.element)===null||K===void 0?void 0:K.parentNode)===null||Z===void 0||Z.removeChild(this.element)})))}_handleColorEvent(T){if(this._themeService)for(const K of T){let Z,te="";switch(K.index){case 256:Z="foreground",te="10";break;case 257:Z="background",te="11";break;case 258:Z="cursor",te="12";break;default:Z="ansi",te="4;"+K.index}switch(K.type){case 0:const ye=z.color.toColorRGB(Z==="ansi"?this._themeService.colors.ansi[K.index]:this._themeService.colors[Z]);this.coreService.triggerDataEvent(`${I.C0.ESC}]${te};${(0,M.toRgbString)(ye)}${I.C1_ESCAPED.ST}`);break;case 1:if(Z==="ansi")this._themeService.modifyColors((ae=>ae.ansi[K.index]=z.rgba.toColor(...K.color)));else{const ae=Z;this._themeService.modifyColors((Re=>Re[ae]=z.rgba.toColor(...K.color)))}break;case 2:this._themeService.restoreColor(K.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(T){T?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Q.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(T){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[I"),this.updateCursorStyle(T),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var T;return(T=this.textarea)===null||T===void 0?void 0:T.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const T=this.buffer.ybase+this.buffer.y,K=this.buffer.lines.get(T);if(!K)return;const Z=Math.min(this.buffer.x,this.cols-1),te=this._renderService.dimensions.css.cell.height,ye=K.getWidth(Z),ae=this._renderService.dimensions.css.cell.width*ye,Re=this.buffer.y*this._renderService.dimensions.css.cell.height,He=Z*this._renderService.dimensions.css.cell.width;this.textarea.style.left=He+"px",this.textarea.style.top=Re+"px",this.textarea.style.width=ae+"px",this.textarea.style.height=te+"px",this.textarea.style.lineHeight=te+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,y.addDisposableDomListener)(this.element,"copy",(K=>{this.hasSelection()&&(0,d.copyHandler)(K,this._selectionService)})));const T=K=>(0,d.handlePasteEvent)(K,this.textarea,this.coreService,this.optionsService);this.register((0,y.addDisposableDomListener)(this.textarea,"paste",T)),this.register((0,y.addDisposableDomListener)(this.element,"paste",T)),J.isFirefox?this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(K=>{K.button===2&&(0,d.rightClickHandler)(K,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,y.addDisposableDomListener)(this.element,"contextmenu",(K=>{(0,d.rightClickHandler)(K,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),J.isLinux&&this.register((0,y.addDisposableDomListener)(this.element,"auxclick",(K=>{K.button===1&&(0,d.moveTextAreaUnderMouseCursor)(K,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,y.addDisposableDomListener)(this.textarea,"keyup",(T=>this._keyUp(T)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keydown",(T=>this._keyDown(T)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keypress",(T=>this._keyPress(T)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionupdate",(T=>this._compositionHelper.compositionupdate(T)))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,y.addDisposableDomListener)(this.textarea,"input",(T=>this._inputEvent(T)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(T){var K;if(!T)throw new Error("Terminal requires a parent element.");T.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=T.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),T.appendChild(this.element);const Z=se.createDocumentFragment();this._viewportElement=se.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Z.appendChild(this._viewportElement),this._viewportScrollArea=se.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=se.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=se.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Z.appendChild(this.screenElement),this.textarea=se.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),J.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(m.CoreBrowserService,this.textarea,(K=this._document.defaultView)!==null&&K!==void 0?K:window),this._instantiationService.setService(E.ICoreBrowserService,this._coreBrowserService),this.register((0,y.addDisposableDomListener)(this.textarea,"focus",(te=>this._handleTextAreaFocus(te)))),this.register((0,y.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(E.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(E.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((te=>this._onRender.fire(te)))),this.onResize((te=>this._renderService.resize(te.cols,te.rows))),this._compositionView=se.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(Z);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(b.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(A.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((te=>this.scrollLines(te.amount,te.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(v.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((te=>this.scrollLines(te.amount,te.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((te=>this._renderService.handleSelectionChanged(te.start,te.end,te.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((te=>{this.textarea.value=te,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((te=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,y.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(S.BufferDecorationRenderer,this.screenElement)),this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(te=>this._selectionService.handleMouseDown(te)))),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(Q.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(te=>this._handleScreenReaderModeOptionChange(te)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(te=>{!this._overviewRulerRenderer&&te&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(a.DomRenderer,this.element,this.screenElement,this._viewportElement,this.linkifier2)}bindMouse(){const T=this,K=this.element;function Z(ae){const Re=T._mouseService.getMouseReportCoords(ae,T.screenElement);if(!Re)return!1;let He,$e;switch(ae.overrideType||ae.type){case"mousemove":$e=32,ae.buttons===void 0?(He=3,ae.button!==void 0&&(He=ae.button<3?ae.button:3)):He=1&ae.buttons?0:4&ae.buttons?1:2&ae.buttons?2:3;break;case"mouseup":$e=0,He=ae.button<3?ae.button:3;break;case"mousedown":$e=1,He=ae.button<3?ae.button:3;break;case"wheel":if(T.viewport.getLinesScrolled(ae)===0)return!1;$e=ae.deltaY<0?0:1,He=4;break;default:return!1}return!($e===void 0||He===void 0||He>4)&&T.coreMouseService.triggerMouseEvent({col:Re.col,row:Re.row,x:Re.x,y:Re.y,button:He,action:$e,ctrl:ae.ctrlKey,alt:ae.altKey,shift:ae.shiftKey})}const te={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ye={mouseup:ae=>(Z(ae),ae.buttons||(this._document.removeEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.removeEventListener("mousemove",te.mousedrag)),this.cancel(ae)),wheel:ae=>(Z(ae),this.cancel(ae,!0)),mousedrag:ae=>{ae.buttons&&Z(ae)},mousemove:ae=>{ae.buttons||Z(ae)}};this.register(this.coreMouseService.onProtocolChange((ae=>{ae?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ae)),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&ae?te.mousemove||(K.addEventListener("mousemove",ye.mousemove),te.mousemove=ye.mousemove):(K.removeEventListener("mousemove",te.mousemove),te.mousemove=null),16&ae?te.wheel||(K.addEventListener("wheel",ye.wheel,{passive:!1}),te.wheel=ye.wheel):(K.removeEventListener("wheel",te.wheel),te.wheel=null),2&ae?te.mouseup||(K.addEventListener("mouseup",ye.mouseup),te.mouseup=ye.mouseup):(this._document.removeEventListener("mouseup",te.mouseup),K.removeEventListener("mouseup",te.mouseup),te.mouseup=null),4&ae?te.mousedrag||(te.mousedrag=ye.mousedrag):(this._document.removeEventListener("mousemove",te.mousedrag),te.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,y.addDisposableDomListener)(K,"mousedown",(ae=>{if(ae.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ae))return Z(ae),te.mouseup&&this._document.addEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.addEventListener("mousemove",te.mousedrag),this.cancel(ae)}))),this.register((0,y.addDisposableDomListener)(K,"wheel",(ae=>{if(!te.wheel){if(!this.buffer.hasScrollback){const Re=this.viewport.getLinesScrolled(ae);if(Re===0)return;const He=I.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ae.deltaY<0?"A":"B");let $e="";for(let Lt=0;Lt<Math.abs(Re);Lt++)$e+=He;return this.coreService.triggerDataEvent($e,!0),this.cancel(ae,!0)}return this.viewport.handleWheel(ae)?this.cancel(ae):void 0}}),{passive:!1})),this.register((0,y.addDisposableDomListener)(K,"touchstart",(ae=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ae),this.cancel(ae)}),{passive:!0})),this.register((0,y.addDisposableDomListener)(K,"touchmove",(ae=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ae)?void 0:this.cancel(ae)}),{passive:!1}))}refresh(T,K){var Z;(Z=this._renderService)===null||Z===void 0||Z.refreshRows(T,K)}updateCursorStyle(T){var K;!((K=this._selectionService)===null||K===void 0)&&K.shouldColumnSelect(T)?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(T,K,Z=0){var te;Z===1?(super.scrollLines(T,K,Z),this.refresh(0,this.rows-1)):(te=this.viewport)===null||te===void 0||te.scrollLines(T)}paste(T){(0,d.paste)(T,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(T){this._customKeyEventHandler=T}registerLinkProvider(T){return this.linkifier2.registerLinkProvider(T)}registerCharacterJoiner(T){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const K=this._characterJoinerService.register(T);return this.refresh(0,this.rows-1),K}deregisterCharacterJoiner(T){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(T)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(T){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+T)}registerDecoration(T){return this._decorationService.registerDecoration(T)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(T,K,Z){this._selectionService.setSelection(T,K,Z)}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 T;(T=this._selectionService)===null||T===void 0||T.clearSelection()}selectAll(){var T;(T=this._selectionService)===null||T===void 0||T.selectAll()}selectLines(T,K){var Z;(Z=this._selectionService)===null||Z===void 0||Z.selectLines(T,K)}_keyDown(T){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(T)===!1)return!1;const K=this.browser.isMac&&this.options.macOptionIsMeta&&T.altKey;if(!K&&!this._compositionHelper.keydown(T))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;K||T.key!=="Dead"&&T.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const Z=(0,x.evaluateKeyboardEvent)(T,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(T),Z.type===3||Z.type===2){const te=this.rows-1;return this.scrollLines(Z.type===2?-te:te),this.cancel(T,!0)}return Z.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,T)||(Z.cancel&&this.cancel(T,!0),!Z.key||!!(T.key&&!T.ctrlKey&&!T.altKey&&!T.metaKey&&T.key.length===1&&T.key.charCodeAt(0)>=65&&T.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(Z.key!==I.C0.ETX&&Z.key!==I.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Z.key,domEvent:T}),this._showCursor(),this.coreService.triggerDataEvent(Z.key,!0),!this.optionsService.rawOptions.screenReaderMode||T.altKey||T.ctrlKey?this.cancel(T,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(T,K){const Z=T.isMac&&!this.options.macOptionIsMeta&&K.altKey&&!K.ctrlKey&&!K.metaKey||T.isWindows&&K.altKey&&K.ctrlKey&&!K.metaKey||T.isWindows&&K.getModifierState("AltGraph");return K.type==="keypress"?Z:Z&&(!K.keyCode||K.keyCode>47)}_keyUp(T){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(T)===!1||((function(K){return K.keyCode===16||K.keyCode===17||K.keyCode===18})(T)||this.focus(),this.updateCursorStyle(T),this._keyPressHandled=!1)}_keyPress(T){let K;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(T)===!1)return!1;if(this.cancel(T),T.charCode)K=T.charCode;else if(T.which===null||T.which===void 0)K=T.keyCode;else{if(T.which===0||T.charCode===0)return!1;K=T.which}return!(!K||(T.altKey||T.ctrlKey||T.metaKey)&&!this._isThirdLevelShift(this.browser,T)||(K=String.fromCharCode(K),this._onKey.fire({key:K,domEvent:T}),this._showCursor(),this.coreService.triggerDataEvent(K,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(T){if(T.data&&T.inputType==="insertText"&&(!T.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const K=T.data;return this.coreService.triggerDataEvent(K,!0),this.cancel(T),!0}return!1}resize(T,K){T!==this.cols||K!==this.rows?super.resize(T,K):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(T,K){var Z,te;(Z=this._charSizeService)===null||Z===void 0||Z.measure(),(te=this.viewport)===null||te===void 0||te.syncScrollArea(!0)}clear(){var T;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let K=1;K<this.rows;K++)this.buffer.lines.push(this.buffer.getBlankLine(k.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(T=this.viewport)===null||T===void 0||T.reset(),this.refresh(0,this.rows-1)}}reset(){var T,K;this.options.rows=this.rows,this.options.cols=this.cols;const Z=this._customKeyEventHandler;this._setup(),super.reset(),(T=this._selectionService)===null||T===void 0||T.reset(),this._decorationService.reset(),(K=this.viewport)===null||K===void 0||K.reset(),this._customKeyEventHandler=Z,this.refresh(0,this.rows-1)}clearTextureAtlas(){var T;(T=this._renderService)===null||T===void 0||T.clearTextureAtlas()}_reportFocus(){var T;!((T=this.element)===null||T===void 0)&&T.classList.contains("focus")?this.coreService.triggerDataEvent(I.C0.ESC+"[I"):this.coreService.triggerDataEvent(I.C0.ESC+"[O")}_reportWindowsOptions(T){if(this._renderService)switch(T){case N.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const K=this._renderService.dimensions.css.canvas.width.toFixed(0),Z=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[4;${Z};${K}t`);break;case N.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const te=this._renderService.dimensions.css.cell.width.toFixed(0),ye=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[6;${ye};${te}t`)}}cancel(T,K){if(this.options.cancelEvents||K)return T.preventDefault(),T.stopPropagation(),!1}}u.Terminal=ne},9924:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(f,d=1e3){this._renderCallback=f,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(f,d,y){this._rowCount=y,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=h-this._lastRefreshMs,C=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),C)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d)}}},1680:function(ee,u,f){var d=this&&this.__decorate||function(c,a,o,_){var m,b=arguments.length,D=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(m=c[v])&&(D=(b<3?m(D):b>3?m(a,o,D):m(a,o))||D);return b>3&&D&&Object.defineProperty(a,o,D),D},y=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const h=f(3656),p=f(4725),C=f(8460),A=f(844),S=f(2585);let l=u.Viewport=class extends A.Disposable{constructor(c,a,o,_,m,b,D,v){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=o,this._optionsService=_,this._charSizeService=m,this._renderService=b,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 C.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((E=>this._activeBuffer=E.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((E=>this._renderDimensions=E))),this._handleThemeChange(v.colors),this.register(v.onChangeColors((E=>this._handleThemeChange(E)))),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 a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.css.canvas.height);this._lastRecordedBufferHeight!==a&&(this._lastRecordedBufferHeight=a,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 a=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:a,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,a){const o=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&o<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const a=this._getPixelsScrolled(c);return a!==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+a:this._smoothScrollState.target+=a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const a=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+a,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 a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a}getBufferElements(c,a){var o;let _,m="";const b=[],D=a??this._bufferService.buffer.lines.length,v=this._bufferService.buffer.lines;for(let E=c;E<D;E++){const L=v.get(E);if(!L)continue;const z=(o=v.get(E+1))===null||o===void 0?void 0:o.isWrapped;if(m+=L.translateToString(!z),!z||E===v.length-1){const O=document.createElement("div");O.textContent=m,b.push(O),m.length>0&&(_=O),m=""}}return{bufferElements:b,cursorElement:_}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=this._currentRowHeight+0,this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(c,a){const o=this._optionsService.rawOptions.fastScrollModifier;return o==="alt"&&a.altKey||o==="ctrl"&&a.ctrlKey||o==="shift"&&a.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 a=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}};u.Viewport=l=d([y(2,S.IBufferService),y(3,S.IOptionsService),y(4,p.ICharSizeService),y(5,p.IRenderService),y(6,p.ICoreBrowserService),y(7,p.IThemeService)],l)},3107:function(ee,u,f){var d=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const h=f(3656),p=f(4725),C=f(844),A=f(2585);let S=u.BufferDecorationRenderer=class extends C.Disposable{constructor(l,c,a,o){super(),this._screenElement=l,this._bufferService=c,this._decorationService=a,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((_=>this._removeDecoration(_)))),this.register((0,C.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const l of this._decorationService.decorations)this._renderDecoration(l);this._dimensionsChanged=!1}_renderDecoration(l){this._refreshStyle(l),this._dimensionsChanged&&this._refreshXPosition(l)}_createElement(l){var c,a;const o=document.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",((c=l?.options)===null||c===void 0?void 0:c.layer)==="top"),o.style.width=`${Math.round((l.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(l.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(l.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 _=(a=l.options.x)!==null&&a!==void 0?a:0;return _&&_>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(l,o),o}_refreshStyle(l){const c=l.marker.line-this._bufferService.buffers.active.ydisp;if(c<0||c>=this._bufferService.rows)l.element&&(l.element.style.display="none",l.onRenderEmitter.fire(l.element));else{let a=this._decorationElements.get(l);a||(a=this._createElement(l),l.element=a,this._decorationElements.set(l,a),this._container.appendChild(a),l.onDispose((()=>{this._decorationElements.delete(l),a.remove()}))),a.style.top=c*this._renderService.dimensions.css.cell.height+"px",a.style.display=this._altBufferIsActive?"none":"block",l.onRenderEmitter.fire(a)}}_refreshXPosition(l,c=l.element){var a;if(!c)return;const o=(a=l.options.x)!==null&&a!==void 0?a:0;(l.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(l){var c;(c=this._decorationElements.get(l))===null||c===void 0||c.remove(),this._decorationElements.delete(l),l.dispose()}};u.BufferDecorationRenderer=S=d([y(1,A.IBufferService),y(2,A.IDecorationService),y(3,p.IRenderService)],S)},5871:(ee,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(f){if(f.options.overviewRulerOptions){for(const d of this._zones)if(d.color===f.options.overviewRulerOptions.color&&d.position===f.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,f.marker.line))return;if(this._lineAdjacentToZone(d,f.marker.line,f.options.overviewRulerOptions.position))return void this._addLineToZone(d,f.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=f.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=f.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=f.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=f.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:f.options.overviewRulerOptions.color,position:f.options.overviewRulerOptions.position,startBufferLine:f.marker.line,endBufferLine:f.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(f){this._linePadding=f}_lineIntersectsZone(f,d){return d>=f.startBufferLine&&d<=f.endBufferLine}_lineAdjacentToZone(f,d,y){return d>=f.startBufferLine-this._linePadding[y||"full"]&&d<=f.endBufferLine+this._linePadding[y||"full"]}_addLineToZone(f,d){f.startBufferLine=Math.min(f.startBufferLine,d),f.endBufferLine=Math.max(f.endBufferLine,d)}}},5744:function(ee,u,f){var d=this&&this.__decorate||function(_,m,b,D){var v,E=arguments.length,L=E<3?m:D===null?D=Object.getOwnPropertyDescriptor(m,b):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,m,b,D);else for(var z=_.length-1;z>=0;z--)(v=_[z])&&(L=(E<3?v(L):E>3?v(m,b,L):v(m,b))||L);return E>3&&L&&Object.defineProperty(m,b,L),L},y=this&&this.__param||function(_,m){return function(b,D){m(b,D,_)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=f(5871),p=f(3656),C=f(4725),A=f(844),S=f(2585),l={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0},a={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(_,m,b,D,v,E,L){var z;super(),this._viewportElement=_,this._screenElement=m,this._bufferService=b,this._decorationService=D,this._renderService=v,this._optionsService=E,this._coreBrowseService=L,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(),(z=this._viewportElement.parentElement)===null||z===void 0||z.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,A.toDisposable)((()=>{var U;(U=this._canvas)===null||U===void 0||U.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,p.addDisposableDomListener)(this._coreBrowseService.window,"resize",(()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const _=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);c.full=this._canvas.width,c.left=_,c.center=m,c.right=_,this._refreshDrawHeightConstants(),a.full=0,a.left=0,a.center=c.left,a.right=c.left+c.center}_refreshDrawHeightConstants(){l.full=Math.round(2*this._coreBrowseService.dpr);const _=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(_,12),6)*this._coreBrowseService.dpr);l.left=m,l.center=m,l.right=m}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.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 m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const _=this._colorZoneStore.zones;for(const m of _)m.position!=="full"&&this._renderColorZone(m);for(const m of _)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(_){this._ctx.fillStyle=_.color,this._ctx.fillRect(a[_.position||"full"],Math.round((this._canvas.height-1)*(_.startBufferLine/this._bufferService.buffers.active.lines.length)-l[_.position||"full"]/2),c[_.position||"full"],Math.round((this._canvas.height-1)*((_.endBufferLine-_.startBufferLine)/this._bufferService.buffers.active.lines.length)+l[_.position||"full"]))}_queueRefresh(_,m){this._shouldUpdateDimensions=_||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=o=d([y(2,S.IBufferService),y(3,S.IDecorationService),y(4,C.IRenderService),y(5,S.IOptionsService),y(6,C.ICoreBrowserService)],o)},2950:function(ee,u,f){var d=this&&this.__decorate||function(S,l,c,a){var o,_=arguments.length,m=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(S,l,c,a);else for(var b=S.length-1;b>=0;b--)(o=S[b])&&(m=(_<3?o(m):_>3?o(l,c,m):o(l,c))||m);return _>3&&m&&Object.defineProperty(l,c,m),m},y=this&&this.__param||function(S,l){return function(c,a){l(c,a,S)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const h=f(4725),p=f(2585),C=f(2584);let A=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(S,l,c,a,o,_){this._textarea=S,this._compositionView=l,this._bufferService=c,this._optionsService=a,this._coreService=o,this._renderService=_,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(S){this._compositionView.textContent=S.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(S){if(this._isComposing||this._isSendingComposition){if(S.keyCode===229||S.keyCode===16||S.keyCode===17||S.keyCode===18)return!1;this._finalizeComposition(!1)}return S.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(S){if(this._compositionView.classList.remove("active"),this._isComposing=!1,S){const l={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,l.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(l.start,l.end):this._textarea.value.substring(l.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const l=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(l,!0)}}_handleAnyTextareaChanges(){const S=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const l=this._textarea.value,c=l.replace(S,"");this._dataAlreadySent=c,l.length>S.length?this._coreService.triggerDataEvent(c,!0):l.length<S.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):l.length===S.length&&l!==S&&this._coreService.triggerDataEvent(l,!0)}}),0)}updateCompositionElements(S){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,a=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=l*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=a+"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 _=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=a+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}S||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=A=d([y(2,p.IBufferService),y(3,p.IOptionsService),y(4,p.ICoreService),y(5,h.IRenderService)],A)},9806:(ee,u)=>{function f(d,y,h){const p=h.getBoundingClientRect(),C=d.getComputedStyle(h),A=parseInt(C.getPropertyValue("padding-left")),S=parseInt(C.getPropertyValue("padding-top"));return[y.clientX-p.left-A,y.clientY-p.top-S]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=f,u.getCoords=function(d,y,h,p,C,A,S,l,c){if(!A)return;const a=f(d,y,h);return a?(a[0]=Math.ceil((a[0]+(c?S/2:0))/S),a[1]=Math.ceil(a[1]/l),a[0]=Math.min(Math.max(a[0],1),p+(c?1:0)),a[1]=Math.min(Math.max(a[1],1),C),a):void 0}},9504:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const d=f(2584);function y(l,c,a,o){const _=l-h(l,a),m=c-h(c,a),b=Math.abs(_-m)-(function(D,v,E){let L=0;const z=D-h(D,E),O=v-h(v,E);for(let U=0;U<Math.abs(z-O);U++){const V=p(D,v)==="A"?-1:1,J=E.buffer.lines.get(z+V*U);J?.isWrapped&&L++}return L})(l,c,a);return S(b,A(p(l,c),o))}function h(l,c){let a=0,o=c.buffer.lines.get(l),_=o?.isWrapped;for(;_&&l>=0&&l<c.rows;)a++,o=c.buffer.lines.get(--l),_=o?.isWrapped;return a}function p(l,c){return l>c?"A":"B"}function C(l,c,a,o,_,m){let b=l,D=c,v="";for(;b!==a||D!==o;)b+=_?1:-1,_&&b>m.cols-1?(v+=m.buffer.translateBufferLineToString(D,!1,l,b),b=0,l=0,D++):!_&&b<0&&(v+=m.buffer.translateBufferLineToString(D,!1,0,l+1),b=m.cols-1,l=b,D--);return v+m.buffer.translateBufferLineToString(D,!1,l,b)}function A(l,c){const a=c?"O":"[";return d.C0.ESC+a+l}function S(l,c){l=Math.floor(l);let a="";for(let o=0;o<l;o++)a+=c;return a}u.moveToCellSequence=function(l,c,a,o){const _=a.buffer.x,m=a.buffer.y;if(!a.buffer.hasScrollback)return(function(v,E,L,z,O,U){return y(E,z,O,U).length===0?"":S(C(v,E,v,E-h(E,O),!1,O).length,A("D",U))})(_,m,0,c,a,o)+y(m,c,a,o)+(function(v,E,L,z,O,U){let V;V=y(E,z,O,U).length>0?z-h(z,O):E;const J=z,k=(function(I,x,M,B,w,N){let Q;return Q=y(M,B,w,N).length>0?B-h(B,w):x,I<M&&Q<=B||I>=M&&Q<B?"C":"D"})(v,E,L,z,O,U);return S(C(v,V,L,J,k==="C",O).length,A(k,U))})(_,m,l,c,a,o);let b;if(m===c)return b=_>l?"D":"C",S(Math.abs(_-l),A(b,o));b=m>c?"D":"C";const D=Math.abs(m-c);return S((function(v,E){return E.cols-v})(m>c?l:_,a)+(D-1)*a.cols+1+((m>c?_:l)-1),A(b,o))}},1296:function(ee,u,f){var d=this&&this.__decorate||function(O,U,V,J){var k,I=arguments.length,x=I<3?U:J===null?J=Object.getOwnPropertyDescriptor(U,V):J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(O,U,V,J);else for(var M=O.length-1;M>=0;M--)(k=O[M])&&(x=(I<3?k(x):I>3?k(U,V,x):k(U,V))||x);return I>3&&x&&Object.defineProperty(U,V,x),x},y=this&&this.__param||function(O,U){return function(V,J){U(V,J,O)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=f(3787),p=f(2550),C=f(2223),A=f(6171),S=f(4725),l=f(8055),c=f(8460),a=f(844),o=f(2585),_="xterm-dom-renderer-owner-",m="xterm-rows",b="xterm-fg-",D="xterm-bg-",v="xterm-focus",E="xterm-selection";let L=1,z=u.DomRenderer=class extends a.Disposable{constructor(O,U,V,J,k,I,x,M,B,w){super(),this._element=O,this._screenElement=U,this._viewportElement=V,this._linkifier2=J,this._charSizeService=I,this._optionsService=x,this._bufferService=M,this._coreBrowserService=B,this._themeService=w,this._terminalClass=L++,this._rowElements=[],this.onRequestRedraw=this.register(new c.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(m),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(E),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((N=>this._injectCss(N)))),this._injectCss(this._themeService.colors),this._rowFactory=k.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(_+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((N=>this._handleLinkHover(N)))),this.register(this._linkifier2.onHideLinkUnderline((N=>this._handleLinkLeave(N)))),this.register((0,a.toDisposable)((()=>{this._element.classList.remove(_+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.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 O=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*O,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*O),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/O),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/O),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 V of this._rowElements)V.style.width=`${this.dimensions.css.canvas.width}px`,V.style.height=`${this.dimensions.css.cell.height}px`,V.style.lineHeight=`${this.dimensions.css.cell.height}px`,V.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const U=`${this._terminalSelector} .${m} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=U,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(O){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let U=`${this._terminalSelector} .${m} { color: ${O.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;U+=`${this._terminalSelector} .${m} .xterm-dim { color: ${l.color.multiplyOpacity(O.foreground,.5).css};}`,U+=`${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;}`,U+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",U+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css}; } 50% { background-color: inherit; color: ${O.cursor.css}; }}`,U+=`${this._terminalSelector} .${m}.${v} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${m}.${v} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-block { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css};}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${O.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${O.cursor.css} inset;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${O.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,U+=`${this._terminalSelector} .${E} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${E} div { position: absolute; background-color: ${O.selectionBackgroundOpaque.css};}${this._terminalSelector} .${E} div { position: absolute; background-color: ${O.selectionInactiveBackgroundOpaque.css};}`;for(const[V,J]of O.ansi.entries())U+=`${this._terminalSelector} .${b}${V} { color: ${J.css}; }${this._terminalSelector} .${b}${V}.xterm-dim { color: ${l.color.multiplyOpacity(J,.5).css}; }${this._terminalSelector} .${D}${V} { background-color: ${J.css}; }`;U+=`${this._terminalSelector} .${b}${C.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(O.background).css}; }${this._terminalSelector} .${b}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(O.background),.5).css}; }${this._terminalSelector} .${D}${C.INVERTED_DEFAULT_COLOR} { background-color: ${O.foreground.css}; }`,this._themeStyleElement.textContent=U}_setDefaultSpacing(){const O=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${O}px`,this._rowFactory.defaultSpacing=O}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(O,U){for(let V=this._rowElements.length;V<=U;V++){const J=document.createElement("div");this._rowContainer.appendChild(J),this._rowElements.push(J)}for(;this._rowElements.length>U;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(O,U){this._refreshRowElements(O,U),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(v)}handleFocus(){this._rowContainer.classList.add(v),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(O,U,V){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(O,U,V),this.renderRows(0,this._bufferService.rows-1),!O||!U)return;const J=O[1]-this._bufferService.buffer.ydisp,k=U[1]-this._bufferService.buffer.ydisp,I=Math.max(J,0),x=Math.min(k,this._bufferService.rows-1);if(I>=this._bufferService.rows||x<0)return;const M=document.createDocumentFragment();if(V){const B=O[0]>U[0];M.appendChild(this._createSelectionElement(I,B?U[0]:O[0],B?O[0]:U[0],x-I+1))}else{const B=J===I?O[0]:0,w=I===k?U[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(I,B,w));const N=x-I-1;if(M.appendChild(this._createSelectionElement(I+1,0,this._bufferService.cols,N)),I!==x){const Q=k===x?U[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(x,0,Q))}}this._selectionContainer.appendChild(M)}_createSelectionElement(O,U,V,J=1){const k=document.createElement("div");return k.style.height=J*this.dimensions.css.cell.height+"px",k.style.top=O*this.dimensions.css.cell.height+"px",k.style.left=U*this.dimensions.css.cell.width+"px",k.style.width=this.dimensions.css.cell.width*(V-U)+"px",k}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 O of this._rowElements)O.replaceChildren()}renderRows(O,U){const V=this._bufferService.buffer,J=V.ybase+V.y,k=Math.min(V.x,this._bufferService.cols-1),I=this._optionsService.rawOptions.cursorBlink,x=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=O;B<=U;B++){const w=B+V.ydisp,N=this._rowElements[B],Q=V.lines.get(w);if(!N||!Q)break;N.replaceChildren(...this._rowFactory.createRow(Q,w,w===J,x,M,k,I,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${_}${this._terminalClass}`}_handleLinkHover(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!0)}_handleLinkLeave(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!1)}_setCellUnderline(O,U,V,J,k,I){V<0&&(O=0),J<0&&(U=0);const x=this._bufferService.rows-1;V=Math.max(Math.min(V,x),0),J=Math.max(Math.min(J,x),0),k=Math.min(k,this._bufferService.cols);const M=this._bufferService.buffer,B=M.ybase+M.y,w=Math.min(M.x,k-1),N=this._optionsService.rawOptions.cursorBlink,Q=this._optionsService.rawOptions.cursorStyle,se=this._optionsService.rawOptions.cursorInactiveStyle;for(let ne=V;ne<=J;++ne){const fe=ne+M.ydisp,T=this._rowElements[ne],K=M.lines.get(fe);if(!T||!K)break;T.replaceChildren(...this._rowFactory.createRow(K,fe,fe===B,Q,se,w,N,this.dimensions.css.cell.width,this._widthCache,I?ne===V?O:0:-1,I?(ne===J?U:k)-1:-1))}}};u.DomRenderer=z=d([y(4,o.IInstantiationService),y(5,S.ICharSizeService),y(6,o.IOptionsService),y(7,o.IBufferService),y(8,S.ICoreBrowserService),y(9,S.IThemeService)],z)},3787:function(ee,u,f){var d=this&&this.__decorate||function(b,D,v,E){var L,z=arguments.length,O=z<3?D:E===null?E=Object.getOwnPropertyDescriptor(D,v):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(b,D,v,E);else for(var U=b.length-1;U>=0;U--)(L=b[U])&&(O=(z<3?L(O):z>3?L(D,v,O):L(D,v))||O);return z>3&&O&&Object.defineProperty(D,v,O),O},y=this&&this.__param||function(b,D){return function(v,E){D(v,E,b)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=f(2223),p=f(643),C=f(511),A=f(2585),S=f(8055),l=f(4725),c=f(4269),a=f(6171),o=f(3734);let _=u.DomRendererRowFactory=class{constructor(b,D,v,E,L,z,O){this._document=b,this._characterJoinerService=D,this._optionsService=v,this._coreBrowserService=E,this._coreService=L,this._decorationService=z,this._themeService=O,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,D,v){this._selectionStart=b,this._selectionEnd=D,this._columnSelectMode=v}createRow(b,D,v,E,L,z,O,U,V,J,k){const I=[],x=this._characterJoinerService.getJoinedCharacters(D),M=this._themeService.colors;let B,w=b.getNoBgTrimmedLength();v&&w<z+1&&(w=z+1);let N=0,Q="",se=0,ne=0,fe=0,T=!1,K=0,Z=!1,te=0;const ye=[],ae=J!==-1&&k!==-1;for(let Re=0;Re<w;Re++){b.loadCell(Re,this._workCell);let He=this._workCell.getWidth();if(He===0)continue;let $e=!1,Lt=Re,Ce=this._workCell;if(x.length>0&&Re===x[0][0]){$e=!0;const ze=x.shift();Ce=new c.JoinedCellData(this._workCell,b.translateToString(!0,ze[0],ze[1]),ze[1]-ze[0]),Lt=ze[1]-1,He=Ce.getWidth()}const Wt=this._isCellInSelection(Re,D),ai=v&&Re===z,ii=ae&&Re>=J&&Re<=k;let oi=!1;this._decorationService.forEachDecorationAtCell(Re,D,void 0,(ze=>{oi=!0}));let Ri=Ce.getChars()||p.WHITESPACE_CELL_CHAR;if(Ri===" "&&(Ce.isUnderline()||Ce.isOverline())&&(Ri=" "),te=He*U-V.get(Ri,Ce.isBold(),Ce.isItalic()),B){if(N&&(Wt&&Z||!Wt&&!Z&&Ce.bg===se)&&(Wt&&Z&&M.selectionForeground||Ce.fg===ne)&&Ce.extended.ext===fe&&ii===T&&te===K&&!ai&&!$e&&!oi){Q+=Ri,N++;continue}N&&(B.textContent=Q),B=this._document.createElement("span"),N=0,Q=""}else B=this._document.createElement("span");if(se=Ce.bg,ne=Ce.fg,fe=Ce.extended.ext,T=ii,K=te,Z=Wt,$e&&z>=Re&&z<=Lt&&(z=Re),!this._coreService.isCursorHidden&&ai){if(ye.push("xterm-cursor"),this._coreBrowserService.isFocused)O&&ye.push("xterm-cursor-blink"),ye.push(E==="bar"?"xterm-cursor-bar":E==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":ye.push("xterm-cursor-outline");break;case"block":ye.push("xterm-cursor-block");break;case"bar":ye.push("xterm-cursor-bar");break;case"underline":ye.push("xterm-cursor-underline")}}if(Ce.isBold()&&ye.push("xterm-bold"),Ce.isItalic()&&ye.push("xterm-italic"),Ce.isDim()&&ye.push("xterm-dim"),Q=Ce.isInvisible()?p.WHITESPACE_CELL_CHAR:Ce.getChars()||p.WHITESPACE_CELL_CHAR,Ce.isUnderline()&&(ye.push(`xterm-underline-${Ce.extended.underlineStyle}`),Q===" "&&(Q=" "),!Ce.isUnderlineColorDefault()))if(Ce.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${o.AttributeData.toColorRGB(Ce.getUnderlineColor()).join(",")})`;else{let ze=Ce.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ce.isBold()&&ze<8&&(ze+=8),B.style.textDecorationColor=M.ansi[ze].css}Ce.isOverline()&&(ye.push("xterm-overline"),Q===" "&&(Q=" ")),Ce.isStrikethrough()&&ye.push("xterm-strikethrough"),ii&&(B.style.textDecoration="underline");let We=Ce.getFgColor(),Ne=Ce.getFgColorMode(),ot=Ce.getBgColor(),Zt=Ce.getBgColorMode();const Mi=!!Ce.isInverse();if(Mi){const ze=We;We=ot,ot=ze;const ci=Ne;Ne=Zt,Zt=ci}let pt,ut,it,jt=!1;switch(this._decorationService.forEachDecorationAtCell(Re,D,void 0,(ze=>{ze.options.layer!=="top"&&jt||(ze.backgroundColorRGB&&(Zt=50331648,ot=ze.backgroundColorRGB.rgba>>8&16777215,pt=ze.backgroundColorRGB),ze.foregroundColorRGB&&(Ne=50331648,We=ze.foregroundColorRGB.rgba>>8&16777215,ut=ze.foregroundColorRGB),jt=ze.options.layer==="top")})),!jt&&Wt&&(pt=this._coreBrowserService.isFocused?M.selectionBackgroundOpaque:M.selectionInactiveBackgroundOpaque,ot=pt.rgba>>8&16777215,Zt=50331648,jt=!0,M.selectionForeground&&(Ne=50331648,We=M.selectionForeground.rgba>>8&16777215,ut=M.selectionForeground)),jt&&ye.push("xterm-decoration-top"),Zt){case 16777216:case 33554432:it=M.ansi[ot],ye.push(`xterm-bg-${ot}`);break;case 50331648:it=S.rgba.toColor(ot>>16,ot>>8&255,255&ot),this._addStyle(B,`background-color:#${m((ot>>>0).toString(16),"0",6)}`);break;default:Mi?(it=M.foreground,ye.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):it=M.background}switch(pt||Ce.isDim()&&(pt=S.color.multiplyOpacity(it,.5)),Ne){case 16777216:case 33554432:Ce.isBold()&&We<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(We+=8),this._applyMinimumContrast(B,it,M.ansi[We],Ce,pt,void 0)||ye.push(`xterm-fg-${We}`);break;case 50331648:const ze=S.rgba.toColor(We>>16&255,We>>8&255,255&We);this._applyMinimumContrast(B,it,ze,Ce,pt,ut)||this._addStyle(B,`color:#${m(We.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,it,M.foreground,Ce,pt,void 0)||Mi&&ye.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}ye.length&&(B.className=ye.join(" "),ye.length=0),ai||$e||oi?B.textContent=Q:N++,te!==this.defaultSpacing&&(B.style.letterSpacing=`${te}px`),I.push(B),Re=Lt}return B&&N&&(B.textContent=Q),I}_applyMinimumContrast(b,D,v,E,L,z){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.excludeFromContrastRatioDemands)(E.getCode()))return!1;const O=this._getContrastCache(E);let U;if(L||z||(U=O.getColor(D.rgba,v.rgba)),U===void 0){const V=this._optionsService.rawOptions.minimumContrastRatio/(E.isDim()?2:1);U=S.color.ensureContrastRatio(L||D,z||v,V),O.setColor((L||D).rgba,(z||v).rgba,U??null)}return!!U&&(this._addStyle(b,`color:${U.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,D){b.setAttribute("style",`${b.getAttribute("style")||""}${D};`)}_isCellInSelection(b,D){const v=this._selectionStart,E=this._selectionEnd;return!(!v||!E)&&(this._columnSelectMode?v[0]<=E[0]?b>=v[0]&&D>=v[1]&&b<E[0]&&D<=E[1]:b<v[0]&&D>=v[1]&&b>=E[0]&&D<=E[1]:D>v[1]&&D<E[1]||v[1]===E[1]&&D===v[1]&&b>=v[0]&&b<E[0]||v[1]<E[1]&&D===E[1]&&b<E[0]||v[1]<E[1]&&D===v[1]&&b>=v[0])}};function m(b,D,v){for(;b.length<v;)b=D+b;return b}u.DomRendererRowFactory=_=d([y(1,l.ICharacterJoinerService),y(2,A.IOptionsService),y(3,l.ICoreBrowserService),y(4,A.ICoreService),y(5,A.IDecorationService),y(6,l.IThemeService)],_)},2550:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=f.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=f.createElement("span"),y=f.createElement("span");y.style.fontWeight="bold";const h=f.createElement("span");h.style.fontStyle="italic";const p=f.createElement("span");p.style.fontWeight="bold",p.style.fontStyle="italic",this._measureElements=[d,y,h,p],this._container.appendChild(d),this._container.appendChild(y),this._container.appendChild(h),this._container.appendChild(p),f.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(f,d,y,h){f===this._font&&d===this._fontSize&&y===this._weight&&h===this._weightBold||(this._font=f,this._fontSize=d,this._weight=y,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${y}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${y}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(f,d,y){let h=0;if(!d&&!y&&f.length===1&&(h=f.charCodeAt(0))<256)return this._flat[h]!==-9999?this._flat[h]:this._flat[h]=this._measure(f,0);let p=f;d&&(p+="B"),y&&(p+="I");let C=this._holey.get(p);if(C===void 0){let A=0;d&&(A|=1),y&&(A|=2),C=this._measure(f,A),this._holey.set(p,C)}return C}_measure(f,d){const y=this._measureElements[d];return y.textContent=f.repeat(32),y.offsetWidth/32}}},2223:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const d=f(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(ee,u)=>{function f(d){return 57508<=d&&d<=57558}Object.defineProperty(u,"__esModule",{value:!0}),u.createRenderDimensions=u.excludeFromContrastRatioDemands=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},u.isPowerlineGlyph=f,u.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},u.excludeFromContrastRatioDemands=function(d){return f(d)||(function(y){return 9472<=y&&y<=9631})(d)},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:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionModel=void 0,u.SelectionModel=class{constructor(f){this._bufferService=f,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 f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?f%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)-1]:[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[f,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[Math.max(f,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const f=this.selectionStart,d=this.selectionEnd;return!(!f||!d)&&(f[1]>d[1]||f[1]===d[1]&&f[0]>d[0])}handleTrim(f){return this.selectionStart&&(this.selectionStart[1]-=f),this.selectionEnd&&(this.selectionEnd[1]-=f),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(ee,u,f){var d=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const h=f(2585),p=f(8460),C=f(844);let A=u.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,c,a){super(),this._optionsService=a,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new S(l,c,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};u.CharSizeService=A=d([y(2,h.IOptionsService)],A);class S{constructor(c,a,o){this._document=c,this._parentElement=a,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(ee,u,f){var d=this&&this.__decorate||function(c,a,o,_){var m,b=arguments.length,D=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(m=c[v])&&(D=(b<3?m(D):b>3?m(a,o,D):m(a,o))||D);return b>3&&D&&Object.defineProperty(a,o,D),D},y=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const h=f(3734),p=f(643),C=f(511),A=f(2585);class S extends h.AttributeData{constructor(a,o,_){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=o,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=S;let l=u.CharacterJoinerService=class Vf{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(a){const o={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(o),o.id}deregister(a){for(let o=0;o<this._characterJoiners.length;o++)if(this._characterJoiners[o].id===a)return this._characterJoiners.splice(o,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const o=this._bufferService.buffer.lines.get(a);if(!o||o.length===0)return[];const _=[],m=o.translateToString(!0);let b=0,D=0,v=0,E=o.getFg(0),L=o.getBg(0);for(let z=0;z<o.getTrimmedLength();z++)if(o.loadCell(z,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==L){if(z-b>1){const O=this._getJoinedRanges(m,v,D,o,b);for(let U=0;U<O.length;U++)_.push(O[U])}b=z,v=D,E=this._workCell.fg,L=this._workCell.bg}D+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const z=this._getJoinedRanges(m,v,D,o,b);for(let O=0;O<z.length;O++)_.push(z[O])}return _}_getJoinedRanges(a,o,_,m,b){const D=a.substring(o,_);let v=[];try{v=this._characterJoiners[0].handler(D)}catch(E){console.error(E)}for(let E=1;E<this._characterJoiners.length;E++)try{const L=this._characterJoiners[E].handler(D);for(let z=0;z<L.length;z++)Vf._mergeRanges(v,L[z])}catch(L){console.error(L)}return this._stringRangesToCellRanges(v,m,b),v}_stringRangesToCellRanges(a,o,_){let m=0,b=!1,D=0,v=a[m];if(v){for(let E=_;E<this._bufferService.cols;E++){const L=o.getWidth(E),z=o.getString(E).length||p.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!b&&v[0]<=D&&(v[0]=E,b=!0),v[1]<=D){if(v[1]=E,v=a[++m],!v)break;v[0]<=D?(v[0]=E,b=!0):b=!1}D+=z}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(a,o){let _=!1;for(let m=0;m<a.length;m++){const b=a[m];if(_){if(o[1]<=b[0])return a[m-1][1]=o[1],a;if(o[1]<=b[1])return a[m-1][1]=Math.max(o[1],b[1]),a.splice(m,1),a;a.splice(m,1),m--}else{if(o[1]<=b[0])return a.splice(m,0,o),a;if(o[1]<=b[1])return b[0]=Math.min(o[0],b[0]),a;o[0]<b[1]&&(b[0]=Math.min(o[0],b[0]),_=!0)}}return _?a[a.length-1][1]=o[1]:a.push(o),a}};u.CharacterJoinerService=l=d([y(0,A.IBufferService)],l)},5114:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0,u.CoreBrowserService=class{constructor(f,d){this._textarea=f,this.window=d,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(ee,u,f){var d=this&&this.__decorate||function(A,S,l,c){var a,o=arguments.length,_=o<3?S:c===null?c=Object.getOwnPropertyDescriptor(S,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(A,S,l,c);else for(var m=A.length-1;m>=0;m--)(a=A[m])&&(_=(o<3?a(_):o>3?a(S,l,_):a(S,l))||_);return o>3&&_&&Object.defineProperty(S,l,_),_},y=this&&this.__param||function(A,S){return function(l,c){S(l,c,A)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=f(4725),p=f(9806);let C=u.MouseService=class{constructor(A,S){this._renderService=A,this._charSizeService=S}getCoords(A,S,l,c,a){return(0,p.getCoords)(window,A,S,l,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(A,S){const l=(0,p.getCoordsRelativeToElement)(window,A,S);if(this._charSizeService.hasValidSize)return l[0]=Math.min(Math.max(l[0],0),this._renderService.dimensions.css.canvas.width-1),l[1]=Math.min(Math.max(l[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(l[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(l[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(l[0]),y:Math.floor(l[1])}}};u.MouseService=C=d([y(0,h.IRenderService),y(1,h.ICharSizeService)],C)},3230:function(ee,u,f){var d=this&&this.__decorate||function(_,m,b,D){var v,E=arguments.length,L=E<3?m:D===null?D=Object.getOwnPropertyDescriptor(m,b):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,m,b,D);else for(var z=_.length-1;z>=0;z--)(v=_[z])&&(L=(E<3?v(L):E>3?v(m,b,L):v(m,b))||L);return E>3&&L&&Object.defineProperty(m,b,L),L},y=this&&this.__param||function(_,m){return function(b,D){m(b,D,_)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=f(3656),p=f(6193),C=f(5596),A=f(4725),S=f(8460),l=f(844),c=f(7226),a=f(2585);let o=u.RenderService=class extends l.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(_,m,b,D,v,E,L,z){if(super(),this._rowCount=_,this._charSizeService=D,this._renderer=this.register(new l.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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new p.RenderDebouncer(L.window,((O,U)=>this._renderRows(O,U))),this.register(this._renderDebouncer),this._screenDprMonitor=new C.ScreenDprMonitor(L.window),this._screenDprMonitor.setListener((()=>this.handleDevicePixelRatioChange())),this.register(this._screenDprMonitor),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)===null||O===void 0?void 0:O.clear()}))),this.register(b.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(v.onDecorationRegistered((()=>this._fullRefresh()))),this.register(v.onDecorationRemoved((()=>this._fullRefresh()))),this.register(b.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(b.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register((0,h.addDisposableDomListener)(L.window,"resize",(()=>this.handleDevicePixelRatioChange()))),this.register(z.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in L.window){const O=new L.window.IntersectionObserver((U=>this._handleIntersectionChange(U[U.length-1])),{threshold:0});O.observe(m),this.register({dispose:()=>O.disconnect()})}}_handleIntersectionChange(_){this._isPaused=_.isIntersecting===void 0?_.intersectionRatio===0:!_.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(_,m,b=!1){this._isPaused?this._needsFullRefresh=!0:(b||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,m,this._rowCount))}_renderRows(_,m){this._renderer.value&&(_=Math.min(_,this._rowCount-1),m=Math.min(m,this._rowCount-1),this._renderer.value.renderRows(_,m),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:_,end:m}),this._onRender.fire({start:_,end:m}),this._isNextRenderRedrawOnly=!0)}resize(_,m){this._rowCount=m,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(_){this._renderer.value=_,this._renderer.value.onRequestRedraw((m=>this.refreshRows(m.start,m.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(_){return this._renderDebouncer.addRefreshCallback(_)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var _,m;this._renderer.value&&((m=(_=this._renderer.value).clearTextureAtlas)===null||m===void 0||m.call(_),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,m){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value.handleResize(_,m))):this._renderer.value.handleResize(_,m),this._fullRefresh())}handleCharSizeChanged(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCharSizeChanged()}handleBlur(){var _;(_=this._renderer.value)===null||_===void 0||_.handleBlur()}handleFocus(){var _;(_=this._renderer.value)===null||_===void 0||_.handleFocus()}handleSelectionChanged(_,m,b){var D;this._selectionState.start=_,this._selectionState.end=m,this._selectionState.columnSelectMode=b,(D=this._renderer.value)===null||D===void 0||D.handleSelectionChanged(_,m,b)}handleCursorMove(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCursorMove()}clear(){var _;(_=this._renderer.value)===null||_===void 0||_.clear()}};u.RenderService=o=d([y(2,a.IOptionsService),y(3,A.ICharSizeService),y(4,a.IDecorationService),y(5,a.IBufferService),y(6,A.ICoreBrowserService),y(7,A.IThemeService)],o)},9312:function(ee,u,f){var d=this&&this.__decorate||function(v,E,L,z){var O,U=arguments.length,V=U<3?E:z===null?z=Object.getOwnPropertyDescriptor(E,L):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(v,E,L,z);else for(var J=v.length-1;J>=0;J--)(O=v[J])&&(V=(U<3?O(V):U>3?O(E,L,V):O(E,L))||V);return U>3&&V&&Object.defineProperty(E,L,V),V},y=this&&this.__param||function(v,E){return function(L,z){E(L,z,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=f(9806),p=f(9504),C=f(456),A=f(4725),S=f(8460),l=f(844),c=f(6114),a=f(4841),o=f(511),_=f(2585),m=" ",b=new RegExp(m,"g");let D=u.SelectionService=class extends l.Disposable{constructor(v,E,L,z,O,U,V,J,k){super(),this._element=v,this._screenElement=E,this._linkifier=L,this._bufferService=z,this._coreService=O,this._mouseService=U,this._optionsService=V,this._renderService=J,this._coreBrowserService=k,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 S.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new S.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new S.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=I=>this._handleMouseMove(I),this._mouseUpListener=I=>this._handleMouseUp(I),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((I=>this._handleTrim(I))),this.register(this._bufferService.buffers.onBufferActivate((I=>this._handleBufferActivate(I)))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,l.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 v=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;return!(!v||!E||v[0]===E[0]&&v[1]===E[1])}get selectionText(){const v=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;if(!v||!E)return"";const L=this._bufferService.buffer,z=[];if(this._activeSelectionMode===3){if(v[0]===E[0])return"";const O=v[0]<E[0]?v[0]:E[0],U=v[0]<E[0]?E[0]:v[0];for(let V=v[1];V<=E[1];V++){const J=L.translateBufferLineToString(V,!0,O,U);z.push(J)}}else{const O=v[1]===E[1]?E[0]:void 0;z.push(L.translateBufferLineToString(v[1],!0,v[0],O));for(let U=v[1]+1;U<=E[1]-1;U++){const V=L.lines.get(U),J=L.translateBufferLineToString(U,!0);V?.isWrapped?z[z.length-1]+=J:z.push(J)}if(v[1]!==E[1]){const U=L.lines.get(E[1]),V=L.translateBufferLineToString(E[1],!0,0,E[0]);U&&U.isWrapped?z[z.length-1]+=V:z.push(V)}}return z.map((O=>O.replace(b," "))).join(c.isWindows?`\r
|
|
13
|
+
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=C=f([y(0,p.IBufferService),y(1,p.IOptionsService),y(2,p.IOscLinkService)],C)},6193:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(d,f){this._parentWindow=d,this._renderCallback=f,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,f,y){this._rowCount=y,d=d!==void 0?d:0,f=f!==void 0?f: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,f):f,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),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},5596:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ScreenDprMonitor=void 0;const f=d(844);class y extends f.Disposable{constructor(p){super(),this._parentWindow=p,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,f.toDisposable)((()=>{this.clearListener()})))}setListener(p){this._listener&&this.clearListener(),this._listener=p,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)===null||p===void 0||p.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=y},3236:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const f=d(3614),y=d(3656),h=d(6465),p=d(9042),C=d(3730),x=d(1680),S=d(3107),l=d(5744),c=d(2950),a=d(1296),o=d(428),_=d(4269),m=d(5114),b=d(8934),D=d(3230),v=d(9312),E=d(4725),L=d(6731),z=d(8055),O=d(8969),U=d(8460),V=d(844),J=d(6114),k=d(8437),I=d(2584),A=d(7399),M=d(5941),B=d(9074),w=d(2585),N=d(5435),Q=d(4567),ie=typeof window<"u"?window.document:null;class le extends O.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(T={}){super(T),this.browser=J,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new V.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(h.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(w.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((Y,Z)=>this.refresh(Y,Z)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((Y=>this._reportWindowsOptions(Y)))),this.register(this._inputHandler.onColor((Y=>this._handleColorEvent(Y)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((Y=>this._afterResize(Y.cols,Y.rows)))),this.register((0,V.toDisposable)((()=>{var Y,Z;this._customKeyEventHandler=void 0,(Z=(Y=this.element)===null||Y===void 0?void 0:Y.parentNode)===null||Z===void 0||Z.removeChild(this.element)})))}_handleColorEvent(T){if(this._themeService)for(const Y of T){let Z,te="";switch(Y.index){case 256:Z="foreground",te="10";break;case 257:Z="background",te="11";break;case 258:Z="cursor",te="12";break;default:Z="ansi",te="4;"+Y.index}switch(Y.type){case 0:const ye=z.color.toColorRGB(Z==="ansi"?this._themeService.colors.ansi[Y.index]:this._themeService.colors[Z]);this.coreService.triggerDataEvent(`${I.C0.ESC}]${te};${(0,M.toRgbString)(ye)}${I.C1_ESCAPED.ST}`);break;case 1:if(Z==="ansi")this._themeService.modifyColors((ae=>ae.ansi[Y.index]=z.rgba.toColor(...Y.color)));else{const ae=Z;this._themeService.modifyColors((Ae=>Ae[ae]=z.rgba.toColor(...Y.color)))}break;case 2:this._themeService.restoreColor(Y.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(T){T?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Q.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(T){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[I"),this.updateCursorStyle(T),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var T;return(T=this.textarea)===null||T===void 0?void 0:T.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const T=this.buffer.ybase+this.buffer.y,Y=this.buffer.lines.get(T);if(!Y)return;const Z=Math.min(this.buffer.x,this.cols-1),te=this._renderService.dimensions.css.cell.height,ye=Y.getWidth(Z),ae=this._renderService.dimensions.css.cell.width*ye,Ae=this.buffer.y*this._renderService.dimensions.css.cell.height,ke=Z*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ke+"px",this.textarea.style.top=Ae+"px",this.textarea.style.width=ae+"px",this.textarea.style.height=te+"px",this.textarea.style.lineHeight=te+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,y.addDisposableDomListener)(this.element,"copy",(Y=>{this.hasSelection()&&(0,f.copyHandler)(Y,this._selectionService)})));const T=Y=>(0,f.handlePasteEvent)(Y,this.textarea,this.coreService,this.optionsService);this.register((0,y.addDisposableDomListener)(this.textarea,"paste",T)),this.register((0,y.addDisposableDomListener)(this.element,"paste",T)),J.isFirefox?this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(Y=>{Y.button===2&&(0,f.rightClickHandler)(Y,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,y.addDisposableDomListener)(this.element,"contextmenu",(Y=>{(0,f.rightClickHandler)(Y,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),J.isLinux&&this.register((0,y.addDisposableDomListener)(this.element,"auxclick",(Y=>{Y.button===1&&(0,f.moveTextAreaUnderMouseCursor)(Y,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,y.addDisposableDomListener)(this.textarea,"keyup",(T=>this._keyUp(T)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keydown",(T=>this._keyDown(T)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keypress",(T=>this._keyPress(T)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionupdate",(T=>this._compositionHelper.compositionupdate(T)))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,y.addDisposableDomListener)(this.textarea,"input",(T=>this._inputEvent(T)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(T){var Y;if(!T)throw new Error("Terminal requires a parent element.");T.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=T.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),T.appendChild(this.element);const Z=ie.createDocumentFragment();this._viewportElement=ie.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Z.appendChild(this._viewportElement),this._viewportScrollArea=ie.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=ie.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=ie.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Z.appendChild(this.screenElement),this.textarea=ie.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),J.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(m.CoreBrowserService,this.textarea,(Y=this._document.defaultView)!==null&&Y!==void 0?Y:window),this._instantiationService.setService(E.ICoreBrowserService,this._coreBrowserService),this.register((0,y.addDisposableDomListener)(this.textarea,"focus",(te=>this._handleTextAreaFocus(te)))),this.register((0,y.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(E.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(E.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((te=>this._onRender.fire(te)))),this.onResize((te=>this._renderService.resize(te.cols,te.rows))),this._compositionView=ie.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(Z);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(b.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(x.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((te=>this.scrollLines(te.amount,te.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(v.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((te=>this.scrollLines(te.amount,te.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((te=>this._renderService.handleSelectionChanged(te.start,te.end,te.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((te=>{this.textarea.value=te,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((te=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,y.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(S.BufferDecorationRenderer,this.screenElement)),this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(te=>this._selectionService.handleMouseDown(te)))),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(Q.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(te=>this._handleScreenReaderModeOptionChange(te)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(te=>{!this._overviewRulerRenderer&&te&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(a.DomRenderer,this.element,this.screenElement,this._viewportElement,this.linkifier2)}bindMouse(){const T=this,Y=this.element;function Z(ae){const Ae=T._mouseService.getMouseReportCoords(ae,T.screenElement);if(!Ae)return!1;let ke,Je;switch(ae.overrideType||ae.type){case"mousemove":Je=32,ae.buttons===void 0?(ke=3,ae.button!==void 0&&(ke=ae.button<3?ae.button:3)):ke=1&ae.buttons?0:4&ae.buttons?1:2&ae.buttons?2:3;break;case"mouseup":Je=0,ke=ae.button<3?ae.button:3;break;case"mousedown":Je=1,ke=ae.button<3?ae.button:3;break;case"wheel":if(T.viewport.getLinesScrolled(ae)===0)return!1;Je=ae.deltaY<0?0:1,ke=4;break;default:return!1}return!(Je===void 0||ke===void 0||ke>4)&&T.coreMouseService.triggerMouseEvent({col:Ae.col,row:Ae.row,x:Ae.x,y:Ae.y,button:ke,action:Je,ctrl:ae.ctrlKey,alt:ae.altKey,shift:ae.shiftKey})}const te={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ye={mouseup:ae=>(Z(ae),ae.buttons||(this._document.removeEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.removeEventListener("mousemove",te.mousedrag)),this.cancel(ae)),wheel:ae=>(Z(ae),this.cancel(ae,!0)),mousedrag:ae=>{ae.buttons&&Z(ae)},mousemove:ae=>{ae.buttons||Z(ae)}};this.register(this.coreMouseService.onProtocolChange((ae=>{ae?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ae)),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&ae?te.mousemove||(Y.addEventListener("mousemove",ye.mousemove),te.mousemove=ye.mousemove):(Y.removeEventListener("mousemove",te.mousemove),te.mousemove=null),16&ae?te.wheel||(Y.addEventListener("wheel",ye.wheel,{passive:!1}),te.wheel=ye.wheel):(Y.removeEventListener("wheel",te.wheel),te.wheel=null),2&ae?te.mouseup||(Y.addEventListener("mouseup",ye.mouseup),te.mouseup=ye.mouseup):(this._document.removeEventListener("mouseup",te.mouseup),Y.removeEventListener("mouseup",te.mouseup),te.mouseup=null),4&ae?te.mousedrag||(te.mousedrag=ye.mousedrag):(this._document.removeEventListener("mousemove",te.mousedrag),te.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,y.addDisposableDomListener)(Y,"mousedown",(ae=>{if(ae.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ae))return Z(ae),te.mouseup&&this._document.addEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.addEventListener("mousemove",te.mousedrag),this.cancel(ae)}))),this.register((0,y.addDisposableDomListener)(Y,"wheel",(ae=>{if(!te.wheel){if(!this.buffer.hasScrollback){const Ae=this.viewport.getLinesScrolled(ae);if(Ae===0)return;const ke=I.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ae.deltaY<0?"A":"B");let Je="";for(let wt=0;wt<Math.abs(Ae);wt++)Je+=ke;return this.coreService.triggerDataEvent(Je,!0),this.cancel(ae,!0)}return this.viewport.handleWheel(ae)?this.cancel(ae):void 0}}),{passive:!1})),this.register((0,y.addDisposableDomListener)(Y,"touchstart",(ae=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ae),this.cancel(ae)}),{passive:!0})),this.register((0,y.addDisposableDomListener)(Y,"touchmove",(ae=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ae)?void 0:this.cancel(ae)}),{passive:!1}))}refresh(T,Y){var Z;(Z=this._renderService)===null||Z===void 0||Z.refreshRows(T,Y)}updateCursorStyle(T){var Y;!((Y=this._selectionService)===null||Y===void 0)&&Y.shouldColumnSelect(T)?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(T,Y,Z=0){var te;Z===1?(super.scrollLines(T,Y,Z),this.refresh(0,this.rows-1)):(te=this.viewport)===null||te===void 0||te.scrollLines(T)}paste(T){(0,f.paste)(T,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(T){this._customKeyEventHandler=T}registerLinkProvider(T){return this.linkifier2.registerLinkProvider(T)}registerCharacterJoiner(T){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const Y=this._characterJoinerService.register(T);return this.refresh(0,this.rows-1),Y}deregisterCharacterJoiner(T){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(T)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(T){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+T)}registerDecoration(T){return this._decorationService.registerDecoration(T)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(T,Y,Z){this._selectionService.setSelection(T,Y,Z)}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 T;(T=this._selectionService)===null||T===void 0||T.clearSelection()}selectAll(){var T;(T=this._selectionService)===null||T===void 0||T.selectAll()}selectLines(T,Y){var Z;(Z=this._selectionService)===null||Z===void 0||Z.selectLines(T,Y)}_keyDown(T){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(T)===!1)return!1;const Y=this.browser.isMac&&this.options.macOptionIsMeta&&T.altKey;if(!Y&&!this._compositionHelper.keydown(T))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Y||T.key!=="Dead"&&T.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const Z=(0,A.evaluateKeyboardEvent)(T,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(T),Z.type===3||Z.type===2){const te=this.rows-1;return this.scrollLines(Z.type===2?-te:te),this.cancel(T,!0)}return Z.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,T)||(Z.cancel&&this.cancel(T,!0),!Z.key||!!(T.key&&!T.ctrlKey&&!T.altKey&&!T.metaKey&&T.key.length===1&&T.key.charCodeAt(0)>=65&&T.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(Z.key!==I.C0.ETX&&Z.key!==I.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Z.key,domEvent:T}),this._showCursor(),this.coreService.triggerDataEvent(Z.key,!0),!this.optionsService.rawOptions.screenReaderMode||T.altKey||T.ctrlKey?this.cancel(T,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(T,Y){const Z=T.isMac&&!this.options.macOptionIsMeta&&Y.altKey&&!Y.ctrlKey&&!Y.metaKey||T.isWindows&&Y.altKey&&Y.ctrlKey&&!Y.metaKey||T.isWindows&&Y.getModifierState("AltGraph");return Y.type==="keypress"?Z:Z&&(!Y.keyCode||Y.keyCode>47)}_keyUp(T){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(T)===!1||((function(Y){return Y.keyCode===16||Y.keyCode===17||Y.keyCode===18})(T)||this.focus(),this.updateCursorStyle(T),this._keyPressHandled=!1)}_keyPress(T){let Y;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(T)===!1)return!1;if(this.cancel(T),T.charCode)Y=T.charCode;else if(T.which===null||T.which===void 0)Y=T.keyCode;else{if(T.which===0||T.charCode===0)return!1;Y=T.which}return!(!Y||(T.altKey||T.ctrlKey||T.metaKey)&&!this._isThirdLevelShift(this.browser,T)||(Y=String.fromCharCode(Y),this._onKey.fire({key:Y,domEvent:T}),this._showCursor(),this.coreService.triggerDataEvent(Y,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(T){if(T.data&&T.inputType==="insertText"&&(!T.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const Y=T.data;return this.coreService.triggerDataEvent(Y,!0),this.cancel(T),!0}return!1}resize(T,Y){T!==this.cols||Y!==this.rows?super.resize(T,Y):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(T,Y){var Z,te;(Z=this._charSizeService)===null||Z===void 0||Z.measure(),(te=this.viewport)===null||te===void 0||te.syncScrollArea(!0)}clear(){var T;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 Y=1;Y<this.rows;Y++)this.buffer.lines.push(this.buffer.getBlankLine(k.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(T=this.viewport)===null||T===void 0||T.reset(),this.refresh(0,this.rows-1)}}reset(){var T,Y;this.options.rows=this.rows,this.options.cols=this.cols;const Z=this._customKeyEventHandler;this._setup(),super.reset(),(T=this._selectionService)===null||T===void 0||T.reset(),this._decorationService.reset(),(Y=this.viewport)===null||Y===void 0||Y.reset(),this._customKeyEventHandler=Z,this.refresh(0,this.rows-1)}clearTextureAtlas(){var T;(T=this._renderService)===null||T===void 0||T.clearTextureAtlas()}_reportFocus(){var T;!((T=this.element)===null||T===void 0)&&T.classList.contains("focus")?this.coreService.triggerDataEvent(I.C0.ESC+"[I"):this.coreService.triggerDataEvent(I.C0.ESC+"[O")}_reportWindowsOptions(T){if(this._renderService)switch(T){case N.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const Y=this._renderService.dimensions.css.canvas.width.toFixed(0),Z=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[4;${Z};${Y}t`);break;case N.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const te=this._renderService.dimensions.css.cell.width.toFixed(0),ye=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[6;${ye};${te}t`)}}cancel(T,Y){if(this.options.cancelEvents||Y)return T.preventDefault(),T.stopPropagation(),!1}}u.Terminal=le},9924:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(d,f=1e3){this._renderCallback=d,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,f,y){this._rowCount=y,d=d!==void 0?d:0,f=f!==void 0?f: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,f):f;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=h-this._lastRefreshMs,C=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),C)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const d=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,f)}}},1680:function(ee,u,d){var f=this&&this.__decorate||function(c,a,o,_){var m,b=arguments.length,D=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(m=c[v])&&(D=(b<3?m(D):b>3?m(a,o,D):m(a,o))||D);return b>3&&D&&Object.defineProperty(a,o,D),D},y=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const h=d(3656),p=d(4725),C=d(8460),x=d(844),S=d(2585);let l=u.Viewport=class extends x.Disposable{constructor(c,a,o,_,m,b,D,v){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=o,this._optionsService=_,this._charSizeService=m,this._renderService=b,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 C.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((E=>this._activeBuffer=E.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((E=>this._renderDimensions=E))),this._handleThemeChange(v.colors),this.register(v.onChangeColors((E=>this._handleThemeChange(E)))),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 a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.css.canvas.height);this._lastRecordedBufferHeight!==a&&(this._lastRecordedBufferHeight=a,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 a=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:a,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,a){const o=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&o<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const a=this._getPixelsScrolled(c);return a!==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+a:this._smoothScrollState.target+=a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const a=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+a,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 a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a}getBufferElements(c,a){var o;let _,m="";const b=[],D=a??this._bufferService.buffer.lines.length,v=this._bufferService.buffer.lines;for(let E=c;E<D;E++){const L=v.get(E);if(!L)continue;const z=(o=v.get(E+1))===null||o===void 0?void 0:o.isWrapped;if(m+=L.translateToString(!z),!z||E===v.length-1){const O=document.createElement("div");O.textContent=m,b.push(O),m.length>0&&(_=O),m=""}}return{bufferElements:b,cursorElement:_}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=this._currentRowHeight+0,this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(c,a){const o=this._optionsService.rawOptions.fastScrollModifier;return o==="alt"&&a.altKey||o==="ctrl"&&a.ctrlKey||o==="shift"&&a.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 a=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}};u.Viewport=l=f([y(2,S.IBufferService),y(3,S.IOptionsService),y(4,p.ICharSizeService),y(5,p.IRenderService),y(6,p.ICoreBrowserService),y(7,p.IThemeService)],l)},3107:function(ee,u,d){var f=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const h=d(3656),p=d(4725),C=d(844),x=d(2585);let S=u.BufferDecorationRenderer=class extends C.Disposable{constructor(l,c,a,o){super(),this._screenElement=l,this._bufferService=c,this._decorationService=a,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((_=>this._removeDecoration(_)))),this.register((0,C.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const l of this._decorationService.decorations)this._renderDecoration(l);this._dimensionsChanged=!1}_renderDecoration(l){this._refreshStyle(l),this._dimensionsChanged&&this._refreshXPosition(l)}_createElement(l){var c,a;const o=document.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",((c=l?.options)===null||c===void 0?void 0:c.layer)==="top"),o.style.width=`${Math.round((l.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(l.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(l.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 _=(a=l.options.x)!==null&&a!==void 0?a:0;return _&&_>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(l,o),o}_refreshStyle(l){const c=l.marker.line-this._bufferService.buffers.active.ydisp;if(c<0||c>=this._bufferService.rows)l.element&&(l.element.style.display="none",l.onRenderEmitter.fire(l.element));else{let a=this._decorationElements.get(l);a||(a=this._createElement(l),l.element=a,this._decorationElements.set(l,a),this._container.appendChild(a),l.onDispose((()=>{this._decorationElements.delete(l),a.remove()}))),a.style.top=c*this._renderService.dimensions.css.cell.height+"px",a.style.display=this._altBufferIsActive?"none":"block",l.onRenderEmitter.fire(a)}}_refreshXPosition(l,c=l.element){var a;if(!c)return;const o=(a=l.options.x)!==null&&a!==void 0?a:0;(l.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(l){var c;(c=this._decorationElements.get(l))===null||c===void 0||c.remove(),this._decorationElements.delete(l),l.dispose()}};u.BufferDecorationRenderer=S=f([y(1,x.IBufferService),y(2,x.IDecorationService),y(3,p.IRenderService)],S)},5871:(ee,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 f of this._zones)if(f.color===d.options.overviewRulerOptions.color&&f.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,d.marker.line))return;if(this._lineAdjacentToZone(f,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(f,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,f){return f>=d.startBufferLine&&f<=d.endBufferLine}_lineAdjacentToZone(d,f,y){return f>=d.startBufferLine-this._linePadding[y||"full"]&&f<=d.endBufferLine+this._linePadding[y||"full"]}_addLineToZone(d,f){d.startBufferLine=Math.min(d.startBufferLine,f),d.endBufferLine=Math.max(d.endBufferLine,f)}}},5744:function(ee,u,d){var f=this&&this.__decorate||function(_,m,b,D){var v,E=arguments.length,L=E<3?m:D===null?D=Object.getOwnPropertyDescriptor(m,b):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,m,b,D);else for(var z=_.length-1;z>=0;z--)(v=_[z])&&(L=(E<3?v(L):E>3?v(m,b,L):v(m,b))||L);return E>3&&L&&Object.defineProperty(m,b,L),L},y=this&&this.__param||function(_,m){return function(b,D){m(b,D,_)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=d(5871),p=d(3656),C=d(4725),x=d(844),S=d(2585),l={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0},a={full:0,left:0,center:0,right:0};let o=u.OverviewRulerRenderer=class extends x.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(_,m,b,D,v,E,L){var z;super(),this._viewportElement=_,this._screenElement=m,this._bufferService=b,this._decorationService=D,this._renderService=v,this._optionsService=E,this._coreBrowseService=L,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(),(z=this._viewportElement.parentElement)===null||z===void 0||z.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,x.toDisposable)((()=>{var U;(U=this._canvas)===null||U===void 0||U.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,p.addDisposableDomListener)(this._coreBrowseService.window,"resize",(()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const _=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);c.full=this._canvas.width,c.left=_,c.center=m,c.right=_,this._refreshDrawHeightConstants(),a.full=0,a.left=0,a.center=c.left,a.right=c.left+c.center}_refreshDrawHeightConstants(){l.full=Math.round(2*this._coreBrowseService.dpr);const _=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(_,12),6)*this._coreBrowseService.dpr);l.left=m,l.center=m,l.right=m}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.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 m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const _=this._colorZoneStore.zones;for(const m of _)m.position!=="full"&&this._renderColorZone(m);for(const m of _)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(_){this._ctx.fillStyle=_.color,this._ctx.fillRect(a[_.position||"full"],Math.round((this._canvas.height-1)*(_.startBufferLine/this._bufferService.buffers.active.lines.length)-l[_.position||"full"]/2),c[_.position||"full"],Math.round((this._canvas.height-1)*((_.endBufferLine-_.startBufferLine)/this._bufferService.buffers.active.lines.length)+l[_.position||"full"]))}_queueRefresh(_,m){this._shouldUpdateDimensions=_||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=o=f([y(2,S.IBufferService),y(3,S.IDecorationService),y(4,C.IRenderService),y(5,S.IOptionsService),y(6,C.ICoreBrowserService)],o)},2950:function(ee,u,d){var f=this&&this.__decorate||function(S,l,c,a){var o,_=arguments.length,m=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(S,l,c,a);else for(var b=S.length-1;b>=0;b--)(o=S[b])&&(m=(_<3?o(m):_>3?o(l,c,m):o(l,c))||m);return _>3&&m&&Object.defineProperty(l,c,m),m},y=this&&this.__param||function(S,l){return function(c,a){l(c,a,S)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const h=d(4725),p=d(2585),C=d(2584);let x=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(S,l,c,a,o,_){this._textarea=S,this._compositionView=l,this._bufferService=c,this._optionsService=a,this._coreService=o,this._renderService=_,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(S){this._compositionView.textContent=S.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(S){if(this._isComposing||this._isSendingComposition){if(S.keyCode===229||S.keyCode===16||S.keyCode===17||S.keyCode===18)return!1;this._finalizeComposition(!1)}return S.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(S){if(this._compositionView.classList.remove("active"),this._isComposing=!1,S){const l={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,l.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(l.start,l.end):this._textarea.value.substring(l.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const l=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(l,!0)}}_handleAnyTextareaChanges(){const S=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const l=this._textarea.value,c=l.replace(S,"");this._dataAlreadySent=c,l.length>S.length?this._coreService.triggerDataEvent(c,!0):l.length<S.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):l.length===S.length&&l!==S&&this._coreService.triggerDataEvent(l,!0)}}),0)}updateCompositionElements(S){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,a=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=l*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=a+"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 _=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=a+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}S||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=x=f([y(2,p.IBufferService),y(3,p.IOptionsService),y(4,p.ICoreService),y(5,h.IRenderService)],x)},9806:(ee,u)=>{function d(f,y,h){const p=h.getBoundingClientRect(),C=f.getComputedStyle(h),x=parseInt(C.getPropertyValue("padding-left")),S=parseInt(C.getPropertyValue("padding-top"));return[y.clientX-p.left-x,y.clientY-p.top-S]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=d,u.getCoords=function(f,y,h,p,C,x,S,l,c){if(!x)return;const a=d(f,y,h);return a?(a[0]=Math.ceil((a[0]+(c?S/2:0))/S),a[1]=Math.ceil(a[1]/l),a[0]=Math.min(Math.max(a[0],1),p+(c?1:0)),a[1]=Math.min(Math.max(a[1],1),C),a):void 0}},9504:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const f=d(2584);function y(l,c,a,o){const _=l-h(l,a),m=c-h(c,a),b=Math.abs(_-m)-(function(D,v,E){let L=0;const z=D-h(D,E),O=v-h(v,E);for(let U=0;U<Math.abs(z-O);U++){const V=p(D,v)==="A"?-1:1,J=E.buffer.lines.get(z+V*U);J?.isWrapped&&L++}return L})(l,c,a);return S(b,x(p(l,c),o))}function h(l,c){let a=0,o=c.buffer.lines.get(l),_=o?.isWrapped;for(;_&&l>=0&&l<c.rows;)a++,o=c.buffer.lines.get(--l),_=o?.isWrapped;return a}function p(l,c){return l>c?"A":"B"}function C(l,c,a,o,_,m){let b=l,D=c,v="";for(;b!==a||D!==o;)b+=_?1:-1,_&&b>m.cols-1?(v+=m.buffer.translateBufferLineToString(D,!1,l,b),b=0,l=0,D++):!_&&b<0&&(v+=m.buffer.translateBufferLineToString(D,!1,0,l+1),b=m.cols-1,l=b,D--);return v+m.buffer.translateBufferLineToString(D,!1,l,b)}function x(l,c){const a=c?"O":"[";return f.C0.ESC+a+l}function S(l,c){l=Math.floor(l);let a="";for(let o=0;o<l;o++)a+=c;return a}u.moveToCellSequence=function(l,c,a,o){const _=a.buffer.x,m=a.buffer.y;if(!a.buffer.hasScrollback)return(function(v,E,L,z,O,U){return y(E,z,O,U).length===0?"":S(C(v,E,v,E-h(E,O),!1,O).length,x("D",U))})(_,m,0,c,a,o)+y(m,c,a,o)+(function(v,E,L,z,O,U){let V;V=y(E,z,O,U).length>0?z-h(z,O):E;const J=z,k=(function(I,A,M,B,w,N){let Q;return Q=y(M,B,w,N).length>0?B-h(B,w):A,I<M&&Q<=B||I>=M&&Q<B?"C":"D"})(v,E,L,z,O,U);return S(C(v,V,L,J,k==="C",O).length,x(k,U))})(_,m,l,c,a,o);let b;if(m===c)return b=_>l?"D":"C",S(Math.abs(_-l),x(b,o));b=m>c?"D":"C";const D=Math.abs(m-c);return S((function(v,E){return E.cols-v})(m>c?l:_,a)+(D-1)*a.cols+1+((m>c?_:l)-1),x(b,o))}},1296:function(ee,u,d){var f=this&&this.__decorate||function(O,U,V,J){var k,I=arguments.length,A=I<3?U:J===null?J=Object.getOwnPropertyDescriptor(U,V):J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(O,U,V,J);else for(var M=O.length-1;M>=0;M--)(k=O[M])&&(A=(I<3?k(A):I>3?k(U,V,A):k(U,V))||A);return I>3&&A&&Object.defineProperty(U,V,A),A},y=this&&this.__param||function(O,U){return function(V,J){U(V,J,O)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=d(3787),p=d(2550),C=d(2223),x=d(6171),S=d(4725),l=d(8055),c=d(8460),a=d(844),o=d(2585),_="xterm-dom-renderer-owner-",m="xterm-rows",b="xterm-fg-",D="xterm-bg-",v="xterm-focus",E="xterm-selection";let L=1,z=u.DomRenderer=class extends a.Disposable{constructor(O,U,V,J,k,I,A,M,B,w){super(),this._element=O,this._screenElement=U,this._viewportElement=V,this._linkifier2=J,this._charSizeService=I,this._optionsService=A,this._bufferService=M,this._coreBrowserService=B,this._themeService=w,this._terminalClass=L++,this._rowElements=[],this.onRequestRedraw=this.register(new c.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(m),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(E),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,x.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((N=>this._injectCss(N)))),this._injectCss(this._themeService.colors),this._rowFactory=k.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(_+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((N=>this._handleLinkHover(N)))),this.register(this._linkifier2.onHideLinkUnderline((N=>this._handleLinkLeave(N)))),this.register((0,a.toDisposable)((()=>{this._element.classList.remove(_+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.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 O=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*O,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*O),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/O),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/O),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 V of this._rowElements)V.style.width=`${this.dimensions.css.canvas.width}px`,V.style.height=`${this.dimensions.css.cell.height}px`,V.style.lineHeight=`${this.dimensions.css.cell.height}px`,V.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const U=`${this._terminalSelector} .${m} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=U,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(O){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let U=`${this._terminalSelector} .${m} { color: ${O.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;U+=`${this._terminalSelector} .${m} .xterm-dim { color: ${l.color.multiplyOpacity(O.foreground,.5).css};}`,U+=`${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;}`,U+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",U+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css}; } 50% { background-color: inherit; color: ${O.cursor.css}; }}`,U+=`${this._terminalSelector} .${m}.${v} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${m}.${v} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-block { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css};}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${O.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${O.cursor.css} inset;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${O.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,U+=`${this._terminalSelector} .${E} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${E} div { position: absolute; background-color: ${O.selectionBackgroundOpaque.css};}${this._terminalSelector} .${E} div { position: absolute; background-color: ${O.selectionInactiveBackgroundOpaque.css};}`;for(const[V,J]of O.ansi.entries())U+=`${this._terminalSelector} .${b}${V} { color: ${J.css}; }${this._terminalSelector} .${b}${V}.xterm-dim { color: ${l.color.multiplyOpacity(J,.5).css}; }${this._terminalSelector} .${D}${V} { background-color: ${J.css}; }`;U+=`${this._terminalSelector} .${b}${C.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(O.background).css}; }${this._terminalSelector} .${b}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(O.background),.5).css}; }${this._terminalSelector} .${D}${C.INVERTED_DEFAULT_COLOR} { background-color: ${O.foreground.css}; }`,this._themeStyleElement.textContent=U}_setDefaultSpacing(){const O=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${O}px`,this._rowFactory.defaultSpacing=O}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(O,U){for(let V=this._rowElements.length;V<=U;V++){const J=document.createElement("div");this._rowContainer.appendChild(J),this._rowElements.push(J)}for(;this._rowElements.length>U;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(O,U){this._refreshRowElements(O,U),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(v)}handleFocus(){this._rowContainer.classList.add(v),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(O,U,V){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(O,U,V),this.renderRows(0,this._bufferService.rows-1),!O||!U)return;const J=O[1]-this._bufferService.buffer.ydisp,k=U[1]-this._bufferService.buffer.ydisp,I=Math.max(J,0),A=Math.min(k,this._bufferService.rows-1);if(I>=this._bufferService.rows||A<0)return;const M=document.createDocumentFragment();if(V){const B=O[0]>U[0];M.appendChild(this._createSelectionElement(I,B?U[0]:O[0],B?O[0]:U[0],A-I+1))}else{const B=J===I?O[0]:0,w=I===k?U[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(I,B,w));const N=A-I-1;if(M.appendChild(this._createSelectionElement(I+1,0,this._bufferService.cols,N)),I!==A){const Q=k===A?U[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(A,0,Q))}}this._selectionContainer.appendChild(M)}_createSelectionElement(O,U,V,J=1){const k=document.createElement("div");return k.style.height=J*this.dimensions.css.cell.height+"px",k.style.top=O*this.dimensions.css.cell.height+"px",k.style.left=U*this.dimensions.css.cell.width+"px",k.style.width=this.dimensions.css.cell.width*(V-U)+"px",k}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 O of this._rowElements)O.replaceChildren()}renderRows(O,U){const V=this._bufferService.buffer,J=V.ybase+V.y,k=Math.min(V.x,this._bufferService.cols-1),I=this._optionsService.rawOptions.cursorBlink,A=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=O;B<=U;B++){const w=B+V.ydisp,N=this._rowElements[B],Q=V.lines.get(w);if(!N||!Q)break;N.replaceChildren(...this._rowFactory.createRow(Q,w,w===J,A,M,k,I,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${_}${this._terminalClass}`}_handleLinkHover(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!0)}_handleLinkLeave(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!1)}_setCellUnderline(O,U,V,J,k,I){V<0&&(O=0),J<0&&(U=0);const A=this._bufferService.rows-1;V=Math.max(Math.min(V,A),0),J=Math.max(Math.min(J,A),0),k=Math.min(k,this._bufferService.cols);const M=this._bufferService.buffer,B=M.ybase+M.y,w=Math.min(M.x,k-1),N=this._optionsService.rawOptions.cursorBlink,Q=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let le=V;le<=J;++le){const he=le+M.ydisp,T=this._rowElements[le],Y=M.lines.get(he);if(!T||!Y)break;T.replaceChildren(...this._rowFactory.createRow(Y,he,he===B,Q,ie,w,N,this.dimensions.css.cell.width,this._widthCache,I?le===V?O:0:-1,I?(le===J?U:k)-1:-1))}}};u.DomRenderer=z=f([y(4,o.IInstantiationService),y(5,S.ICharSizeService),y(6,o.IOptionsService),y(7,o.IBufferService),y(8,S.ICoreBrowserService),y(9,S.IThemeService)],z)},3787:function(ee,u,d){var f=this&&this.__decorate||function(b,D,v,E){var L,z=arguments.length,O=z<3?D:E===null?E=Object.getOwnPropertyDescriptor(D,v):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(b,D,v,E);else for(var U=b.length-1;U>=0;U--)(L=b[U])&&(O=(z<3?L(O):z>3?L(D,v,O):L(D,v))||O);return z>3&&O&&Object.defineProperty(D,v,O),O},y=this&&this.__param||function(b,D){return function(v,E){D(v,E,b)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=d(2223),p=d(643),C=d(511),x=d(2585),S=d(8055),l=d(4725),c=d(4269),a=d(6171),o=d(3734);let _=u.DomRendererRowFactory=class{constructor(b,D,v,E,L,z,O){this._document=b,this._characterJoinerService=D,this._optionsService=v,this._coreBrowserService=E,this._coreService=L,this._decorationService=z,this._themeService=O,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,D,v){this._selectionStart=b,this._selectionEnd=D,this._columnSelectMode=v}createRow(b,D,v,E,L,z,O,U,V,J,k){const I=[],A=this._characterJoinerService.getJoinedCharacters(D),M=this._themeService.colors;let B,w=b.getNoBgTrimmedLength();v&&w<z+1&&(w=z+1);let N=0,Q="",ie=0,le=0,he=0,T=!1,Y=0,Z=!1,te=0;const ye=[],ae=J!==-1&&k!==-1;for(let Ae=0;Ae<w;Ae++){b.loadCell(Ae,this._workCell);let ke=this._workCell.getWidth();if(ke===0)continue;let Je=!1,wt=Ae,Ce=this._workCell;if(A.length>0&&Ae===A[0][0]){Je=!0;const He=A.shift();Ce=new c.JoinedCellData(this._workCell,b.translateToString(!0,He[0],He[1]),He[1]-He[0]),wt=He[1]-1,ke=Ce.getWidth()}const It=this._isCellInSelection(Ae,D),si=v&&Ae===z,Jt=ae&&Ae>=J&&Ae<=k;let ri=!1;this._decorationService.forEachDecorationAtCell(Ae,D,void 0,(He=>{ri=!0}));let ni=Ce.getChars()||p.WHITESPACE_CELL_CHAR;if(ni===" "&&(Ce.isUnderline()||Ce.isOverline())&&(ni=" "),te=ke*U-V.get(ni,Ce.isBold(),Ce.isItalic()),B){if(N&&(It&&Z||!It&&!Z&&Ce.bg===ie)&&(It&&Z&&M.selectionForeground||Ce.fg===le)&&Ce.extended.ext===he&&Jt===T&&te===Y&&!si&&!Je&&!ri){Q+=ni,N++;continue}N&&(B.textContent=Q),B=this._document.createElement("span"),N=0,Q=""}else B=this._document.createElement("span");if(ie=Ce.bg,le=Ce.fg,he=Ce.extended.ext,T=Jt,Y=te,Z=It,Je&&z>=Ae&&z<=wt&&(z=Ae),!this._coreService.isCursorHidden&&si){if(ye.push("xterm-cursor"),this._coreBrowserService.isFocused)O&&ye.push("xterm-cursor-blink"),ye.push(E==="bar"?"xterm-cursor-bar":E==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":ye.push("xterm-cursor-outline");break;case"block":ye.push("xterm-cursor-block");break;case"bar":ye.push("xterm-cursor-bar");break;case"underline":ye.push("xterm-cursor-underline")}}if(Ce.isBold()&&ye.push("xterm-bold"),Ce.isItalic()&&ye.push("xterm-italic"),Ce.isDim()&&ye.push("xterm-dim"),Q=Ce.isInvisible()?p.WHITESPACE_CELL_CHAR:Ce.getChars()||p.WHITESPACE_CELL_CHAR,Ce.isUnderline()&&(ye.push(`xterm-underline-${Ce.extended.underlineStyle}`),Q===" "&&(Q=" "),!Ce.isUnderlineColorDefault()))if(Ce.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${o.AttributeData.toColorRGB(Ce.getUnderlineColor()).join(",")})`;else{let He=Ce.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ce.isBold()&&He<8&&(He+=8),B.style.textDecorationColor=M.ansi[He].css}Ce.isOverline()&&(ye.push("xterm-overline"),Q===" "&&(Q=" ")),Ce.isStrikethrough()&&ye.push("xterm-strikethrough"),Jt&&(B.style.textDecoration="underline");let ot=Ce.getFgColor(),Xe=Ce.getFgColorMode(),Fe=Ce.getBgColor(),ct=Ce.getBgColorMode();const di=!!Ce.isInverse();if(di){const He=ot;ot=Fe,Fe=He;const Bt=Xe;Xe=ct,ct=Bt}let St,Oi,Ve,yt=!1;switch(this._decorationService.forEachDecorationAtCell(Ae,D,void 0,(He=>{He.options.layer!=="top"&&yt||(He.backgroundColorRGB&&(ct=50331648,Fe=He.backgroundColorRGB.rgba>>8&16777215,St=He.backgroundColorRGB),He.foregroundColorRGB&&(Xe=50331648,ot=He.foregroundColorRGB.rgba>>8&16777215,Oi=He.foregroundColorRGB),yt=He.options.layer==="top")})),!yt&&It&&(St=this._coreBrowserService.isFocused?M.selectionBackgroundOpaque:M.selectionInactiveBackgroundOpaque,Fe=St.rgba>>8&16777215,ct=50331648,yt=!0,M.selectionForeground&&(Xe=50331648,ot=M.selectionForeground.rgba>>8&16777215,Oi=M.selectionForeground)),yt&&ye.push("xterm-decoration-top"),ct){case 16777216:case 33554432:Ve=M.ansi[Fe],ye.push(`xterm-bg-${Fe}`);break;case 50331648:Ve=S.rgba.toColor(Fe>>16,Fe>>8&255,255&Fe),this._addStyle(B,`background-color:#${m((Fe>>>0).toString(16),"0",6)}`);break;default:di?(Ve=M.foreground,ye.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Ve=M.background}switch(St||Ce.isDim()&&(St=S.color.multiplyOpacity(Ve,.5)),Xe){case 16777216:case 33554432:Ce.isBold()&&ot<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ot+=8),this._applyMinimumContrast(B,Ve,M.ansi[ot],Ce,St,void 0)||ye.push(`xterm-fg-${ot}`);break;case 50331648:const He=S.rgba.toColor(ot>>16&255,ot>>8&255,255&ot);this._applyMinimumContrast(B,Ve,He,Ce,St,Oi)||this._addStyle(B,`color:#${m(ot.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Ve,M.foreground,Ce,St,void 0)||di&&ye.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}ye.length&&(B.className=ye.join(" "),ye.length=0),si||Je||ri?B.textContent=Q:N++,te!==this.defaultSpacing&&(B.style.letterSpacing=`${te}px`),I.push(B),Ae=wt}return B&&N&&(B.textContent=Q),I}_applyMinimumContrast(b,D,v,E,L,z){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.excludeFromContrastRatioDemands)(E.getCode()))return!1;const O=this._getContrastCache(E);let U;if(L||z||(U=O.getColor(D.rgba,v.rgba)),U===void 0){const V=this._optionsService.rawOptions.minimumContrastRatio/(E.isDim()?2:1);U=S.color.ensureContrastRatio(L||D,z||v,V),O.setColor((L||D).rgba,(z||v).rgba,U??null)}return!!U&&(this._addStyle(b,`color:${U.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,D){b.setAttribute("style",`${b.getAttribute("style")||""}${D};`)}_isCellInSelection(b,D){const v=this._selectionStart,E=this._selectionEnd;return!(!v||!E)&&(this._columnSelectMode?v[0]<=E[0]?b>=v[0]&&D>=v[1]&&b<E[0]&&D<=E[1]:b<v[0]&&D>=v[1]&&b>=E[0]&&D<=E[1]:D>v[1]&&D<E[1]||v[1]===E[1]&&D===v[1]&&b>=v[0]&&b<E[0]||v[1]<E[1]&&D===E[1]&&b<E[0]||v[1]<E[1]&&D===v[1]&&b>=v[0])}};function m(b,D,v){for(;b.length<v;)b=D+b;return b}u.DomRendererRowFactory=_=f([y(1,l.ICharacterJoinerService),y(2,x.IOptionsService),y(3,l.ICoreBrowserService),y(4,x.ICoreService),y(5,x.IDecorationService),y(6,l.IThemeService)],_)},2550:(ee,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 f=d.createElement("span"),y=d.createElement("span");y.style.fontWeight="bold";const h=d.createElement("span");h.style.fontStyle="italic";const p=d.createElement("span");p.style.fontWeight="bold",p.style.fontStyle="italic",this._measureElements=[f,y,h,p],this._container.appendChild(f),this._container.appendChild(y),this._container.appendChild(h),this._container.appendChild(p),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,f,y,h){d===this._font&&f===this._fontSize&&y===this._weight&&h===this._weightBold||(this._font=d,this._fontSize=f,this._weight=y,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${y}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${y}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(d,f,y){let h=0;if(!f&&!y&&d.length===1&&(h=d.charCodeAt(0))<256)return this._flat[h]!==-9999?this._flat[h]:this._flat[h]=this._measure(d,0);let p=d;f&&(p+="B"),y&&(p+="I");let C=this._holey.get(p);if(C===void 0){let x=0;f&&(x|=1),y&&(x|=2),C=this._measure(d,x),this._holey.set(p,C)}return C}_measure(d,f){const y=this._measureElements[f];return y.textContent=d.repeat(32),y.offsetWidth/32}}},2223:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const f=d(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(ee,u)=>{function d(f){return 57508<=f&&f<=57558}Object.defineProperty(u,"__esModule",{value:!0}),u.createRenderDimensions=u.excludeFromContrastRatioDemands=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(f){if(!f)throw new Error("value must not be falsy");return f},u.isPowerlineGlyph=d,u.isRestrictedPowerlineGlyph=function(f){return 57520<=f&&f<=57527},u.excludeFromContrastRatioDemands=function(f){return d(f)||(function(y){return 9472<=y&&y<=9631})(f)},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:(ee,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,f=this.selectionEnd;return!(!d||!f)&&(d[1]>f[1]||d[1]===f[1]&&d[0]>f[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(ee,u,d){var f=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const h=d(2585),p=d(8460),C=d(844);let x=u.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,c,a){super(),this._optionsService=a,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new S(l,c,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};u.CharSizeService=x=f([y(2,h.IOptionsService)],x);class S{constructor(c,a,o){this._document=c,this._parentElement=a,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(ee,u,d){var f=this&&this.__decorate||function(c,a,o,_){var m,b=arguments.length,D=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(m=c[v])&&(D=(b<3?m(D):b>3?m(a,o,D):m(a,o))||D);return b>3&&D&&Object.defineProperty(a,o,D),D},y=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const h=d(3734),p=d(643),C=d(511),x=d(2585);class S extends h.AttributeData{constructor(a,o,_){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=o,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=S;let l=u.CharacterJoinerService=class Zf{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(a){const o={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(o),o.id}deregister(a){for(let o=0;o<this._characterJoiners.length;o++)if(this._characterJoiners[o].id===a)return this._characterJoiners.splice(o,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const o=this._bufferService.buffer.lines.get(a);if(!o||o.length===0)return[];const _=[],m=o.translateToString(!0);let b=0,D=0,v=0,E=o.getFg(0),L=o.getBg(0);for(let z=0;z<o.getTrimmedLength();z++)if(o.loadCell(z,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==L){if(z-b>1){const O=this._getJoinedRanges(m,v,D,o,b);for(let U=0;U<O.length;U++)_.push(O[U])}b=z,v=D,E=this._workCell.fg,L=this._workCell.bg}D+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const z=this._getJoinedRanges(m,v,D,o,b);for(let O=0;O<z.length;O++)_.push(z[O])}return _}_getJoinedRanges(a,o,_,m,b){const D=a.substring(o,_);let v=[];try{v=this._characterJoiners[0].handler(D)}catch(E){console.error(E)}for(let E=1;E<this._characterJoiners.length;E++)try{const L=this._characterJoiners[E].handler(D);for(let z=0;z<L.length;z++)Zf._mergeRanges(v,L[z])}catch(L){console.error(L)}return this._stringRangesToCellRanges(v,m,b),v}_stringRangesToCellRanges(a,o,_){let m=0,b=!1,D=0,v=a[m];if(v){for(let E=_;E<this._bufferService.cols;E++){const L=o.getWidth(E),z=o.getString(E).length||p.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!b&&v[0]<=D&&(v[0]=E,b=!0),v[1]<=D){if(v[1]=E,v=a[++m],!v)break;v[0]<=D?(v[0]=E,b=!0):b=!1}D+=z}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(a,o){let _=!1;for(let m=0;m<a.length;m++){const b=a[m];if(_){if(o[1]<=b[0])return a[m-1][1]=o[1],a;if(o[1]<=b[1])return a[m-1][1]=Math.max(o[1],b[1]),a.splice(m,1),a;a.splice(m,1),m--}else{if(o[1]<=b[0])return a.splice(m,0,o),a;if(o[1]<=b[1])return b[0]=Math.min(o[0],b[0]),a;o[0]<b[1]&&(b[0]=Math.min(o[0],b[0]),_=!0)}}return _?a[a.length-1][1]=o[1]:a.push(o),a}};u.CharacterJoinerService=l=f([y(0,x.IBufferService)],l)},5114:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0,u.CoreBrowserService=class{constructor(d,f){this._textarea=d,this.window=f,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(ee,u,d){var f=this&&this.__decorate||function(x,S,l,c){var a,o=arguments.length,_=o<3?S:c===null?c=Object.getOwnPropertyDescriptor(S,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(x,S,l,c);else for(var m=x.length-1;m>=0;m--)(a=x[m])&&(_=(o<3?a(_):o>3?a(S,l,_):a(S,l))||_);return o>3&&_&&Object.defineProperty(S,l,_),_},y=this&&this.__param||function(x,S){return function(l,c){S(l,c,x)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=d(4725),p=d(9806);let C=u.MouseService=class{constructor(x,S){this._renderService=x,this._charSizeService=S}getCoords(x,S,l,c,a){return(0,p.getCoords)(window,x,S,l,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(x,S){const l=(0,p.getCoordsRelativeToElement)(window,x,S);if(this._charSizeService.hasValidSize)return l[0]=Math.min(Math.max(l[0],0),this._renderService.dimensions.css.canvas.width-1),l[1]=Math.min(Math.max(l[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(l[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(l[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(l[0]),y:Math.floor(l[1])}}};u.MouseService=C=f([y(0,h.IRenderService),y(1,h.ICharSizeService)],C)},3230:function(ee,u,d){var f=this&&this.__decorate||function(_,m,b,D){var v,E=arguments.length,L=E<3?m:D===null?D=Object.getOwnPropertyDescriptor(m,b):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,m,b,D);else for(var z=_.length-1;z>=0;z--)(v=_[z])&&(L=(E<3?v(L):E>3?v(m,b,L):v(m,b))||L);return E>3&&L&&Object.defineProperty(m,b,L),L},y=this&&this.__param||function(_,m){return function(b,D){m(b,D,_)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=d(3656),p=d(6193),C=d(5596),x=d(4725),S=d(8460),l=d(844),c=d(7226),a=d(2585);let o=u.RenderService=class extends l.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(_,m,b,D,v,E,L,z){if(super(),this._rowCount=_,this._charSizeService=D,this._renderer=this.register(new l.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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new p.RenderDebouncer(L.window,((O,U)=>this._renderRows(O,U))),this.register(this._renderDebouncer),this._screenDprMonitor=new C.ScreenDprMonitor(L.window),this._screenDprMonitor.setListener((()=>this.handleDevicePixelRatioChange())),this.register(this._screenDprMonitor),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)===null||O===void 0?void 0:O.clear()}))),this.register(b.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(v.onDecorationRegistered((()=>this._fullRefresh()))),this.register(v.onDecorationRemoved((()=>this._fullRefresh()))),this.register(b.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(b.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register((0,h.addDisposableDomListener)(L.window,"resize",(()=>this.handleDevicePixelRatioChange()))),this.register(z.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in L.window){const O=new L.window.IntersectionObserver((U=>this._handleIntersectionChange(U[U.length-1])),{threshold:0});O.observe(m),this.register({dispose:()=>O.disconnect()})}}_handleIntersectionChange(_){this._isPaused=_.isIntersecting===void 0?_.intersectionRatio===0:!_.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(_,m,b=!1){this._isPaused?this._needsFullRefresh=!0:(b||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,m,this._rowCount))}_renderRows(_,m){this._renderer.value&&(_=Math.min(_,this._rowCount-1),m=Math.min(m,this._rowCount-1),this._renderer.value.renderRows(_,m),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:_,end:m}),this._onRender.fire({start:_,end:m}),this._isNextRenderRedrawOnly=!0)}resize(_,m){this._rowCount=m,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(_){this._renderer.value=_,this._renderer.value.onRequestRedraw((m=>this.refreshRows(m.start,m.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(_){return this._renderDebouncer.addRefreshCallback(_)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var _,m;this._renderer.value&&((m=(_=this._renderer.value).clearTextureAtlas)===null||m===void 0||m.call(_),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,m){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value.handleResize(_,m))):this._renderer.value.handleResize(_,m),this._fullRefresh())}handleCharSizeChanged(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCharSizeChanged()}handleBlur(){var _;(_=this._renderer.value)===null||_===void 0||_.handleBlur()}handleFocus(){var _;(_=this._renderer.value)===null||_===void 0||_.handleFocus()}handleSelectionChanged(_,m,b){var D;this._selectionState.start=_,this._selectionState.end=m,this._selectionState.columnSelectMode=b,(D=this._renderer.value)===null||D===void 0||D.handleSelectionChanged(_,m,b)}handleCursorMove(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCursorMove()}clear(){var _;(_=this._renderer.value)===null||_===void 0||_.clear()}};u.RenderService=o=f([y(2,a.IOptionsService),y(3,x.ICharSizeService),y(4,a.IDecorationService),y(5,a.IBufferService),y(6,x.ICoreBrowserService),y(7,x.IThemeService)],o)},9312:function(ee,u,d){var f=this&&this.__decorate||function(v,E,L,z){var O,U=arguments.length,V=U<3?E:z===null?z=Object.getOwnPropertyDescriptor(E,L):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(v,E,L,z);else for(var J=v.length-1;J>=0;J--)(O=v[J])&&(V=(U<3?O(V):U>3?O(E,L,V):O(E,L))||V);return U>3&&V&&Object.defineProperty(E,L,V),V},y=this&&this.__param||function(v,E){return function(L,z){E(L,z,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=d(9806),p=d(9504),C=d(456),x=d(4725),S=d(8460),l=d(844),c=d(6114),a=d(4841),o=d(511),_=d(2585),m=" ",b=new RegExp(m,"g");let D=u.SelectionService=class extends l.Disposable{constructor(v,E,L,z,O,U,V,J,k){super(),this._element=v,this._screenElement=E,this._linkifier=L,this._bufferService=z,this._coreService=O,this._mouseService=U,this._optionsService=V,this._renderService=J,this._coreBrowserService=k,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 S.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new S.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new S.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=I=>this._handleMouseMove(I),this._mouseUpListener=I=>this._handleMouseUp(I),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((I=>this._handleTrim(I))),this.register(this._bufferService.buffers.onBufferActivate((I=>this._handleBufferActivate(I)))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,l.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 v=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;return!(!v||!E||v[0]===E[0]&&v[1]===E[1])}get selectionText(){const v=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;if(!v||!E)return"";const L=this._bufferService.buffer,z=[];if(this._activeSelectionMode===3){if(v[0]===E[0])return"";const O=v[0]<E[0]?v[0]:E[0],U=v[0]<E[0]?E[0]:v[0];for(let V=v[1];V<=E[1];V++){const J=L.translateBufferLineToString(V,!0,O,U);z.push(J)}}else{const O=v[1]===E[1]?E[0]:void 0;z.push(L.translateBufferLineToString(v[1],!0,v[0],O));for(let U=v[1]+1;U<=E[1]-1;U++){const V=L.lines.get(U),J=L.translateBufferLineToString(U,!0);V?.isWrapped?z[z.length-1]+=J:z.push(J)}if(v[1]!==E[1]){const U=L.lines.get(E[1]),V=L.translateBufferLineToString(E[1],!0,0,E[0]);U&&U.isWrapped?z[z.length-1]+=V:z.push(V)}}return z.map((O=>O.replace(b," "))).join(c.isWindows?`\r
|
|
14
14
|
`:`
|
|
15
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(v){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&v&&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(v){const E=this._getMouseBufferCoords(v),L=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!!(L&&z&&E)&&this._areCoordsInSelection(E,L,z)}isCellInSelection(v,E){const L=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!(!L||!z)&&this._areCoordsInSelection([v,E],L,z)}_areCoordsInSelection(v,E,L){return v[1]>E[1]&&v[1]<L[1]||E[1]===L[1]&&v[1]===E[1]&&v[0]>=E[0]&&v[0]<L[0]||E[1]<L[1]&&v[1]===L[1]&&v[0]<L[0]||E[1]<L[1]&&v[1]===E[1]&&v[0]>=E[0]}_selectWordAtCursor(v,E){var L,z;const O=(z=(L=this._linkifier.currentLink)===null||L===void 0?void 0:L.link)===null||z===void 0?void 0:z.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const U=this._getMouseBufferCoords(v);return!!U&&(this._selectWordAt(U,E),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(v,E){this._model.clearSelection(),v=Math.max(v,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()}_handleTrim(v){this._model.handleTrim(v)&&this.refresh()}_getMouseBufferCoords(v){const E=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E}_getMouseEventScrollAmount(v){let E=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,v,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return E>=0&&E<=L?0:(E>L&&(E-=L),E=Math.min(Math.max(E,-50),50),E/=50,E/Math.abs(E)+Math.round(14*E))}shouldForceSelection(v){return c.isMac?v.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:v.shiftKey}handleMouseDown(v){if(this._mouseDownTimeStamp=v.timeStamp,(v.button!==2||!this.hasSelection)&&v.button===0){if(!this._enabled){if(!this.shouldForceSelection(v))return;v.stopPropagation()}v.preventDefault(),this._dragScrollAmount=0,this._enabled&&v.shiftKey?this._handleIncrementalClick(v):v.detail===1?this._handleSingleClick(v):v.detail===2?this._handleDoubleClick(v):v.detail===3&&this._handleTripleClick(v),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(v){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(v))}_handleSingleClick(v){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(v)?3:0,this._model.selectionStart=this._getMouseBufferCoords(v),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(v){this._selectWordAtCursor(v,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(v){const E=this._getMouseBufferCoords(v);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))}shouldColumnSelect(v){return v.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(v){if(v.stopImmediatePropagation(),!this._model.selectionStart)return;const E=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(v),!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(v),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const z=L.lines.get(this._model.selectionEnd[1]);z&&z.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}E&&E[0]===this._model.selectionEnd[0]&&E[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const v=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(v.ydisp+this._bufferService.rows,v.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=v.ydisp),this.refresh()}}_handleMouseUp(v){const E=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&E<500&&v.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const z=(0,p.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(z,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const v=this._model.finalSelectionStart,E=this._model.finalSelectionEnd,L=!(!v||!E||v[0]===E[0]&&v[1]===E[1]);L?v&&E&&(this._oldSelectionStart&&this._oldSelectionEnd&&v[0]===this._oldSelectionStart[0]&&v[1]===this._oldSelectionStart[1]&&E[0]===this._oldSelectionEnd[0]&&E[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(v,E,L)):this._oldHasSelection&&this._fireOnSelectionChange(v,E,L)}_fireOnSelectionChange(v,E,L){this._oldSelectionStart=v,this._oldSelectionEnd=E,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(v){this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim((E=>this._handleTrim(E)))}_convertViewportColToCharacterIndex(v,E){let L=E;for(let z=0;E>=z;z++){const O=v.loadCell(z,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:O>1&&E!==z&&(L+=O-1)}return L}setSelection(v,E,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,E],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(v){this._isClickInSelection(v)||(this._selectWordAtCursor(v,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(v,E,L=!0,z=!0){if(v[0]>=this._bufferService.cols)return;const O=this._bufferService.buffer,U=O.lines.get(v[1]);if(!U)return;const V=O.translateBufferLineToString(v[1],!1);let J=this._convertViewportColToCharacterIndex(U,v[0]),k=J;const I=v[0]-J;let x=0,M=0,B=0,w=0;if(V.charAt(J)===" "){for(;J>0&&V.charAt(J-1)===" ";)J--;for(;k<V.length&&V.charAt(k+1)===" ";)k++}else{let se=v[0],ne=v[0];U.getWidth(se)===0&&(x++,se--),U.getWidth(ne)===2&&(M++,ne++);const fe=U.getString(ne).length;for(fe>1&&(w+=fe-1,k+=fe-1);se>0&&J>0&&!this._isCharWordSeparator(U.loadCell(se-1,this._workCell));){U.loadCell(se-1,this._workCell);const T=this._workCell.getChars().length;this._workCell.getWidth()===0?(x++,se--):T>1&&(B+=T-1,J-=T-1),J--,se--}for(;ne<U.length&&k+1<V.length&&!this._isCharWordSeparator(U.loadCell(ne+1,this._workCell));){U.loadCell(ne+1,this._workCell);const T=this._workCell.getChars().length;this._workCell.getWidth()===2?(M++,ne++):T>1&&(w+=T-1,k+=T-1),k++,ne++}}k++;let N=J+I-x+B,Q=Math.min(this._bufferService.cols,k-J+x+M-B-w);if(E||V.slice(J,k).trim()!==""){if(L&&N===0&&U.getCodePoint(0)!==32){const se=O.lines.get(v[1]-1);if(se&&U.isWrapped&&se.getCodePoint(this._bufferService.cols-1)!==32){const ne=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(ne){const fe=this._bufferService.cols-ne.start;N-=fe,Q+=fe}}}if(z&&N+Q===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const se=O.lines.get(v[1]+1);if(se?.isWrapped&&se.getCodePoint(0)!==32){const ne=this._getWordAt([0,v[1]+1],!1,!1,!0);ne&&(Q+=ne.length)}}return{start:N,length:Q}}}_selectWordAt(v,E){const L=this._getWordAt(v,E);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[L.start,v[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(v){const E=this._getWordAt(v,!0);if(E){let L=v[1];for(;E.start<0;)E.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,L]}}_isCharWordSeparator(v){return v.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(v.getChars())>=0}_selectLineAt(v){const E=this._bufferService.buffer.getWrappedRangeForLine(v),L={start:{x:0,y:E.first},end:{x:this._bufferService.cols-1,y:E.last}};this._model.selectionStart=[0,E.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(L,this._bufferService.cols)}};u.SelectionService=D=d([y(3,_.IBufferService),y(4,_.ICoreService),y(5,A.IMouseService),y(6,_.IOptionsService),y(7,A.IRenderService),y(8,A.ICoreBrowserService)],D)},4725:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IThemeService=u.ICharacterJoinerService=u.ISelectionService=u.IRenderService=u.IMouseService=u.ICoreBrowserService=u.ICharSizeService=void 0;const d=f(8343);u.ICharSizeService=(0,d.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),u.IMouseService=(0,d.createDecorator)("MouseService"),u.IRenderService=(0,d.createDecorator)("RenderService"),u.ISelectionService=(0,d.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,d.createDecorator)("ThemeService")},6731:function(ee,u,f){var d=this&&this.__decorate||function(D,v,E,L){var z,O=arguments.length,U=O<3?v:L===null?L=Object.getOwnPropertyDescriptor(v,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(D,v,E,L);else for(var V=D.length-1;V>=0;V--)(z=D[V])&&(U=(O<3?z(U):O>3?z(v,E,U):z(v,E))||U);return O>3&&U&&Object.defineProperty(v,E,U),U},y=this&&this.__param||function(D,v){return function(E,L){v(E,L,D)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=f(7239),p=f(8055),C=f(8460),A=f(844),S=f(2585),l=p.css.toColor("#ffffff"),c=p.css.toColor("#000000"),a=p.css.toColor("#ffffff"),o=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const D=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],v=[0,95,135,175,215,255];for(let E=0;E<216;E++){const L=v[E/36%6|0],z=v[E/6%6|0],O=v[E%6];D.push({css:p.channels.toCss(L,z,O),rgba:p.channels.toRgba(L,z,O)})}for(let E=0;E<24;E++){const L=8+10*E;D.push({css:p.channels.toCss(L,L,L),rgba:p.channels.toRgba(L,L,L)})}return D})());let m=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 C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:c,cursor:a,cursorAccent:o,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(c,_),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 v=this._colors;if(v.foreground=b(D.foreground,l),v.background=b(D.background,c),v.cursor=b(D.cursor,a),v.cursorAccent=b(D.cursorAccent,o),v.selectionBackgroundTransparent=b(D.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=b(D.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=D.selectionForeground?b(D.selectionForeground,p.NULL_COLOR):void 0,v.selectionForeground===p.NULL_COLOR&&(v.selectionForeground=void 0),p.color.isOpaque(v.selectionBackgroundTransparent)&&(v.selectionBackgroundTransparent=p.color.opacity(v.selectionBackgroundTransparent,.3)),p.color.isOpaque(v.selectionInactiveBackgroundTransparent)&&(v.selectionInactiveBackgroundTransparent=p.color.opacity(v.selectionInactiveBackgroundTransparent,.3)),v.ansi=u.DEFAULT_ANSI_COLORS.slice(),v.ansi[0]=b(D.black,u.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=b(D.red,u.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=b(D.green,u.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=b(D.yellow,u.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=b(D.blue,u.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=b(D.magenta,u.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=b(D.cyan,u.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=b(D.white,u.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=b(D.brightBlack,u.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=b(D.brightRed,u.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=b(D.brightGreen,u.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=b(D.brightYellow,u.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=b(D.brightBlue,u.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=b(D.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=b(D.brightCyan,u.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=b(D.brightWhite,u.DEFAULT_ANSI_COLORS[15]),D.extendedAnsi){const E=Math.min(v.ansi.length-16,D.extendedAnsi.length);for(let L=0;L<E;L++)v.ansi[L+16]=b(D.extendedAnsi[L],u.DEFAULT_ANSI_COLORS[L+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 v=0;v<this._restoreColors.ansi.length;++v)this._colors.ansi[v]=this._restoreColors.ansi[v]}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 b(D,v){if(D!==void 0)try{return p.css.toColor(D)}catch{}return v}u.ThemeService=m=d([y(0,S.IOptionsService)],m)},6349:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const d=f(8460),y=f(844);class h extends y.Disposable{constructor(C){super(),this._maxLength=C,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(C){if(this._maxLength===C)return;const A=new Array(C);for(let S=0;S<Math.min(C,this.length);S++)A[S]=this._array[this._getCyclicIndex(S)];this._array=A,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let A=this._length;A<C;A++)this._array[A]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,A){this._array[this._getCyclicIndex(C)]=A}push(C){this._array[this._getCyclicIndex(this._length)]=C,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(C,A,...S){if(A){for(let l=C;l<this._length-A;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+A)];this._length-=A,this.onDeleteEmitter.fire({index:C,amount:A})}for(let l=this._length-1;l>=C;l--)this._array[this._getCyclicIndex(l+S.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<S.length;l++)this._array[this._getCyclicIndex(C+l)]=S[l];if(S.length&&this.onInsertEmitter.fire({index:C,amount:S.length}),this._length+S.length>this._maxLength){const l=this._length+S.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=S.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,A,S){if(!(A<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+S<0)throw new Error("Cannot shift elements in list beyond index 0");if(S>0){for(let c=A-1;c>=0;c--)this.set(C+c+S,this.get(C+c));const l=C+A+S-this._length;if(l>0)for(this._length+=l;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let l=0;l<A;l++)this.set(C+l+S,this.get(C+l))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}u.CircularList=h},1439:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function f(d,y=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const p in d)h[p]=y<=1?d[p]:d[p]&&f(d[p],y-1);return h}},8055:(ee,u,f)=>{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=f(6114);let y=0,h=0,p=0,C=0;var A,S,l,c,a;function o(m){const b=m.toString(16);return b.length<2?"0"+b:b}function _(m,b){return m<b?(b+.05)/(m+.05):(m+.05)/(b+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(m){m.toCss=function(b,D,v,E){return E!==void 0?`#${o(b)}${o(D)}${o(v)}${o(E)}`:`#${o(b)}${o(D)}${o(v)}`},m.toRgba=function(b,D,v,E=255){return(b<<24|D<<16|v<<8|E)>>>0}})(A||(u.channels=A={})),(function(m){function b(D,v){return C=Math.round(255*v),[y,h,p]=a.toChannels(D.rgba),{css:A.toCss(y,h,p,C),rgba:A.toRgba(y,h,p,C)}}m.blend=function(D,v){if(C=(255&v.rgba)/255,C===1)return{css:v.css,rgba:v.rgba};const E=v.rgba>>24&255,L=v.rgba>>16&255,z=v.rgba>>8&255,O=D.rgba>>24&255,U=D.rgba>>16&255,V=D.rgba>>8&255;return y=O+Math.round((E-O)*C),h=U+Math.round((L-U)*C),p=V+Math.round((z-V)*C),{css:A.toCss(y,h,p),rgba:A.toRgba(y,h,p)}},m.isOpaque=function(D){return(255&D.rgba)==255},m.ensureContrastRatio=function(D,v,E){const L=a.ensureContrastRatio(D.rgba,v.rgba,E);if(L)return a.toColor(L>>24&255,L>>16&255,L>>8&255)},m.opaque=function(D){const v=(255|D.rgba)>>>0;return[y,h,p]=a.toChannels(v),{css:A.toCss(y,h,p),rgba:v}},m.opacity=b,m.multiplyOpacity=function(D,v){return C=255&D.rgba,b(D,C*v/255)},m.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(S||(u.color=S={})),(function(m){let b,D;if(!d.isNode){const v=document.createElement("canvas");v.width=1,v.height=1;const E=v.getContext("2d",{willReadFrequently:!0});E&&(b=E,b.globalCompositeOperation="copy",D=b.createLinearGradient(0,0,1,1))}m.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return y=parseInt(v.slice(1,2).repeat(2),16),h=parseInt(v.slice(2,3).repeat(2),16),p=parseInt(v.slice(3,4).repeat(2),16),a.toColor(y,h,p);case 5:return y=parseInt(v.slice(1,2).repeat(2),16),h=parseInt(v.slice(2,3).repeat(2),16),p=parseInt(v.slice(3,4).repeat(2),16),C=parseInt(v.slice(4,5).repeat(2),16),a.toColor(y,h,p,C);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const E=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return y=parseInt(E[1]),h=parseInt(E[2]),p=parseInt(E[3]),C=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),a.toColor(y,h,p,C);if(!b||!D)throw new Error("css.toColor: Unsupported css format");if(b.fillStyle=D,b.fillStyle=v,typeof b.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(b.fillRect(0,0,1,1),[y,h,p,C]=b.getImageData(0,0,1,1).data,C!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:A.toRgba(y,h,p,C),css:v}}})(l||(u.css=l={})),(function(m){function b(D,v,E){const L=D/255,z=v/255,O=E/255;return .2126*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.7152*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}m.relativeLuminance=function(D){return b(D>>16&255,D>>8&255,255&D)},m.relativeLuminance2=b})(c||(u.rgb=c={})),(function(m){function b(v,E,L){const z=v>>24&255,O=v>>16&255,U=v>>8&255;let V=E>>24&255,J=E>>16&255,k=E>>8&255,I=_(c.relativeLuminance2(V,J,k),c.relativeLuminance2(z,O,U));for(;I<L&&(V>0||J>0||k>0);)V-=Math.max(0,Math.ceil(.1*V)),J-=Math.max(0,Math.ceil(.1*J)),k-=Math.max(0,Math.ceil(.1*k)),I=_(c.relativeLuminance2(V,J,k),c.relativeLuminance2(z,O,U));return(V<<24|J<<16|k<<8|255)>>>0}function D(v,E,L){const z=v>>24&255,O=v>>16&255,U=v>>8&255;let V=E>>24&255,J=E>>16&255,k=E>>8&255,I=_(c.relativeLuminance2(V,J,k),c.relativeLuminance2(z,O,U));for(;I<L&&(V<255||J<255||k<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),J=Math.min(255,J+Math.ceil(.1*(255-J))),k=Math.min(255,k+Math.ceil(.1*(255-k))),I=_(c.relativeLuminance2(V,J,k),c.relativeLuminance2(z,O,U));return(V<<24|J<<16|k<<8|255)>>>0}m.ensureContrastRatio=function(v,E,L){const z=c.relativeLuminance(v>>8),O=c.relativeLuminance(E>>8);if(_(z,O)<L){if(O<z){const J=b(v,E,L),k=_(z,c.relativeLuminance(J>>8));if(k<L){const I=D(v,E,L);return k>_(z,c.relativeLuminance(I>>8))?J:I}return J}const U=D(v,E,L),V=_(z,c.relativeLuminance(U>>8));if(V<L){const J=b(v,E,L);return V>_(z,c.relativeLuminance(J>>8))?U:J}return U}},m.reduceLuminance=b,m.increaseLuminance=D,m.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]},m.toColor=function(v,E,L,z){return{css:A.toCss(v,E,L,z),rgba:A.toRgba(v,E,L,z)}}})(a||(u.rgba=a={})),u.toPaddedHex=o,u.contrastRatio=_},8969:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const d=f(844),y=f(2585),h=f(4348),p=f(7866),C=f(744),A=f(7302),S=f(6975),l=f(8460),c=f(1753),a=f(1480),o=f(7994),_=f(9282),m=f(5435),b=f(5981),D=f(2660);let v=!1;class E extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event((z=>{var O;(O=this._onScrollApi)===null||O===void 0||O.fire(z.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(z){for(const O in z)this.optionsService.options[O]=z[O]}constructor(z){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new l.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new A.OptionsService(z)),this._instantiationService.setService(y.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(y.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(y.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(S.CoreService)),this._instantiationService.setService(y.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(y.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(y.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(o.CharsetService),this._instantiationService.setService(y.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(D.OscLinkService),this._instantiationService.setService(y.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new m.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,l.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,l.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,l.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,l.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((O=>{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((O=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new b.WriteBuffer(((O,U)=>this._inputHandler.parse(O,U)))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(z,O){this._writeBuffer.write(z,O)}writeSync(z,O){this._logService.logLevel<=y.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(z,O)}resize(z,O){isNaN(z)||isNaN(O)||(z=Math.max(z,C.MINIMUM_COLS),O=Math.max(O,C.MINIMUM_ROWS),this._bufferService.resize(z,O))}scroll(z,O=!1){this._bufferService.scroll(z,O)}scrollLines(z,O,U){this._bufferService.scrollLines(z,O,U)}scrollPages(z){this.scrollLines(z*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(z){const O=z-this._bufferService.buffer.ydisp;O!==0&&this.scrollLines(O)}registerEscHandler(z,O){return this._inputHandler.registerEscHandler(z,O)}registerDcsHandler(z,O){return this._inputHandler.registerDcsHandler(z,O)}registerCsiHandler(z,O){return this._inputHandler.registerCsiHandler(z,O)}registerOscHandler(z,O){return this._inputHandler.registerOscHandler(z,O)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let z=!1;const O=this.optionsService.rawOptions.windowsPty;O&&O.buildNumber!==void 0&&O.buildNumber!==void 0?z=O.backend==="conpty"&&O.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(z=!0),z?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const z=[];z.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),z.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const O of z)O.dispose()}))}}}u.CoreTerminal=E},8460:(ee,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=f=>(this._listeners.push(f),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===f)return void this._listeners.splice(d,1)}}})),this._event}fire(f,d){const y=[];for(let h=0;h<this._listeners.length;h++)y.push(this._listeners[h]);for(let h=0;h<y.length;h++)y[h].call(void 0,f,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(f,d){return f((y=>d.fire(y)))}},5435:function(ee,u,f){var d=this&&this.__decorate||function(I,x,M,B){var w,N=arguments.length,Q=N<3?x:B===null?B=Object.getOwnPropertyDescriptor(x,M):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(I,x,M,B);else for(var se=I.length-1;se>=0;se--)(w=I[se])&&(Q=(N<3?w(Q):N>3?w(x,M,Q):w(x,M))||Q);return N>3&&Q&&Object.defineProperty(x,M,Q),Q},y=this&&this.__param||function(I,x){return function(M,B){x(M,B,I)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=f(2584),p=f(7116),C=f(2015),A=f(844),S=f(482),l=f(8437),c=f(8460),a=f(643),o=f(511),_=f(3734),m=f(2585),b=f(6242),D=f(6351),v=f(5941),E={"(":0,")":1,"*":2,"+":3,"-":1,".":2},L=131072;function z(I,x){if(I>24)return x.setWinLines||!1;switch(I){case 1:return!!x.restoreWin;case 2:return!!x.minimizeWin;case 3:return!!x.setWinPosition;case 4:return!!x.setWinSizePixels;case 5:return!!x.raiseWin;case 6:return!!x.lowerWin;case 7:return!!x.refreshWin;case 8:return!!x.setWinSizeChars;case 9:return!!x.maximizeWin;case 10:return!!x.fullscreenWin;case 11:return!!x.getWinState;case 13:return!!x.getWinPosition;case 14:return!!x.getWinSizePixels;case 15:return!!x.getScreenSizePixels;case 16:return!!x.getCellSizePixels;case 18:return!!x.getWinSizeChars;case 19:return!!x.getScreenSizeChars;case 20:return!!x.getIconTitle;case 21:return!!x.getWinTitle;case 22:return!!x.pushTitle;case 23:return!!x.popTitle;case 24:return!!x.setWinLines}return!1}var O;(function(I){I[I.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",I[I.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(O||(u.WindowsOptionsReportType=O={}));let U=0;class V extends A.Disposable{getAttrData(){return this._curAttrData}constructor(x,M,B,w,N,Q,se,ne,fe=new C.EscapeSequenceParser){super(),this._bufferService=x,this._charsetService=M,this._coreService=B,this._logService=w,this._optionsService=N,this._oscLinkService=Q,this._coreMouseService=se,this._unicodeService=ne,this._parser=fe,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new S.StringToUtf32,this._utf8Decoder=new S.Utf8ToUtf32,this._workCell=new o.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.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 J(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((T=>this._activeBuffer=T.activeBuffer))),this._parser.setCsiHandlerFallback(((T,K)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(T),params:K.toArray()})})),this._parser.setEscHandlerFallback((T=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(T)})})),this._parser.setExecuteHandlerFallback((T=>{this._logService.debug("Unknown EXECUTE code: ",{code:T})})),this._parser.setOscHandlerFallback(((T,K,Z)=>{this._logService.debug("Unknown OSC code: ",{identifier:T,action:K,data:Z})})),this._parser.setDcsHandlerFallback(((T,K,Z)=>{K==="HOOK"&&(Z=Z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(T),action:K,payload:Z})})),this._parser.setPrintHandler(((T,K,Z)=>this.print(T,K,Z))),this._parser.registerCsiHandler({final:"@"},(T=>this.insertChars(T))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(T=>this.scrollLeft(T))),this._parser.registerCsiHandler({final:"A"},(T=>this.cursorUp(T))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(T=>this.scrollRight(T))),this._parser.registerCsiHandler({final:"B"},(T=>this.cursorDown(T))),this._parser.registerCsiHandler({final:"C"},(T=>this.cursorForward(T))),this._parser.registerCsiHandler({final:"D"},(T=>this.cursorBackward(T))),this._parser.registerCsiHandler({final:"E"},(T=>this.cursorNextLine(T))),this._parser.registerCsiHandler({final:"F"},(T=>this.cursorPrecedingLine(T))),this._parser.registerCsiHandler({final:"G"},(T=>this.cursorCharAbsolute(T))),this._parser.registerCsiHandler({final:"H"},(T=>this.cursorPosition(T))),this._parser.registerCsiHandler({final:"I"},(T=>this.cursorForwardTab(T))),this._parser.registerCsiHandler({final:"J"},(T=>this.eraseInDisplay(T,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(T=>this.eraseInDisplay(T,!0))),this._parser.registerCsiHandler({final:"K"},(T=>this.eraseInLine(T,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(T=>this.eraseInLine(T,!0))),this._parser.registerCsiHandler({final:"L"},(T=>this.insertLines(T))),this._parser.registerCsiHandler({final:"M"},(T=>this.deleteLines(T))),this._parser.registerCsiHandler({final:"P"},(T=>this.deleteChars(T))),this._parser.registerCsiHandler({final:"S"},(T=>this.scrollUp(T))),this._parser.registerCsiHandler({final:"T"},(T=>this.scrollDown(T))),this._parser.registerCsiHandler({final:"X"},(T=>this.eraseChars(T))),this._parser.registerCsiHandler({final:"Z"},(T=>this.cursorBackwardTab(T))),this._parser.registerCsiHandler({final:"`"},(T=>this.charPosAbsolute(T))),this._parser.registerCsiHandler({final:"a"},(T=>this.hPositionRelative(T))),this._parser.registerCsiHandler({final:"b"},(T=>this.repeatPrecedingCharacter(T))),this._parser.registerCsiHandler({final:"c"},(T=>this.sendDeviceAttributesPrimary(T))),this._parser.registerCsiHandler({prefix:">",final:"c"},(T=>this.sendDeviceAttributesSecondary(T))),this._parser.registerCsiHandler({final:"d"},(T=>this.linePosAbsolute(T))),this._parser.registerCsiHandler({final:"e"},(T=>this.vPositionRelative(T))),this._parser.registerCsiHandler({final:"f"},(T=>this.hVPosition(T))),this._parser.registerCsiHandler({final:"g"},(T=>this.tabClear(T))),this._parser.registerCsiHandler({final:"h"},(T=>this.setMode(T))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(T=>this.setModePrivate(T))),this._parser.registerCsiHandler({final:"l"},(T=>this.resetMode(T))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(T=>this.resetModePrivate(T))),this._parser.registerCsiHandler({final:"m"},(T=>this.charAttributes(T))),this._parser.registerCsiHandler({final:"n"},(T=>this.deviceStatus(T))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(T=>this.deviceStatusPrivate(T))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(T=>this.softReset(T))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(T=>this.setCursorStyle(T))),this._parser.registerCsiHandler({final:"r"},(T=>this.setScrollRegion(T))),this._parser.registerCsiHandler({final:"s"},(T=>this.saveCursor(T))),this._parser.registerCsiHandler({final:"t"},(T=>this.windowOptions(T))),this._parser.registerCsiHandler({final:"u"},(T=>this.restoreCursor(T))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(T=>this.insertColumns(T))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(T=>this.deleteColumns(T))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(T=>this.selectProtected(T))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(T=>this.requestMode(T,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(T=>this.requestMode(T,!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 b.OscHandler((T=>(this.setTitle(T),this.setIconName(T),!0)))),this._parser.registerOscHandler(1,new b.OscHandler((T=>this.setIconName(T)))),this._parser.registerOscHandler(2,new b.OscHandler((T=>this.setTitle(T)))),this._parser.registerOscHandler(4,new b.OscHandler((T=>this.setOrReportIndexedColor(T)))),this._parser.registerOscHandler(8,new b.OscHandler((T=>this.setHyperlink(T)))),this._parser.registerOscHandler(10,new b.OscHandler((T=>this.setOrReportFgColor(T)))),this._parser.registerOscHandler(11,new b.OscHandler((T=>this.setOrReportBgColor(T)))),this._parser.registerOscHandler(12,new b.OscHandler((T=>this.setOrReportCursorColor(T)))),this._parser.registerOscHandler(104,new b.OscHandler((T=>this.restoreIndexedColor(T)))),this._parser.registerOscHandler(110,new b.OscHandler((T=>this.restoreFgColor(T)))),this._parser.registerOscHandler(111,new b.OscHandler((T=>this.restoreBgColor(T)))),this._parser.registerOscHandler(112,new b.OscHandler((T=>this.restoreCursorColor(T)))),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 T in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:T},(()=>this.selectCharset("("+T))),this._parser.registerEscHandler({intermediates:")",final:T},(()=>this.selectCharset(")"+T))),this._parser.registerEscHandler({intermediates:"*",final:T},(()=>this.selectCharset("*"+T))),this._parser.registerEscHandler({intermediates:"+",final:T},(()=>this.selectCharset("+"+T))),this._parser.registerEscHandler({intermediates:"-",final:T},(()=>this.selectCharset("-"+T))),this._parser.registerEscHandler({intermediates:".",final:T},(()=>this.selectCharset("."+T))),this._parser.registerEscHandler({intermediates:"/",final:T},(()=>this.selectCharset("/"+T)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((T=>(this._logService.error("Parsing error: ",T),T))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new D.DcsHandler(((T,K)=>this.requestStatusString(T,K))))}_preserveStack(x,M,B,w){this._parseStack.paused=!0,this._parseStack.cursorStartX=x,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=B,this._parseStack.position=w}_logSlowResolvingAsync(x){this._logService.logLevel<=m.LogLevelEnum.WARN&&Promise.race([x,new Promise(((M,B)=>setTimeout((()=>B("#SLOW_TIMEOUT")),5e3)))]).catch((M=>{if(M!=="#SLOW_TIMEOUT")throw M;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(x,M){let B,w=this._activeBuffer.x,N=this._activeBuffer.y,Q=0;const se=this._parseStack.paused;if(se){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(B),B;w=this._parseStack.cursorStartX,N=this._parseStack.cursorStartY,this._parseStack.paused=!1,x.length>L&&(Q=this._parseStack.position+L)}if(this._logService.logLevel<=m.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof x=="string"?` "${x}"`:` "${Array.prototype.map.call(x,(ne=>String.fromCharCode(ne))).join("")}"`),typeof x=="string"?x.split("").map((ne=>ne.charCodeAt(0))):x),this._parseBuffer.length<x.length&&this._parseBuffer.length<L&&(this._parseBuffer=new Uint32Array(Math.min(x.length,L))),se||this._dirtyRowTracker.clearRange(),x.length>L)for(let ne=Q;ne<x.length;ne+=L){const fe=ne+L<x.length?ne+L:x.length,T=typeof x=="string"?this._stringDecoder.decode(x.substring(ne,fe),this._parseBuffer):this._utf8Decoder.decode(x.subarray(ne,fe),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,T))return this._preserveStack(w,N,T,ne),this._logSlowResolvingAsync(B),B}else if(!se){const ne=typeof x=="string"?this._stringDecoder.decode(x,this._parseBuffer):this._utf8Decoder.decode(x,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,ne))return this._preserveStack(w,N,ne,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===w&&this._activeBuffer.y===N||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(x,M,B){let w,N;const Q=this._charsetService.charset,se=this._optionsService.rawOptions.screenReaderMode,ne=this._bufferService.cols,fe=this._coreService.decPrivateModes.wraparound,T=this._coreService.modes.insertMode,K=this._curAttrData;let Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-M>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodePoint(this._activeBuffer.x-1,0,1,K.fg,K.bg,K.extended);for(let te=M;te<B;++te){if(w=x[te],N=this._unicodeService.wcwidth(w),w<127&&Q){const ye=Q[String.fromCharCode(w)];ye&&(w=ye.charCodeAt(0))}if(se&&this._onA11yChar.fire((0,S.stringFromCodePoint)(w)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),N||!this._activeBuffer.x){if(this._activeBuffer.x+N-1>=ne){if(fe){for(;this._activeBuffer.x<ne;)Z.setCellFromCodePoint(this._activeBuffer.x++,0,1,K.fg,K.bg,K.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),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=ne-1,N===2)continue}if(T&&(Z.insertCells(this._activeBuffer.x,N,this._activeBuffer.getNullCell(K),K),Z.getWidth(ne-1)===2&&Z.setCellFromCodePoint(ne-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,K.fg,K.bg,K.extended)),Z.setCellFromCodePoint(this._activeBuffer.x++,w,N,K.fg,K.bg,K.extended),N>0)for(;--N;)Z.setCellFromCodePoint(this._activeBuffer.x++,0,0,K.fg,K.bg,K.extended)}else Z.getWidth(this._activeBuffer.x-1)?Z.addCodepointToCell(this._activeBuffer.x-1,w):Z.addCodepointToCell(this._activeBuffer.x-2,w)}B-M>0&&(Z.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<ne&&B-M>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodePoint(this._activeBuffer.x,0,1,K.fg,K.bg,K.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(x,M){return x.final!=="t"||x.prefix||x.intermediates?this._parser.registerCsiHandler(x,M):this._parser.registerCsiHandler(x,(B=>!z(B.params[0],this._optionsService.rawOptions.windowOptions)||M(B)))}registerDcsHandler(x,M){return this._parser.registerDcsHandler(x,new D.DcsHandler(M))}registerEscHandler(x,M){return this._parser.registerEscHandler(x,M)}registerOscHandler(x,M){return this._parser.registerOscHandler(x,new b.OscHandler(M))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var x;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&&(!((x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||x===void 0)&&x.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);M.hasWidth(this._activeBuffer.x)&&!M.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const x=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-x),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(x=this._bufferService.cols-1){this._activeBuffer.x=Math.min(x,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(x,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=x,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=x,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(x,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+x,this._activeBuffer.y+M)}cursorUp(x){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,x.params[0]||1)):this._moveCursor(0,-(x.params[0]||1)),!0}cursorDown(x){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,x.params[0]||1)):this._moveCursor(0,x.params[0]||1),!0}cursorForward(x){return this._moveCursor(x.params[0]||1,0),!0}cursorBackward(x){return this._moveCursor(-(x.params[0]||1),0),!0}cursorNextLine(x){return this.cursorDown(x),this._activeBuffer.x=0,!0}cursorPrecedingLine(x){return this.cursorUp(x),this._activeBuffer.x=0,!0}cursorCharAbsolute(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(x){return this._setCursor(x.length>=2?(x.params[1]||1)-1:0,(x.params[0]||1)-1),!0}charPosAbsolute(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(x){return this._moveCursor(x.params[0]||1,0),!0}linePosAbsolute(x){return this._setCursor(this._activeBuffer.x,(x.params[0]||1)-1),!0}vPositionRelative(x){return this._moveCursor(0,x.params[0]||1),!0}hVPosition(x){return this.cursorPosition(x),!0}tabClear(x){const M=x.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=x.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=x.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(x){const M=x.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(x,M,B,w=!1,N=!1){const Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);Q.replaceCells(M,B,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),N),w&&(Q.isWrapped=!1)}_resetBufferLine(x,M=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+x),B.isWrapped=!1)}eraseInDisplay(x,M=!1){let B;switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);B<this._bufferService.rows;B++)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,M),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(0);break;case 3:const w=this._activeBuffer.lines.length-this._bufferService.rows;w>0&&(this._activeBuffer.lines.trimStart(w),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-w,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-w,0),this._onScroll.fire(0))}return!0}eraseInLine(x,M=!1){switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,M);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,M)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(x){this._restrictCursor();let M=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,w=this._bufferService.rows-1-this._activeBuffer.scrollBottom,N=this._bufferService.rows-1+this._activeBuffer.ybase-w+1;for(;M--;)this._activeBuffer.lines.splice(N-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(x){this._restrictCursor();let M=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y;let w;for(w=this._bufferService.rows-1-this._activeBuffer.scrollBottom,w=this._bufferService.rows-1+this._activeBuffer.ybase-w;M--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(w,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(x){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(x){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(x){let M=x.params[0]||1;for(;M--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(x){let M=x.params[0]||1;for(;M--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(l.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=x.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);w.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=x.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);w.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=x.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);w.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=x.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);w.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(x){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(x.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(x){if(!this._parser.precedingCodepoint)return!0;const M=x.params[0]||1,B=new Uint32Array(M);for(let w=0;w<M;++w)B[w]=this._parser.precedingCodepoint;return this.print(B,0,B.length),!0}sendDeviceAttributesPrimary(x){return x.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(x){return x.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(x.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(x){return(this._optionsService.rawOptions.termName+"").indexOf(x)===0}setMode(x){for(let M=0;M<x.length;M++)switch(x.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(x){for(let M=0;M<x.length;M++)switch(x.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(x){for(let M=0;M<x.length;M++)switch(x.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(x){for(let M=0;M<x.length;M++)switch(x.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),x.params[M]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(x,M){const B=this._coreService.decPrivateModes,{activeProtocol:w,activeEncoding:N}=this._coreMouseService,Q=this._coreService,{buffers:se,cols:ne}=this._bufferService,{active:fe,alt:T}=se,K=this._optionsService.rawOptions,Z=Re=>Re?1:2,te=x.params[0];return ye=te,ae=M?te===2?4:te===4?Z(Q.modes.insertMode):te===12?3:te===20?Z(K.convertEol):0:te===1?Z(B.applicationCursorKeys):te===3?K.windowOptions.setWinLines?ne===80?2:ne===132?1:0:0:te===6?Z(B.origin):te===7?Z(B.wraparound):te===8?3:te===9?Z(w==="X10"):te===12?Z(K.cursorBlink):te===25?Z(!Q.isCursorHidden):te===45?Z(B.reverseWraparound):te===66?Z(B.applicationKeypad):te===67?4:te===1e3?Z(w==="VT200"):te===1002?Z(w==="DRAG"):te===1003?Z(w==="ANY"):te===1004?Z(B.sendFocus):te===1005?4:te===1006?Z(N==="SGR"):te===1015?4:te===1016?Z(N==="SGR_PIXELS"):te===1048?1:te===47||te===1047||te===1049?Z(fe===T):te===2004?Z(B.bracketedPasteMode):0,Q.triggerDataEvent(`${h.C0.ESC}[${M?"":"?"}${ye};${ae}$y`),!0;var ye,ae}_updateAttrColor(x,M,B,w,N){return M===2?(x|=50331648,x&=-16777216,x|=_.AttributeData.fromColorRGB([B,w,N])):M===5&&(x&=-50331904,x|=33554432|255&B),x}_extractColor(x,M,B){const w=[0,0,-1,0,0,0];let N=0,Q=0;do{if(w[Q+N]=x.params[M+Q],x.hasSubParams(M+Q)){const se=x.getSubParams(M+Q);let ne=0;do w[1]===5&&(N=1),w[Q+ne+1+N]=se[ne];while(++ne<se.length&&ne+Q+1+N<w.length);break}if(w[1]===5&&Q+N>=2||w[1]===2&&Q+N>=5)break;w[1]&&(N=1)}while(++Q+M<x.length&&Q+N<w.length);for(let se=2;se<w.length;++se)w[se]===-1&&(w[se]=0);switch(w[0]){case 38:B.fg=this._updateAttrColor(B.fg,w[1],w[3],w[4],w[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,w[1],w[3],w[4],w[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,w[1],w[3],w[4],w[5])}return Q}_processUnderline(x,M){M.extended=M.extended.clone(),(!~x||x>5)&&(x=1),M.extended.underlineStyle=x,M.fg|=268435456,x===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(x){x.fg=l.DEFAULT_ATTR_DATA.fg,x.bg=l.DEFAULT_ATTR_DATA.bg,x.extended=x.extended.clone(),x.extended.underlineStyle=0,x.extended.underlineColor&=-67108864,x.updateExtended()}charAttributes(x){if(x.length===1&&x.params[0]===0)return this._processSGR0(this._curAttrData),!0;const M=x.length;let B;const w=this._curAttrData;for(let N=0;N<M;N++)B=x.params[N],B>=30&&B<=37?(w.fg&=-50331904,w.fg|=16777216|B-30):B>=40&&B<=47?(w.bg&=-50331904,w.bg|=16777216|B-40):B>=90&&B<=97?(w.fg&=-50331904,w.fg|=16777224|B-90):B>=100&&B<=107?(w.bg&=-50331904,w.bg|=16777224|B-100):B===0?this._processSGR0(w):B===1?w.fg|=134217728:B===3?w.bg|=67108864:B===4?(w.fg|=268435456,this._processUnderline(x.hasSubParams(N)?x.getSubParams(N)[0]:1,w)):B===5?w.fg|=536870912:B===7?w.fg|=67108864:B===8?w.fg|=1073741824:B===9?w.fg|=2147483648:B===2?w.bg|=134217728:B===21?this._processUnderline(2,w):B===22?(w.fg&=-134217729,w.bg&=-134217729):B===23?w.bg&=-67108865:B===24?(w.fg&=-268435457,this._processUnderline(0,w)):B===25?w.fg&=-536870913:B===27?w.fg&=-67108865:B===28?w.fg&=-1073741825:B===29?w.fg&=2147483647:B===39?(w.fg&=-67108864,w.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):B===49?(w.bg&=-67108864,w.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?N+=this._extractColor(x,N,w):B===53?w.bg|=1073741824:B===55?w.bg&=-1073741825:B===59?(w.extended=w.extended.clone(),w.extended.underlineColor=-1,w.updateExtended()):B===100?(w.fg&=-67108864,w.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,w.bg&=-67108864,w.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(x){switch(x.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const M=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${M};${B}R`)}return!0}deviceStatusPrivate(x){if(x.params[0]===6){const M=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${M};${B}R`)}return!0}softReset(x){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=l.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(x){const M=x.params[0]||1;switch(M){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const B=M%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(x){const M=x.params[0]||1;let B;return(x.length<2||(B=x.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(x){if(!z(x.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=x.length>1?x.params[1]:0;switch(x.params[0]){case 14:M!==2&&this._onRequestWindowsOptionsReport.fire(O.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(O.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:M!==0&&M!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),M!==0&&M!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:M!==0&&M!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),M!==0&&M!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(x){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(x){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(x){return this._windowTitle=x,this._onTitleChange.fire(x),!0}setIconName(x){return this._iconName=x,!0}setOrReportIndexedColor(x){const M=[],B=x.split(";");for(;B.length>1;){const w=B.shift(),N=B.shift();if(/^\d+$/.exec(w)){const Q=parseInt(w);if(k(Q))if(N==="?")M.push({type:0,index:Q});else{const se=(0,v.parseColor)(N);se&&M.push({type:1,index:Q,color:se})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(x){const M=x.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(x,M){this._getCurrentLinkId()&&this._finishHyperlink();const B=x.split(":");let w;const N=B.findIndex((Q=>Q.startsWith("id=")));return N!==-1&&(w=B[N].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:w,uri:M}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(x,M){const B=x.split(";");for(let w=0;w<B.length&&!(M>=this._specialColors.length);++w,++M)if(B[w]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const N=(0,v.parseColor)(B[w]);N&&this._onColor.fire([{type:1,index:this._specialColors[M],color:N}])}return!0}setOrReportFgColor(x){return this._setOrReportSpecialColor(x,0)}setOrReportBgColor(x){return this._setOrReportSpecialColor(x,1)}setOrReportCursorColor(x){return this._setOrReportSpecialColor(x,2)}restoreIndexedColor(x){if(!x)return this._onColor.fire([{type:2}]),!0;const M=[],B=x.split(";");for(let w=0;w<B.length;++w)if(/^\d+$/.exec(B[w])){const N=parseInt(B[w]);k(N)&&M.push({type:2,index:N})}return M.length&&this._onColor.fire(M),!0}restoreFgColor(x){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(x){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(x){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(x){return x.length!==2?(this.selectDefaultCharset(),!0):(x[0]==="/"||this._charsetService.setgCharset(E[x[0]],p.CHARSETS[x[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const x=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,x,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=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(x){return this._charsetService.setgLevel(x),!0}screenAlignmentPattern(){const x=new o.CellData;x.content=4194373,x.fg=this._curAttrData.fg,x.bg=this._curAttrData.bg,this._setCursor(0,0);for(let M=0;M<this._bufferService.rows;++M){const B=this._activeBuffer.ybase+this._activeBuffer.y+M,w=this._activeBuffer.lines.get(B);w&&(w.fill(x),w.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(x,M){const B=this._bufferService.buffer,w=this._optionsService.rawOptions;return(N=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${N}${h.C0.ESC}\\`),!0))(x==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:x==='"p'?'P1$r61;1"p':x==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:x==="m"?"P1$r0m":x===" q"?`P1$r${{block:2,underline:4,bar:6}[w.cursorStyle]-(w.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(x,M){this._dirtyRowTracker.markRangeDirty(x,M)}}u.InputHandler=V;let J=class{constructor(I){this._bufferService=I,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(I){I<this.start?this.start=I:I>this.end&&(this.end=I)}markRangeDirty(I,x){I>x&&(U=I,I=x,x=U),I<this.start&&(this.start=I),x>this.end&&(this.end=x)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function k(I){return 0<=I&&I<256}J=d([y(0,m.IBufferService)],J)},844:(ee,u)=>{function f(d){for(const y of d)y.dispose();d.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 d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const y=this._disposables.indexOf(d);y!==-1&&this._disposables.splice(y,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var y;this._isDisposed||d===this._value||((y=this._value)===null||y===void 0||y.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)===null||d===void 0||d.dispose(),this._value=void 0}},u.toDisposable=function(d){return{dispose:d}},u.disposeArray=f,u.getDisposeArrayDisposable=function(d){return{dispose:()=>f(d)}}},1505:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class f{constructor(){this._data={}}set(y,h,p){this._data[y]||(this._data[y]={}),this._data[y][h]=p}get(y,h){return this._data[y]?this._data[y][h]:void 0}clear(){this._data={}}}u.TwoKeyMap=f,u.FourKeyMap=class{constructor(){this._data=new f}set(d,y,h,p,C){this._data.get(d,y)||this._data.set(d,y,new f),this._data.get(d,y).set(h,p,C)}get(d,y,h,p){var C;return(C=this._data.get(d,y))===null||C===void 0?void 0:C.get(h,p)}clear(){this._data.clear()}}},6114:(ee,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 f=u.isNode?"node":navigator.userAgent,d=u.isNode?"node":navigator.platform;u.isFirefox=f.includes("Firefox"),u.isLegacyEdge=f.includes("Edge"),u.isSafari=/^((?!chrome|android).)*safari/i.test(f),u.getSafariVersion=function(){if(!u.isSafari)return 0;const y=f.match(/Version\/(\d+)/);return y===null||y.length<2?0:parseInt(y[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),u.isIpad=d==="iPad",u.isIphone=d==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),u.isLinux=d.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(f)},6106:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let f=0;u.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(f=this._search(this._getKey(d)),this._array.splice(f,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const y=this._getKey(d);if(y===void 0||(f=this._search(y),f===-1)||this._getKey(this._array[f])!==y)return!1;do if(this._array[f]===d)return this._array.splice(f,1),!0;while(++f<this._array.length&&this._getKey(this._array[f])===y);return!1}*getKeyIterator(d){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do yield this._array[f];while(++f<this._array.length&&this._getKey(this._array[f])===d)}forEachByKey(d,y){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do y(this._array[f]);while(++f<this._array.length&&this._getKey(this._array[f])===d)}values(){return[...this._array].values()}_search(d){let y=0,h=this._array.length-1;for(;h>=y;){let p=y+h>>1;const C=this._getKey(this._array[p]);if(C>d)h=p-1;else{if(!(C<d)){for(;p>0&&this._getKey(this._array[p-1])===d;)p--;return p}y=p+1}}return y}}},7226:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const d=f(6114);class y{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(C){this._idleCallback=void 0;let A=0,S=0,l=C.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),S=Math.max(A,S),c=C.timeRemaining(),1.5*S>c)return l-A<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-A))}ms`),void this._start();l=c}this.clear()}}class h extends y{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const A=Date.now()+C;return{timeRemaining:()=>Math.max(0,A-Date.now())}}}u.PriorityTaskQueue=h,u.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends y{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:h,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const d=f(643);u.updateWindowsModeWrappedState=function(y){const h=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),p=h?.get(y.cols-1),C=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);C&&p&&(C.isWrapped=p[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&p[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExtendedAttrs=u.AttributeData=void 0;class f{constructor(){this.fg=0,this.bg=0,this.extended=new d}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 f;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=f;class d{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,p=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=p}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=d},9092:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const d=f(6349),y=f(7226),h=f(3734),p=f(8437),C=f(4634),A=f(511),S=f(643),l=f(4863),c=f(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(a,o,_){this._hasScrollback=a,this._optionsService=o,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=A.CellData.fromCharData([0,S.NULL_CELL_CHAR,S.NULL_CELL_WIDTH,S.NULL_CELL_CODE]),this._whitespaceCell=A.CellData.fromCharData([0,S.WHITESPACE_CELL_CHAR,S.WHITESPACE_CELL_WIDTH,S.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new y.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(a){return a?(this._nullCell.fg=a.fg,this._nullCell.bg=a.bg,this._nullCell.extended=a.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(a){return a?(this._whitespaceCell.fg=a.fg,this._whitespaceCell.bg=a.bg,this._whitespaceCell.extended=a.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(a,o){return new p.BufferLine(this._bufferService.cols,this.getNullCell(a),o)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const a=this.ybase+this.y-this.ydisp;return a>=0&&a<this._rows}_getCorrectBufferLength(a){if(!this._hasScrollback)return a;const o=a+this._optionsService.rawOptions.scrollback;return o>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:o}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=p.DEFAULT_ATTR_DATA);let o=this._rows;for(;o--;)this.lines.push(this.getBlankLine(a))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(a,o){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let m=0;const b=this._getCorrectBufferLength(o);if(b>this.lines.maxLength&&(this.lines.maxLength=b),this.lines.length>0){if(this._cols<a)for(let v=0;v<this.lines.length;v++)m+=+this.lines.get(v).resize(a,_);let D=0;if(this._rows<o)for(let v=this._rows;v<o;v++)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 p.BufferLine(a,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+D+1?(this.ybase--,D++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(a,_)));else for(let v=this._rows;v>o;v--)this.lines.length>o+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(b<this.lines.maxLength){const v=this.lines.length-b;v>0&&(this.lines.trimStart(v),this.ybase=Math.max(this.ybase-v,0),this.ydisp=Math.max(this.ydisp-v,0),this.savedY=Math.max(this.savedY-v,0)),this.lines.maxLength=b}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,o-1),D&&(this.y+=D),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=o-1,this._isReflowEnabled&&(this._reflow(a,o),this._cols>a))for(let D=0;D<this.lines.length;D++)m+=+this.lines.get(D).resize(a,_);this._cols=a,this._rows=o,this._memoryCleanupQueue.clear(),m>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let a=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,a=!1);let o=0;for(;this._memoryCleanupPosition<this.lines.length;)if(o+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),o>100)return!0;return a}get _isReflowEnabled(){const a=this._optionsService.rawOptions.windowsPty;return a&&a.buildNumber?this._hasScrollback&&a.backend==="conpty"&&a.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(a,o){this._cols!==a&&(a>this._cols?this._reflowLarger(a,o):this._reflowSmaller(a,o))}_reflowLarger(a,o){const _=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const m=(0,C.reflowLargerCreateNewLayout)(this.lines,_);(0,C.reflowLargerApplyNewLayout)(this.lines,m.layout),this._reflowLargerAdjustViewport(a,o,m.countRemoved)}}_reflowLargerAdjustViewport(a,o,_){const m=this.getNullCell(p.DEFAULT_ATTR_DATA);let b=_;for(;b-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<o&&this.lines.push(new p.BufferLine(a,m))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(a,o){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),m=[];let b=0;for(let D=this.lines.length-1;D>=0;D--){let v=this.lines.get(D);if(!v||!v.isWrapped&&v.getTrimmedLength()<=a)continue;const E=[v];for(;v.isWrapped&&D>0;)v=this.lines.get(--D),E.unshift(v);const L=this.ybase+this.y;if(L>=D&&L<D+E.length)continue;const z=E[E.length-1].getTrimmedLength(),O=(0,C.reflowSmallerGetNewLineLengths)(E,this._cols,a),U=O.length-E.length;let V;V=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+U):Math.max(0,this.lines.length-this.lines.maxLength+U);const J=[];for(let w=0;w<U;w++){const N=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);J.push(N)}J.length>0&&(m.push({start:D+E.length+b,newLines:J}),b+=J.length),E.push(...J);let k=O.length-1,I=O[k];I===0&&(k--,I=O[k]);let x=E.length-U-1,M=z;for(;x>=0;){const w=Math.min(M,I);if(E[k]===void 0)break;if(E[k].copyCellsFrom(E[x],M-w,I-w,w,!0),I-=w,I===0&&(k--,I=O[k]),M-=w,M===0){x--;const N=Math.max(x,0);M=(0,C.getWrappedLineTrimmedLength)(E,N,this._cols)}}for(let w=0;w<E.length;w++)O[w]<a&&E[w].setCell(O[w],_);let B=U-V;for(;B-- >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+b)-o&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+U,this.ybase+o-1)}if(m.length>0){const D=[],v=[];for(let k=0;k<this.lines.length;k++)v.push(this.lines.get(k));const E=this.lines.length;let L=E-1,z=0,O=m[z];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let U=0;for(let k=Math.min(this.lines.maxLength-1,E+b-1);k>=0;k--)if(O&&O.start>L+U){for(let I=O.newLines.length-1;I>=0;I--)this.lines.set(k--,O.newLines[I]);k++,D.push({index:L+1,amount:O.newLines.length}),U+=O.newLines.length,O=m[++z]}else this.lines.set(k,v[L--]);let V=0;for(let k=D.length-1;k>=0;k--)D[k].index+=V,this.lines.onInsertEmitter.fire(D[k]),V+=D[k].amount;const J=Math.max(0,E+b-this.lines.maxLength);J>0&&this.lines.onTrimEmitter.fire(J)}}translateBufferLineToString(a,o,_=0,m){const b=this.lines.get(a);return b?b.translateToString(o,_,m):""}getWrappedRangeForLine(a){let o=a,_=a;for(;o>0&&this.lines.get(o).isWrapped;)o--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:o,last:_}}setupTabStops(a){for(a!=null?this.tabs[a]||(a=this.prevStop(a)):(this.tabs={},a=0);a<this._cols;a+=this._optionsService.rawOptions.tabStopWidth)this.tabs[a]=!0}prevStop(a){for(a==null&&(a=this.x);!this.tabs[--a]&&a>0;);return a>=this._cols?this._cols-1:a<0?0:a}nextStop(a){for(a==null&&(a=this.x);!this.tabs[++a]&&a<this._cols;);return a>=this._cols?this._cols-1:a<0?0:a}clearMarkers(a){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].line===a&&(this.markers[o].dispose(),this.markers.splice(o--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].dispose(),this.markers.splice(a--,1);this._isClearing=!1}addMarker(a){const o=new l.Marker(a);return this.markers.push(o),o.register(this.lines.onTrim((_=>{o.line-=_,o.line<0&&o.dispose()}))),o.register(this.lines.onInsert((_=>{o.line>=_.index&&(o.line+=_.amount)}))),o.register(this.lines.onDelete((_=>{o.line>=_.index&&o.line<_.index+_.amount&&o.dispose(),o.line>_.index&&(o.line-=_.amount)}))),o.register(o.onDispose((()=>this._removeMarker(o)))),o}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const d=f(3734),y=f(511),h=f(643),p=f(482);u.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let C=0;class A{constructor(l,c,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*l);const o=c||y.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<l;++_)this.setCell(_,o);this.length=l}get(l){const c=this._data[3*l+0],a=2097151&c;return[this._data[3*l+1],2097152&c?this._combined[l]:a?(0,p.stringFromCodePoint)(a):"",c>>22,2097152&c?this._combined[l].charCodeAt(this._combined[l].length-1):a]}set(l,c){this._data[3*l+1]=c[h.CHAR_DATA_ATTR_INDEX],c[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[l]=c[1],this._data[3*l+0]=2097152|l|c[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*l+0]=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(l){return this._data[3*l+0]>>22}hasWidth(l){return 12582912&this._data[3*l+0]}getFg(l){return this._data[3*l+1]}getBg(l){return this._data[3*l+2]}hasContent(l){return 4194303&this._data[3*l+0]}getCodePoint(l){const c=this._data[3*l+0];return 2097152&c?this._combined[l].charCodeAt(this._combined[l].length-1):2097151&c}isCombined(l){return 2097152&this._data[3*l+0]}getString(l){const c=this._data[3*l+0];return 2097152&c?this._combined[l]:2097151&c?(0,p.stringFromCodePoint)(2097151&c):""}isProtected(l){return 536870912&this._data[3*l+2]}loadCell(l,c){return C=3*l,c.content=this._data[C+0],c.fg=this._data[C+1],c.bg=this._data[C+2],2097152&c.content&&(c.combinedData=this._combined[l]),268435456&c.bg&&(c.extended=this._extendedAttrs[l]),c}setCell(l,c){2097152&c.content&&(this._combined[l]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[l]=c.extended),this._data[3*l+0]=c.content,this._data[3*l+1]=c.fg,this._data[3*l+2]=c.bg}setCellFromCodePoint(l,c,a,o,_,m){268435456&_&&(this._extendedAttrs[l]=m),this._data[3*l+0]=c|a<<22,this._data[3*l+1]=o,this._data[3*l+2]=_}addCodepointToCell(l,c){let a=this._data[3*l+0];2097152&a?this._combined[l]+=(0,p.stringFromCodePoint)(c):(2097151&a?(this._combined[l]=(0,p.stringFromCodePoint)(2097151&a)+(0,p.stringFromCodePoint)(c),a&=-2097152,a|=2097152):a=c|4194304,this._data[3*l+0]=a)}insertCells(l,c,a,o){if((l%=this.length)&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new d.ExtendedAttrs),c<this.length-l){const _=new y.CellData;for(let m=this.length-l-c-1;m>=0;--m)this.setCell(l+c+m,this.loadCell(l+m,_));for(let m=0;m<c;++m)this.setCell(l+m,a)}else for(let _=l;_<this.length;++_)this.setCell(_,a);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new d.ExtendedAttrs)}deleteCells(l,c,a,o){if(l%=this.length,c<this.length-l){const _=new y.CellData;for(let m=0;m<this.length-l-c;++m)this.setCell(l+m,this.loadCell(l+c+m,_));for(let m=this.length-c;m<this.length;++m)this.setCell(m,a)}else for(let _=l;_<this.length;++_)this.setCell(_,a);l&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new d.ExtendedAttrs),this.getWidth(l)!==0||this.hasContent(l)||this.setCellFromCodePoint(l,0,1,o?.fg||0,o?.bg||0,o?.extended||new d.ExtendedAttrs)}replaceCells(l,c,a,o,_=!1){if(_)for(l&&this.getWidth(l-1)===2&&!this.isProtected(l-1)&&this.setCellFromCodePoint(l-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new d.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 d.ExtendedAttrs);l<c&&l<this.length;)this.isProtected(l)||this.setCell(l,a),l++;else for(l&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new d.ExtendedAttrs),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c,0,1,o?.fg||0,o?.bg||0,o?.extended||new d.ExtendedAttrs);l<c&&l<this.length;)this.setCell(l++,a)}resize(l,c){if(l===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*l;if(l>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const o=new Uint32Array(a);o.set(this._data),this._data=o}for(let o=this.length;o<l;++o)this.setCell(o,c)}else{this._data=this._data.subarray(0,a);const o=Object.keys(this._combined);for(let m=0;m<o.length;m++){const b=parseInt(o[m],10);b>=l&&delete this._combined[b]}const _=Object.keys(this._extendedAttrs);for(let m=0;m<_.length;m++){const b=parseInt(_[m],10);b>=l&&delete this._extendedAttrs[b]}}return this.length=l,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const l=new Uint32Array(this._data.length);return l.set(this._data),this._data=l,1}return 0}fill(l,c=!1){if(c)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,l);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,l)}}copyFrom(l){this.length!==l.length?this._data=new Uint32Array(l._data):this._data.set(l._data),this.length=l.length,this._combined={};for(const c in l._combined)this._combined[c]=l._combined[c];this._extendedAttrs={};for(const c in l._extendedAttrs)this._extendedAttrs[c]=l._extendedAttrs[c];this.isWrapped=l.isWrapped}clone(){const l=new A(0);l._data=new Uint32Array(this._data),l.length=this.length;for(const c in this._combined)l._combined[c]=this._combined[c];for(const c in this._extendedAttrs)l._extendedAttrs[c]=this._extendedAttrs[c];return l.isWrapped=this.isWrapped,l}getTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0])return l+(this._data[3*l+0]>>22);return 0}getNoBgTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0]||50331648&this._data[3*l+2])return l+(this._data[3*l+0]>>22);return 0}copyCellsFrom(l,c,a,o,_){const m=l._data;if(_)for(let D=o-1;D>=0;D--){for(let v=0;v<3;v++)this._data[3*(a+D)+v]=m[3*(c+D)+v];268435456&m[3*(c+D)+2]&&(this._extendedAttrs[a+D]=l._extendedAttrs[c+D])}else for(let D=0;D<o;D++){for(let v=0;v<3;v++)this._data[3*(a+D)+v]=m[3*(c+D)+v];268435456&m[3*(c+D)+2]&&(this._extendedAttrs[a+D]=l._extendedAttrs[c+D])}const b=Object.keys(l._combined);for(let D=0;D<b.length;D++){const v=parseInt(b[D],10);v>=c&&(this._combined[v-c+a]=l._combined[v])}}translateToString(l=!1,c=0,a=this.length){l&&(a=Math.min(a,this.getTrimmedLength()));let o="";for(;c<a;){const _=this._data[3*c+0],m=2097151&_;o+=2097152&_?this._combined[c]:m?(0,p.stringFromCodePoint)(m):h.WHITESPACE_CELL_CHAR,c+=_>>22||1}return o}}u.BufferLine=A},4841:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(f,d){if(f.start.y>f.end.y)throw new Error(`Buffer range end (${f.end.x}, ${f.end.y}) cannot be before start (${f.start.x}, ${f.start.y})`);return d*(f.end.y-f.start.y)+(f.end.x-f.start.x+1)}},4634:(ee,u)=>{function f(d,y,h){if(y===d.length-1)return d[y].getTrimmedLength();const p=!d[y].hasContent(h-1)&&d[y].getWidth(h-1)===1,C=d[y+1].getWidth(0)===2;return p&&C?h-1:h}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(d,y,h,p,C){const A=[];for(let S=0;S<d.length-1;S++){let l=S,c=d.get(++l);if(!c.isWrapped)continue;const a=[d.get(S)];for(;l<d.length&&c.isWrapped;)a.push(c),c=d.get(++l);if(p>=S&&p<l){S+=a.length-1;continue}let o=0,_=f(a,o,y),m=1,b=0;for(;m<a.length;){const v=f(a,m,y),E=v-b,L=h-_,z=Math.min(E,L);a[o].copyCellsFrom(a[m],b,_,z,!1),_+=z,_===h&&(o++,_=0),b+=z,b===v&&(m++,b=0),_===0&&o!==0&&a[o-1].getWidth(h-1)===2&&(a[o].copyCellsFrom(a[o-1],h-1,_++,1,!1),a[o-1].setCell(h-1,C))}a[o].replaceCells(_,h,C);let D=0;for(let v=a.length-1;v>0&&(v>o||a[v].getTrimmedLength()===0);v--)D++;D>0&&(A.push(S+a.length-D),A.push(D)),S+=a.length-1}return A},u.reflowLargerCreateNewLayout=function(d,y){const h=[];let p=0,C=y[p],A=0;for(let S=0;S<d.length;S++)if(C===S){const l=y[++p];d.onDeleteEmitter.fire({index:S-A,amount:l}),S+=l-1,A+=l,C=y[++p]}else h.push(S);return{layout:h,countRemoved:A}},u.reflowLargerApplyNewLayout=function(d,y){const h=[];for(let p=0;p<y.length;p++)h.push(d.get(y[p]));for(let p=0;p<h.length;p++)d.set(p,h[p]);d.length=y.length},u.reflowSmallerGetNewLineLengths=function(d,y,h){const p=[],C=d.map(((c,a)=>f(d,a,y))).reduce(((c,a)=>c+a));let A=0,S=0,l=0;for(;l<C;){if(C-l<h){p.push(C-l);break}A+=h;const c=f(d,S,y);A>c&&(A-=c,S++);const a=d[S].getWidth(A-1)===2;a&&A--;const o=a?h-1:h;p.push(o),l+=o}return p},u.getWrappedLineTrimmedLength=f},5295:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const d=f(8460),y=f(844),h=f(9092);class p extends y.Disposable{constructor(A,S){super(),this._optionsService=A,this._bufferService=S,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new 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,S){this._normal.resize(A,S),this._alt.resize(A,S),this.setupTabStops(A)}setupTabStops(A){this._normal.setupTabStops(A),this._alt.setupTabStops(A)}}u.BufferSet=p},511:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const d=f(482),y=f(643),h=f(3734);class p 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 S=new p;return S.setFromCharData(A),S}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(A){this.fg=A[y.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(A[y.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(A[y.CHAR_DATA_CHAR_INDEX].length===2){const l=A[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const c=A[y.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(l-55296)+c-56320+65536|A[y.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=A[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|A[y.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=A[y.CHAR_DATA_CHAR_INDEX],this.content=2097152|A[y.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=p},643:(ee,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:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const d=f(8460),y=f(844);class h{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,y.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}u.Marker=h,h._nextId=1},7116:(ee,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:(ee,u)=>{var f,d,y;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=`
|
|
16
|
-
`,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=""})(f||(u.C0=f={})),(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=""})(d||(u.C1=d={})),(function(h){h.ST=`${f.ESC}\\`})(y||(u.C1_ESCAPED=y={}))},7399:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const d=f(2584),y={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,p,C,A){const S={type:0,cancel:!1,key:void 0},l=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?S.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?S.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?S.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(S.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:if(h.altKey){S.key=d.C0.ESC+d.C0.DEL;break}S.key=d.C0.DEL;break;case 9:if(h.shiftKey){S.key=d.C0.ESC+"[Z";break}S.key=d.C0.HT,S.cancel=!0;break;case 13:S.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,S.cancel=!0;break;case 27:S.key=d.C0.ESC,h.altKey&&(S.key=d.C0.ESC+d.C0.ESC),S.cancel=!0;break;case 37:if(h.metaKey)break;l?(S.key=d.C0.ESC+"[1;"+(l+1)+"D",S.key===d.C0.ESC+"[1;3D"&&(S.key=d.C0.ESC+(C?"b":"[1;5D"))):S.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;l?(S.key=d.C0.ESC+"[1;"+(l+1)+"C",S.key===d.C0.ESC+"[1;3C"&&(S.key=d.C0.ESC+(C?"f":"[1;5C"))):S.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;l?(S.key=d.C0.ESC+"[1;"+(l+1)+"A",C||S.key!==d.C0.ESC+"[1;3A"||(S.key=d.C0.ESC+"[1;5A")):S.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;l?(S.key=d.C0.ESC+"[1;"+(l+1)+"B",C||S.key!==d.C0.ESC+"[1;3B"||(S.key=d.C0.ESC+"[1;5B")):S.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(S.key=d.C0.ESC+"[2~");break;case 46:S.key=l?d.C0.ESC+"[3;"+(l+1)+"~":d.C0.ESC+"[3~";break;case 36:S.key=l?d.C0.ESC+"[1;"+(l+1)+"H":p?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:S.key=l?d.C0.ESC+"[1;"+(l+1)+"F":p?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?S.type=2:h.ctrlKey?S.key=d.C0.ESC+"[5;"+(l+1)+"~":S.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?S.type=3:h.ctrlKey?S.key=d.C0.ESC+"[6;"+(l+1)+"~":S.key=d.C0.ESC+"[6~";break;case 112:S.key=l?d.C0.ESC+"[1;"+(l+1)+"P":d.C0.ESC+"OP";break;case 113:S.key=l?d.C0.ESC+"[1;"+(l+1)+"Q":d.C0.ESC+"OQ";break;case 114:S.key=l?d.C0.ESC+"[1;"+(l+1)+"R":d.C0.ESC+"OR";break;case 115:S.key=l?d.C0.ESC+"[1;"+(l+1)+"S":d.C0.ESC+"OS";break;case 116:S.key=l?d.C0.ESC+"[15;"+(l+1)+"~":d.C0.ESC+"[15~";break;case 117:S.key=l?d.C0.ESC+"[17;"+(l+1)+"~":d.C0.ESC+"[17~";break;case 118:S.key=l?d.C0.ESC+"[18;"+(l+1)+"~":d.C0.ESC+"[18~";break;case 119:S.key=l?d.C0.ESC+"[19;"+(l+1)+"~":d.C0.ESC+"[19~";break;case 120:S.key=l?d.C0.ESC+"[20;"+(l+1)+"~":d.C0.ESC+"[20~";break;case 121:S.key=l?d.C0.ESC+"[21;"+(l+1)+"~":d.C0.ESC+"[21~";break;case 122:S.key=l?d.C0.ESC+"[23;"+(l+1)+"~":d.C0.ESC+"[23~";break;case 123:S.key=l?d.C0.ESC+"[24;"+(l+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(C&&!A||!h.altKey||h.metaKey)!C||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?S.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(S.key=d.C0.US),h.key==="@"&&(S.key=d.C0.NUL)):h.keyCode===65&&(S.type=1);else{const c=y[h.keyCode],a=c?.[h.shiftKey?1:0];if(a)S.key=d.C0.ESC+a;else if(h.keyCode>=65&&h.keyCode<=90){const o=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(o);h.shiftKey&&(_=_.toUpperCase()),S.key=d.C0.ESC+_}else if(h.keyCode===32)S.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let o=h.code.slice(3,4);h.shiftKey||(o=o.toLowerCase()),S.key=d.C0.ESC+o,S.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?S.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?S.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?S.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?S.key=d.C0.DEL:h.keyCode===219?S.key=d.C0.ESC:h.keyCode===220?S.key=d.C0.FS:h.keyCode===221&&(S.key=d.C0.GS)}return S}},482:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Utf8ToUtf32=u.StringToUtf32=u.utf32ToString=u.stringFromCodePoint=void 0,u.stringFromCodePoint=function(f){return f>65535?(f-=65536,String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):String.fromCharCode(f)},u.utf32ToString=function(f,d=0,y=f.length){let h="";for(let p=d;p<y;++p){let C=f[p];C>65535?(C-=65536,h+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):h+=String.fromCharCode(C)}return h},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(f,d){const y=f.length;if(!y)return 0;let h=0,p=0;if(this._interim){const C=f.charCodeAt(p++);56320<=C&&C<=57343?d[h++]=1024*(this._interim-55296)+C-56320+65536:(d[h++]=this._interim,d[h++]=C),this._interim=0}for(let C=p;C<y;++C){const A=f.charCodeAt(C);if(55296<=A&&A<=56319){if(++C>=y)return this._interim=A,h;const S=f.charCodeAt(C);56320<=S&&S<=57343?d[h++]=1024*(A-55296)+S-56320+65536:(d[h++]=A,d[h++]=S)}else A!==65279&&(d[h++]=A)}return h}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(f,d){const y=f.length;if(!y)return 0;let h,p,C,A,S=0,l=0,c=0;if(this.interim[0]){let _=!1,m=this.interim[0];m&=(224&m)==192?31:(240&m)==224?15:7;let b,D=0;for(;(b=63&this.interim[++D])&&D<4;)m<<=6,m|=b;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=v-D;for(;c<E;){if(c>=y)return 0;if(b=f[c++],(192&b)!=128){c--,_=!0;break}this.interim[D++]=b,m<<=6,m|=63&b}_||(v===2?m<128?c--:d[S++]=m:v===3?m<2048||m>=55296&&m<=57343||m===65279||(d[S++]=m):m<65536||m>1114111||(d[S++]=m)),this.interim.fill(0)}const a=y-4;let o=c;for(;o<y;){for(;!(!(o<a)||128&(h=f[o])||128&(p=f[o+1])||128&(C=f[o+2])||128&(A=f[o+3]));)d[S++]=h,d[S++]=p,d[S++]=C,d[S++]=A,o+=4;if(h=f[o++],h<128)d[S++]=h;else if((224&h)==192){if(o>=y)return this.interim[0]=h,S;if(p=f[o++],(192&p)!=128){o--;continue}if(l=(31&h)<<6|63&p,l<128){o--;continue}d[S++]=l}else if((240&h)==224){if(o>=y)return this.interim[0]=h,S;if(p=f[o++],(192&p)!=128){o--;continue}if(o>=y)return this.interim[0]=h,this.interim[1]=p,S;if(C=f[o++],(192&C)!=128){o--;continue}if(l=(15&h)<<12|(63&p)<<6|63&C,l<2048||l>=55296&&l<=57343||l===65279)continue;d[S++]=l}else if((248&h)==240){if(o>=y)return this.interim[0]=h,S;if(p=f[o++],(192&p)!=128){o--;continue}if(o>=y)return this.interim[0]=h,this.interim[1]=p,S;if(C=f[o++],(192&C)!=128){o--;continue}if(o>=y)return this.interim[0]=h,this.interim[1]=p,this.interim[2]=C,S;if(A=f[o++],(192&A)!=128){o--;continue}if(l=(7&h)<<18|(63&p)<<12|(63&C)<<6|63&A,l<65536||l>1114111)continue;d[S++]=l}}return S}}},225:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const f=[[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]],d=[[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 y;u.UnicodeV6=class{constructor(){if(this.version="6",!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let h=0;h<f.length;++h)y.fill(0,f[h][0],f[h][1]+1)}}wcwidth(h){return h<32?0:h<127?1:h<65536?y[h]:(function(p,C){let A,S=0,l=C.length-1;if(p<C[0][0]||p>C[l][1])return!1;for(;l>=S;)if(A=S+l>>1,p>C[A][1])S=A+1;else{if(!(p<C[A][0]))return!0;l=A-1}return!1})(h,d)?0:h>=131072&&h<=196605||h>=196608&&h<=262141?2:1}}},5981:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const d=f(8460),y=f(844);class h extends y.Disposable{constructor(C){super(),this._action=C,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(C,A){if(A!==void 0&&this._syncCalls>A)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let S;for(this._isSyncWriting=!0;S=this._writeBuffer.shift();){this._action(S);const l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,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+=C.length,this._writeBuffer.push(C),this._callbacks.push(A),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(A)}_innerWrite(C=0,A=!0){const S=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],c=this._action(l,A);if(c){const o=_=>Date.now()-S>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(S,_);return void c.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(o)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=l.length,Date.now()-S>=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:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.toRgbString=u.parseColor=void 0;const f=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function y(h,p){const C=h.toString(16),A=C.length<2?"0"+C:C;switch(p){case 4:return C[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 p=h.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const C=f.exec(p);if(C){const A=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/A*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/A*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/A*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),d.exec(p)&&[3,6,9,12].includes(p.length))){const C=p.length/3,A=[0,0,0];for(let S=0;S<3;++S){const l=parseInt(p.slice(C*S,C*S+C),16);A[S]=C===1?l<<4:C===2?l:C===3?l>>4:l>>8}return A}},u.toRgbString=function(h,p=16){const[C,A,S]=h;return`rgb:${y(C,p)}/${y(A,p)}/${y(S,p)}`}},5770:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const d=f(482),y=f(8742),h=f(5770),p=[];u.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(A,S){this._handlers[A]===void 0&&(this._handlers[A]=[]);const l=this._handlers[A];return l.push(S),{dispose:()=>{const c=l.indexOf(S);c!==-1&&l.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=p,this._ident=0}hook(A,S){if(this.reset(),this._ident=A,this._active=this._handlers[A]||p,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].hook(S);else this._handlerFb(this._ident,"HOOK",S)}put(A,S,l){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(A,S,l);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(A,S,l))}unhook(A,S=!0){if(this._active.length){let l=!1,c=this._active.length-1,a=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,l=S,a=this._stack.fallThrough,this._stack.paused=!1),!a&&l===!1){for(;c>=0&&(l=this._active[c].unhook(A),l!==!0);c--)if(l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,l;c--}for(;c>=0;c--)if(l=this._active[c].unhook(!1),l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,l}else this._handlerFb(this._ident,"UNHOOK",A);this._active=p,this._ident=0}};const C=new y.Params;C.addParam(0),u.DcsHandler=class{constructor(A){this._handler=A,this._data="",this._params=C,this._hitLimit=!1}hook(A){this._params=A.length>1||A.params[0]?A.clone():C,this._data="",this._hitLimit=!1}put(A,S,l){this._hitLimit||(this._data+=(0,d.utf32ToString)(A,S,l),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(A){let S=!1;if(this._hitLimit)S=!1;else if(A&&(S=this._handler(this._data,this._params),S instanceof Promise))return S.then((l=>(this._params=C,this._data="",this._hitLimit=!1,l)));return this._params=C,this._data="",this._hitLimit=!1,S}}},2015:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const d=f(844),y=f(8742),h=f(6242),p=f(6351);class C{constructor(c){this.table=new Uint8Array(c)}setDefault(c,a){this.table.fill(c<<4|a)}add(c,a,o,_){this.table[a<<8|c]=o<<4|_}addMany(c,a,o,_){for(let m=0;m<c.length;m++)this.table[a<<8|c[m]]=o<<4|_}}u.TransitionTable=C;const A=160;u.VT500_TRANSITION_TABLE=(function(){const l=new C(4095),c=Array.apply(null,Array(256)).map(((D,v)=>v)),a=(D,v)=>c.slice(D,v),o=a(32,127),_=a(0,24);_.push(25),_.push.apply(_,a(28,32));const m=a(0,14);let b;for(b in l.setDefault(1,0),l.addMany(o,0,2,0),m)l.addMany([24,26,153,154],b,3,0),l.addMany(a(128,144),b,3,0),l.addMany(a(144,152),b,3,0),l.add(156,b,0,0),l.add(27,b,11,1),l.add(157,b,4,8),l.addMany([152,158,159],b,0,7),l.add(155,b,11,3),l.add(144,b,11,9);return l.addMany(_,0,3,0),l.addMany(_,1,3,1),l.add(127,1,0,1),l.addMany(_,8,0,8),l.addMany(_,3,3,3),l.add(127,3,0,3),l.addMany(_,4,3,4),l.add(127,4,0,4),l.addMany(_,6,3,6),l.addMany(_,5,3,5),l.add(127,5,0,5),l.addMany(_,2,3,2),l.add(127,2,0,2),l.add(93,1,4,8),l.addMany(o,8,5,8),l.add(127,8,5,8),l.addMany([156,27,24,26,7],8,6,0),l.addMany(a(28,32),8,0,8),l.addMany([88,94,95],1,0,7),l.addMany(o,7,0,7),l.addMany(_,7,0,7),l.add(156,7,0,0),l.add(127,7,0,7),l.add(91,1,11,3),l.addMany(a(64,127),3,7,0),l.addMany(a(48,60),3,8,4),l.addMany([60,61,62,63],3,9,4),l.addMany(a(48,60),4,8,4),l.addMany(a(64,127),4,7,0),l.addMany([60,61,62,63],4,0,6),l.addMany(a(32,64),6,0,6),l.add(127,6,0,6),l.addMany(a(64,127),6,0,0),l.addMany(a(32,48),3,9,5),l.addMany(a(32,48),5,9,5),l.addMany(a(48,64),5,0,6),l.addMany(a(64,127),5,7,0),l.addMany(a(32,48),4,9,5),l.addMany(a(32,48),1,9,2),l.addMany(a(32,48),2,9,2),l.addMany(a(48,127),2,10,0),l.addMany(a(48,80),1,10,0),l.addMany(a(81,88),1,10,0),l.addMany([89,90,92],1,10,0),l.addMany(a(96,127),1,10,0),l.add(80,1,11,9),l.addMany(_,9,0,9),l.add(127,9,0,9),l.addMany(a(28,32),9,0,9),l.addMany(a(32,48),9,9,12),l.addMany(a(48,60),9,8,10),l.addMany([60,61,62,63],9,9,10),l.addMany(_,11,0,11),l.addMany(a(32,128),11,0,11),l.addMany(a(28,32),11,0,11),l.addMany(_,10,0,10),l.add(127,10,0,10),l.addMany(a(28,32),10,0,10),l.addMany(a(48,60),10,8,10),l.addMany([60,61,62,63],10,0,11),l.addMany(a(32,48),10,9,12),l.addMany(_,12,0,12),l.add(127,12,0,12),l.addMany(a(28,32),12,0,12),l.addMany(a(32,48),12,9,12),l.addMany(a(48,64),12,0,11),l.addMany(a(64,127),12,12,13),l.addMany(a(64,127),10,12,13),l.addMany(a(64,127),9,12,13),l.addMany(_,13,13,13),l.addMany(o,13,13,13),l.add(127,13,0,13),l.addMany([27,156,24,26],13,14,0),l.add(A,0,2,0),l.add(A,8,5,8),l.add(A,6,0,6),l.add(A,11,0,11),l.add(A,13,13,13),l})();class S extends d.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 y.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(a,o,_)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,o)=>{},this._escHandlerFb=a=>{},this._errorHandlerFb=a=>a,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,a=[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 m=0;m<c.intermediates.length;++m){const b=c.intermediates.charCodeAt(m);if(32>b||b>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");o<<=8,o|=b}}if(c.final.length!==1)throw new Error("final must be a single byte");const _=c.final.charCodeAt(0);if(a[0]>_||_>a[1])throw new Error(`final must be in range ${a[0]} .. ${a[1]}`);return o<<=8,o|=_,o}identToString(c){const a=[];for(;c;)a.push(String.fromCharCode(255&c)),c>>=8;return a.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,a){const o=this._identifier(c,[48,126]);this._escHandlers[o]===void 0&&(this._escHandlers[o]=[]);const _=this._escHandlers[o];return _.push(a),{dispose:()=>{const m=_.indexOf(a);m!==-1&&_.splice(m,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,a){this._executeHandlers[c.charCodeAt(0)]=a}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,a){const o=this._identifier(c);this._csiHandlers[o]===void 0&&(this._csiHandlers[o]=[]);const _=this._csiHandlers[o];return _.push(a),{dispose:()=>{const m=_.indexOf(a);m!==-1&&_.splice(m,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,a){return this._dcsParser.registerHandler(this._identifier(c),a)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,a){return this._oscParser.registerHandler(c,a)}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,a,o,_,m){this._parseStack.state=c,this._parseStack.handlers=a,this._parseStack.handlerPos=o,this._parseStack.transition=_,this._parseStack.chunkPos=m}parse(c,a,o){let _,m=0,b=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 v=this._parseStack.handlers;let E=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(o===!1&&E>-1){for(;E>=0&&(_=v[E](this._params),_!==!0);E--)if(_ instanceof Promise)return this._parseStack.handlerPos=E,_}this._parseStack.handlers=[];break;case 4:if(o===!1&&E>-1){for(;E>=0&&(_=v[E](),_!==!0);E--)if(_ instanceof Promise)return this._parseStack.handlerPos=E,_}this._parseStack.handlers=[];break;case 6:if(m=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(m!==24&&m!==26,o),_)return _;m===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(m=c[this._parseStack.chunkPos],_=this._oscParser.end(m!==24&&m!==26,o),_)return _;m===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 v=D;v<a;++v){switch(m=c[v],b=this._transitions.table[this.currentState<<8|(m<160?m:A)],b>>4){case 2:for(let U=v+1;;++U){if(U>=a||(m=c[U])<32||m>126&&m<A){this._printHandler(c,v,U),v=U-1;break}if(++U>=a||(m=c[U])<32||m>126&&m<A){this._printHandler(c,v,U),v=U-1;break}if(++U>=a||(m=c[U])<32||m>126&&m<A){this._printHandler(c,v,U),v=U-1;break}if(++U>=a||(m=c[U])<32||m>126&&m<A){this._printHandler(c,v,U),v=U-1;break}}break;case 3:this._executeHandlers[m]?this._executeHandlers[m]():this._executeHandlerFb(m),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:m,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const E=this._csiHandlers[this._collect<<8|m];let L=E?E.length-1:-1;for(;L>=0&&(_=E[L](this._params),_!==!0);L--)if(_ instanceof Promise)return this._preserveStack(3,E,L,b,v),_;L<0&&this._csiHandlerFb(this._collect<<8|m,this._params),this.precedingCodepoint=0;break;case 8:do switch(m){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(m-48)}while(++v<a&&(m=c[v])>47&&m<60);v--;break;case 9:this._collect<<=8,this._collect|=m;break;case 10:const z=this._escHandlers[this._collect<<8|m];let O=z?z.length-1:-1;for(;O>=0&&(_=z[O](),_!==!0);O--)if(_ instanceof Promise)return this._preserveStack(4,z,O,b,v),_;O<0&&this._escHandlerFb(this._collect<<8|m),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|m,this._params);break;case 13:for(let U=v+1;;++U)if(U>=a||(m=c[U])===24||m===26||m===27||m>127&&m<A){this._dcsParser.put(c,v,U),v=U-1;break}break;case 14:if(_=this._dcsParser.unhook(m!==24&&m!==26),_)return this._preserveStack(6,[],0,b,v),_;m===27&&(b|=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 U=v+1;;U++)if(U>=a||(m=c[U])<32||m>127&&m<A){this._oscParser.put(c,v,U),v=U-1;break}break;case 6:if(_=this._oscParser.end(m!==24&&m!==26),_)return this._preserveStack(5,[],0,b,v),_;m===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&b}}}u.EscapeSequenceParser=S},6242:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const d=f(5770),y=f(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(p,C){this._handlers[p]===void 0&&(this._handlers[p]=[]);const A=this._handlers[p];return A.push(C),{dispose:()=>{const S=A.indexOf(C);S!==-1&&A.splice(S,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,C,A){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(p,C,A);else this._handlerFb(this._id,"PUT",(0,y.utf32ToString)(p,C,A))}start(){this.reset(),this._state=1}put(p,C,A){if(this._state!==3){if(this._state===1)for(;C<A;){const S=p[C++];if(S===59){this._state=2,this._start();break}if(S<48||57<S)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+S-48}this._state===2&&A-C>0&&this._put(p,C,A)}}end(p,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let A=!1,S=this._active.length-1,l=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,A=C,l=this._stack.fallThrough,this._stack.paused=!1),!l&&A===!1){for(;S>=0&&(A=this._active[S].end(p),A!==!0);S--)if(A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,A;S--}for(;S>=0;S--)if(A=this._active[S].end(!1),A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,A}else this._handlerFb(this._id,"END",p);this._active=h,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,C,A){this._hitLimit||(this._data+=(0,y.utf32ToString)(p,C,A),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let C=!1;if(this._hitLimit)C=!1;else if(p&&(C=this._handler(this._data),C instanceof Promise))return C.then((A=>(this._data="",this._hitLimit=!1,A)));return this._data="",this._hitLimit=!1,C}}},8742:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const f=2147483647;class d{static fromArray(h){const p=new d;if(!h.length)return p;for(let C=Array.isArray(h[0])?1:0;C<h.length;++C){const A=h[C];if(Array.isArray(A))for(let S=0;S<A.length;++S)p.addSubParam(A[S]);else p.addParam(A)}return p}constructor(h=32,p=32){if(this.maxLength=h,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new d(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 p=0;p<this.length;++p){h.push(this.params[p]);const C=this._subParamsIdx[p]>>8,A=255&this._subParamsIdx[p];A-C>0&&h.push(Array.prototype.slice.call(this._subParams,C,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>f?f: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>f?f:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const p=this._subParamsIdx[h]>>8,C=255&this._subParamsIdx[h];return C-p>0?this._subParams.subarray(p,C):null}getSubParamsAll(){const h={};for(let p=0;p<this.length;++p){const C=this._subParamsIdx[p]>>8,A=255&this._subParamsIdx[p];A-C>0&&(h[p]=this._subParams.slice(C,A))}return h}addDigit(h){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,A=C[p-1];C[p-1]=~A?Math.min(10*A+h,f):h}}u.Params=d},5741:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.AddonManager=void 0,u.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let f=this._addons.length-1;f>=0;f--)this._addons[f].instance.dispose()}loadAddon(f,d){const y={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(y),d.dispose=()=>this._wrappedAddonDispose(y),d.activate(f)}_wrappedAddonDispose(f){if(f.isDisposed)return;let d=-1;for(let y=0;y<this._addons.length;y++)if(this._addons[y]===f){d=y;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");f.isDisposed=!0,f.dispose.apply(f.instance),this._addons.splice(d,1)}}},8771:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const d=f(3785),y=f(511);u.BufferApiView=class{constructor(h,p){this._buffer=h,this.type=p}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 p=this._buffer.lines.get(h);if(p)return new d.BufferLineApiView(p)}getNullCell(){return new y.CellData}}},3785:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const d=f(511);u.BufferLineApiView=class{constructor(y){this._line=y}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(y,h){if(!(y<0||y>=this._line.length))return h?(this._line.loadCell(y,h),h):this._line.loadCell(y,new d.CellData)}translateToString(y,h,p){return this._line.translateToString(y,h,p)}}},8285:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const d=f(8771),y=f(8460),h=f(844);class p extends h.Disposable{constructor(A){super(),this._core=A,this._onBufferChange=this.register(new y.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}u.BufferNamespaceApi=p},7975:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(f){this._core=f}registerCsiHandler(f,d){return this._core.registerCsiHandler(f,(y=>d(y.toArray())))}addCsiHandler(f,d){return this.registerCsiHandler(f,d)}registerDcsHandler(f,d){return this._core.registerDcsHandler(f,((y,h)=>d(y,h.toArray())))}addDcsHandler(f,d){return this.registerDcsHandler(f,d)}registerEscHandler(f,d){return this._core.registerEscHandler(f,d)}addEscHandler(f,d){return this.registerEscHandler(f,d)}registerOscHandler(f,d){return this._core.registerOscHandler(f,d)}addOscHandler(f,d){return this.registerOscHandler(f,d)}}},7090:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeApi=void 0,u.UnicodeApi=class{constructor(f){this._core=f}register(f){this._core.unicodeService.register(f)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(f){this._core.unicodeService.activeVersion=f}}},744:function(ee,u,f){var d=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const h=f(8460),p=f(844),C=f(5295),A=f(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let S=u.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(l){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(l.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(l.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(l,this))}resize(l,c){this.cols=l,this.rows=c,this.buffers.resize(l,c),this._onResize.fire({cols:l,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(l,c=!1){const a=this.buffer;let o;o=this._cachedBlankLine,o&&o.length===this.cols&&o.getFg(0)===l.fg&&o.getBg(0)===l.bg||(o=a.getBlankLine(l,c),this._cachedBlankLine=o),o.isWrapped=c;const _=a.ybase+a.scrollTop,m=a.ybase+a.scrollBottom;if(a.scrollTop===0){const b=a.lines.isFull;m===a.lines.length-1?b?a.lines.recycle().copyFrom(o):a.lines.push(o.clone()):a.lines.splice(m+1,0,o.clone()),b?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const b=m-_+1;a.lines.shiftElements(_+1,b-1,-1),a.lines.set(m,o.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(l,c,a){const o=this.buffer;if(l<0){if(o.ydisp===0)return;this.isUserScrolling=!0}else l+o.ydisp>=o.ybase&&(this.isUserScrolling=!1);const _=o.ydisp;o.ydisp=Math.max(Math.min(o.ydisp+l,o.ybase),0),_!==o.ydisp&&(c||this._onScroll.fire(o.ydisp))}};u.BufferService=S=d([y(0,A.IOptionsService)],S)},7994:(ee,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(f){this.glevel=f,this.charset=this._charsets[f]}setgCharset(f,d){this._charsets[f]=d,this.glevel===f&&(this.charset=d)}}},1753:function(ee,u,f){var d=this&&this.__decorate||function(o,_,m,b){var D,v=arguments.length,E=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,m):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,_,m,b);else for(var L=o.length-1;L>=0;L--)(D=o[L])&&(E=(v<3?D(E):v>3?D(_,m,E):D(_,m))||E);return v>3&&E&&Object.defineProperty(_,m,E),E},y=this&&this.__param||function(o,_){return function(m,b){_(m,b,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const h=f(2585),p=f(8460),C=f(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 S(o,_){let m=(o.ctrl?16:0)|(o.shift?4:0)|(o.alt?8:0);return o.button===4?(m|=64,m|=o.action):(m|=3&o.button,4&o.button&&(m|=64),8&o.button&&(m|=128),o.action===32?m|=32:o.action!==0||_||(m|=3)),m}const l=String.fromCharCode,c={DEFAULT:o=>{const _=[S(o,!1)+32,o.col+32,o.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${l(_[0])}${l(_[1])}${l(_[2])}`},SGR:o=>{const _=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${S(o,!0)};${o.col};${o.row}${_}`},SGR_PIXELS:o=>{const _=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${S(o,!0)};${o.x};${o.y}${_}`}};let a=u.CoreMouseService=class extends C.Disposable{constructor(o,_){super(),this._bufferService=o,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const m of Object.keys(A))this.addProtocol(m,A[m]);for(const m of Object.keys(c))this.addEncoding(m,c[m]);this.reset()}addProtocol(o,_){this._protocols[o]=_}addEncoding(o,_){this._encodings[o]=_}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 _=this._encodings[this._activeEncoding](o);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!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,_,m){if(m){if(o.x!==_.x||o.y!==_.y)return!1}else if(o.col!==_.col||o.row!==_.row)return!1;return o.button===_.button&&o.action===_.action&&o.ctrl===_.ctrl&&o.alt===_.alt&&o.shift===_.shift}};u.CoreMouseService=a=d([y(0,h.IBufferService),y(1,h.ICoreService)],a)},6975:function(ee,u,f){var d=this&&this.__decorate||function(a,o,_,m){var b,D=arguments.length,v=D<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,_):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,m);else for(var E=a.length-1;E>=0;E--)(b=a[E])&&(v=(D<3?b(v):D>3?b(o,_,v):b(o,_))||v);return D>3&&v&&Object.defineProperty(o,_,v),v},y=this&&this.__param||function(a,o){return function(_,m){o(_,m,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const h=f(1439),p=f(8460),C=f(844),A=f(2585),S=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=u.CoreService=class extends C.Disposable{constructor(a,o,_){super(),this._bufferService=a,this._logService=o,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(S),this.decPrivateModes=(0,h.clone)(l)}reset(){this.modes=(0,h.clone)(S),this.decPrivateModes=(0,h.clone)(l)}triggerDataEvent(a,o=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;o&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),o&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((m=>m.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((o=>o.charCodeAt(0))))),this._onBinary.fire(a))}};u.CoreService=c=d([y(0,A.IBufferService),y(1,A.ILogService),y(2,A.IOptionsService)],c)},9074:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const d=f(8055),y=f(8460),h=f(844),p=f(6106);let C=0,A=0;class S extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((a=>a?.marker.line)),this._onDecorationRegistered=this.register(new y.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new y.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const o=new l(a);if(o){const _=o.marker.onDispose((()=>o.dispose()));o.onDispose((()=>{o&&(this._decorations.delete(o)&&this._onDecorationRemoved.fire(o),_.dispose())})),this._decorations.insert(o),this._onDecorationRegistered.fire(o)}return o}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,o,_){var m,b,D;let v=0,E=0;for(const L of this._decorations.getKeyIterator(o))v=(m=L.options.x)!==null&&m!==void 0?m:0,E=v+((b=L.options.width)!==null&&b!==void 0?b:1),a>=v&&a<E&&(!_||((D=L.options.layer)!==null&&D!==void 0?D:"bottom")===_)&&(yield L)}forEachDecorationAtCell(a,o,_,m){this._decorations.forEachByKey(o,(b=>{var D,v,E;C=(D=b.options.x)!==null&&D!==void 0?D:0,A=C+((v=b.options.width)!==null&&v!==void 0?v:1),a>=C&&a<A&&(!_||((E=b.options.layer)!==null&&E!==void 0?E:"bottom")===_)&&m(b)}))}}u.DecorationService=S;class l extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(a){super(),this.options=a,this.onRenderEmitter=this.register(new y.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new y.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=a.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const d=f(2585),y=f(8343);class h{constructor(...C){this._entries=new Map;for(const[A,S]of C)this.set(A,S)}set(C,A){const S=this._entries.get(C);return this._entries.set(C,A),S}forEach(C){for(const[A,S]of this._entries.entries())C(A,S)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}u.ServiceCollection=h,u.InstantiationService=class{constructor(){this._services=new h,this._services.set(d.IInstantiationService,this)}setService(p,C){this._services.set(p,C)}getService(p){return this._services.get(p)}createInstance(p,...C){const A=(0,y.getServiceDependencies)(p).sort(((c,a)=>c.index-a.index)),S=[];for(const c of A){const a=this._services.get(c.id);if(!a)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${c.id}.`);S.push(a)}const l=A.length>0?A[0].index:C.length;if(C.length!==l)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${l+1} conflicts with ${C.length} static arguments`);return new p(...C,...S)}}},7866:function(ee,u,f){var d=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const h=f(844),p=f(2585),C={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let A,S=u.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),A=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let c=0;c<l.length;c++)typeof l[c]=="function"&&(l[c]=l[c]())}_log(l,c,a){this._evalLazyOptionalParams(a),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...a)}trace(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.TRACE&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.trace.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.log,l,c)}debug(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.debug.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.log,l,c)}info(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.INFO&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.info.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.info,l,c)}warn(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.WARN&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.warn.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.warn,l,c)}error(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.ERROR&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.error.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.error,l,c)}};u.LogService=S=d([y(0,p.IOptionsService)],S),u.setTraceLogger=function(l){A=l},u.traceCall=function(l,c,a){if(typeof a.value!="function")throw new Error("not supported");const o=a.value;a.value=function(..._){if(A.logLevel!==p.LogLevelEnum.TRACE)return o.apply(this,_);A.trace(`GlyphRenderer#${o.name}(${_.map((b=>JSON.stringify(b))).join(", ")})`);const m=o.apply(this,_);return A.trace(`GlyphRenderer#${o.name} return`,m),m}}},7302:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const d=f(8460),y=f(844),h=f(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 p=["normal","bold","100","200","300","400","500","600","700","800","900"];class C extends y.Disposable{constructor(S){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const l=Object.assign({},u.DEFAULT_OPTIONS);for(const c in S)if(c in l)try{const a=S[c];l[c]=this._sanitizeAndValidateOption(c,a)}catch(a){console.error(a)}this.rawOptions=l,this.options=Object.assign({},l),this._setupOptions()}onSpecificOptionChange(S,l){return this.onOptionChange((c=>{c===S&&l(this.rawOptions[S])}))}onMultipleOptionChange(S,l){return this.onOptionChange((c=>{S.indexOf(c)!==-1&&l()}))}_setupOptions(){const S=c=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},l=(c,a)=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);a=this._sanitizeAndValidateOption(c,a),this.rawOptions[c]!==a&&(this.rawOptions[c]=a,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const a={get:S.bind(this,c),set:l.bind(this,c)};Object.defineProperty(this.options,c,a)}}_sanitizeAndValidateOption(S,l){switch(S){case"cursorStyle":if(l||(l=u.DEFAULT_OPTIONS[S]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(l))throw new Error(`"${l}" is not a valid value for ${S}`);break;case"wordSeparator":l||(l=u.DEFAULT_OPTIONS[S]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=p.includes(l)?l:u.DEFAULT_OPTIONS[S];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(`${S} cannot be less than 1, value: ${l}`);break;case"minimumContrastRatio":l=Math.max(1,Math.min(21,Math.round(10*l)/10));break;case"scrollback":if((l=Math.min(l,4294967295))<0)throw new Error(`${S} cannot be less than 0, value: ${l}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(`${S} cannot be less than or equal to 0, value: ${l}`);break;case"rows":case"cols":if(!l&&l!==0)throw new Error(`${S} must be numeric, value: ${l}`);break;case"windowsPty":l=l??{}}return l}}u.OptionsService=C},2660:function(ee,u,f){var d=this&&this.__decorate||function(C,A,S,l){var c,a=arguments.length,o=a<3?A:l===null?l=Object.getOwnPropertyDescriptor(A,S):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(C,A,S,l);else for(var _=C.length-1;_>=0;_--)(c=C[_])&&(o=(a<3?c(o):a>3?c(A,S,o):c(A,S))||o);return a>3&&o&&Object.defineProperty(A,S,o),o},y=this&&this.__param||function(C,A){return function(S,l){A(S,l,C)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const h=f(2585);let p=u.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const A=this._bufferService.buffer;if(C.id===void 0){const _=A.addMarker(A.ybase+A.y),m={data:C,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(m,_))),this._dataByLinkId.set(m.id,m),m.id}const S=C,l=this._getEntryIdKey(S),c=this._entriesWithId.get(l);if(c)return this.addLineToLink(c.id,A.ybase+A.y),c.id;const a=A.addMarker(A.ybase+A.y),o={id:this._nextId++,key:this._getEntryIdKey(S),data:S,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(o,a))),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(C,A){const S=this._dataByLinkId.get(C);if(S&&S.lines.every((l=>l.line!==A))){const l=this._bufferService.buffer.addMarker(A);S.lines.push(l),l.onDispose((()=>this._removeMarkerFromLink(S,l)))}}getLinkData(C){var A;return(A=this._dataByLinkId.get(C))===null||A===void 0?void 0:A.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,A){const S=C.lines.indexOf(A);S!==-1&&(C.lines.splice(S,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};u.OscLinkService=p=d([y(0,h.IBufferService)],p)},8343:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const f="di$target",d="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(y){return y[d]||[]},u.createDecorator=function(y){if(u.serviceRegistry.has(y))return u.serviceRegistry.get(y);const h=function(p,C,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(S,l,c){l[f]===l?l[d].push({id:S,index:c}):(l[d]=[{id:S,index:c}],l[f]=l)})(h,p,A)};return h.toString=()=>y,u.serviceRegistry.set(y,h),h}},2585:(ee,u,f)=>{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=f(8343);var y;u.IBufferService=(0,d.createDecorator)("BufferService"),u.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),u.ICoreService=(0,d.createDecorator)("CoreService"),u.ICharsetService=(0,d.createDecorator)("CharsetService"),u.IInstantiationService=(0,d.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"})(y||(u.LogLevelEnum=y={})),u.ILogService=(0,d.createDecorator)("LogService"),u.IOptionsService=(0,d.createDecorator)("OptionsService"),u.IOscLinkService=(0,d.createDecorator)("OscLinkService"),u.IUnicodeService=(0,d.createDecorator)("UnicodeService"),u.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(ee,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const d=f(8460),y=f(225);u.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const h=new y.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 p=0;const C=h.length;for(let A=0;A<C;++A){let S=h.charCodeAt(A);if(55296<=S&&S<=56319){if(++A>=C)return p+this.wcwidth(S);const l=h.charCodeAt(A);56320<=l&&l<=57343?S=1024*(S-55296)+l-56320+65536:p+=this.wcwidth(l)}p+=this.wcwidth(S)}return p}}}},G={};function oe(ee){var u=G[ee];if(u!==void 0)return u.exports;var f=G[ee]={exports:{}};return ge[ee].call(f.exports,f,f.exports,oe),f.exports}var me={};return(()=>{var ee=me;Object.defineProperty(ee,"__esModule",{value:!0}),ee.Terminal=void 0;const u=oe(9042),f=oe(3236),d=oe(844),y=oe(5741),h=oe(8285),p=oe(7975),C=oe(7090),A=["cols","rows"];class S extends d.Disposable{constructor(c){super(),this._core=this.register(new f.Terminal(c)),this._addonManager=this.register(new y.AddonManager),this._publicOptions=Object.assign({},this._core.options);const a=_=>this._core.options[_],o=(_,m)=>{this._checkReadonlyOptions(_),this._core.options[_]=m};for(const _ in this._core.options){const m={get:a.bind(this,_),set:o.bind(this,_)};Object.defineProperty(this._publicOptions,_,m)}}_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 p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new C.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let a="none";switch(this._core.coreMouseService.activeProtocol){case"X10":a="x10";break;case"VT200":a="vt200";break;case"DRAG":a="drag";break;case"ANY":a="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:a,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const a in c)this._publicOptions[a]=c[a]}blur(){this._core.blur()}focus(){this._core.focus()}resize(c,a){this._verifyIntegers(c,a),this._core.resize(c,a)}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 a,o,_;return this._checkProposedApi(),this._verifyPositiveIntegers((a=c.x)!==null&&a!==void 0?a:0,(o=c.width)!==null&&o!==void 0?o:0,(_=c.height)!==null&&_!==void 0?_:0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,a,o){this._verifyIntegers(c,a,o),this._core.select(c,a,o)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,a){this._verifyIntegers(c,a),this._core.selectLines(c,a)}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,a){this._core.write(c,a)}writeln(c,a){this._core.write(c),this._core.write(`\r
|
|
17
|
-
`,a)}paste(c){this._core.paste(c)}refresh(c,a){this._verifyIntegers(c,a),this._core.refresh(c,a)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return u}_verifyIntegers(...c){for(const a of c)if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const a of c)if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}ee.Terminal=S})(),me})()))})(No)),No.exports}var yv=Sv();function ts(q="req"){return`${q}_${Math.random().toString(36).slice(2,10)}`}function pl(q){return le.jsxs("section",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/72 p-5 shadow-2xl shadow-slate-950/30 backdrop-blur",children:[le.jsx("div",{className:"mb-4 flex items-center justify-between gap-3",children:le.jsx("h2",{className:"text-lg font-semibold text-white",children:q.title})}),q.children]})}function hr(q){return le.jsxs("label",{className:"block",children:[le.jsx("span",{className:"mb-2 block text-sm text-slate-400",children:q.label}),le.jsx("input",{className:"w-full rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-sm outline-none placeholder:text-slate-500 disabled:opacity-50",value:q.value,onChange:ce=>q.onChange(ce.target.value),placeholder:q.placeholder,disabled:q.disabled})]})}function Gf(q){return le.jsx("span",{className:`rounded-full border px-3 py-2 text-xs font-medium ${q.active?"border-emerald-500/50 bg-emerald-500/10 text-emerald-200":"border-rose-500/40 bg-rose-500/10 text-rose-200"}`,children:q.label})}function bv(q){const ce=q.kind==="error"?"border-rose-500/40 bg-rose-500/10 text-rose-100":q.kind==="success"?"border-emerald-500/40 bg-emerald-500/10 text-emerald-100":"border-sky-500/40 bg-sky-500/10 text-sky-100";return le.jsxs("div",{className:`flex items-start justify-between gap-3 rounded-2xl border px-4 py-3 text-sm ${ce}`,children:[le.jsx("p",{children:q.text}),le.jsx("button",{className:"rounded-full border border-current/30 px-3 py-1 text-xs",type:"button",onClick:q.onDismiss,children:"关闭"})]})}function Cv(q){const ce=q.connectionPhase==="connected";return le.jsx(pl,{title:"连接",children:le.jsxs("div",{className:"space-y-3",children:[le.jsx(hr,{label:"WebSocket 地址",value:q.wsUrl,onChange:q.onWsUrlChange}),le.jsx(hr,{label:"访问令牌",value:q.clientToken,onChange:q.onClientTokenChange,placeholder:"首次配对后会自动写入"}),le.jsx(hr,{label:"设备 ID",value:q.deviceId,onChange:q.onDeviceIdChange,disabled:!q.deviceIdEditable}),le.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-950/40 p-3",children:[le.jsx("p",{className:"text-sm font-medium text-white",children:"设备配对"}),le.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"电脑上执行 `termpilot pair` 获取一次性配对码,手机输入后会自动换取设备访问令牌。"}),le.jsxs("div",{className:"mt-3 flex gap-3",children:[le.jsx("input",{className:"flex-1 rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-sm uppercase outline-none placeholder:text-slate-500",value:q.pairingCode,onChange:ge=>q.onPairingCodeChange(ge.target.value),placeholder:"ABC-234"}),le.jsx("button",{className:"rounded-full bg-emerald-400 px-4 py-3 text-sm font-medium text-slate-950 disabled:opacity-60",type:"button",disabled:q.pairingPending||!q.wsUrlValid,onClick:q.onRedeemPairingCode,children:q.pairingPending?"配对中":"配对"})]}),q.pairingMessage?le.jsx("p",{className:"mt-2 text-xs text-slate-400",children:q.pairingMessage}):null]}),le.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[minmax(0,1fr)_auto_auto]",children:[le.jsx("button",{className:"w-full rounded-full bg-sky-500 px-4 py-2.5 text-sm font-medium text-slate-950 disabled:opacity-60",disabled:q.connectionPhase==="connecting"||!q.wsUrlValid,onClick:q.onConnect,children:ce?"重新连接":q.connectionPhase==="connecting"?"连接中":"连接"}),le.jsx("button",{className:"w-full rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200 disabled:opacity-40",disabled:!ce,onClick:q.onRefresh,children:"刷新"}),le.jsx("button",{className:"w-full rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200 disabled:opacity-40",disabled:q.connectionPhase==="idle",onClick:q.onDisconnect,children:"断开"})]}),le.jsx("button",{className:"w-full rounded-full border border-rose-500/40 px-4 py-2.5 text-sm text-rose-200",type:"button",onClick:q.onClearBinding,children:"清除本机绑定"}),le.jsx("button",{className:"w-full rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200",type:"button",onClick:q.onToggleNotifications,children:q.notificationsEnabled?"关闭浏览器提醒":"开启浏览器提醒"}),le.jsx("p",{className:"text-xs text-slate-500",children:"断线后会自动重连。连接参数、访问令牌和最近查看的会话会保存在本机浏览器里。"})]})})}function Ev(q){return le.jsx(pl,{title:"创建会话",children:le.jsxs("form",{className:"space-y-3",onSubmit:q.onSubmit,children:[le.jsx(hr,{label:"名称",value:q.createName,onChange:q.onCreateNameChange,placeholder:"claude-main",disabled:!q.canControl}),le.jsx(hr,{label:"工作目录",value:q.createCwd,onChange:q.onCreateCwdChange,placeholder:"/Users/...",disabled:!q.canControl}),le.jsx(hr,{label:"Shell",value:q.createShell,onChange:q.onCreateShellChange,placeholder:"/bin/zsh",disabled:!q.canControl}),le.jsx("button",{className:"w-full rounded-full bg-emerald-400 px-4 py-2.5 text-sm font-medium text-slate-950 disabled:opacity-60",type:"submit",disabled:!q.canControl,children:"创建"})]})})}const wv=[{value:"all",label:"全部"},{value:"running",label:"运行中"},{value:"exited",label:"已退出"}];function Dv(q){return le.jsx(pl,{title:"会话列表",children:le.jsxs("div",{className:"space-y-3",children:[le.jsx("input",{className:"w-full rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-sm outline-none placeholder:text-slate-500",value:q.sessionQuery,onChange:ce=>q.onSessionQueryChange(ce.target.value),placeholder:"搜索会话名称或目录"}),le.jsx("div",{className:"flex flex-wrap gap-2",children:wv.map(ce=>le.jsx("button",{className:`min-h-11 rounded-full px-3 py-2 text-sm ${q.statusFilter===ce.value?"bg-sky-500 text-slate-950":"border border-slate-700 text-slate-200"}`,type:"button",onClick:()=>q.onStatusFilterChange(ce.value),children:ce.label},ce.value))}),le.jsxs("p",{className:"text-xs text-slate-500",children:["当前显示 ",q.filteredSessions.length," / ",q.sessions.length," 个会话。置顶会话会始终排在最前面。"]}),q.filteredSessions.length===0?le.jsx("p",{className:"text-sm text-slate-400",children:q.sessions.length===0?"当前没有会话。":"没有匹配当前搜索或筛选条件的会话。"}):q.filteredSessions.map(ce=>le.jsxs("div",{"data-session-name":ce.name,className:`w-full rounded-2xl border px-4 py-3 text-left transition ${ce.sid===q.activeSid?"border-sky-400/70 bg-sky-500/10":"border-slate-800 bg-slate-950/40"}`,children:[le.jsxs("div",{className:"flex items-start justify-between gap-3",children:[le.jsxs("div",{children:[le.jsx("p",{className:"font-medium text-white",children:ce.name}),le.jsx("p",{className:"mt-1 text-xs text-slate-400",children:ce.cwd})]}),le.jsx("span",{className:`rounded-full px-2.5 py-1 text-[11px] ${ce.status==="running"?"bg-emerald-500/15 text-emerald-300":"bg-slate-700 text-slate-300"}`,children:ce.status==="running"?"运行中":"已退出"})]}),le.jsxs("div",{className:"mt-3 flex gap-2",children:[le.jsx("button",{className:`rounded-full border px-3 py-1.5 text-xs ${q.pinnedSids.includes(ce.sid)?"border-amber-400/50 text-amber-200":"border-slate-700 text-slate-200"}`,type:"button",onClick:()=>q.onTogglePinnedSession(ce.sid),children:q.pinnedSids.includes(ce.sid)?"取消置顶":"置顶"}),le.jsx("button",{className:"rounded-full border border-slate-700 px-3 py-1.5 text-xs text-slate-200",type:"button",onClick:()=>q.onSelectSession(ce.sid),children:"查看"}),le.jsx("button",{className:"rounded-full border border-rose-500/40 px-3 py-1.5 text-xs text-rose-200 disabled:opacity-40",type:"button",disabled:ce.status!=="running"||!q.canControl,onClick:()=>q.onKillSession(ce.sid),children:"关闭"})]})]},ce.sid))]})})}function Av(q){return le.jsx(pl,{title:q.activeSession?`${q.activeSession.name} · ${q.activeSession.status==="running"?"运行中":"已退出"}`:"当前未选择会话",children:q.activeSession?le.jsxs("div",{className:"flex h-full min-h-[68vh] flex-col gap-4",children:[le.jsx("div",{className:"flex flex-wrap gap-2 md:sticky md:top-0 md:z-10 md:bg-slate-900/72 md:pb-2",children:q.shortcutKeys.map(({key:ce,label:ge})=>le.jsx("button",{className:"min-h-11 rounded-full border border-slate-700 px-3 py-2 text-sm text-slate-200 disabled:opacity-40",disabled:!q.activeSid||!q.canControl,onClick:()=>q.onSendKey(ce),children:ge},ce))}),le.jsx("div",{className:"min-h-[440px] flex-1 overflow-hidden rounded-3xl border border-slate-800 bg-slate-950/95 p-3",children:le.jsx("div",{ref:q.terminalRef,className:"h-full w-full overflow-hidden"})}),le.jsxs("form",{className:"flex flex-col gap-3 md:flex-row",onSubmit:q.onSubmitCommand,children:[le.jsx("input",{className:"flex-1 rounded-full border border-slate-700 bg-slate-950/60 px-4 py-3 text-sm outline-none ring-0 placeholder:text-slate-500 disabled:opacity-50",value:q.command,onChange:ce=>q.onCommandChange(ce.target.value),placeholder:"输入命令,发送时会自动追加回车",disabled:!q.activeSid||!q.canControl}),le.jsx("button",{className:"rounded-full bg-sky-500 px-5 py-3 text-sm font-medium text-slate-950 disabled:opacity-60",type:"submit",disabled:!q.activeSid||!q.canControl,children:"发送"})]}),le.jsxs("div",{className:"rounded-3xl border border-slate-800 bg-slate-950/35 p-4",children:[le.jsxs("div",{className:"flex items-center justify-between gap-3",children:[le.jsx("p",{className:"text-sm font-medium text-white",children:"粘贴大段命令"}),le.jsx("span",{className:"text-xs text-slate-500",children:"适合脚本、多行命令和长 prompt"})]}),le.jsx("textarea",{className:"mt-3 min-h-32 w-full rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-sm outline-none placeholder:text-slate-500 disabled:opacity-50",value:q.pasteBuffer,onChange:ce=>q.onPasteBufferChange(ce.target.value),placeholder:"在这里粘贴多行内容。原样发送不会自动补回车;发送并回车会在末尾补一个回车。",disabled:!q.activeSid||!q.canControl}),le.jsxs("div",{className:"mt-3 flex flex-col gap-3 sm:flex-row",children:[le.jsx("button",{className:"min-h-11 flex-1 rounded-full border border-slate-700 px-4 py-3 text-sm text-slate-200 disabled:opacity-40",type:"button",disabled:!q.activeSid||!q.canControl||!q.pasteBuffer,onClick:()=>q.onSendPaste("raw"),children:"原样发送"}),le.jsx("button",{className:"min-h-11 flex-1 rounded-full bg-emerald-400 px-4 py-3 text-sm font-medium text-slate-950 disabled:opacity-40",type:"button",disabled:!q.activeSid||!q.canControl||!q.pasteBuffer,onClick:()=>q.onSendPaste("line"),children:"发送并回车"})]})]}),le.jsx("p",{className:"text-xs text-slate-500",children:"当前模式是浏览器直开 PWA。适合查看流式输出、补命令和关闭会话,不适合重度长文本输入。"})]}):le.jsxs("div",{className:"flex min-h-[56vh] flex-col items-center justify-center rounded-3xl border border-dashed border-slate-700 bg-slate-950/35 px-6 py-12 text-center",children:[le.jsx("p",{className:"text-sm font-semibold text-white",children:"先选择一个会话"}),le.jsx("p",{className:"mt-2 max-w-md text-sm text-slate-400",children:"你可以在左侧查看已有会话,或者先创建一个新的 tmux 会话。选中之后这里才会显示终端输出和输入控件。"})]})})}const xv=[{key:"enter",label:"Enter"},{key:"tab",label:"Tab"},{key:"ctrl_c",label:"Ctrl+C"},{key:"ctrl_d",label:"Ctrl+D"},{key:"escape",label:"Esc"},{key:"arrow_up",label:"↑"},{key:"arrow_down",label:"↓"},{key:"arrow_left",label:"←"},{key:"arrow_right",label:"→"}],Tv="ws://127.0.0.1:8787/ws",Rv="",Cs="pc-main",Xf="termpilot-app-state";function Mv(){if(typeof window>"u")return Tv;const q=window.location.protocol==="https:"?"wss:":"ws:";return window.location.port==="5173"?`${q}//${window.location.hostname}:8787/ws`:`${q}//${window.location.host}/ws`}function Lv(q){const ce=new URL(q);return ce.protocol=ce.protocol==="wss:"?"https:":"http:",ce.pathname="",ce.search="",ce.hash="",ce.toString().replace(/\/$/,"")}function Ov(q){try{return new URL(q)}catch{return null}}function Bv(){const q=pe.useRef(null),ce=pe.useRef(null),ge=pe.useRef(null),G=pe.useRef(null),oe=pe.useRef(null),me=pe.useRef(null),ee=pe.useRef(null),u=pe.useRef(!1),f=pe.useRef(0),d=pe.useRef(Cs),y=pe.useRef(Cs),h=pe.useRef(!1),p=pe.useRef({}),C=pe.useRef(!1),[A,S]=pe.useState(Mv),[l,c]=pe.useState(Rv),[a,o]=pe.useState(Cs),[_,m]=pe.useState(!1),[b,D]=pe.useState("idle"),[v,E]=pe.useState(!1),[L,z]=pe.useState([]),[O,U]=pe.useState({}),[V,J]=pe.useState(null),[k,I]=pe.useState([]),[x,M]=pe.useState(""),[B,w]=pe.useState("all"),[N,Q]=pe.useState(""),[se,ne]=pe.useState(""),[fe,T]=pe.useState(!1),[K,Z]=pe.useState(!1),[te,ye]=pe.useState(null),[ae,Re]=pe.useState(""),[He,$e]=pe.useState(""),[Lt,Ce]=pe.useState(""),[Wt,ai]=pe.useState(""),[ii,oi]=pe.useState(""),Ri=pe.useMemo(()=>L.find(ue=>ue.sid===V)??null,[V,L]),We=b==="connected",Ne=We&&v,ot=pe.useMemo(()=>Ov(A),[A]),Zt=pe.useMemo(()=>ot?Lv(ot.toString()):null,[ot]),Mi=pe.useMemo(()=>{const ue=x.trim().toLowerCase();return L.filter(_e=>B!=="all"&&_e.status!==B?!1:ue?_e.name.toLowerCase().includes(ue)||_e.cwd.toLowerCase().includes(ue):!0).sort((_e,Me)=>{const Ue=k.includes(_e.sid),ss=k.includes(Me.sid);return Ue!==ss?Ue?-1:1:Me.startedAt.localeCompare(_e.startedAt)})},[k,x,L,B]);pe.useEffect(()=>{d.current=a},[a]),pe.useEffect(()=>{const ue=a.trim()||Cs;if(!We){y.current=ue;return}if(y.current===ue)return;y.current=ue,E(!1),z([]),U({}),J(null);const _e=window.setTimeout(()=>{jt(ue)},200);return()=>{window.clearTimeout(_e)}},[We,a]),pe.useEffect(()=>{try{const ue=window.localStorage.getItem(Xf);if(!ue)return;const _e=JSON.parse(ue);_e.wsUrl&&S(_e.wsUrl),_e.clientToken&&c(_e.clientToken),typeof _e.deviceId=="string"&&_e.deviceId.trim()&&o(_e.deviceId.trim()),(typeof _e.activeSid=="string"||_e.activeSid===null)&&J(_e.activeSid??null),Array.isArray(_e.pinnedSids)&&I(_e.pinnedSids.filter(Me=>typeof Me=="string")),typeof _e.notificationsEnabled=="boolean"&&Z(_e.notificationsEnabled)}catch{}},[]),pe.useEffect(()=>{const ue={wsUrl:A,clientToken:l,deviceId:a,activeSid:V,pinnedSids:k,notificationsEnabled:K};window.localStorage.setItem(Xf,JSON.stringify(ue))},[V,l,a,K,k,A]),pe.useEffect(()=>{if(!q.current||ge.current)return;let ue=null,_e=0,Me=0;return _e=window.requestAnimationFrame(()=>{if(!q.current)return;ue=new yv.Terminal({convertEol:!0,cursorBlink:!0,fontFamily:'"SF Mono", "JetBrains Mono", Menlo, monospace',fontSize:13,theme:{background:"#020617",foreground:"#e2e8f0",cursor:"#38bdf8",black:"#0f172a",brightBlack:"#334155"}});const Ue=new pv.FitAddon;ue.loadAddon(Ue),ue.open(q.current),ge.current=ue,G.current=Ue,Me=window.requestAnimationFrame(()=>{pt()})}),()=>{window.cancelAnimationFrame(_e),window.cancelAnimationFrame(Me),ue?.dispose(),ge.current=null,G.current=null}},[]),pe.useEffect(()=>{if(!q.current||!G.current)return;const ue=()=>{!ge.current||!pt()||!Ne||!V||ge.current.cols===0||ge.current.rows===0||it({type:"session.resize",reqId:ts("resize"),deviceId:a,sid:V,payload:{cols:ge.current.cols,rows:ge.current.rows}})},_e=new ResizeObserver(()=>ue());return _e.observe(q.current),ue(),()=>{_e.disconnect()}},[V,Ne,a]),pe.useEffect(()=>{ge.current&&(ge.current.clear(),ge.current.write((O[V??""]??"").replace(/\n/g,`\r
|
|
18
|
-
`)))},[V,O]),
|
|
19
|
-
`}}),
|
|
20
|
-
`:
|
|
15
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(v){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&v&&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(v){const E=this._getMouseBufferCoords(v),L=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!!(L&&z&&E)&&this._areCoordsInSelection(E,L,z)}isCellInSelection(v,E){const L=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!(!L||!z)&&this._areCoordsInSelection([v,E],L,z)}_areCoordsInSelection(v,E,L){return v[1]>E[1]&&v[1]<L[1]||E[1]===L[1]&&v[1]===E[1]&&v[0]>=E[0]&&v[0]<L[0]||E[1]<L[1]&&v[1]===L[1]&&v[0]<L[0]||E[1]<L[1]&&v[1]===E[1]&&v[0]>=E[0]}_selectWordAtCursor(v,E){var L,z;const O=(z=(L=this._linkifier.currentLink)===null||L===void 0?void 0:L.link)===null||z===void 0?void 0:z.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const U=this._getMouseBufferCoords(v);return!!U&&(this._selectWordAt(U,E),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(v,E){this._model.clearSelection(),v=Math.max(v,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()}_handleTrim(v){this._model.handleTrim(v)&&this.refresh()}_getMouseBufferCoords(v){const E=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E}_getMouseEventScrollAmount(v){let E=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,v,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return E>=0&&E<=L?0:(E>L&&(E-=L),E=Math.min(Math.max(E,-50),50),E/=50,E/Math.abs(E)+Math.round(14*E))}shouldForceSelection(v){return c.isMac?v.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:v.shiftKey}handleMouseDown(v){if(this._mouseDownTimeStamp=v.timeStamp,(v.button!==2||!this.hasSelection)&&v.button===0){if(!this._enabled){if(!this.shouldForceSelection(v))return;v.stopPropagation()}v.preventDefault(),this._dragScrollAmount=0,this._enabled&&v.shiftKey?this._handleIncrementalClick(v):v.detail===1?this._handleSingleClick(v):v.detail===2?this._handleDoubleClick(v):v.detail===3&&this._handleTripleClick(v),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(v){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(v))}_handleSingleClick(v){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(v)?3:0,this._model.selectionStart=this._getMouseBufferCoords(v),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(v){this._selectWordAtCursor(v,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(v){const E=this._getMouseBufferCoords(v);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))}shouldColumnSelect(v){return v.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(v){if(v.stopImmediatePropagation(),!this._model.selectionStart)return;const E=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(v),!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(v),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const z=L.lines.get(this._model.selectionEnd[1]);z&&z.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}E&&E[0]===this._model.selectionEnd[0]&&E[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const v=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(v.ydisp+this._bufferService.rows,v.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=v.ydisp),this.refresh()}}_handleMouseUp(v){const E=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&E<500&&v.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const z=(0,p.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(z,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const v=this._model.finalSelectionStart,E=this._model.finalSelectionEnd,L=!(!v||!E||v[0]===E[0]&&v[1]===E[1]);L?v&&E&&(this._oldSelectionStart&&this._oldSelectionEnd&&v[0]===this._oldSelectionStart[0]&&v[1]===this._oldSelectionStart[1]&&E[0]===this._oldSelectionEnd[0]&&E[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(v,E,L)):this._oldHasSelection&&this._fireOnSelectionChange(v,E,L)}_fireOnSelectionChange(v,E,L){this._oldSelectionStart=v,this._oldSelectionEnd=E,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(v){this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim((E=>this._handleTrim(E)))}_convertViewportColToCharacterIndex(v,E){let L=E;for(let z=0;E>=z;z++){const O=v.loadCell(z,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:O>1&&E!==z&&(L+=O-1)}return L}setSelection(v,E,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,E],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(v){this._isClickInSelection(v)||(this._selectWordAtCursor(v,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(v,E,L=!0,z=!0){if(v[0]>=this._bufferService.cols)return;const O=this._bufferService.buffer,U=O.lines.get(v[1]);if(!U)return;const V=O.translateBufferLineToString(v[1],!1);let J=this._convertViewportColToCharacterIndex(U,v[0]),k=J;const I=v[0]-J;let A=0,M=0,B=0,w=0;if(V.charAt(J)===" "){for(;J>0&&V.charAt(J-1)===" ";)J--;for(;k<V.length&&V.charAt(k+1)===" ";)k++}else{let ie=v[0],le=v[0];U.getWidth(ie)===0&&(A++,ie--),U.getWidth(le)===2&&(M++,le++);const he=U.getString(le).length;for(he>1&&(w+=he-1,k+=he-1);ie>0&&J>0&&!this._isCharWordSeparator(U.loadCell(ie-1,this._workCell));){U.loadCell(ie-1,this._workCell);const T=this._workCell.getChars().length;this._workCell.getWidth()===0?(A++,ie--):T>1&&(B+=T-1,J-=T-1),J--,ie--}for(;le<U.length&&k+1<V.length&&!this._isCharWordSeparator(U.loadCell(le+1,this._workCell));){U.loadCell(le+1,this._workCell);const T=this._workCell.getChars().length;this._workCell.getWidth()===2?(M++,le++):T>1&&(w+=T-1,k+=T-1),k++,le++}}k++;let N=J+I-A+B,Q=Math.min(this._bufferService.cols,k-J+A+M-B-w);if(E||V.slice(J,k).trim()!==""){if(L&&N===0&&U.getCodePoint(0)!==32){const ie=O.lines.get(v[1]-1);if(ie&&U.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const le=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(le){const he=this._bufferService.cols-le.start;N-=he,Q+=he}}}if(z&&N+Q===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const ie=O.lines.get(v[1]+1);if(ie?.isWrapped&&ie.getCodePoint(0)!==32){const le=this._getWordAt([0,v[1]+1],!1,!1,!0);le&&(Q+=le.length)}}return{start:N,length:Q}}}_selectWordAt(v,E){const L=this._getWordAt(v,E);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[L.start,v[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(v){const E=this._getWordAt(v,!0);if(E){let L=v[1];for(;E.start<0;)E.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,L]}}_isCharWordSeparator(v){return v.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(v.getChars())>=0}_selectLineAt(v){const E=this._bufferService.buffer.getWrappedRangeForLine(v),L={start:{x:0,y:E.first},end:{x:this._bufferService.cols-1,y:E.last}};this._model.selectionStart=[0,E.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(L,this._bufferService.cols)}};u.SelectionService=D=f([y(3,_.IBufferService),y(4,_.ICoreService),y(5,x.IMouseService),y(6,_.IOptionsService),y(7,x.IRenderService),y(8,x.ICoreBrowserService)],D)},4725:(ee,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 f=d(8343);u.ICharSizeService=(0,f.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),u.IMouseService=(0,f.createDecorator)("MouseService"),u.IRenderService=(0,f.createDecorator)("RenderService"),u.ISelectionService=(0,f.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,f.createDecorator)("ThemeService")},6731:function(ee,u,d){var f=this&&this.__decorate||function(D,v,E,L){var z,O=arguments.length,U=O<3?v:L===null?L=Object.getOwnPropertyDescriptor(v,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(D,v,E,L);else for(var V=D.length-1;V>=0;V--)(z=D[V])&&(U=(O<3?z(U):O>3?z(v,E,U):z(v,E))||U);return O>3&&U&&Object.defineProperty(v,E,U),U},y=this&&this.__param||function(D,v){return function(E,L){v(E,L,D)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=d(7239),p=d(8055),C=d(8460),x=d(844),S=d(2585),l=p.css.toColor("#ffffff"),c=p.css.toColor("#000000"),a=p.css.toColor("#ffffff"),o=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const D=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],v=[0,95,135,175,215,255];for(let E=0;E<216;E++){const L=v[E/36%6|0],z=v[E/6%6|0],O=v[E%6];D.push({css:p.channels.toCss(L,z,O),rgba:p.channels.toRgba(L,z,O)})}for(let E=0;E<24;E++){const L=8+10*E;D.push({css:p.channels.toCss(L,L,L),rgba:p.channels.toRgba(L,L,L)})}return D})());let m=u.ThemeService=class extends x.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 C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:c,cursor:a,cursorAccent:o,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(c,_),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 v=this._colors;if(v.foreground=b(D.foreground,l),v.background=b(D.background,c),v.cursor=b(D.cursor,a),v.cursorAccent=b(D.cursorAccent,o),v.selectionBackgroundTransparent=b(D.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=b(D.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=D.selectionForeground?b(D.selectionForeground,p.NULL_COLOR):void 0,v.selectionForeground===p.NULL_COLOR&&(v.selectionForeground=void 0),p.color.isOpaque(v.selectionBackgroundTransparent)&&(v.selectionBackgroundTransparent=p.color.opacity(v.selectionBackgroundTransparent,.3)),p.color.isOpaque(v.selectionInactiveBackgroundTransparent)&&(v.selectionInactiveBackgroundTransparent=p.color.opacity(v.selectionInactiveBackgroundTransparent,.3)),v.ansi=u.DEFAULT_ANSI_COLORS.slice(),v.ansi[0]=b(D.black,u.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=b(D.red,u.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=b(D.green,u.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=b(D.yellow,u.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=b(D.blue,u.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=b(D.magenta,u.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=b(D.cyan,u.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=b(D.white,u.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=b(D.brightBlack,u.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=b(D.brightRed,u.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=b(D.brightGreen,u.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=b(D.brightYellow,u.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=b(D.brightBlue,u.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=b(D.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=b(D.brightCyan,u.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=b(D.brightWhite,u.DEFAULT_ANSI_COLORS[15]),D.extendedAnsi){const E=Math.min(v.ansi.length-16,D.extendedAnsi.length);for(let L=0;L<E;L++)v.ansi[L+16]=b(D.extendedAnsi[L],u.DEFAULT_ANSI_COLORS[L+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 v=0;v<this._restoreColors.ansi.length;++v)this._colors.ansi[v]=this._restoreColors.ansi[v]}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 b(D,v){if(D!==void 0)try{return p.css.toColor(D)}catch{}return v}u.ThemeService=m=f([y(0,S.IOptionsService)],m)},6349:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const f=d(8460),y=d(844);class h extends y.Disposable{constructor(C){super(),this._maxLength=C,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(C){if(this._maxLength===C)return;const x=new Array(C);for(let S=0;S<Math.min(C,this.length);S++)x[S]=this._array[this._getCyclicIndex(S)];this._array=x,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let x=this._length;x<C;x++)this._array[x]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,x){this._array[this._getCyclicIndex(C)]=x}push(C){this._array[this._getCyclicIndex(this._length)]=C,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(C,x,...S){if(x){for(let l=C;l<this._length-x;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+x)];this._length-=x,this.onDeleteEmitter.fire({index:C,amount:x})}for(let l=this._length-1;l>=C;l--)this._array[this._getCyclicIndex(l+S.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<S.length;l++)this._array[this._getCyclicIndex(C+l)]=S[l];if(S.length&&this.onInsertEmitter.fire({index:C,amount:S.length}),this._length+S.length>this._maxLength){const l=this._length+S.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=S.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,x,S){if(!(x<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+S<0)throw new Error("Cannot shift elements in list beyond index 0");if(S>0){for(let c=x-1;c>=0;c--)this.set(C+c+S,this.get(C+c));const l=C+x+S-this._length;if(l>0)for(this._length+=l;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let l=0;l<x;l++)this.set(C+l+S,this.get(C+l))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}u.CircularList=h},1439:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function d(f,y=5){if(typeof f!="object")return f;const h=Array.isArray(f)?[]:{};for(const p in f)h[p]=y<=1?f[p]:f[p]&&d(f[p],y-1);return h}},8055:(ee,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 f=d(6114);let y=0,h=0,p=0,C=0;var x,S,l,c,a;function o(m){const b=m.toString(16);return b.length<2?"0"+b:b}function _(m,b){return m<b?(b+.05)/(m+.05):(m+.05)/(b+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(m){m.toCss=function(b,D,v,E){return E!==void 0?`#${o(b)}${o(D)}${o(v)}${o(E)}`:`#${o(b)}${o(D)}${o(v)}`},m.toRgba=function(b,D,v,E=255){return(b<<24|D<<16|v<<8|E)>>>0}})(x||(u.channels=x={})),(function(m){function b(D,v){return C=Math.round(255*v),[y,h,p]=a.toChannels(D.rgba),{css:x.toCss(y,h,p,C),rgba:x.toRgba(y,h,p,C)}}m.blend=function(D,v){if(C=(255&v.rgba)/255,C===1)return{css:v.css,rgba:v.rgba};const E=v.rgba>>24&255,L=v.rgba>>16&255,z=v.rgba>>8&255,O=D.rgba>>24&255,U=D.rgba>>16&255,V=D.rgba>>8&255;return y=O+Math.round((E-O)*C),h=U+Math.round((L-U)*C),p=V+Math.round((z-V)*C),{css:x.toCss(y,h,p),rgba:x.toRgba(y,h,p)}},m.isOpaque=function(D){return(255&D.rgba)==255},m.ensureContrastRatio=function(D,v,E){const L=a.ensureContrastRatio(D.rgba,v.rgba,E);if(L)return a.toColor(L>>24&255,L>>16&255,L>>8&255)},m.opaque=function(D){const v=(255|D.rgba)>>>0;return[y,h,p]=a.toChannels(v),{css:x.toCss(y,h,p),rgba:v}},m.opacity=b,m.multiplyOpacity=function(D,v){return C=255&D.rgba,b(D,C*v/255)},m.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(S||(u.color=S={})),(function(m){let b,D;if(!f.isNode){const v=document.createElement("canvas");v.width=1,v.height=1;const E=v.getContext("2d",{willReadFrequently:!0});E&&(b=E,b.globalCompositeOperation="copy",D=b.createLinearGradient(0,0,1,1))}m.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return y=parseInt(v.slice(1,2).repeat(2),16),h=parseInt(v.slice(2,3).repeat(2),16),p=parseInt(v.slice(3,4).repeat(2),16),a.toColor(y,h,p);case 5:return y=parseInt(v.slice(1,2).repeat(2),16),h=parseInt(v.slice(2,3).repeat(2),16),p=parseInt(v.slice(3,4).repeat(2),16),C=parseInt(v.slice(4,5).repeat(2),16),a.toColor(y,h,p,C);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const E=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return y=parseInt(E[1]),h=parseInt(E[2]),p=parseInt(E[3]),C=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),a.toColor(y,h,p,C);if(!b||!D)throw new Error("css.toColor: Unsupported css format");if(b.fillStyle=D,b.fillStyle=v,typeof b.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(b.fillRect(0,0,1,1),[y,h,p,C]=b.getImageData(0,0,1,1).data,C!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:x.toRgba(y,h,p,C),css:v}}})(l||(u.css=l={})),(function(m){function b(D,v,E){const L=D/255,z=v/255,O=E/255;return .2126*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.7152*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}m.relativeLuminance=function(D){return b(D>>16&255,D>>8&255,255&D)},m.relativeLuminance2=b})(c||(u.rgb=c={})),(function(m){function b(v,E,L){const z=v>>24&255,O=v>>16&255,U=v>>8&255;let V=E>>24&255,J=E>>16&255,k=E>>8&255,I=_(c.relativeLuminance2(V,J,k),c.relativeLuminance2(z,O,U));for(;I<L&&(V>0||J>0||k>0);)V-=Math.max(0,Math.ceil(.1*V)),J-=Math.max(0,Math.ceil(.1*J)),k-=Math.max(0,Math.ceil(.1*k)),I=_(c.relativeLuminance2(V,J,k),c.relativeLuminance2(z,O,U));return(V<<24|J<<16|k<<8|255)>>>0}function D(v,E,L){const z=v>>24&255,O=v>>16&255,U=v>>8&255;let V=E>>24&255,J=E>>16&255,k=E>>8&255,I=_(c.relativeLuminance2(V,J,k),c.relativeLuminance2(z,O,U));for(;I<L&&(V<255||J<255||k<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),J=Math.min(255,J+Math.ceil(.1*(255-J))),k=Math.min(255,k+Math.ceil(.1*(255-k))),I=_(c.relativeLuminance2(V,J,k),c.relativeLuminance2(z,O,U));return(V<<24|J<<16|k<<8|255)>>>0}m.ensureContrastRatio=function(v,E,L){const z=c.relativeLuminance(v>>8),O=c.relativeLuminance(E>>8);if(_(z,O)<L){if(O<z){const J=b(v,E,L),k=_(z,c.relativeLuminance(J>>8));if(k<L){const I=D(v,E,L);return k>_(z,c.relativeLuminance(I>>8))?J:I}return J}const U=D(v,E,L),V=_(z,c.relativeLuminance(U>>8));if(V<L){const J=b(v,E,L);return V>_(z,c.relativeLuminance(J>>8))?U:J}return U}},m.reduceLuminance=b,m.increaseLuminance=D,m.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]},m.toColor=function(v,E,L,z){return{css:x.toCss(v,E,L,z),rgba:x.toRgba(v,E,L,z)}}})(a||(u.rgba=a={})),u.toPaddedHex=o,u.contrastRatio=_},8969:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const f=d(844),y=d(2585),h=d(4348),p=d(7866),C=d(744),x=d(7302),S=d(6975),l=d(8460),c=d(1753),a=d(1480),o=d(7994),_=d(9282),m=d(5435),b=d(5981),D=d(2660);let v=!1;class E extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event((z=>{var O;(O=this._onScrollApi)===null||O===void 0||O.fire(z.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(z){for(const O in z)this.optionsService.options[O]=z[O]}constructor(z){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new l.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new x.OptionsService(z)),this._instantiationService.setService(y.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(y.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(y.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(S.CoreService)),this._instantiationService.setService(y.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(y.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(y.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(o.CharsetService),this._instantiationService.setService(y.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(D.OscLinkService),this._instantiationService.setService(y.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new m.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,l.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,l.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,l.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,l.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((O=>{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((O=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new b.WriteBuffer(((O,U)=>this._inputHandler.parse(O,U)))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(z,O){this._writeBuffer.write(z,O)}writeSync(z,O){this._logService.logLevel<=y.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(z,O)}resize(z,O){isNaN(z)||isNaN(O)||(z=Math.max(z,C.MINIMUM_COLS),O=Math.max(O,C.MINIMUM_ROWS),this._bufferService.resize(z,O))}scroll(z,O=!1){this._bufferService.scroll(z,O)}scrollLines(z,O,U){this._bufferService.scrollLines(z,O,U)}scrollPages(z){this.scrollLines(z*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(z){const O=z-this._bufferService.buffer.ydisp;O!==0&&this.scrollLines(O)}registerEscHandler(z,O){return this._inputHandler.registerEscHandler(z,O)}registerDcsHandler(z,O){return this._inputHandler.registerDcsHandler(z,O)}registerCsiHandler(z,O){return this._inputHandler.registerCsiHandler(z,O)}registerOscHandler(z,O){return this._inputHandler.registerOscHandler(z,O)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let z=!1;const O=this.optionsService.rawOptions.windowsPty;O&&O.buildNumber!==void 0&&O.buildNumber!==void 0?z=O.backend==="conpty"&&O.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(z=!0),z?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const z=[];z.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),z.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const O of z)O.dispose()}))}}}u.CoreTerminal=E},8460:(ee,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 f=0;f<this._listeners.length;f++)if(this._listeners[f]===d)return void this._listeners.splice(f,1)}}})),this._event}fire(d,f){const y=[];for(let h=0;h<this._listeners.length;h++)y.push(this._listeners[h]);for(let h=0;h<y.length;h++)y[h].call(void 0,d,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(d,f){return d((y=>f.fire(y)))}},5435:function(ee,u,d){var f=this&&this.__decorate||function(I,A,M,B){var w,N=arguments.length,Q=N<3?A:B===null?B=Object.getOwnPropertyDescriptor(A,M):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(I,A,M,B);else for(var ie=I.length-1;ie>=0;ie--)(w=I[ie])&&(Q=(N<3?w(Q):N>3?w(A,M,Q):w(A,M))||Q);return N>3&&Q&&Object.defineProperty(A,M,Q),Q},y=this&&this.__param||function(I,A){return function(M,B){A(M,B,I)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=d(2584),p=d(7116),C=d(2015),x=d(844),S=d(482),l=d(8437),c=d(8460),a=d(643),o=d(511),_=d(3734),m=d(2585),b=d(6242),D=d(6351),v=d(5941),E={"(":0,")":1,"*":2,"+":3,"-":1,".":2},L=131072;function z(I,A){if(I>24)return A.setWinLines||!1;switch(I){case 1:return!!A.restoreWin;case 2:return!!A.minimizeWin;case 3:return!!A.setWinPosition;case 4:return!!A.setWinSizePixels;case 5:return!!A.raiseWin;case 6:return!!A.lowerWin;case 7:return!!A.refreshWin;case 8:return!!A.setWinSizeChars;case 9:return!!A.maximizeWin;case 10:return!!A.fullscreenWin;case 11:return!!A.getWinState;case 13:return!!A.getWinPosition;case 14:return!!A.getWinSizePixels;case 15:return!!A.getScreenSizePixels;case 16:return!!A.getCellSizePixels;case 18:return!!A.getWinSizeChars;case 19:return!!A.getScreenSizeChars;case 20:return!!A.getIconTitle;case 21:return!!A.getWinTitle;case 22:return!!A.pushTitle;case 23:return!!A.popTitle;case 24:return!!A.setWinLines}return!1}var O;(function(I){I[I.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",I[I.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(O||(u.WindowsOptionsReportType=O={}));let U=0;class V extends x.Disposable{getAttrData(){return this._curAttrData}constructor(A,M,B,w,N,Q,ie,le,he=new C.EscapeSequenceParser){super(),this._bufferService=A,this._charsetService=M,this._coreService=B,this._logService=w,this._optionsService=N,this._oscLinkService=Q,this._coreMouseService=ie,this._unicodeService=le,this._parser=he,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new S.StringToUtf32,this._utf8Decoder=new S.Utf8ToUtf32,this._workCell=new o.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.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 J(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((T=>this._activeBuffer=T.activeBuffer))),this._parser.setCsiHandlerFallback(((T,Y)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(T),params:Y.toArray()})})),this._parser.setEscHandlerFallback((T=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(T)})})),this._parser.setExecuteHandlerFallback((T=>{this._logService.debug("Unknown EXECUTE code: ",{code:T})})),this._parser.setOscHandlerFallback(((T,Y,Z)=>{this._logService.debug("Unknown OSC code: ",{identifier:T,action:Y,data:Z})})),this._parser.setDcsHandlerFallback(((T,Y,Z)=>{Y==="HOOK"&&(Z=Z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(T),action:Y,payload:Z})})),this._parser.setPrintHandler(((T,Y,Z)=>this.print(T,Y,Z))),this._parser.registerCsiHandler({final:"@"},(T=>this.insertChars(T))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(T=>this.scrollLeft(T))),this._parser.registerCsiHandler({final:"A"},(T=>this.cursorUp(T))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(T=>this.scrollRight(T))),this._parser.registerCsiHandler({final:"B"},(T=>this.cursorDown(T))),this._parser.registerCsiHandler({final:"C"},(T=>this.cursorForward(T))),this._parser.registerCsiHandler({final:"D"},(T=>this.cursorBackward(T))),this._parser.registerCsiHandler({final:"E"},(T=>this.cursorNextLine(T))),this._parser.registerCsiHandler({final:"F"},(T=>this.cursorPrecedingLine(T))),this._parser.registerCsiHandler({final:"G"},(T=>this.cursorCharAbsolute(T))),this._parser.registerCsiHandler({final:"H"},(T=>this.cursorPosition(T))),this._parser.registerCsiHandler({final:"I"},(T=>this.cursorForwardTab(T))),this._parser.registerCsiHandler({final:"J"},(T=>this.eraseInDisplay(T,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(T=>this.eraseInDisplay(T,!0))),this._parser.registerCsiHandler({final:"K"},(T=>this.eraseInLine(T,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(T=>this.eraseInLine(T,!0))),this._parser.registerCsiHandler({final:"L"},(T=>this.insertLines(T))),this._parser.registerCsiHandler({final:"M"},(T=>this.deleteLines(T))),this._parser.registerCsiHandler({final:"P"},(T=>this.deleteChars(T))),this._parser.registerCsiHandler({final:"S"},(T=>this.scrollUp(T))),this._parser.registerCsiHandler({final:"T"},(T=>this.scrollDown(T))),this._parser.registerCsiHandler({final:"X"},(T=>this.eraseChars(T))),this._parser.registerCsiHandler({final:"Z"},(T=>this.cursorBackwardTab(T))),this._parser.registerCsiHandler({final:"`"},(T=>this.charPosAbsolute(T))),this._parser.registerCsiHandler({final:"a"},(T=>this.hPositionRelative(T))),this._parser.registerCsiHandler({final:"b"},(T=>this.repeatPrecedingCharacter(T))),this._parser.registerCsiHandler({final:"c"},(T=>this.sendDeviceAttributesPrimary(T))),this._parser.registerCsiHandler({prefix:">",final:"c"},(T=>this.sendDeviceAttributesSecondary(T))),this._parser.registerCsiHandler({final:"d"},(T=>this.linePosAbsolute(T))),this._parser.registerCsiHandler({final:"e"},(T=>this.vPositionRelative(T))),this._parser.registerCsiHandler({final:"f"},(T=>this.hVPosition(T))),this._parser.registerCsiHandler({final:"g"},(T=>this.tabClear(T))),this._parser.registerCsiHandler({final:"h"},(T=>this.setMode(T))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(T=>this.setModePrivate(T))),this._parser.registerCsiHandler({final:"l"},(T=>this.resetMode(T))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(T=>this.resetModePrivate(T))),this._parser.registerCsiHandler({final:"m"},(T=>this.charAttributes(T))),this._parser.registerCsiHandler({final:"n"},(T=>this.deviceStatus(T))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(T=>this.deviceStatusPrivate(T))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(T=>this.softReset(T))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(T=>this.setCursorStyle(T))),this._parser.registerCsiHandler({final:"r"},(T=>this.setScrollRegion(T))),this._parser.registerCsiHandler({final:"s"},(T=>this.saveCursor(T))),this._parser.registerCsiHandler({final:"t"},(T=>this.windowOptions(T))),this._parser.registerCsiHandler({final:"u"},(T=>this.restoreCursor(T))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(T=>this.insertColumns(T))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(T=>this.deleteColumns(T))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(T=>this.selectProtected(T))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(T=>this.requestMode(T,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(T=>this.requestMode(T,!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 b.OscHandler((T=>(this.setTitle(T),this.setIconName(T),!0)))),this._parser.registerOscHandler(1,new b.OscHandler((T=>this.setIconName(T)))),this._parser.registerOscHandler(2,new b.OscHandler((T=>this.setTitle(T)))),this._parser.registerOscHandler(4,new b.OscHandler((T=>this.setOrReportIndexedColor(T)))),this._parser.registerOscHandler(8,new b.OscHandler((T=>this.setHyperlink(T)))),this._parser.registerOscHandler(10,new b.OscHandler((T=>this.setOrReportFgColor(T)))),this._parser.registerOscHandler(11,new b.OscHandler((T=>this.setOrReportBgColor(T)))),this._parser.registerOscHandler(12,new b.OscHandler((T=>this.setOrReportCursorColor(T)))),this._parser.registerOscHandler(104,new b.OscHandler((T=>this.restoreIndexedColor(T)))),this._parser.registerOscHandler(110,new b.OscHandler((T=>this.restoreFgColor(T)))),this._parser.registerOscHandler(111,new b.OscHandler((T=>this.restoreBgColor(T)))),this._parser.registerOscHandler(112,new b.OscHandler((T=>this.restoreCursorColor(T)))),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 T in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:T},(()=>this.selectCharset("("+T))),this._parser.registerEscHandler({intermediates:")",final:T},(()=>this.selectCharset(")"+T))),this._parser.registerEscHandler({intermediates:"*",final:T},(()=>this.selectCharset("*"+T))),this._parser.registerEscHandler({intermediates:"+",final:T},(()=>this.selectCharset("+"+T))),this._parser.registerEscHandler({intermediates:"-",final:T},(()=>this.selectCharset("-"+T))),this._parser.registerEscHandler({intermediates:".",final:T},(()=>this.selectCharset("."+T))),this._parser.registerEscHandler({intermediates:"/",final:T},(()=>this.selectCharset("/"+T)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((T=>(this._logService.error("Parsing error: ",T),T))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new D.DcsHandler(((T,Y)=>this.requestStatusString(T,Y))))}_preserveStack(A,M,B,w){this._parseStack.paused=!0,this._parseStack.cursorStartX=A,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=B,this._parseStack.position=w}_logSlowResolvingAsync(A){this._logService.logLevel<=m.LogLevelEnum.WARN&&Promise.race([A,new Promise(((M,B)=>setTimeout((()=>B("#SLOW_TIMEOUT")),5e3)))]).catch((M=>{if(M!=="#SLOW_TIMEOUT")throw M;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(A,M){let B,w=this._activeBuffer.x,N=this._activeBuffer.y,Q=0;const ie=this._parseStack.paused;if(ie){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(B),B;w=this._parseStack.cursorStartX,N=this._parseStack.cursorStartY,this._parseStack.paused=!1,A.length>L&&(Q=this._parseStack.position+L)}if(this._logService.logLevel<=m.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof A=="string"?` "${A}"`:` "${Array.prototype.map.call(A,(le=>String.fromCharCode(le))).join("")}"`),typeof A=="string"?A.split("").map((le=>le.charCodeAt(0))):A),this._parseBuffer.length<A.length&&this._parseBuffer.length<L&&(this._parseBuffer=new Uint32Array(Math.min(A.length,L))),ie||this._dirtyRowTracker.clearRange(),A.length>L)for(let le=Q;le<A.length;le+=L){const he=le+L<A.length?le+L:A.length,T=typeof A=="string"?this._stringDecoder.decode(A.substring(le,he),this._parseBuffer):this._utf8Decoder.decode(A.subarray(le,he),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,T))return this._preserveStack(w,N,T,le),this._logSlowResolvingAsync(B),B}else if(!ie){const le=typeof A=="string"?this._stringDecoder.decode(A,this._parseBuffer):this._utf8Decoder.decode(A,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,le))return this._preserveStack(w,N,le,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===w&&this._activeBuffer.y===N||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(A,M,B){let w,N;const Q=this._charsetService.charset,ie=this._optionsService.rawOptions.screenReaderMode,le=this._bufferService.cols,he=this._coreService.decPrivateModes.wraparound,T=this._coreService.modes.insertMode,Y=this._curAttrData;let Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-M>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodePoint(this._activeBuffer.x-1,0,1,Y.fg,Y.bg,Y.extended);for(let te=M;te<B;++te){if(w=A[te],N=this._unicodeService.wcwidth(w),w<127&&Q){const ye=Q[String.fromCharCode(w)];ye&&(w=ye.charCodeAt(0))}if(ie&&this._onA11yChar.fire((0,S.stringFromCodePoint)(w)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),N||!this._activeBuffer.x){if(this._activeBuffer.x+N-1>=le){if(he){for(;this._activeBuffer.x<le;)Z.setCellFromCodePoint(this._activeBuffer.x++,0,1,Y.fg,Y.bg,Y.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),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=le-1,N===2)continue}if(T&&(Z.insertCells(this._activeBuffer.x,N,this._activeBuffer.getNullCell(Y),Y),Z.getWidth(le-1)===2&&Z.setCellFromCodePoint(le-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,Y.fg,Y.bg,Y.extended)),Z.setCellFromCodePoint(this._activeBuffer.x++,w,N,Y.fg,Y.bg,Y.extended),N>0)for(;--N;)Z.setCellFromCodePoint(this._activeBuffer.x++,0,0,Y.fg,Y.bg,Y.extended)}else Z.getWidth(this._activeBuffer.x-1)?Z.addCodepointToCell(this._activeBuffer.x-1,w):Z.addCodepointToCell(this._activeBuffer.x-2,w)}B-M>0&&(Z.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<le&&B-M>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodePoint(this._activeBuffer.x,0,1,Y.fg,Y.bg,Y.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(A,M){return A.final!=="t"||A.prefix||A.intermediates?this._parser.registerCsiHandler(A,M):this._parser.registerCsiHandler(A,(B=>!z(B.params[0],this._optionsService.rawOptions.windowOptions)||M(B)))}registerDcsHandler(A,M){return this._parser.registerDcsHandler(A,new D.DcsHandler(M))}registerEscHandler(A,M){return this._parser.registerEscHandler(A,M)}registerOscHandler(A,M){return this._parser.registerOscHandler(A,new b.OscHandler(M))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var A;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&&(!((A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||A===void 0)&&A.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);M.hasWidth(this._activeBuffer.x)&&!M.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const A=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-A),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(A=this._bufferService.cols-1){this._activeBuffer.x=Math.min(A,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(A,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=A,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=A,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(A,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+A,this._activeBuffer.y+M)}cursorUp(A){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,A.params[0]||1)):this._moveCursor(0,-(A.params[0]||1)),!0}cursorDown(A){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,A.params[0]||1)):this._moveCursor(0,A.params[0]||1),!0}cursorForward(A){return this._moveCursor(A.params[0]||1,0),!0}cursorBackward(A){return this._moveCursor(-(A.params[0]||1),0),!0}cursorNextLine(A){return this.cursorDown(A),this._activeBuffer.x=0,!0}cursorPrecedingLine(A){return this.cursorUp(A),this._activeBuffer.x=0,!0}cursorCharAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(A){return this._setCursor(A.length>=2?(A.params[1]||1)-1:0,(A.params[0]||1)-1),!0}charPosAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(A){return this._moveCursor(A.params[0]||1,0),!0}linePosAbsolute(A){return this._setCursor(this._activeBuffer.x,(A.params[0]||1)-1),!0}vPositionRelative(A){return this._moveCursor(0,A.params[0]||1),!0}hVPosition(A){return this.cursorPosition(A),!0}tabClear(A){const M=A.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=A.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=A.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(A){const M=A.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(A,M,B,w=!1,N=!1){const Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);Q.replaceCells(M,B,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),N),w&&(Q.isWrapped=!1)}_resetBufferLine(A,M=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+A),B.isWrapped=!1)}eraseInDisplay(A,M=!1){let B;switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);B<this._bufferService.rows;B++)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,M),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(0);break;case 3:const w=this._activeBuffer.lines.length-this._bufferService.rows;w>0&&(this._activeBuffer.lines.trimStart(w),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-w,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-w,0),this._onScroll.fire(0))}return!0}eraseInLine(A,M=!1){switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,M);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,M)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(A){this._restrictCursor();let M=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,w=this._bufferService.rows-1-this._activeBuffer.scrollBottom,N=this._bufferService.rows-1+this._activeBuffer.ybase-w+1;for(;M--;)this._activeBuffer.lines.splice(N-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(A){this._restrictCursor();let M=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y;let w;for(w=this._bufferService.rows-1-this._activeBuffer.scrollBottom,w=this._bufferService.rows-1+this._activeBuffer.ybase-w;M--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(w,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(A){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(A){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(A){let M=A.params[0]||1;for(;M--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(A){let M=A.params[0]||1;for(;M--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(l.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=A.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);w.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=A.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);w.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=A.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);w.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=A.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);w.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(A){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(A.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(A){if(!this._parser.precedingCodepoint)return!0;const M=A.params[0]||1,B=new Uint32Array(M);for(let w=0;w<M;++w)B[w]=this._parser.precedingCodepoint;return this.print(B,0,B.length),!0}sendDeviceAttributesPrimary(A){return A.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(A){return A.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(A.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(A){return(this._optionsService.rawOptions.termName+"").indexOf(A)===0}setMode(A){for(let M=0;M<A.length;M++)switch(A.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(A){for(let M=0;M<A.length;M++)switch(A.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(A){for(let M=0;M<A.length;M++)switch(A.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(A){for(let M=0;M<A.length;M++)switch(A.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),A.params[M]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(A,M){const B=this._coreService.decPrivateModes,{activeProtocol:w,activeEncoding:N}=this._coreMouseService,Q=this._coreService,{buffers:ie,cols:le}=this._bufferService,{active:he,alt:T}=ie,Y=this._optionsService.rawOptions,Z=Ae=>Ae?1:2,te=A.params[0];return ye=te,ae=M?te===2?4:te===4?Z(Q.modes.insertMode):te===12?3:te===20?Z(Y.convertEol):0:te===1?Z(B.applicationCursorKeys):te===3?Y.windowOptions.setWinLines?le===80?2:le===132?1:0:0:te===6?Z(B.origin):te===7?Z(B.wraparound):te===8?3:te===9?Z(w==="X10"):te===12?Z(Y.cursorBlink):te===25?Z(!Q.isCursorHidden):te===45?Z(B.reverseWraparound):te===66?Z(B.applicationKeypad):te===67?4:te===1e3?Z(w==="VT200"):te===1002?Z(w==="DRAG"):te===1003?Z(w==="ANY"):te===1004?Z(B.sendFocus):te===1005?4:te===1006?Z(N==="SGR"):te===1015?4:te===1016?Z(N==="SGR_PIXELS"):te===1048?1:te===47||te===1047||te===1049?Z(he===T):te===2004?Z(B.bracketedPasteMode):0,Q.triggerDataEvent(`${h.C0.ESC}[${M?"":"?"}${ye};${ae}$y`),!0;var ye,ae}_updateAttrColor(A,M,B,w,N){return M===2?(A|=50331648,A&=-16777216,A|=_.AttributeData.fromColorRGB([B,w,N])):M===5&&(A&=-50331904,A|=33554432|255&B),A}_extractColor(A,M,B){const w=[0,0,-1,0,0,0];let N=0,Q=0;do{if(w[Q+N]=A.params[M+Q],A.hasSubParams(M+Q)){const ie=A.getSubParams(M+Q);let le=0;do w[1]===5&&(N=1),w[Q+le+1+N]=ie[le];while(++le<ie.length&&le+Q+1+N<w.length);break}if(w[1]===5&&Q+N>=2||w[1]===2&&Q+N>=5)break;w[1]&&(N=1)}while(++Q+M<A.length&&Q+N<w.length);for(let ie=2;ie<w.length;++ie)w[ie]===-1&&(w[ie]=0);switch(w[0]){case 38:B.fg=this._updateAttrColor(B.fg,w[1],w[3],w[4],w[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,w[1],w[3],w[4],w[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,w[1],w[3],w[4],w[5])}return Q}_processUnderline(A,M){M.extended=M.extended.clone(),(!~A||A>5)&&(A=1),M.extended.underlineStyle=A,M.fg|=268435456,A===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(A){A.fg=l.DEFAULT_ATTR_DATA.fg,A.bg=l.DEFAULT_ATTR_DATA.bg,A.extended=A.extended.clone(),A.extended.underlineStyle=0,A.extended.underlineColor&=-67108864,A.updateExtended()}charAttributes(A){if(A.length===1&&A.params[0]===0)return this._processSGR0(this._curAttrData),!0;const M=A.length;let B;const w=this._curAttrData;for(let N=0;N<M;N++)B=A.params[N],B>=30&&B<=37?(w.fg&=-50331904,w.fg|=16777216|B-30):B>=40&&B<=47?(w.bg&=-50331904,w.bg|=16777216|B-40):B>=90&&B<=97?(w.fg&=-50331904,w.fg|=16777224|B-90):B>=100&&B<=107?(w.bg&=-50331904,w.bg|=16777224|B-100):B===0?this._processSGR0(w):B===1?w.fg|=134217728:B===3?w.bg|=67108864:B===4?(w.fg|=268435456,this._processUnderline(A.hasSubParams(N)?A.getSubParams(N)[0]:1,w)):B===5?w.fg|=536870912:B===7?w.fg|=67108864:B===8?w.fg|=1073741824:B===9?w.fg|=2147483648:B===2?w.bg|=134217728:B===21?this._processUnderline(2,w):B===22?(w.fg&=-134217729,w.bg&=-134217729):B===23?w.bg&=-67108865:B===24?(w.fg&=-268435457,this._processUnderline(0,w)):B===25?w.fg&=-536870913:B===27?w.fg&=-67108865:B===28?w.fg&=-1073741825:B===29?w.fg&=2147483647:B===39?(w.fg&=-67108864,w.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):B===49?(w.bg&=-67108864,w.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?N+=this._extractColor(A,N,w):B===53?w.bg|=1073741824:B===55?w.bg&=-1073741825:B===59?(w.extended=w.extended.clone(),w.extended.underlineColor=-1,w.updateExtended()):B===100?(w.fg&=-67108864,w.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,w.bg&=-67108864,w.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(A){switch(A.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const M=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${M};${B}R`)}return!0}deviceStatusPrivate(A){if(A.params[0]===6){const M=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${M};${B}R`)}return!0}softReset(A){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=l.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(A){const M=A.params[0]||1;switch(M){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const B=M%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(A){const M=A.params[0]||1;let B;return(A.length<2||(B=A.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(A){if(!z(A.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=A.length>1?A.params[1]:0;switch(A.params[0]){case 14:M!==2&&this._onRequestWindowsOptionsReport.fire(O.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(O.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:M!==0&&M!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),M!==0&&M!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:M!==0&&M!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),M!==0&&M!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(A){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(A){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(A){return this._windowTitle=A,this._onTitleChange.fire(A),!0}setIconName(A){return this._iconName=A,!0}setOrReportIndexedColor(A){const M=[],B=A.split(";");for(;B.length>1;){const w=B.shift(),N=B.shift();if(/^\d+$/.exec(w)){const Q=parseInt(w);if(k(Q))if(N==="?")M.push({type:0,index:Q});else{const ie=(0,v.parseColor)(N);ie&&M.push({type:1,index:Q,color:ie})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(A){const M=A.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(A,M){this._getCurrentLinkId()&&this._finishHyperlink();const B=A.split(":");let w;const N=B.findIndex((Q=>Q.startsWith("id=")));return N!==-1&&(w=B[N].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:w,uri:M}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(A,M){const B=A.split(";");for(let w=0;w<B.length&&!(M>=this._specialColors.length);++w,++M)if(B[w]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const N=(0,v.parseColor)(B[w]);N&&this._onColor.fire([{type:1,index:this._specialColors[M],color:N}])}return!0}setOrReportFgColor(A){return this._setOrReportSpecialColor(A,0)}setOrReportBgColor(A){return this._setOrReportSpecialColor(A,1)}setOrReportCursorColor(A){return this._setOrReportSpecialColor(A,2)}restoreIndexedColor(A){if(!A)return this._onColor.fire([{type:2}]),!0;const M=[],B=A.split(";");for(let w=0;w<B.length;++w)if(/^\d+$/.exec(B[w])){const N=parseInt(B[w]);k(N)&&M.push({type:2,index:N})}return M.length&&this._onColor.fire(M),!0}restoreFgColor(A){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(A){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(A){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(A){return A.length!==2?(this.selectDefaultCharset(),!0):(A[0]==="/"||this._charsetService.setgCharset(E[A[0]],p.CHARSETS[A[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const A=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,A,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=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(A){return this._charsetService.setgLevel(A),!0}screenAlignmentPattern(){const A=new o.CellData;A.content=4194373,A.fg=this._curAttrData.fg,A.bg=this._curAttrData.bg,this._setCursor(0,0);for(let M=0;M<this._bufferService.rows;++M){const B=this._activeBuffer.ybase+this._activeBuffer.y+M,w=this._activeBuffer.lines.get(B);w&&(w.fill(A),w.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(A,M){const B=this._bufferService.buffer,w=this._optionsService.rawOptions;return(N=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${N}${h.C0.ESC}\\`),!0))(A==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:A==='"p'?'P1$r61;1"p':A==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:A==="m"?"P1$r0m":A===" q"?`P1$r${{block:2,underline:4,bar:6}[w.cursorStyle]-(w.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(A,M){this._dirtyRowTracker.markRangeDirty(A,M)}}u.InputHandler=V;let J=class{constructor(I){this._bufferService=I,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(I){I<this.start?this.start=I:I>this.end&&(this.end=I)}markRangeDirty(I,A){I>A&&(U=I,I=A,A=U),I<this.start&&(this.start=I),A>this.end&&(this.end=A)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function k(I){return 0<=I&&I<256}J=f([y(0,m.IBufferService)],J)},844:(ee,u)=>{function d(f){for(const y of f)y.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const y=this._disposables.indexOf(f);y!==-1&&this._disposables.splice(y,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var y;this._isDisposed||f===this._value||((y=this._value)===null||y===void 0||y.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)===null||f===void 0||f.dispose(),this._value=void 0}},u.toDisposable=function(f){return{dispose:f}},u.disposeArray=d,u.getDisposeArrayDisposable=function(f){return{dispose:()=>d(f)}}},1505:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(y,h,p){this._data[y]||(this._data[y]={}),this._data[y][h]=p}get(y,h){return this._data[y]?this._data[y][h]:void 0}clear(){this._data={}}}u.TwoKeyMap=d,u.FourKeyMap=class{constructor(){this._data=new d}set(f,y,h,p,C){this._data.get(f,y)||this._data.set(f,y,new d),this._data.get(f,y).set(h,p,C)}get(f,y,h,p){var C;return(C=this._data.get(f,y))===null||C===void 0?void 0:C.get(h,p)}clear(){this._data.clear()}}},6114:(ee,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,f=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 y=d.match(/Version\/(\d+)/);return y===null||y.length<2?0:parseInt(y[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),u.isIpad=f==="iPad",u.isIphone=f==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),u.isLinux=f.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(d)},6106:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let d=0;u.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(d=this._search(this._getKey(f)),this._array.splice(d,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const y=this._getKey(f);if(y===void 0||(d=this._search(y),d===-1)||this._getKey(this._array[d])!==y)return!1;do if(this._array[d]===f)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===y);return!1}*getKeyIterator(f){if(this._array.length!==0&&(d=this._search(f),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===f))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===f)}forEachByKey(f,y){if(this._array.length!==0&&(d=this._search(f),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===f))do y(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===f)}values(){return[...this._array].values()}_search(f){let y=0,h=this._array.length-1;for(;h>=y;){let p=y+h>>1;const C=this._getKey(this._array[p]);if(C>f)h=p-1;else{if(!(C<f)){for(;p>0&&this._getKey(this._array[p-1])===f;)p--;return p}y=p+1}}return y}}},7226:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const f=d(6114);class y{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(C){this._idleCallback=void 0;let x=0,S=0,l=C.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(x=Date.now(),this._tasks[this._i]()||this._i++,x=Math.max(1,Date.now()-x),S=Math.max(x,S),c=C.timeRemaining(),1.5*S>c)return l-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-x))}ms`),void this._start();l=c}this.clear()}}class h extends y{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const x=Date.now()+C;return{timeRemaining:()=>Math.max(0,x-Date.now())}}}u.PriorityTaskQueue=h,u.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends y{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:h,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const f=d(643);u.updateWindowsModeWrappedState=function(y){const h=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),p=h?.get(y.cols-1),C=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);C&&p&&(C.isWrapped=p[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&p[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(ee,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 f}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 f{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,p=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=f},9092:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const f=d(6349),y=d(7226),h=d(3734),p=d(8437),C=d(4634),x=d(511),S=d(643),l=d(4863),c=d(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(a,o,_){this._hasScrollback=a,this._optionsService=o,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,S.NULL_CELL_CHAR,S.NULL_CELL_WIDTH,S.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,S.WHITESPACE_CELL_CHAR,S.WHITESPACE_CELL_WIDTH,S.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new y.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(a){return a?(this._nullCell.fg=a.fg,this._nullCell.bg=a.bg,this._nullCell.extended=a.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(a){return a?(this._whitespaceCell.fg=a.fg,this._whitespaceCell.bg=a.bg,this._whitespaceCell.extended=a.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(a,o){return new p.BufferLine(this._bufferService.cols,this.getNullCell(a),o)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const a=this.ybase+this.y-this.ydisp;return a>=0&&a<this._rows}_getCorrectBufferLength(a){if(!this._hasScrollback)return a;const o=a+this._optionsService.rawOptions.scrollback;return o>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:o}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=p.DEFAULT_ATTR_DATA);let o=this._rows;for(;o--;)this.lines.push(this.getBlankLine(a))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(a,o){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let m=0;const b=this._getCorrectBufferLength(o);if(b>this.lines.maxLength&&(this.lines.maxLength=b),this.lines.length>0){if(this._cols<a)for(let v=0;v<this.lines.length;v++)m+=+this.lines.get(v).resize(a,_);let D=0;if(this._rows<o)for(let v=this._rows;v<o;v++)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 p.BufferLine(a,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+D+1?(this.ybase--,D++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(a,_)));else for(let v=this._rows;v>o;v--)this.lines.length>o+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(b<this.lines.maxLength){const v=this.lines.length-b;v>0&&(this.lines.trimStart(v),this.ybase=Math.max(this.ybase-v,0),this.ydisp=Math.max(this.ydisp-v,0),this.savedY=Math.max(this.savedY-v,0)),this.lines.maxLength=b}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,o-1),D&&(this.y+=D),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=o-1,this._isReflowEnabled&&(this._reflow(a,o),this._cols>a))for(let D=0;D<this.lines.length;D++)m+=+this.lines.get(D).resize(a,_);this._cols=a,this._rows=o,this._memoryCleanupQueue.clear(),m>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let a=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,a=!1);let o=0;for(;this._memoryCleanupPosition<this.lines.length;)if(o+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),o>100)return!0;return a}get _isReflowEnabled(){const a=this._optionsService.rawOptions.windowsPty;return a&&a.buildNumber?this._hasScrollback&&a.backend==="conpty"&&a.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(a,o){this._cols!==a&&(a>this._cols?this._reflowLarger(a,o):this._reflowSmaller(a,o))}_reflowLarger(a,o){const _=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const m=(0,C.reflowLargerCreateNewLayout)(this.lines,_);(0,C.reflowLargerApplyNewLayout)(this.lines,m.layout),this._reflowLargerAdjustViewport(a,o,m.countRemoved)}}_reflowLargerAdjustViewport(a,o,_){const m=this.getNullCell(p.DEFAULT_ATTR_DATA);let b=_;for(;b-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<o&&this.lines.push(new p.BufferLine(a,m))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(a,o){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),m=[];let b=0;for(let D=this.lines.length-1;D>=0;D--){let v=this.lines.get(D);if(!v||!v.isWrapped&&v.getTrimmedLength()<=a)continue;const E=[v];for(;v.isWrapped&&D>0;)v=this.lines.get(--D),E.unshift(v);const L=this.ybase+this.y;if(L>=D&&L<D+E.length)continue;const z=E[E.length-1].getTrimmedLength(),O=(0,C.reflowSmallerGetNewLineLengths)(E,this._cols,a),U=O.length-E.length;let V;V=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+U):Math.max(0,this.lines.length-this.lines.maxLength+U);const J=[];for(let w=0;w<U;w++){const N=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);J.push(N)}J.length>0&&(m.push({start:D+E.length+b,newLines:J}),b+=J.length),E.push(...J);let k=O.length-1,I=O[k];I===0&&(k--,I=O[k]);let A=E.length-U-1,M=z;for(;A>=0;){const w=Math.min(M,I);if(E[k]===void 0)break;if(E[k].copyCellsFrom(E[A],M-w,I-w,w,!0),I-=w,I===0&&(k--,I=O[k]),M-=w,M===0){A--;const N=Math.max(A,0);M=(0,C.getWrappedLineTrimmedLength)(E,N,this._cols)}}for(let w=0;w<E.length;w++)O[w]<a&&E[w].setCell(O[w],_);let B=U-V;for(;B-- >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+b)-o&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+U,this.ybase+o-1)}if(m.length>0){const D=[],v=[];for(let k=0;k<this.lines.length;k++)v.push(this.lines.get(k));const E=this.lines.length;let L=E-1,z=0,O=m[z];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let U=0;for(let k=Math.min(this.lines.maxLength-1,E+b-1);k>=0;k--)if(O&&O.start>L+U){for(let I=O.newLines.length-1;I>=0;I--)this.lines.set(k--,O.newLines[I]);k++,D.push({index:L+1,amount:O.newLines.length}),U+=O.newLines.length,O=m[++z]}else this.lines.set(k,v[L--]);let V=0;for(let k=D.length-1;k>=0;k--)D[k].index+=V,this.lines.onInsertEmitter.fire(D[k]),V+=D[k].amount;const J=Math.max(0,E+b-this.lines.maxLength);J>0&&this.lines.onTrimEmitter.fire(J)}}translateBufferLineToString(a,o,_=0,m){const b=this.lines.get(a);return b?b.translateToString(o,_,m):""}getWrappedRangeForLine(a){let o=a,_=a;for(;o>0&&this.lines.get(o).isWrapped;)o--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:o,last:_}}setupTabStops(a){for(a!=null?this.tabs[a]||(a=this.prevStop(a)):(this.tabs={},a=0);a<this._cols;a+=this._optionsService.rawOptions.tabStopWidth)this.tabs[a]=!0}prevStop(a){for(a==null&&(a=this.x);!this.tabs[--a]&&a>0;);return a>=this._cols?this._cols-1:a<0?0:a}nextStop(a){for(a==null&&(a=this.x);!this.tabs[++a]&&a<this._cols;);return a>=this._cols?this._cols-1:a<0?0:a}clearMarkers(a){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].line===a&&(this.markers[o].dispose(),this.markers.splice(o--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].dispose(),this.markers.splice(a--,1);this._isClearing=!1}addMarker(a){const o=new l.Marker(a);return this.markers.push(o),o.register(this.lines.onTrim((_=>{o.line-=_,o.line<0&&o.dispose()}))),o.register(this.lines.onInsert((_=>{o.line>=_.index&&(o.line+=_.amount)}))),o.register(this.lines.onDelete((_=>{o.line>=_.index&&o.line<_.index+_.amount&&o.dispose(),o.line>_.index&&(o.line-=_.amount)}))),o.register(o.onDispose((()=>this._removeMarker(o)))),o}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const f=d(3734),y=d(511),h=d(643),p=d(482);u.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let C=0;class x{constructor(l,c,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*l);const o=c||y.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<l;++_)this.setCell(_,o);this.length=l}get(l){const c=this._data[3*l+0],a=2097151&c;return[this._data[3*l+1],2097152&c?this._combined[l]:a?(0,p.stringFromCodePoint)(a):"",c>>22,2097152&c?this._combined[l].charCodeAt(this._combined[l].length-1):a]}set(l,c){this._data[3*l+1]=c[h.CHAR_DATA_ATTR_INDEX],c[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[l]=c[1],this._data[3*l+0]=2097152|l|c[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*l+0]=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(l){return this._data[3*l+0]>>22}hasWidth(l){return 12582912&this._data[3*l+0]}getFg(l){return this._data[3*l+1]}getBg(l){return this._data[3*l+2]}hasContent(l){return 4194303&this._data[3*l+0]}getCodePoint(l){const c=this._data[3*l+0];return 2097152&c?this._combined[l].charCodeAt(this._combined[l].length-1):2097151&c}isCombined(l){return 2097152&this._data[3*l+0]}getString(l){const c=this._data[3*l+0];return 2097152&c?this._combined[l]:2097151&c?(0,p.stringFromCodePoint)(2097151&c):""}isProtected(l){return 536870912&this._data[3*l+2]}loadCell(l,c){return C=3*l,c.content=this._data[C+0],c.fg=this._data[C+1],c.bg=this._data[C+2],2097152&c.content&&(c.combinedData=this._combined[l]),268435456&c.bg&&(c.extended=this._extendedAttrs[l]),c}setCell(l,c){2097152&c.content&&(this._combined[l]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[l]=c.extended),this._data[3*l+0]=c.content,this._data[3*l+1]=c.fg,this._data[3*l+2]=c.bg}setCellFromCodePoint(l,c,a,o,_,m){268435456&_&&(this._extendedAttrs[l]=m),this._data[3*l+0]=c|a<<22,this._data[3*l+1]=o,this._data[3*l+2]=_}addCodepointToCell(l,c){let a=this._data[3*l+0];2097152&a?this._combined[l]+=(0,p.stringFromCodePoint)(c):(2097151&a?(this._combined[l]=(0,p.stringFromCodePoint)(2097151&a)+(0,p.stringFromCodePoint)(c),a&=-2097152,a|=2097152):a=c|4194304,this._data[3*l+0]=a)}insertCells(l,c,a,o){if((l%=this.length)&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new f.ExtendedAttrs),c<this.length-l){const _=new y.CellData;for(let m=this.length-l-c-1;m>=0;--m)this.setCell(l+c+m,this.loadCell(l+m,_));for(let m=0;m<c;++m)this.setCell(l+m,a)}else for(let _=l;_<this.length;++_)this.setCell(_,a);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new f.ExtendedAttrs)}deleteCells(l,c,a,o){if(l%=this.length,c<this.length-l){const _=new y.CellData;for(let m=0;m<this.length-l-c;++m)this.setCell(l+m,this.loadCell(l+c+m,_));for(let m=this.length-c;m<this.length;++m)this.setCell(m,a)}else for(let _=l;_<this.length;++_)this.setCell(_,a);l&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new f.ExtendedAttrs),this.getWidth(l)!==0||this.hasContent(l)||this.setCellFromCodePoint(l,0,1,o?.fg||0,o?.bg||0,o?.extended||new f.ExtendedAttrs)}replaceCells(l,c,a,o,_=!1){if(_)for(l&&this.getWidth(l-1)===2&&!this.isProtected(l-1)&&this.setCellFromCodePoint(l-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new f.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 f.ExtendedAttrs);l<c&&l<this.length;)this.isProtected(l)||this.setCell(l,a),l++;else for(l&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,o?.fg||0,o?.bg||0,o?.extended||new f.ExtendedAttrs),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c,0,1,o?.fg||0,o?.bg||0,o?.extended||new f.ExtendedAttrs);l<c&&l<this.length;)this.setCell(l++,a)}resize(l,c){if(l===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*l;if(l>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const o=new Uint32Array(a);o.set(this._data),this._data=o}for(let o=this.length;o<l;++o)this.setCell(o,c)}else{this._data=this._data.subarray(0,a);const o=Object.keys(this._combined);for(let m=0;m<o.length;m++){const b=parseInt(o[m],10);b>=l&&delete this._combined[b]}const _=Object.keys(this._extendedAttrs);for(let m=0;m<_.length;m++){const b=parseInt(_[m],10);b>=l&&delete this._extendedAttrs[b]}}return this.length=l,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const l=new Uint32Array(this._data.length);return l.set(this._data),this._data=l,1}return 0}fill(l,c=!1){if(c)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,l);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,l)}}copyFrom(l){this.length!==l.length?this._data=new Uint32Array(l._data):this._data.set(l._data),this.length=l.length,this._combined={};for(const c in l._combined)this._combined[c]=l._combined[c];this._extendedAttrs={};for(const c in l._extendedAttrs)this._extendedAttrs[c]=l._extendedAttrs[c];this.isWrapped=l.isWrapped}clone(){const l=new x(0);l._data=new Uint32Array(this._data),l.length=this.length;for(const c in this._combined)l._combined[c]=this._combined[c];for(const c in this._extendedAttrs)l._extendedAttrs[c]=this._extendedAttrs[c];return l.isWrapped=this.isWrapped,l}getTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0])return l+(this._data[3*l+0]>>22);return 0}getNoBgTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0]||50331648&this._data[3*l+2])return l+(this._data[3*l+0]>>22);return 0}copyCellsFrom(l,c,a,o,_){const m=l._data;if(_)for(let D=o-1;D>=0;D--){for(let v=0;v<3;v++)this._data[3*(a+D)+v]=m[3*(c+D)+v];268435456&m[3*(c+D)+2]&&(this._extendedAttrs[a+D]=l._extendedAttrs[c+D])}else for(let D=0;D<o;D++){for(let v=0;v<3;v++)this._data[3*(a+D)+v]=m[3*(c+D)+v];268435456&m[3*(c+D)+2]&&(this._extendedAttrs[a+D]=l._extendedAttrs[c+D])}const b=Object.keys(l._combined);for(let D=0;D<b.length;D++){const v=parseInt(b[D],10);v>=c&&(this._combined[v-c+a]=l._combined[v])}}translateToString(l=!1,c=0,a=this.length){l&&(a=Math.min(a,this.getTrimmedLength()));let o="";for(;c<a;){const _=this._data[3*c+0],m=2097151&_;o+=2097152&_?this._combined[c]:m?(0,p.stringFromCodePoint)(m):h.WHITESPACE_CELL_CHAR,c+=_>>22||1}return o}}u.BufferLine=x},4841:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(d,f){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 f*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(ee,u)=>{function d(f,y,h){if(y===f.length-1)return f[y].getTrimmedLength();const p=!f[y].hasContent(h-1)&&f[y].getWidth(h-1)===1,C=f[y+1].getWidth(0)===2;return p&&C?h-1:h}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(f,y,h,p,C){const x=[];for(let S=0;S<f.length-1;S++){let l=S,c=f.get(++l);if(!c.isWrapped)continue;const a=[f.get(S)];for(;l<f.length&&c.isWrapped;)a.push(c),c=f.get(++l);if(p>=S&&p<l){S+=a.length-1;continue}let o=0,_=d(a,o,y),m=1,b=0;for(;m<a.length;){const v=d(a,m,y),E=v-b,L=h-_,z=Math.min(E,L);a[o].copyCellsFrom(a[m],b,_,z,!1),_+=z,_===h&&(o++,_=0),b+=z,b===v&&(m++,b=0),_===0&&o!==0&&a[o-1].getWidth(h-1)===2&&(a[o].copyCellsFrom(a[o-1],h-1,_++,1,!1),a[o-1].setCell(h-1,C))}a[o].replaceCells(_,h,C);let D=0;for(let v=a.length-1;v>0&&(v>o||a[v].getTrimmedLength()===0);v--)D++;D>0&&(x.push(S+a.length-D),x.push(D)),S+=a.length-1}return x},u.reflowLargerCreateNewLayout=function(f,y){const h=[];let p=0,C=y[p],x=0;for(let S=0;S<f.length;S++)if(C===S){const l=y[++p];f.onDeleteEmitter.fire({index:S-x,amount:l}),S+=l-1,x+=l,C=y[++p]}else h.push(S);return{layout:h,countRemoved:x}},u.reflowLargerApplyNewLayout=function(f,y){const h=[];for(let p=0;p<y.length;p++)h.push(f.get(y[p]));for(let p=0;p<h.length;p++)f.set(p,h[p]);f.length=y.length},u.reflowSmallerGetNewLineLengths=function(f,y,h){const p=[],C=f.map(((c,a)=>d(f,a,y))).reduce(((c,a)=>c+a));let x=0,S=0,l=0;for(;l<C;){if(C-l<h){p.push(C-l);break}x+=h;const c=d(f,S,y);x>c&&(x-=c,S++);const a=f[S].getWidth(x-1)===2;a&&x--;const o=a?h-1:h;p.push(o),l+=o}return p},u.getWrappedLineTrimmedLength=d},5295:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const f=d(8460),y=d(844),h=d(9092);class p extends y.Disposable{constructor(x,S){super(),this._optionsService=x,this._bufferService=S,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new 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(x){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(x),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(x,S){this._normal.resize(x,S),this._alt.resize(x,S),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}u.BufferSet=p},511:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const f=d(482),y=d(643),h=d(3734);class p extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const S=new p;return S.setFromCharData(x),S}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(x){this.fg=x[y.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(x[y.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(x[y.CHAR_DATA_CHAR_INDEX].length===2){const l=x[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const c=x[y.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(l-55296)+c-56320+65536|x[y.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=x[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[y.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=x[y.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[y.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=p},643:(ee,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:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const f=d(8460),y=d(844);class h{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,y.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}u.Marker=h,h._nextId=1},7116:(ee,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:(ee,u)=>{var d,f,y;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=`
|
|
16
|
+
`,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=""})(f||(u.C1=f={})),(function(h){h.ST=`${d.ESC}\\`})(y||(u.C1_ESCAPED=y={}))},7399:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const f=d(2584),y={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,p,C,x){const S={type:0,cancel:!1,key:void 0},l=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?S.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?S.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?S.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(S.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:if(h.altKey){S.key=f.C0.ESC+f.C0.DEL;break}S.key=f.C0.DEL;break;case 9:if(h.shiftKey){S.key=f.C0.ESC+"[Z";break}S.key=f.C0.HT,S.cancel=!0;break;case 13:S.key=h.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,S.cancel=!0;break;case 27:S.key=f.C0.ESC,h.altKey&&(S.key=f.C0.ESC+f.C0.ESC),S.cancel=!0;break;case 37:if(h.metaKey)break;l?(S.key=f.C0.ESC+"[1;"+(l+1)+"D",S.key===f.C0.ESC+"[1;3D"&&(S.key=f.C0.ESC+(C?"b":"[1;5D"))):S.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(h.metaKey)break;l?(S.key=f.C0.ESC+"[1;"+(l+1)+"C",S.key===f.C0.ESC+"[1;3C"&&(S.key=f.C0.ESC+(C?"f":"[1;5C"))):S.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(h.metaKey)break;l?(S.key=f.C0.ESC+"[1;"+(l+1)+"A",C||S.key!==f.C0.ESC+"[1;3A"||(S.key=f.C0.ESC+"[1;5A")):S.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(h.metaKey)break;l?(S.key=f.C0.ESC+"[1;"+(l+1)+"B",C||S.key!==f.C0.ESC+"[1;3B"||(S.key=f.C0.ESC+"[1;5B")):S.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(S.key=f.C0.ESC+"[2~");break;case 46:S.key=l?f.C0.ESC+"[3;"+(l+1)+"~":f.C0.ESC+"[3~";break;case 36:S.key=l?f.C0.ESC+"[1;"+(l+1)+"H":p?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:S.key=l?f.C0.ESC+"[1;"+(l+1)+"F":p?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:h.shiftKey?S.type=2:h.ctrlKey?S.key=f.C0.ESC+"[5;"+(l+1)+"~":S.key=f.C0.ESC+"[5~";break;case 34:h.shiftKey?S.type=3:h.ctrlKey?S.key=f.C0.ESC+"[6;"+(l+1)+"~":S.key=f.C0.ESC+"[6~";break;case 112:S.key=l?f.C0.ESC+"[1;"+(l+1)+"P":f.C0.ESC+"OP";break;case 113:S.key=l?f.C0.ESC+"[1;"+(l+1)+"Q":f.C0.ESC+"OQ";break;case 114:S.key=l?f.C0.ESC+"[1;"+(l+1)+"R":f.C0.ESC+"OR";break;case 115:S.key=l?f.C0.ESC+"[1;"+(l+1)+"S":f.C0.ESC+"OS";break;case 116:S.key=l?f.C0.ESC+"[15;"+(l+1)+"~":f.C0.ESC+"[15~";break;case 117:S.key=l?f.C0.ESC+"[17;"+(l+1)+"~":f.C0.ESC+"[17~";break;case 118:S.key=l?f.C0.ESC+"[18;"+(l+1)+"~":f.C0.ESC+"[18~";break;case 119:S.key=l?f.C0.ESC+"[19;"+(l+1)+"~":f.C0.ESC+"[19~";break;case 120:S.key=l?f.C0.ESC+"[20;"+(l+1)+"~":f.C0.ESC+"[20~";break;case 121:S.key=l?f.C0.ESC+"[21;"+(l+1)+"~":f.C0.ESC+"[21~";break;case 122:S.key=l?f.C0.ESC+"[23;"+(l+1)+"~":f.C0.ESC+"[23~";break;case 123:S.key=l?f.C0.ESC+"[24;"+(l+1)+"~":f.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(C&&!x||!h.altKey||h.metaKey)!C||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?S.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(S.key=f.C0.US),h.key==="@"&&(S.key=f.C0.NUL)):h.keyCode===65&&(S.type=1);else{const c=y[h.keyCode],a=c?.[h.shiftKey?1:0];if(a)S.key=f.C0.ESC+a;else if(h.keyCode>=65&&h.keyCode<=90){const o=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(o);h.shiftKey&&(_=_.toUpperCase()),S.key=f.C0.ESC+_}else if(h.keyCode===32)S.key=f.C0.ESC+(h.ctrlKey?f.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let o=h.code.slice(3,4);h.shiftKey||(o=o.toLowerCase()),S.key=f.C0.ESC+o,S.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?S.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?S.key=f.C0.NUL:h.keyCode>=51&&h.keyCode<=55?S.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?S.key=f.C0.DEL:h.keyCode===219?S.key=f.C0.ESC:h.keyCode===220?S.key=f.C0.FS:h.keyCode===221&&(S.key=f.C0.GS)}return S}},482:(ee,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,f=0,y=d.length){let h="";for(let p=f;p<y;++p){let C=d[p];C>65535?(C-=65536,h+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):h+=String.fromCharCode(C)}return h},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,f){const y=d.length;if(!y)return 0;let h=0,p=0;if(this._interim){const C=d.charCodeAt(p++);56320<=C&&C<=57343?f[h++]=1024*(this._interim-55296)+C-56320+65536:(f[h++]=this._interim,f[h++]=C),this._interim=0}for(let C=p;C<y;++C){const x=d.charCodeAt(C);if(55296<=x&&x<=56319){if(++C>=y)return this._interim=x,h;const S=d.charCodeAt(C);56320<=S&&S<=57343?f[h++]=1024*(x-55296)+S-56320+65536:(f[h++]=x,f[h++]=S)}else x!==65279&&(f[h++]=x)}return h}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,f){const y=d.length;if(!y)return 0;let h,p,C,x,S=0,l=0,c=0;if(this.interim[0]){let _=!1,m=this.interim[0];m&=(224&m)==192?31:(240&m)==224?15:7;let b,D=0;for(;(b=63&this.interim[++D])&&D<4;)m<<=6,m|=b;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=v-D;for(;c<E;){if(c>=y)return 0;if(b=d[c++],(192&b)!=128){c--,_=!0;break}this.interim[D++]=b,m<<=6,m|=63&b}_||(v===2?m<128?c--:f[S++]=m:v===3?m<2048||m>=55296&&m<=57343||m===65279||(f[S++]=m):m<65536||m>1114111||(f[S++]=m)),this.interim.fill(0)}const a=y-4;let o=c;for(;o<y;){for(;!(!(o<a)||128&(h=d[o])||128&(p=d[o+1])||128&(C=d[o+2])||128&(x=d[o+3]));)f[S++]=h,f[S++]=p,f[S++]=C,f[S++]=x,o+=4;if(h=d[o++],h<128)f[S++]=h;else if((224&h)==192){if(o>=y)return this.interim[0]=h,S;if(p=d[o++],(192&p)!=128){o--;continue}if(l=(31&h)<<6|63&p,l<128){o--;continue}f[S++]=l}else if((240&h)==224){if(o>=y)return this.interim[0]=h,S;if(p=d[o++],(192&p)!=128){o--;continue}if(o>=y)return this.interim[0]=h,this.interim[1]=p,S;if(C=d[o++],(192&C)!=128){o--;continue}if(l=(15&h)<<12|(63&p)<<6|63&C,l<2048||l>=55296&&l<=57343||l===65279)continue;f[S++]=l}else if((248&h)==240){if(o>=y)return this.interim[0]=h,S;if(p=d[o++],(192&p)!=128){o--;continue}if(o>=y)return this.interim[0]=h,this.interim[1]=p,S;if(C=d[o++],(192&C)!=128){o--;continue}if(o>=y)return this.interim[0]=h,this.interim[1]=p,this.interim[2]=C,S;if(x=d[o++],(192&x)!=128){o--;continue}if(l=(7&h)<<18|(63&p)<<12|(63&C)<<6|63&x,l<65536||l>1114111)continue;f[S++]=l}}return S}}},225:(ee,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]],f=[[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 y;u.UnicodeV6=class{constructor(){if(this.version="6",!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let h=0;h<d.length;++h)y.fill(0,d[h][0],d[h][1]+1)}}wcwidth(h){return h<32?0:h<127?1:h<65536?y[h]:(function(p,C){let x,S=0,l=C.length-1;if(p<C[0][0]||p>C[l][1])return!1;for(;l>=S;)if(x=S+l>>1,p>C[x][1])S=x+1;else{if(!(p<C[x][0]))return!0;l=x-1}return!1})(h,f)?0:h>=131072&&h<=196605||h>=196608&&h<=262141?2:1}}},5981:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const f=d(8460),y=d(844);class h extends y.Disposable{constructor(C){super(),this._action=C,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(C,x){if(x!==void 0&&this._syncCalls>x)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let S;for(this._isSyncWriting=!0;S=this._writeBuffer.shift();){this._action(S);const l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,x){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(x),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(x)}_innerWrite(C=0,x=!0){const S=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],c=this._action(l,x);if(c){const o=_=>Date.now()-S>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(S,_);return void c.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(o)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=l.length,Date.now()-S>=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:(ee,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})$/,f=/^[\da-f]+$/;function y(h,p){const C=h.toString(16),x=C.length<2?"0"+C:C;switch(p){case 4:return C[0];case 8:return x;case 12:return(x+x).slice(0,3);default:return x+x}}u.parseColor=function(h){if(!h)return;let p=h.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const C=d.exec(p);if(C){const x=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/x*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/x*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/x*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),f.exec(p)&&[3,6,9,12].includes(p.length))){const C=p.length/3,x=[0,0,0];for(let S=0;S<3;++S){const l=parseInt(p.slice(C*S,C*S+C),16);x[S]=C===1?l<<4:C===2?l:C===3?l>>4:l>>8}return x}},u.toRgbString=function(h,p=16){const[C,x,S]=h;return`rgb:${y(C,p)}/${y(x,p)}/${y(S,p)}`}},5770:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const f=d(482),y=d(8742),h=d(5770),p=[];u.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(x,S){this._handlers[x]===void 0&&(this._handlers[x]=[]);const l=this._handlers[x];return l.push(S),{dispose:()=>{const c=l.indexOf(S);c!==-1&&l.splice(c,1)}}}clearHandler(x){this._handlers[x]&&delete this._handlers[x]}setHandlerFallback(x){this._handlerFb=x}reset(){if(this._active.length)for(let x=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;x>=0;--x)this._active[x].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(x,S){if(this.reset(),this._ident=x,this._active=this._handlers[x]||p,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].hook(S);else this._handlerFb(this._ident,"HOOK",S)}put(x,S,l){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(x,S,l);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(x,S,l))}unhook(x,S=!0){if(this._active.length){let l=!1,c=this._active.length-1,a=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,l=S,a=this._stack.fallThrough,this._stack.paused=!1),!a&&l===!1){for(;c>=0&&(l=this._active[c].unhook(x),l!==!0);c--)if(l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,l;c--}for(;c>=0;c--)if(l=this._active[c].unhook(!1),l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,l}else this._handlerFb(this._ident,"UNHOOK",x);this._active=p,this._ident=0}};const C=new y.Params;C.addParam(0),u.DcsHandler=class{constructor(x){this._handler=x,this._data="",this._params=C,this._hitLimit=!1}hook(x){this._params=x.length>1||x.params[0]?x.clone():C,this._data="",this._hitLimit=!1}put(x,S,l){this._hitLimit||(this._data+=(0,f.utf32ToString)(x,S,l),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(x){let S=!1;if(this._hitLimit)S=!1;else if(x&&(S=this._handler(this._data,this._params),S instanceof Promise))return S.then((l=>(this._params=C,this._data="",this._hitLimit=!1,l)));return this._params=C,this._data="",this._hitLimit=!1,S}}},2015:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const f=d(844),y=d(8742),h=d(6242),p=d(6351);class C{constructor(c){this.table=new Uint8Array(c)}setDefault(c,a){this.table.fill(c<<4|a)}add(c,a,o,_){this.table[a<<8|c]=o<<4|_}addMany(c,a,o,_){for(let m=0;m<c.length;m++)this.table[a<<8|c[m]]=o<<4|_}}u.TransitionTable=C;const x=160;u.VT500_TRANSITION_TABLE=(function(){const l=new C(4095),c=Array.apply(null,Array(256)).map(((D,v)=>v)),a=(D,v)=>c.slice(D,v),o=a(32,127),_=a(0,24);_.push(25),_.push.apply(_,a(28,32));const m=a(0,14);let b;for(b in l.setDefault(1,0),l.addMany(o,0,2,0),m)l.addMany([24,26,153,154],b,3,0),l.addMany(a(128,144),b,3,0),l.addMany(a(144,152),b,3,0),l.add(156,b,0,0),l.add(27,b,11,1),l.add(157,b,4,8),l.addMany([152,158,159],b,0,7),l.add(155,b,11,3),l.add(144,b,11,9);return l.addMany(_,0,3,0),l.addMany(_,1,3,1),l.add(127,1,0,1),l.addMany(_,8,0,8),l.addMany(_,3,3,3),l.add(127,3,0,3),l.addMany(_,4,3,4),l.add(127,4,0,4),l.addMany(_,6,3,6),l.addMany(_,5,3,5),l.add(127,5,0,5),l.addMany(_,2,3,2),l.add(127,2,0,2),l.add(93,1,4,8),l.addMany(o,8,5,8),l.add(127,8,5,8),l.addMany([156,27,24,26,7],8,6,0),l.addMany(a(28,32),8,0,8),l.addMany([88,94,95],1,0,7),l.addMany(o,7,0,7),l.addMany(_,7,0,7),l.add(156,7,0,0),l.add(127,7,0,7),l.add(91,1,11,3),l.addMany(a(64,127),3,7,0),l.addMany(a(48,60),3,8,4),l.addMany([60,61,62,63],3,9,4),l.addMany(a(48,60),4,8,4),l.addMany(a(64,127),4,7,0),l.addMany([60,61,62,63],4,0,6),l.addMany(a(32,64),6,0,6),l.add(127,6,0,6),l.addMany(a(64,127),6,0,0),l.addMany(a(32,48),3,9,5),l.addMany(a(32,48),5,9,5),l.addMany(a(48,64),5,0,6),l.addMany(a(64,127),5,7,0),l.addMany(a(32,48),4,9,5),l.addMany(a(32,48),1,9,2),l.addMany(a(32,48),2,9,2),l.addMany(a(48,127),2,10,0),l.addMany(a(48,80),1,10,0),l.addMany(a(81,88),1,10,0),l.addMany([89,90,92],1,10,0),l.addMany(a(96,127),1,10,0),l.add(80,1,11,9),l.addMany(_,9,0,9),l.add(127,9,0,9),l.addMany(a(28,32),9,0,9),l.addMany(a(32,48),9,9,12),l.addMany(a(48,60),9,8,10),l.addMany([60,61,62,63],9,9,10),l.addMany(_,11,0,11),l.addMany(a(32,128),11,0,11),l.addMany(a(28,32),11,0,11),l.addMany(_,10,0,10),l.add(127,10,0,10),l.addMany(a(28,32),10,0,10),l.addMany(a(48,60),10,8,10),l.addMany([60,61,62,63],10,0,11),l.addMany(a(32,48),10,9,12),l.addMany(_,12,0,12),l.add(127,12,0,12),l.addMany(a(28,32),12,0,12),l.addMany(a(32,48),12,9,12),l.addMany(a(48,64),12,0,11),l.addMany(a(64,127),12,12,13),l.addMany(a(64,127),10,12,13),l.addMany(a(64,127),9,12,13),l.addMany(_,13,13,13),l.addMany(o,13,13,13),l.add(127,13,0,13),l.addMany([27,156,24,26],13,14,0),l.add(x,0,2,0),l.add(x,8,5,8),l.add(x,6,0,6),l.add(x,11,0,11),l.add(x,13,13,13),l})();class S extends f.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 y.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(a,o,_)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,o)=>{},this._escHandlerFb=a=>{},this._errorHandlerFb=a=>a,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,a=[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 m=0;m<c.intermediates.length;++m){const b=c.intermediates.charCodeAt(m);if(32>b||b>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");o<<=8,o|=b}}if(c.final.length!==1)throw new Error("final must be a single byte");const _=c.final.charCodeAt(0);if(a[0]>_||_>a[1])throw new Error(`final must be in range ${a[0]} .. ${a[1]}`);return o<<=8,o|=_,o}identToString(c){const a=[];for(;c;)a.push(String.fromCharCode(255&c)),c>>=8;return a.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,a){const o=this._identifier(c,[48,126]);this._escHandlers[o]===void 0&&(this._escHandlers[o]=[]);const _=this._escHandlers[o];return _.push(a),{dispose:()=>{const m=_.indexOf(a);m!==-1&&_.splice(m,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,a){this._executeHandlers[c.charCodeAt(0)]=a}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,a){const o=this._identifier(c);this._csiHandlers[o]===void 0&&(this._csiHandlers[o]=[]);const _=this._csiHandlers[o];return _.push(a),{dispose:()=>{const m=_.indexOf(a);m!==-1&&_.splice(m,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,a){return this._dcsParser.registerHandler(this._identifier(c),a)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,a){return this._oscParser.registerHandler(c,a)}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,a,o,_,m){this._parseStack.state=c,this._parseStack.handlers=a,this._parseStack.handlerPos=o,this._parseStack.transition=_,this._parseStack.chunkPos=m}parse(c,a,o){let _,m=0,b=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 v=this._parseStack.handlers;let E=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(o===!1&&E>-1){for(;E>=0&&(_=v[E](this._params),_!==!0);E--)if(_ instanceof Promise)return this._parseStack.handlerPos=E,_}this._parseStack.handlers=[];break;case 4:if(o===!1&&E>-1){for(;E>=0&&(_=v[E](),_!==!0);E--)if(_ instanceof Promise)return this._parseStack.handlerPos=E,_}this._parseStack.handlers=[];break;case 6:if(m=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(m!==24&&m!==26,o),_)return _;m===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(m=c[this._parseStack.chunkPos],_=this._oscParser.end(m!==24&&m!==26,o),_)return _;m===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 v=D;v<a;++v){switch(m=c[v],b=this._transitions.table[this.currentState<<8|(m<160?m:x)],b>>4){case 2:for(let U=v+1;;++U){if(U>=a||(m=c[U])<32||m>126&&m<x){this._printHandler(c,v,U),v=U-1;break}if(++U>=a||(m=c[U])<32||m>126&&m<x){this._printHandler(c,v,U),v=U-1;break}if(++U>=a||(m=c[U])<32||m>126&&m<x){this._printHandler(c,v,U),v=U-1;break}if(++U>=a||(m=c[U])<32||m>126&&m<x){this._printHandler(c,v,U),v=U-1;break}}break;case 3:this._executeHandlers[m]?this._executeHandlers[m]():this._executeHandlerFb(m),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:m,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const E=this._csiHandlers[this._collect<<8|m];let L=E?E.length-1:-1;for(;L>=0&&(_=E[L](this._params),_!==!0);L--)if(_ instanceof Promise)return this._preserveStack(3,E,L,b,v),_;L<0&&this._csiHandlerFb(this._collect<<8|m,this._params),this.precedingCodepoint=0;break;case 8:do switch(m){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(m-48)}while(++v<a&&(m=c[v])>47&&m<60);v--;break;case 9:this._collect<<=8,this._collect|=m;break;case 10:const z=this._escHandlers[this._collect<<8|m];let O=z?z.length-1:-1;for(;O>=0&&(_=z[O](),_!==!0);O--)if(_ instanceof Promise)return this._preserveStack(4,z,O,b,v),_;O<0&&this._escHandlerFb(this._collect<<8|m),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|m,this._params);break;case 13:for(let U=v+1;;++U)if(U>=a||(m=c[U])===24||m===26||m===27||m>127&&m<x){this._dcsParser.put(c,v,U),v=U-1;break}break;case 14:if(_=this._dcsParser.unhook(m!==24&&m!==26),_)return this._preserveStack(6,[],0,b,v),_;m===27&&(b|=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 U=v+1;;U++)if(U>=a||(m=c[U])<32||m>127&&m<x){this._oscParser.put(c,v,U),v=U-1;break}break;case 6:if(_=this._oscParser.end(m!==24&&m!==26),_)return this._preserveStack(5,[],0,b,v),_;m===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&b}}}u.EscapeSequenceParser=S},6242:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const f=d(5770),y=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(p,C){this._handlers[p]===void 0&&(this._handlers[p]=[]);const x=this._handlers[p];return x.push(C),{dispose:()=>{const S=x.indexOf(C);S!==-1&&x.splice(S,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,C,x){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(p,C,x);else this._handlerFb(this._id,"PUT",(0,y.utf32ToString)(p,C,x))}start(){this.reset(),this._state=1}put(p,C,x){if(this._state!==3){if(this._state===1)for(;C<x;){const S=p[C++];if(S===59){this._state=2,this._start();break}if(S<48||57<S)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+S-48}this._state===2&&x-C>0&&this._put(p,C,x)}}end(p,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let x=!1,S=this._active.length-1,l=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,x=C,l=this._stack.fallThrough,this._stack.paused=!1),!l&&x===!1){for(;S>=0&&(x=this._active[S].end(p),x!==!0);S--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,x;S--}for(;S>=0;S--)if(x=this._active[S].end(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,x}else this._handlerFb(this._id,"END",p);this._active=h,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,C,x){this._hitLimit||(this._data+=(0,y.utf32ToString)(p,C,x),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let C=!1;if(this._hitLimit)C=!1;else if(p&&(C=this._handler(this._data),C instanceof Promise))return C.then((x=>(this._data="",this._hitLimit=!1,x)));return this._data="",this._hitLimit=!1,C}}},8742:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const d=2147483647;class f{static fromArray(h){const p=new f;if(!h.length)return p;for(let C=Array.isArray(h[0])?1:0;C<h.length;++C){const x=h[C];if(Array.isArray(x))for(let S=0;S<x.length;++S)p.addSubParam(x[S]);else p.addParam(x)}return p}constructor(h=32,p=32){if(this.maxLength=h,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new f(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 p=0;p<this.length;++p){h.push(this.params[p]);const C=this._subParamsIdx[p]>>8,x=255&this._subParamsIdx[p];x-C>0&&h.push(Array.prototype.slice.call(this._subParams,C,x))}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 p=this._subParamsIdx[h]>>8,C=255&this._subParamsIdx[h];return C-p>0?this._subParams.subarray(p,C):null}getSubParamsAll(){const h={};for(let p=0;p<this.length;++p){const C=this._subParamsIdx[p]>>8,x=255&this._subParamsIdx[p];x-C>0&&(h[p]=this._subParams.slice(C,x))}return h}addDigit(h){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,x=C[p-1];C[p-1]=~x?Math.min(10*x+h,d):h}}u.Params=f},5741:(ee,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,f){const y={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(y),f.dispose=()=>this._wrappedAddonDispose(y),f.activate(d)}_wrappedAddonDispose(d){if(d.isDisposed)return;let f=-1;for(let y=0;y<this._addons.length;y++)if(this._addons[y]===d){f=y;break}if(f===-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(f,1)}}},8771:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const f=d(3785),y=d(511);u.BufferApiView=class{constructor(h,p){this._buffer=h,this.type=p}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 p=this._buffer.lines.get(h);if(p)return new f.BufferLineApiView(p)}getNullCell(){return new y.CellData}}},3785:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const f=d(511);u.BufferLineApiView=class{constructor(y){this._line=y}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(y,h){if(!(y<0||y>=this._line.length))return h?(this._line.loadCell(y,h),h):this._line.loadCell(y,new f.CellData)}translateToString(y,h,p){return this._line.translateToString(y,h,p)}}},8285:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const f=d(8771),y=d(8460),h=d(844);class p extends h.Disposable{constructor(x){super(),this._core=x,this._onBufferChange=this.register(new y.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}u.BufferNamespaceApi=p},7975:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(d){this._core=d}registerCsiHandler(d,f){return this._core.registerCsiHandler(d,(y=>f(y.toArray())))}addCsiHandler(d,f){return this.registerCsiHandler(d,f)}registerDcsHandler(d,f){return this._core.registerDcsHandler(d,((y,h)=>f(y,h.toArray())))}addDcsHandler(d,f){return this.registerDcsHandler(d,f)}registerEscHandler(d,f){return this._core.registerEscHandler(d,f)}addEscHandler(d,f){return this.registerEscHandler(d,f)}registerOscHandler(d,f){return this._core.registerOscHandler(d,f)}addOscHandler(d,f){return this.registerOscHandler(d,f)}}},7090:(ee,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(ee,u,d){var f=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const h=d(8460),p=d(844),C=d(5295),x=d(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let S=u.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(l){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(l.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(l.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(l,this))}resize(l,c){this.cols=l,this.rows=c,this.buffers.resize(l,c),this._onResize.fire({cols:l,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(l,c=!1){const a=this.buffer;let o;o=this._cachedBlankLine,o&&o.length===this.cols&&o.getFg(0)===l.fg&&o.getBg(0)===l.bg||(o=a.getBlankLine(l,c),this._cachedBlankLine=o),o.isWrapped=c;const _=a.ybase+a.scrollTop,m=a.ybase+a.scrollBottom;if(a.scrollTop===0){const b=a.lines.isFull;m===a.lines.length-1?b?a.lines.recycle().copyFrom(o):a.lines.push(o.clone()):a.lines.splice(m+1,0,o.clone()),b?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const b=m-_+1;a.lines.shiftElements(_+1,b-1,-1),a.lines.set(m,o.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(l,c,a){const o=this.buffer;if(l<0){if(o.ydisp===0)return;this.isUserScrolling=!0}else l+o.ydisp>=o.ybase&&(this.isUserScrolling=!1);const _=o.ydisp;o.ydisp=Math.max(Math.min(o.ydisp+l,o.ybase),0),_!==o.ydisp&&(c||this._onScroll.fire(o.ydisp))}};u.BufferService=S=f([y(0,x.IOptionsService)],S)},7994:(ee,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,f){this._charsets[d]=f,this.glevel===d&&(this.charset=f)}}},1753:function(ee,u,d){var f=this&&this.__decorate||function(o,_,m,b){var D,v=arguments.length,E=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,m):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,_,m,b);else for(var L=o.length-1;L>=0;L--)(D=o[L])&&(E=(v<3?D(E):v>3?D(_,m,E):D(_,m))||E);return v>3&&E&&Object.defineProperty(_,m,E),E},y=this&&this.__param||function(o,_){return function(m,b){_(m,b,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const h=d(2585),p=d(8460),C=d(844),x={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 S(o,_){let m=(o.ctrl?16:0)|(o.shift?4:0)|(o.alt?8:0);return o.button===4?(m|=64,m|=o.action):(m|=3&o.button,4&o.button&&(m|=64),8&o.button&&(m|=128),o.action===32?m|=32:o.action!==0||_||(m|=3)),m}const l=String.fromCharCode,c={DEFAULT:o=>{const _=[S(o,!1)+32,o.col+32,o.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${l(_[0])}${l(_[1])}${l(_[2])}`},SGR:o=>{const _=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${S(o,!0)};${o.col};${o.row}${_}`},SGR_PIXELS:o=>{const _=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${S(o,!0)};${o.x};${o.y}${_}`}};let a=u.CoreMouseService=class extends C.Disposable{constructor(o,_){super(),this._bufferService=o,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const m of Object.keys(x))this.addProtocol(m,x[m]);for(const m of Object.keys(c))this.addEncoding(m,c[m]);this.reset()}addProtocol(o,_){this._protocols[o]=_}addEncoding(o,_){this._encodings[o]=_}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 _=this._encodings[this._activeEncoding](o);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!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,_,m){if(m){if(o.x!==_.x||o.y!==_.y)return!1}else if(o.col!==_.col||o.row!==_.row)return!1;return o.button===_.button&&o.action===_.action&&o.ctrl===_.ctrl&&o.alt===_.alt&&o.shift===_.shift}};u.CoreMouseService=a=f([y(0,h.IBufferService),y(1,h.ICoreService)],a)},6975:function(ee,u,d){var f=this&&this.__decorate||function(a,o,_,m){var b,D=arguments.length,v=D<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,_):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,m);else for(var E=a.length-1;E>=0;E--)(b=a[E])&&(v=(D<3?b(v):D>3?b(o,_,v):b(o,_))||v);return D>3&&v&&Object.defineProperty(o,_,v),v},y=this&&this.__param||function(a,o){return function(_,m){o(_,m,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const h=d(1439),p=d(8460),C=d(844),x=d(2585),S=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=u.CoreService=class extends C.Disposable{constructor(a,o,_){super(),this._bufferService=a,this._logService=o,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(S),this.decPrivateModes=(0,h.clone)(l)}reset(){this.modes=(0,h.clone)(S),this.decPrivateModes=(0,h.clone)(l)}triggerDataEvent(a,o=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;o&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),o&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((m=>m.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((o=>o.charCodeAt(0))))),this._onBinary.fire(a))}};u.CoreService=c=f([y(0,x.IBufferService),y(1,x.ILogService),y(2,x.IOptionsService)],c)},9074:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const f=d(8055),y=d(8460),h=d(844),p=d(6106);let C=0,x=0;class S extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((a=>a?.marker.line)),this._onDecorationRegistered=this.register(new y.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new y.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const o=new l(a);if(o){const _=o.marker.onDispose((()=>o.dispose()));o.onDispose((()=>{o&&(this._decorations.delete(o)&&this._onDecorationRemoved.fire(o),_.dispose())})),this._decorations.insert(o),this._onDecorationRegistered.fire(o)}return o}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,o,_){var m,b,D;let v=0,E=0;for(const L of this._decorations.getKeyIterator(o))v=(m=L.options.x)!==null&&m!==void 0?m:0,E=v+((b=L.options.width)!==null&&b!==void 0?b:1),a>=v&&a<E&&(!_||((D=L.options.layer)!==null&&D!==void 0?D:"bottom")===_)&&(yield L)}forEachDecorationAtCell(a,o,_,m){this._decorations.forEachByKey(o,(b=>{var D,v,E;C=(D=b.options.x)!==null&&D!==void 0?D:0,x=C+((v=b.options.width)!==null&&v!==void 0?v:1),a>=C&&a<x&&(!_||((E=b.options.layer)!==null&&E!==void 0?E:"bottom")===_)&&m(b)}))}}u.DecorationService=S;class l extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(a){super(),this.options=a,this.onRenderEmitter=this.register(new y.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new y.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=a.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const f=d(2585),y=d(8343);class h{constructor(...C){this._entries=new Map;for(const[x,S]of C)this.set(x,S)}set(C,x){const S=this._entries.get(C);return this._entries.set(C,x),S}forEach(C){for(const[x,S]of this._entries.entries())C(x,S)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}u.ServiceCollection=h,u.InstantiationService=class{constructor(){this._services=new h,this._services.set(f.IInstantiationService,this)}setService(p,C){this._services.set(p,C)}getService(p){return this._services.get(p)}createInstance(p,...C){const x=(0,y.getServiceDependencies)(p).sort(((c,a)=>c.index-a.index)),S=[];for(const c of x){const a=this._services.get(c.id);if(!a)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${c.id}.`);S.push(a)}const l=x.length>0?x[0].index:C.length;if(C.length!==l)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${l+1} conflicts with ${C.length} static arguments`);return new p(...C,...S)}}},7866:function(ee,u,d){var f=this&&this.__decorate||function(l,c,a,o){var _,m=arguments.length,b=m<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var D=l.length-1;D>=0;D--)(_=l[D])&&(b=(m<3?_(b):m>3?_(c,a,b):_(c,a))||b);return m>3&&b&&Object.defineProperty(c,a,b),b},y=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const h=d(844),p=d(2585),C={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let x,S=u.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),x=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let c=0;c<l.length;c++)typeof l[c]=="function"&&(l[c]=l[c]())}_log(l,c,a){this._evalLazyOptionalParams(a),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...a)}trace(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.TRACE&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.trace.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.log,l,c)}debug(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.debug.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.log,l,c)}info(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.INFO&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.info.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.info,l,c)}warn(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.WARN&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.warn.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.warn,l,c)}error(l,...c){var a,o;this._logLevel<=p.LogLevelEnum.ERROR&&this._log((o=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.error.bind(this._optionsService.options.logger))!==null&&o!==void 0?o:console.error,l,c)}};u.LogService=S=f([y(0,p.IOptionsService)],S),u.setTraceLogger=function(l){x=l},u.traceCall=function(l,c,a){if(typeof a.value!="function")throw new Error("not supported");const o=a.value;a.value=function(..._){if(x.logLevel!==p.LogLevelEnum.TRACE)return o.apply(this,_);x.trace(`GlyphRenderer#${o.name}(${_.map((b=>JSON.stringify(b))).join(", ")})`);const m=o.apply(this,_);return x.trace(`GlyphRenderer#${o.name} return`,m),m}}},7302:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const f=d(8460),y=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 p=["normal","bold","100","200","300","400","500","600","700","800","900"];class C extends y.Disposable{constructor(S){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const l=Object.assign({},u.DEFAULT_OPTIONS);for(const c in S)if(c in l)try{const a=S[c];l[c]=this._sanitizeAndValidateOption(c,a)}catch(a){console.error(a)}this.rawOptions=l,this.options=Object.assign({},l),this._setupOptions()}onSpecificOptionChange(S,l){return this.onOptionChange((c=>{c===S&&l(this.rawOptions[S])}))}onMultipleOptionChange(S,l){return this.onOptionChange((c=>{S.indexOf(c)!==-1&&l()}))}_setupOptions(){const S=c=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},l=(c,a)=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);a=this._sanitizeAndValidateOption(c,a),this.rawOptions[c]!==a&&(this.rawOptions[c]=a,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const a={get:S.bind(this,c),set:l.bind(this,c)};Object.defineProperty(this.options,c,a)}}_sanitizeAndValidateOption(S,l){switch(S){case"cursorStyle":if(l||(l=u.DEFAULT_OPTIONS[S]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(l))throw new Error(`"${l}" is not a valid value for ${S}`);break;case"wordSeparator":l||(l=u.DEFAULT_OPTIONS[S]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=p.includes(l)?l:u.DEFAULT_OPTIONS[S];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(`${S} cannot be less than 1, value: ${l}`);break;case"minimumContrastRatio":l=Math.max(1,Math.min(21,Math.round(10*l)/10));break;case"scrollback":if((l=Math.min(l,4294967295))<0)throw new Error(`${S} cannot be less than 0, value: ${l}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(`${S} cannot be less than or equal to 0, value: ${l}`);break;case"rows":case"cols":if(!l&&l!==0)throw new Error(`${S} must be numeric, value: ${l}`);break;case"windowsPty":l=l??{}}return l}}u.OptionsService=C},2660:function(ee,u,d){var f=this&&this.__decorate||function(C,x,S,l){var c,a=arguments.length,o=a<3?x:l===null?l=Object.getOwnPropertyDescriptor(x,S):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(C,x,S,l);else for(var _=C.length-1;_>=0;_--)(c=C[_])&&(o=(a<3?c(o):a>3?c(x,S,o):c(x,S))||o);return a>3&&o&&Object.defineProperty(x,S,o),o},y=this&&this.__param||function(C,x){return function(S,l){x(S,l,C)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const h=d(2585);let p=u.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const x=this._bufferService.buffer;if(C.id===void 0){const _=x.addMarker(x.ybase+x.y),m={data:C,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(m,_))),this._dataByLinkId.set(m.id,m),m.id}const S=C,l=this._getEntryIdKey(S),c=this._entriesWithId.get(l);if(c)return this.addLineToLink(c.id,x.ybase+x.y),c.id;const a=x.addMarker(x.ybase+x.y),o={id:this._nextId++,key:this._getEntryIdKey(S),data:S,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(o,a))),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(C,x){const S=this._dataByLinkId.get(C);if(S&&S.lines.every((l=>l.line!==x))){const l=this._bufferService.buffer.addMarker(x);S.lines.push(l),l.onDispose((()=>this._removeMarkerFromLink(S,l)))}}getLinkData(C){var x;return(x=this._dataByLinkId.get(C))===null||x===void 0?void 0:x.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,x){const S=C.lines.indexOf(x);S!==-1&&(C.lines.splice(S,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};u.OscLinkService=p=f([y(0,h.IBufferService)],p)},8343:(ee,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const d="di$target",f="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(y){return y[f]||[]},u.createDecorator=function(y){if(u.serviceRegistry.has(y))return u.serviceRegistry.get(y);const h=function(p,C,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(S,l,c){l[d]===l?l[f].push({id:S,index:c}):(l[f]=[{id:S,index:c}],l[d]=l)})(h,p,x)};return h.toString=()=>y,u.serviceRegistry.set(y,h),h}},2585:(ee,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 f=d(8343);var y;u.IBufferService=(0,f.createDecorator)("BufferService"),u.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),u.ICoreService=(0,f.createDecorator)("CoreService"),u.ICharsetService=(0,f.createDecorator)("CharsetService"),u.IInstantiationService=(0,f.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"})(y||(u.LogLevelEnum=y={})),u.ILogService=(0,f.createDecorator)("LogService"),u.IOptionsService=(0,f.createDecorator)("OptionsService"),u.IOscLinkService=(0,f.createDecorator)("OscLinkService"),u.IUnicodeService=(0,f.createDecorator)("UnicodeService"),u.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(ee,u,d)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const f=d(8460),y=d(225);u.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const h=new y.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 p=0;const C=h.length;for(let x=0;x<C;++x){let S=h.charCodeAt(x);if(55296<=S&&S<=56319){if(++x>=C)return p+this.wcwidth(S);const l=h.charCodeAt(x);56320<=l&&l<=57343?S=1024*(S-55296)+l-56320+65536:p+=this.wcwidth(l)}p+=this.wcwidth(S)}return p}}}},G={};function oe(ee){var u=G[ee];if(u!==void 0)return u.exports;var d=G[ee]={exports:{}};return pe[ee].call(d.exports,d,d.exports,oe),d.exports}var ge={};return(()=>{var ee=ge;Object.defineProperty(ee,"__esModule",{value:!0}),ee.Terminal=void 0;const u=oe(9042),d=oe(3236),f=oe(844),y=oe(5741),h=oe(8285),p=oe(7975),C=oe(7090),x=["cols","rows"];class S extends f.Disposable{constructor(c){super(),this._core=this.register(new d.Terminal(c)),this._addonManager=this.register(new y.AddonManager),this._publicOptions=Object.assign({},this._core.options);const a=_=>this._core.options[_],o=(_,m)=>{this._checkReadonlyOptions(_),this._core.options[_]=m};for(const _ in this._core.options){const m={get:a.bind(this,_),set:o.bind(this,_)};Object.defineProperty(this._publicOptions,_,m)}}_checkReadonlyOptions(c){if(x.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 p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new C.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let a="none";switch(this._core.coreMouseService.activeProtocol){case"X10":a="x10";break;case"VT200":a="vt200";break;case"DRAG":a="drag";break;case"ANY":a="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:a,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const a in c)this._publicOptions[a]=c[a]}blur(){this._core.blur()}focus(){this._core.focus()}resize(c,a){this._verifyIntegers(c,a),this._core.resize(c,a)}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 a,o,_;return this._checkProposedApi(),this._verifyPositiveIntegers((a=c.x)!==null&&a!==void 0?a:0,(o=c.width)!==null&&o!==void 0?o:0,(_=c.height)!==null&&_!==void 0?_:0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,a,o){this._verifyIntegers(c,a,o),this._core.select(c,a,o)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,a){this._verifyIntegers(c,a),this._core.selectLines(c,a)}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,a){this._core.write(c,a)}writeln(c,a){this._core.write(c),this._core.write(`\r
|
|
17
|
+
`,a)}paste(c){this._core.paste(c)}refresh(c,a){this._verifyIntegers(c,a),this._core.refresh(c,a)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return u}_verifyIntegers(...c){for(const a of c)if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const a of c)if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}ee.Terminal=S})(),ge})()))})(jo)),jo.exports}var wv=Ev();function ns(q="req"){return`${q}_${Math.random().toString(36).slice(2,10)}`}function rn(q){return se.jsxs("section",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/72 p-5 shadow-2xl shadow-slate-950/30 backdrop-blur",children:[se.jsx("div",{className:"mb-4 flex items-center justify-between gap-3",children:se.jsx("h2",{className:"text-lg font-semibold text-white",children:q.title})}),q.children]})}function hr(q){return se.jsxs("label",{className:"block",children:[se.jsx("span",{className:"mb-2 block text-sm text-slate-400",children:q.label}),se.jsx("input",{className:"w-full rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-base outline-none placeholder:text-slate-500 disabled:opacity-50 md:text-sm",value:q.value,onChange:ue=>q.onChange(ue.target.value),placeholder:q.placeholder,disabled:q.disabled})]})}function xv(q){const ue=q.kind==="error"?"border-rose-500/40 bg-rose-500/10 text-rose-100":q.kind==="success"?"border-emerald-500/40 bg-emerald-500/10 text-emerald-100":"border-sky-500/40 bg-sky-500/10 text-sky-100";return se.jsxs("div",{className:`flex items-start justify-between gap-3 rounded-2xl border px-4 py-3 text-sm ${ue}`,children:[se.jsx("p",{children:q.text}),se.jsx("button",{className:"rounded-full border border-current/30 px-3 py-1 text-xs",type:"button",onClick:q.onDismiss,children:"关闭"})]})}function Gf(q){const ue=q.connectionPhase==="connected",pe=q.showConnectionFields??!0,G=q.showPairingSection??!0,oe=q.showActions??!0;return se.jsx(rn,{title:q.title??"连接",children:se.jsxs("div",{className:"space-y-3",children:[pe?se.jsxs(se.Fragment,{children:[se.jsx(hr,{label:"WebSocket 地址",value:q.wsUrl,onChange:q.onWsUrlChange}),se.jsx(hr,{label:"访问令牌",value:q.clientToken,onChange:q.onClientTokenChange,placeholder:"首次配对后会自动写入"}),se.jsx(hr,{label:"设备 ID",value:q.deviceId,onChange:q.onDeviceIdChange,disabled:!q.deviceIdEditable})]}):null,G?se.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-950/40 p-3",children:[se.jsx("p",{className:"text-sm font-medium text-white",children:"设备配对"}),se.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"电脑上执行 `termpilot pair` 获取一次性配对码,手机输入后会自动换取设备访问令牌。"}),se.jsxs("div",{className:"mt-3 flex gap-3",children:[se.jsx("input",{className:"flex-1 rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-base uppercase outline-none placeholder:text-slate-500 md:text-sm",value:q.pairingCode,onChange:ge=>q.onPairingCodeChange(ge.target.value),placeholder:"ABC-234"}),se.jsx("button",{className:"rounded-full bg-emerald-400 px-4 py-3 text-sm font-medium text-slate-950 disabled:opacity-60",type:"button",disabled:q.pairingPending||!q.wsUrlValid,onClick:q.onRedeemPairingCode,children:q.pairingPending?"配对中":"配对"})]}),q.pairingMessage?se.jsx("p",{className:"mt-2 text-xs text-slate-400",children:q.pairingMessage}):null]}):null,oe?se.jsxs(se.Fragment,{children:[se.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[minmax(0,1fr)_auto_auto]",children:[se.jsx("button",{className:"w-full rounded-full bg-sky-500 px-4 py-2.5 text-sm font-medium text-slate-950 disabled:opacity-60",disabled:q.connectionPhase==="connecting"||!q.wsUrlValid,onClick:q.onConnect,children:ue?"重新连接":q.connectionPhase==="connecting"?"连接中":"连接"}),se.jsx("button",{className:"w-full rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200 disabled:opacity-40",disabled:!ue,onClick:q.onRefresh,children:"刷新"}),se.jsx("button",{className:"w-full rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200 disabled:opacity-40",disabled:q.connectionPhase==="idle",onClick:q.onDisconnect,children:"断开"})]}),se.jsx("button",{className:"w-full rounded-full border border-rose-500/40 px-4 py-2.5 text-sm text-rose-200",type:"button",onClick:q.onClearBinding,children:"清除本机绑定"}),se.jsx("button",{className:"w-full rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200",type:"button",onClick:q.onToggleNotifications,children:q.notificationsEnabled?"关闭浏览器提醒":"开启浏览器提醒"}),se.jsx("p",{className:"text-xs text-slate-500",children:"断线后会自动重连。连接参数、访问令牌和最近查看的会话会保存在本机浏览器里。"})]}):null]})})}function Xf(q){return se.jsx(rn,{title:"创建会话",children:se.jsxs("form",{className:"space-y-3",onSubmit:q.onSubmit,children:[se.jsx(hr,{label:"名称",value:q.createName,onChange:q.onCreateNameChange,placeholder:"claude-main",disabled:!q.canControl}),se.jsx(hr,{label:"工作目录",value:q.createCwd,onChange:q.onCreateCwdChange,placeholder:"/Users/...",disabled:!q.canControl}),se.jsx(hr,{label:"Shell",value:q.createShell,onChange:q.onCreateShellChange,placeholder:"/bin/zsh",disabled:!q.canControl}),se.jsx("button",{className:"w-full rounded-full bg-emerald-400 px-4 py-2.5 text-sm font-medium text-slate-950 disabled:opacity-60",type:"submit",disabled:!q.canControl,children:"创建"})]})})}const Dv=[{value:"all",label:"全部"},{value:"running",label:"运行中"},{value:"exited",label:"已退出"}];function Ff(q){return se.jsx(rn,{title:"会话列表",children:se.jsxs("div",{className:"space-y-3",children:[se.jsx("input",{className:"w-full rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-base outline-none placeholder:text-slate-500 md:text-sm",value:q.sessionQuery,onChange:ue=>q.onSessionQueryChange(ue.target.value),placeholder:"搜索会话名称或目录"}),se.jsx("div",{className:"flex flex-wrap gap-2",children:Dv.map(ue=>se.jsx("button",{className:`min-h-11 rounded-full px-3 py-2 text-sm ${q.statusFilter===ue.value?"bg-sky-500 text-slate-950":"border border-slate-700 text-slate-200"}`,type:"button",onClick:()=>q.onStatusFilterChange(ue.value),children:ue.label},ue.value))}),se.jsxs("p",{className:"text-xs text-slate-500",children:["当前显示 ",q.filteredSessions.length," / ",q.sessions.length," 个会话。置顶会话会始终排在最前面。"]}),q.filteredSessions.length===0?se.jsx("p",{className:"text-sm text-slate-400",children:q.sessions.length===0?"当前没有会话。":"没有匹配当前搜索或筛选条件的会话。"}):q.filteredSessions.map(ue=>se.jsxs("div",{"data-session-name":ue.name,className:`w-full rounded-2xl border px-4 py-3 text-left transition ${ue.sid===q.activeSid?"border-sky-400/70 bg-sky-500/10":"border-slate-800 bg-slate-950/40"}`,children:[se.jsxs("div",{className:"flex items-start justify-between gap-3",children:[se.jsxs("div",{children:[se.jsx("p",{className:"font-medium text-white",children:ue.name}),se.jsx("p",{className:"mt-1 text-xs text-slate-400",children:ue.cwd})]}),se.jsx("span",{className:`rounded-full px-2.5 py-1 text-[11px] ${ue.status==="running"?"bg-emerald-500/15 text-emerald-300":"bg-slate-700 text-slate-300"}`,children:ue.status==="running"?"运行中":"已退出"})]}),se.jsxs("div",{className:"mt-3 flex gap-2",children:[se.jsx("button",{className:`rounded-full border px-3 py-1.5 text-xs ${q.pinnedSids.includes(ue.sid)?"border-amber-400/50 text-amber-200":"border-slate-700 text-slate-200"}`,type:"button",onClick:()=>q.onTogglePinnedSession(ue.sid),children:q.pinnedSids.includes(ue.sid)?"取消置顶":"置顶"}),se.jsx("button",{className:"rounded-full border border-slate-700 px-3 py-1.5 text-xs text-slate-200",type:"button",onClick:()=>q.onSelectSession(ue.sid),children:"查看"}),se.jsx("button",{className:"rounded-full border border-rose-500/40 px-3 py-1.5 text-xs text-rose-200 disabled:opacity-40",type:"button",disabled:ue.status!=="running"||!q.canControl,onClick:()=>q.onKillSession(ue.sid),children:"关闭"})]})]},ue.sid))]})})}function Vf(q){return se.jsx(rn,{title:q.activeSession?`${q.activeSession.name} · ${q.activeSession.status==="running"?"运行中":"已退出"}`:"当前未选择会话",children:q.activeSession?se.jsxs("div",{className:"flex h-full min-h-[68vh] flex-col gap-4",children:[q.onBack?se.jsx("button",{className:"inline-flex min-h-11 w-fit items-center rounded-full border border-slate-700 px-4 py-2 text-sm text-slate-200",type:"button",onClick:q.onBack,children:"返回会话列表"}):null,se.jsx("div",{className:"flex flex-wrap gap-2 md:sticky md:top-0 md:z-10 md:bg-slate-900/72 md:pb-2",children:q.shortcutKeys.map(({key:ue,label:pe})=>se.jsx("button",{className:"min-h-11 rounded-full border border-slate-700 px-3 py-2 text-sm text-slate-200 disabled:opacity-40",disabled:!q.activeSid||!q.canControl,onClick:()=>q.onSendKey(ue),children:pe},ue))}),se.jsx("div",{className:"min-h-[440px] flex-1 overflow-hidden rounded-3xl border border-slate-800 bg-slate-950/95 p-3",children:se.jsx("div",{ref:q.terminalRef,className:"h-full w-full overflow-hidden"})}),se.jsxs("form",{className:"flex flex-col gap-3 md:flex-row",onSubmit:q.onSubmitCommand,children:[se.jsx("input",{className:"flex-1 rounded-full border border-slate-700 bg-slate-950/60 px-4 py-3 text-base outline-none ring-0 placeholder:text-slate-500 disabled:opacity-50 md:text-sm",value:q.command,onChange:ue=>q.onCommandChange(ue.target.value),placeholder:"输入命令,发送时会自动追加回车",disabled:!q.activeSid||!q.canControl}),se.jsx("button",{className:"rounded-full bg-sky-500 px-5 py-3 text-sm font-medium text-slate-950 disabled:opacity-60",type:"submit",disabled:!q.activeSid||!q.canControl,children:"发送"})]}),se.jsxs("div",{className:"rounded-3xl border border-slate-800 bg-slate-950/35 p-4",children:[se.jsxs("div",{className:"flex items-center justify-between gap-3",children:[se.jsx("p",{className:"text-sm font-medium text-white",children:"粘贴大段命令"}),se.jsx("span",{className:"text-xs text-slate-500",children:"适合脚本、多行命令和长 prompt"})]}),se.jsx("textarea",{className:"mt-3 min-h-32 w-full rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-base outline-none placeholder:text-slate-500 disabled:opacity-50 md:text-sm",value:q.pasteBuffer,onChange:ue=>q.onPasteBufferChange(ue.target.value),placeholder:"在这里粘贴多行内容。原样发送不会自动补回车;发送并回车会在末尾补一个回车。",disabled:!q.activeSid||!q.canControl}),se.jsxs("div",{className:"mt-3 flex flex-col gap-3 sm:flex-row",children:[se.jsx("button",{className:"min-h-11 flex-1 rounded-full border border-slate-700 px-4 py-3 text-sm text-slate-200 disabled:opacity-40",type:"button",disabled:!q.activeSid||!q.canControl||!q.pasteBuffer,onClick:()=>q.onSendPaste("raw"),children:"原样发送"}),se.jsx("button",{className:"min-h-11 flex-1 rounded-full bg-emerald-400 px-4 py-3 text-sm font-medium text-slate-950 disabled:opacity-40",type:"button",disabled:!q.activeSid||!q.canControl||!q.pasteBuffer,onClick:()=>q.onSendPaste("line"),children:"发送并回车"})]})]}),se.jsx("p",{className:"text-xs text-slate-500",children:"当前模式是浏览器直开 PWA。适合查看流式输出、补命令和关闭会话,不适合重度长文本输入。"})]}):se.jsxs("div",{className:"flex min-h-[56vh] flex-col items-center justify-center rounded-3xl border border-dashed border-slate-700 bg-slate-950/35 px-6 py-12 text-center",children:[se.jsx("p",{className:"text-sm font-semibold text-white",children:"先选择一个会话"}),se.jsx("p",{className:"mt-2 max-w-md text-sm text-slate-400",children:"你可以在左侧查看已有会话,或者先创建一个新的 tmux 会话。选中之后这里才会显示终端输出和输入控件。"})]})})}const Pf=[{key:"enter",label:"Enter"},{key:"tab",label:"Tab"},{key:"ctrl_c",label:"Ctrl+C"},{key:"ctrl_d",label:"Ctrl+D"},{key:"escape",label:"Esc"},{key:"arrow_up",label:"↑"},{key:"arrow_down",label:"↓"},{key:"arrow_left",label:"←"},{key:"arrow_right",label:"→"}],Av="ws://127.0.0.1:8787/ws",Tv="",xs="pc-main",Qf="termpilot-app-state";function Rv(){if(typeof window>"u")return Av;const q=window.location.protocol==="https:"?"wss:":"ws:";return window.location.port==="5173"?`${q}//${window.location.hostname}:8787/ws`:`${q}//${window.location.host}/ws`}function Mv(q){const ue=new URL(q);return ue.protocol=ue.protocol==="wss:"?"https:":"http:",ue.pathname="",ue.search="",ue.hash="",ue.toString().replace(/\/$/,"")}function Lv(q){try{return new URL(q)}catch{return null}}function Ov(){const q=me.useRef(null),ue=me.useRef(null),pe=me.useRef(null),G=me.useRef(null),oe=me.useRef(null),ge=me.useRef(null),ee=me.useRef(null),u=me.useRef(!1),d=me.useRef(0),f=me.useRef(xs),y=me.useRef(xs),h=me.useRef(!1),p=me.useRef({}),C=me.useRef(!1),[x,S]=me.useState(Rv),[l,c]=me.useState(Tv),[a,o]=me.useState(xs),[_,m]=me.useState(!1),[b,D]=me.useState("idle"),[v,E]=me.useState(!1),[L,z]=me.useState([]),[O,U]=me.useState({}),[V,J]=me.useState(null),[k,I]=me.useState([]),[A,M]=me.useState(""),[B,w]=me.useState("all"),[N,Q]=me.useState(""),[ie,le]=me.useState(""),[he,T]=me.useState(!1),[Y,Z]=me.useState(!1),[te,ye]=me.useState(null),[ae,Ae]=me.useState(""),[ke,Je]=me.useState(""),[wt,Ce]=me.useState(""),[It,si]=me.useState(""),[Jt,ri]=me.useState(""),ni=me.useMemo(()=>L.find(ce=>ce.sid===V)??null,[V,L]),ot=l.trim().length>0,Xe=b==="connected",Fe=Xe&&v,ct=me.useMemo(()=>Lv(x),[x]),di=me.useMemo(()=>ct?Mv(ct.toString()):null,[ct]),St=me.useMemo(()=>{const ce=A.trim().toLowerCase();return L.filter(de=>B!=="all"&&de.status!==B?!1:ce?de.name.toLowerCase().includes(ce)||de.cwd.toLowerCase().includes(ce):!0).sort((de,Le)=>{const Ye=k.includes(de.sid),Hi=k.includes(Le.sid);return Ye!==Hi?Ye?-1:1:Le.startedAt.localeCompare(de.startedAt)})},[k,A,L,B]);me.useEffect(()=>{f.current=a},[a]),me.useEffect(()=>{const ce=a.trim()||xs;if(!Xe){y.current=ce;return}if(y.current===ce)return;y.current=ce,E(!1),z([]),U({}),J(null);const de=window.setTimeout(()=>{He(ce)},200);return()=>{window.clearTimeout(de)}},[Xe,a]),me.useEffect(()=>{try{const ce=window.localStorage.getItem(Qf);if(!ce)return;const de=JSON.parse(ce);de.wsUrl&&S(de.wsUrl),de.clientToken&&c(de.clientToken),typeof de.deviceId=="string"&&de.deviceId.trim()&&o(de.deviceId.trim()),(typeof de.activeSid=="string"||de.activeSid===null)&&J(de.activeSid??null),Array.isArray(de.pinnedSids)&&I(de.pinnedSids.filter(Le=>typeof Le=="string")),typeof de.notificationsEnabled=="boolean"&&Z(de.notificationsEnabled)}catch{}},[]),me.useEffect(()=>{const ce={wsUrl:x,clientToken:l,deviceId:a,activeSid:V,pinnedSids:k,notificationsEnabled:Y};window.localStorage.setItem(Qf,JSON.stringify(ce))},[V,l,a,Y,k,x]),me.useEffect(()=>{if(!q.current||pe.current)return;let ce=null,de=0,Le=0;return de=window.requestAnimationFrame(()=>{if(!q.current)return;ce=new wv.Terminal({convertEol:!0,cursorBlink:!0,fontFamily:'"SF Mono", "JetBrains Mono", Menlo, monospace',fontSize:13,theme:{background:"#020617",foreground:"#e2e8f0",cursor:"#38bdf8",black:"#0f172a",brightBlack:"#334155"}});const Ye=new Cv.FitAddon;ce.loadAddon(Ye),ce.open(q.current),pe.current=ce,G.current=Ye,Le=window.requestAnimationFrame(()=>{Oi()})}),()=>{window.cancelAnimationFrame(de),window.cancelAnimationFrame(Le),ce?.dispose(),pe.current=null,G.current=null}},[]),me.useEffect(()=>{if(!q.current||!G.current)return;const ce=()=>{!pe.current||!Oi()||!Fe||!V||pe.current.cols===0||pe.current.rows===0||yt({type:"session.resize",reqId:ns("resize"),deviceId:a,sid:V,payload:{cols:pe.current.cols,rows:pe.current.rows}})},de=new ResizeObserver(()=>ce());return de.observe(q.current),ce(),()=>{de.disconnect()}},[V,Fe,a]),me.useEffect(()=>{pe.current&&(pe.current.clear(),pe.current.write((O[V??""]??"").replace(/\n/g,`\r
|
|
18
|
+
`)))},[V,O]),me.useEffect(()=>()=>{ge.current!==null&&window.clearTimeout(ge.current),ee.current!==null&&window.clearTimeout(ee.current),oe.current?.close()},[]),me.useEffect(()=>{Xe&&(He(f.current),V&&Bt(V,f.current))},[V,Xe]),me.useEffect(()=>{!l.trim()||ct===null||oe.current||b!=="idle"||u.current||li(!1)},[l,b,ct]),me.useEffect(()=>{const ce=new Set(L.map(de=>de.sid));I(de=>de.filter(Le=>ce.has(Le)))},[L]),me.useEffect(()=>{const ce=h.current,de=p.current,Le=Object.fromEntries(L.map(Ye=>[Ye.sid,Ye.status]));if(C.current&&Y&&typeof window<"u"&&"Notification"in window&&Notification.permission==="granted"&&document.hidden){ce&&!v&&new Notification("TermPilot",{body:`设备 ${a} 已离线`});for(const Ye of L)de[Ye.sid]==="running"&&Ye.status==="exited"&&new Notification("会话已退出",{body:`${Ye.name} 已结束`})}h.current=v,p.current=Le,C.current=!0},[a,v,Y,L]);function Oi(){if(!G.current||!pe.current||!q.current||q.current.clientWidth===0||q.current.clientHeight===0)return!1;try{return G.current.fit(),!0}catch{return!1}}function Ve(ce,de){ye({kind:ce,text:de}),ee.current!==null&&window.clearTimeout(ee.current),ee.current=window.setTimeout(()=>{ye(null),ee.current=null},4e3)}function yt(ce){const de=oe.current;!de||de.readyState!==WebSocket.OPEN||de.send(JSON.stringify(ce))}function He(ce){yt({type:"session.list",reqId:ns("list"),deviceId:ce??f.current})}function Bt(ce,de){yt({type:"session.replay",reqId:ns("replay"),deviceId:de??f.current,sid:ce,payload:{afterSeq:-1}})}function Ct(){if(u.current)return;const ce=d.current+1;d.current=ce;const de=Math.min(1e3*2**Math.min(ce,4),12e3);D("reconnecting"),ge.current=window.setTimeout(()=>{ge.current=null,li(!1)},de)}function $t(){u.current=!0,d.current=0,ge.current!==null&&(window.clearTimeout(ge.current),ge.current=null)}function dt(){$t(),oe.current?.close(),oe.current=null,D("idle"),E(!1)}function nn(){dt(),c(""),o(xs),m(!1),J(null),z([]),U({}),le("已清除本机保存的访问令牌,请重新配对。"),Ve("info","已清除本机绑定。"),h.current=!1,p.current={},C.current=!1}function ln(ce){I(de=>de.includes(ce)?de.filter(Le=>Le!==ce):[ce,...de])}async function an(){if(Y){Z(!1),Ve("info","已关闭浏览器提醒。");return}if(typeof window>"u"||!("Notification"in window)){Ve("error","当前浏览器不支持通知。");return}if(await Notification.requestPermission()==="granted"){Z(!0),Ve("success","已开启浏览器提醒。页面在后台时,会在会话退出或设备离线时提醒。");return}Z(!1),Ve("error","通知权限未开启。")}function li(ce=!0,de){if(!ct){le("WebSocket 地址无效,请先输入完整地址。"),D("idle");return}ce&&(u.current=!1,d.current=0),ge.current!==null&&(window.clearTimeout(ge.current),ge.current=null),oe.current?.close(),D(ce?"connecting":"reconnecting"),le("");const Le=new URL(ct.toString());Le.searchParams.set("role","client"),Le.searchParams.set("token",de??l);const Ye=new WebSocket(Le);oe.current=Ye,Ye.addEventListener("open",()=>{oe.current===Ye&&(d.current=0,D("connected"))}),Ye.addEventListener("close",()=>{oe.current===Ye&&(oe.current=null),!(oe.current!==null&&oe.current!==Ye)&&(D(Hi=>u.current?"idle":Hi),E(!1),u.current||Ct())}),Ye.addEventListener("message",Hi=>{if(oe.current!==Ye)return;const We=JSON.parse(Hi.data);switch(We.type){case"auth.ok":{const je=We.payload.deviceId??(f.current.trim()||xs),tt=f.current,xt=!!We.payload.deviceId||!tt.trim();le(""),m(!!We.payload.deviceId),f.current=je,je!==tt&&(z([]),U({}),J(null)),xt&&o(je),He(je),V&&Bt(V,je)}return;case"relay.state":E(We.payload.agents.some(je=>je.deviceId===f.current&&je.online));return;case"session.list.result":if(We.deviceId!==f.current)return;z(We.payload.sessions),U(je=>{const tt={};for(const xt of We.payload.sessions)je[xt.sid]&&(tt[xt.sid]=je[xt.sid]);return tt}),J(je=>{const tt=je&&We.payload.sessions.some(xt=>xt.sid===je)?je:null;return tt&&Bt(tt,f.current),tt});return;case"session.created":case"session.state":{const je=We.payload.session;if(je.deviceId!==f.current)return;z(tt=>{const xt=tt.filter(Ds=>Ds.sid!==je.sid);return xt.push(je),xt.sort((Ds,oi)=>oi.startedAt.localeCompare(Ds.startedAt)),xt}),J(tt=>tt??je.sid);return}case"session.output":if(We.deviceId!==f.current)return;U(je=>({...je,[We.sid]:We.payload.data}));return;case"session.exit":if(We.deviceId!==f.current)return;z(je=>je.map(tt=>tt.sid===We.sid?{...tt,status:"exited"}:tt));return;case"error":if(We.code==="AUTH_FAILED"||We.code==="AUTH_REVOKED"){$t(),D("idle"),E(!1),We.code==="AUTH_REVOKED"&&c(""),le(We.message),Ve("error",We.message),Ye.close();return}Ve("error",We.message)}})}async function Bi(){if(!di){le("WebSocket 地址无效,请先输入完整地址。");return}const ce=N.trim().toUpperCase();if(!ce){le("请先输入配对码。");return}T(!0),le("");try{const de=await fetch(`${di}/api/pairings/redeem`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({pairingCode:ce})}),Le=await de.json().catch(()=>null);if(!de.ok||!Le||!("accessToken"in Le)){const Ye=Le&&"message"in Le&&Le.message?Le.message:"配对失败";throw new Error(Ye)}z([]),U({}),J(null),o(Le.deviceId),c(Le.accessToken),Q(""),le(""),Ve("success",`已绑定设备 ${Le.deviceId}。`),li(!0,Le.accessToken)}catch(de){const Le=de instanceof Error?de.message:"配对失败";le(Le),Ve("error",Le)}finally{T(!1)}}function ls(ce){if(ce.preventDefault(),!Fe){Ve("error",v?"当前未连接 relay,无法创建会话。":`设备 ${a||xs} 当前离线,无法创建会话。`);return}yt({type:"session.create",reqId:ns("create"),deviceId:a,payload:{name:wt||void 0,cwd:It||void 0,shell:Jt||void 0}}),Ce(""),Ve("success","已发送创建会话请求。")}function ai(ce){ce.preventDefault(),!(!V||!ae.trim()||!Fe)&&(yt({type:"session.input",reqId:ns("input"),deviceId:a,sid:V,payload:{text:`${ae}
|
|
19
|
+
`}}),Ae(""))}function as(ce){!V||!ke||!Fe||(yt({type:"session.input",reqId:ns("paste"),deviceId:a,sid:V,payload:{text:ce==="line"?`${ke}
|
|
20
|
+
`:ke}}),Je(""),Ve("success",ce==="line"?"已发送多行内容并追加回车。":"已原样发送多行内容。"))}function ki(ce){!V||!Fe||yt({type:"session.input",reqId:ns("key"),deviceId:a,sid:V,payload:{key:ce}})}function on(ce){yt({type:"session.kill",reqId:ns("kill"),deviceId:a,sid:ce}),Ve("info","已发送关闭会话请求。")}function cn(){if(!ue.current||typeof window>"u"||window.innerWidth>=1024)return;const ce=ue.current;window.requestAnimationFrame(()=>{ce.scrollIntoView({block:"start",inline:"nearest"})})}return se.jsxs("main",{className:"mx-auto flex min-h-screen w-full max-w-7xl flex-col gap-5 px-4 py-5 text-slate-100 sm:px-6 lg:px-8",children:[se.jsxs("header",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/70 p-5 shadow-2xl shadow-slate-950/40 backdrop-blur",children:[se.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.25em] text-sky-300",children:"TermPilot"}),se.jsx("h1",{className:"mt-2 text-3xl font-semibold text-white",children:ot?"会话列表":"先绑定你的电脑"}),se.jsx("p",{className:"mt-2 max-w-2xl text-sm text-slate-400",children:ot?"先选一个会话,再进入查看输出和补命令。":"在电脑上执行 termpilot pair,手机输入一次性配对码后就能开始用。"}),ot?se.jsxs("p",{className:"mt-3 text-xs text-slate-500",children:[a," · ",v?"设备在线":"设备离线"," · ",Xe?"已连上 relay":b==="reconnecting"?"正在重连 relay":"relay 未连接"]}):null]}),te?se.jsx(xv,{kind:te.kind,text:te.text,onDismiss:()=>{ye(null),ee.current!==null&&(window.clearTimeout(ee.current),ee.current=null)}}):null,ot?se.jsxs(se.Fragment,{children:[se.jsx("section",{className:"space-y-4 lg:hidden",children:ni?se.jsx("div",{ref:ue,"data-testid":"terminal-workspace",children:se.jsx(Vf,{activeSession:ni,activeSid:V,canControl:Fe,command:ae,pasteBuffer:ke,shortcutKeys:Pf,terminalRef:q,onBack:()=>J(null),onCommandChange:Ae,onSubmitCommand:ai,onPasteBufferChange:Je,onSendPaste:as,onSendKey:ki})}):se.jsxs(se.Fragment,{children:[se.jsx(Ff,{canControl:Fe,sessions:L,filteredSessions:St,activeSid:V,pinnedSids:k,sessionQuery:A,statusFilter:B,onSessionQueryChange:M,onStatusFilterChange:w,onTogglePinnedSession:ln,onSelectSession:ce=>{J(ce),Bt(ce,f.current),cn()},onKillSession:on}),se.jsxs("details",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/72 p-5 shadow-2xl shadow-slate-950/30 backdrop-blur",children:[se.jsx("summary",{className:"cursor-pointer list-none text-sm font-medium text-slate-200",children:"新建会话"}),se.jsx("div",{className:"mt-4",children:se.jsx(Xf,{canControl:Fe,createName:wt,createCwd:It,createShell:Jt,onCreateNameChange:Ce,onCreateCwdChange:si,onCreateShellChange:ri,onSubmit:ls})})]})]})}),se.jsxs("section",{className:"hidden gap-5 lg:grid lg:grid-cols-[360px_minmax(0,1fr)]",children:[se.jsxs("div",{className:"space-y-5",children:[se.jsx(Xf,{canControl:Fe,createName:wt,createCwd:It,createShell:Jt,onCreateNameChange:Ce,onCreateCwdChange:si,onCreateShellChange:ri,onSubmit:ls}),se.jsx(Ff,{canControl:Fe,sessions:L,filteredSessions:St,activeSid:V,pinnedSids:k,sessionQuery:A,statusFilter:B,onSessionQueryChange:M,onStatusFilterChange:w,onTogglePinnedSession:ln,onSelectSession:ce=>{J(ce),Bt(ce,f.current)},onKillSession:on})]}),se.jsx("div",{"data-testid":"desktop-terminal-workspace",children:se.jsx(Vf,{activeSession:ni,activeSid:V,canControl:Fe,command:ae,pasteBuffer:ke,shortcutKeys:Pf,terminalRef:q,onCommandChange:Ae,onSubmitCommand:ai,onPasteBufferChange:Je,onSendPaste:as,onSendKey:ki})})]}),se.jsxs("details",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/72 p-5 shadow-2xl shadow-slate-950/30 backdrop-blur",children:[se.jsx("summary",{className:"cursor-pointer list-none text-sm font-medium text-slate-200",children:"连接与设备设置"}),se.jsx("p",{className:"mt-3 text-xs text-slate-500",children:"这里放不常用的信息和管理项。日常使用时,你主要只需要看会话列表和终端输出。"}),se.jsx("div",{className:"mt-4",children:se.jsx(Gf,{title:"连接与设备设置",wsUrl:x,wsUrlValid:ct!==null,clientToken:l,deviceId:a,deviceIdEditable:!_,pairingCode:N,pairingMessage:ie,pairingPending:he,connectionPhase:b,notificationsEnabled:Y,onWsUrlChange:S,onClientTokenChange:c,onDeviceIdChange:o,onPairingCodeChange:Q,onRedeemPairingCode:()=>{Bi()},onConnect:()=>li(!0),onRefresh:()=>He(f.current),onDisconnect:dt,onClearBinding:nn,onToggleNotifications:()=>{an()},showPairingSection:!1})})]})]}):se.jsxs("section",{className:"mx-auto flex w-full max-w-md flex-col gap-4",children:[se.jsxs(rn,{title:"输入配对码",children:[se.jsx("p",{className:"text-sm text-slate-400",children:"电脑上执行 `termpilot pair --relay 你的 relay 地址`,然后把配对码填到这里。"}),se.jsxs("div",{className:"mt-4 flex gap-3",children:[se.jsx("input",{className:"flex-1 rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-base uppercase outline-none placeholder:text-slate-500 md:text-sm",value:N,onChange:ce=>Q(ce.target.value),placeholder:"ABC-234"}),se.jsx("button",{className:"rounded-full bg-emerald-400 px-5 py-3 text-sm font-medium text-slate-950 disabled:opacity-60",type:"button",disabled:he||ct===null,onClick:()=>{Bi()},children:he?"配对中":"配对"})]}),ie?se.jsx("p",{className:"mt-3 text-sm text-slate-400",children:ie}):null]}),se.jsxs("details",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/72 p-5 shadow-2xl shadow-slate-950/30 backdrop-blur",children:[se.jsx("summary",{className:"cursor-pointer list-none text-sm font-medium text-slate-200",children:"高级设置"}),se.jsx("div",{className:"mt-4",children:se.jsx(Gf,{title:"连接与设备设置",wsUrl:x,wsUrlValid:ct!==null,clientToken:l,deviceId:a,deviceIdEditable:!_,pairingCode:N,pairingMessage:ie,pairingPending:he,connectionPhase:b,notificationsEnabled:Y,onWsUrlChange:S,onClientTokenChange:c,onDeviceIdChange:o,onPairingCodeChange:Q,onRedeemPairingCode:()=>{Bi()},onConnect:()=>li(!0),onRefresh:()=>He(f.current),onDisconnect:dt,onClearBinding:nn,onToggleNotifications:()=>{an()},showPairingSection:!1})})]})]})]})}yv.createRoot(document.getElementById("root")).render(se.jsx(fv.StrictMode,{children:se.jsx(Ov,{})}));
|