@fengye404/termpilot 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ (function(){const ae=document.createElement("link").relList;if(ae&&ae.supports&&ae.supports("modulepreload"))return;for(const ce of document.querySelectorAll('link[rel="modulepreload"]'))G(ce);new MutationObserver(ce=>{for(const Se of ce)if(Se.type==="childList")for(const te of Se.addedNodes)te.tagName==="LINK"&&te.rel==="modulepreload"&&G(te)}).observe(document,{childList:!0,subtree:!0});function ye(ce){const Se={};return ce.integrity&&(Se.integrity=ce.integrity),ce.referrerPolicy&&(Se.referrerPolicy=ce.referrerPolicy),ce.crossOrigin==="use-credentials"?Se.credentials="include":ce.crossOrigin==="anonymous"?Se.credentials="omit":Se.credentials="same-origin",Se}function G(ce){if(ce.ep)return;ce.ep=!0;const Se=ye(ce);fetch(ce.href,Se)}})();function Ff(q){return q&&q.__esModule&&Object.prototype.hasOwnProperty.call(q,"default")?q.default:q}var To={exports:{}},Qr={};var Of;function nv(){if(Of)return Qr;Of=1;var q=Symbol.for("react.transitional.element"),ae=Symbol.for("react.fragment");function ye(G,ce,Se){var te=null;if(Se!==void 0&&(te=""+Se),ce.key!==void 0&&(te=""+ce.key),"key"in ce){Se={};for(var u in ce)u!=="key"&&(Se[u]=ce[u])}else Se=ce;return ce=Se.ref,{$$typeof:q,type:G,key:te,ref:ce!==void 0?ce:null,props:Se}}return Qr.Fragment=ae,Qr.jsx=ye,Qr.jsxs=ye,Qr}var Bf;function lv(){return Bf||(Bf=1,To.exports=nv()),To.exports}var le=lv(),xo={exports:{}},be={};var kf;function av(){if(kf)return be;kf=1;var q=Symbol.for("react.transitional.element"),ae=Symbol.for("react.portal"),ye=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),Se=Symbol.for("react.consumer"),te=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 D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,l={};function c(w,N,X){this.props=w,this.context=N,this.refs=l,this.updater=X||D}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,X){this.props=w,this.context=N,this.refs=l,this.updater=X||D}var _=o.prototype=new a;_.constructor=o,S(_,c.prototype),_.isPureReactComponent=!0;var m=Array.isArray;function b(){}var A={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function E(w,N,X){var se=X.ref;return{$$typeof:q,type:w,key:N,ref:se!==void 0?se:null,props:X}}function O(w,N){return E(w.type,N,w.props)}function U(w){return typeof w=="object"&&w!==null&&w.$$typeof===q}function M(w){var N={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(X){return N[X]})}var z=/\/+/g;function W(w,N){return typeof w=="object"&&w!==null&&w.key!=null?M(""+w.key):N.toString(36)}function ee(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 H(w,N,X,se,ne){var ue=typeof w;(ue==="undefined"||ue==="boolean")&&(w=null);var x=!1;if(w===null)x=!0;else switch(ue){case"bigint":case"string":case"number":x=!0;break;case"object":switch(w.$$typeof){case q:case ae:x=!0;break;case y:return x=w._init,H(x(w._payload),N,X,se,ne)}}if(x)return ne=ne(w),x=se===""?"."+W(w,0):se,m(ne)?(X="",x!=null&&(X=x.replace(z,"$&/")+"/"),H(ne,N,X,"",function($){return $})):ne!=null&&(U(ne)&&(ne=O(ne,X+(ne.key==null||w&&w.key===ne.key?"":(""+ne.key).replace(z,"$&/")+"/")+x)),N.push(ne)),1;x=0;var K=se===""?".":se+":";if(m(w))for(var Z=0;Z<w.length;Z++)se=w[Z],ue=K+W(se,Z),x+=H(se,N,X,ue,ne);else if(Z=C(w),typeof Z=="function")for(w=Z.call(w),Z=0;!(se=w.next()).done;)se=se.value,ue=K+W(se,Z++),x+=H(se,N,X,ue,ne);else if(ue==="object"){if(typeof w.then=="function")return H(ee(w),N,X,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 x}function I(w,N,X){if(w==null)return w;var se=[],ne=0;return H(w,se,"","",function(ue){return N.call(X,ue,ne++)}),se}function T(w){if(w._status===-1){var N=w._result;N=N(),N.then(function(X){(w._status===0||w._status===-1)&&(w._status=1,w._result=X)},function(X){(w._status===0||w._status===-1)&&(w._status=2,w._result=X)}),w._status===-1&&(w._status=0,w._result=N)}if(w._status===1)return w._result.default;throw w._result}var L=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,X){I(w,function(){N.apply(this,arguments)},X)},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(!U(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=ye,be.Profiler=ce,be.PureComponent=o,be.StrictMode=G,be.Suspense=f,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,be.__COMPILER_RUNTIME={__proto__:null,c:function(w){return A.H.useMemoCache(w)}},be.cache=function(w){return function(){return w.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(w,N,X){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(ue in N.key!==void 0&&(ne=""+N.key),N)!v.call(N,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&N.ref===void 0||(se[ue]=N[ue]);var ue=arguments.length-2;if(ue===1)se.children=X;else if(1<ue){for(var x=Array(ue),K=0;K<ue;K++)x[K]=arguments[K+2];se.children=x}return E(w.type,ne,se)},be.createContext=function(w){return w={$$typeof:te,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:Se,_context:w},w},be.createElement=function(w,N,X){var se,ne={},ue=null;if(N!=null)for(se in N.key!==void 0&&(ue=""+N.key),N)v.call(N,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(ne[se]=N[se]);var x=arguments.length-2;if(x===1)ne.children=X;else if(1<x){for(var K=Array(x),Z=0;Z<x;Z++)K[Z]=arguments[Z+2];ne.children=K}if(w&&w.defaultProps)for(se in x=w.defaultProps,x)ne[se]===void 0&&(ne[se]=x[se]);return E(w,ue,ne)},be.createRef=function(){return{current:null}},be.forwardRef=function(w){return{$$typeof:u,render:w}},be.isValidElement=U,be.lazy=function(w){return{$$typeof:y,_payload:{_status:-1,_result:w},_init:T}},be.memo=function(w,N){return{$$typeof:d,type:w,compare:N===void 0?null:N}},be.startTransition=function(w){var N=A.T,X={};A.T=X;try{var se=w(),ne=A.S;ne!==null&&ne(X,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(b,L)}catch(ue){L(ue)}finally{N!==null&&X.types!==null&&(N.types=X.types),A.T=N}},be.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},be.use=function(w){return A.H.use(w)},be.useActionState=function(w,N,X){return A.H.useActionState(w,N,X)},be.useCallback=function(w,N){return A.H.useCallback(w,N)},be.useContext=function(w){return A.H.useContext(w)},be.useDebugValue=function(){},be.useDeferredValue=function(w,N){return A.H.useDeferredValue(w,N)},be.useEffect=function(w,N){return A.H.useEffect(w,N)},be.useEffectEvent=function(w){return A.H.useEffectEvent(w)},be.useId=function(){return A.H.useId()},be.useImperativeHandle=function(w,N,X){return A.H.useImperativeHandle(w,N,X)},be.useInsertionEffect=function(w,N){return A.H.useInsertionEffect(w,N)},be.useLayoutEffect=function(w,N){return A.H.useLayoutEffect(w,N)},be.useMemo=function(w,N){return A.H.useMemo(w,N)},be.useOptimistic=function(w,N){return A.H.useOptimistic(w,N)},be.useReducer=function(w,N,X){return A.H.useReducer(w,N,X)},be.useRef=function(w){return A.H.useRef(w)},be.useState=function(w){return A.H.useState(w)},be.useSyncExternalStore=function(w,N,X){return A.H.useSyncExternalStore(w,N,X)},be.useTransition=function(){return A.H.useTransition()},be.version="19.2.4",be}var Hf;function Ho(){return Hf||(Hf=1,xo.exports=av()),xo.exports}var pe=Ho();const ov=Ff(pe);var Ro={exports:{}},Wr={},Mo={exports:{}},Lo={};var zf;function cv(){return zf||(zf=1,(function(q){function ae(H,I){var T=H.length;H.push(I);e:for(;0<T;){var L=T-1>>>1,B=H[L];if(0<ce(B,I))H[L]=I,H[T]=B,T=L;else break e}}function ye(H){return H.length===0?null:H[0]}function G(H){if(H.length===0)return null;var I=H[0],T=H.pop();if(T!==I){H[0]=T;e:for(var L=0,B=H.length,w=B>>>1;L<w;){var N=2*(L+1)-1,X=H[N],se=N+1,ne=H[se];if(0>ce(X,T))se<B&&0>ce(ne,X)?(H[L]=ne,H[se]=T,L=se):(H[L]=X,H[N]=T,L=N);else if(se<B&&0>ce(ne,T))H[L]=ne,H[se]=T,L=se;else break e}}return I}function ce(H,I){var T=H.sortIndex-I.sortIndex;return T!==0?T:H.id-I.id}if(q.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var Se=performance;q.unstable_now=function(){return Se.now()}}else{var te=Date,u=te.now();q.unstable_now=function(){return te.now()-u}}var f=[],d=[],y=1,h=null,p=3,C=!1,D=!1,S=!1,l=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,o=typeof setImmediate<"u"?setImmediate:null;function _(H){for(var I=ye(d);I!==null;){if(I.callback===null)G(d);else if(I.startTime<=H)G(d),I.sortIndex=I.expirationTime,ae(f,I);else break;I=ye(d)}}function m(H){if(S=!1,_(H),!D)if(ye(f)!==null)D=!0,b||(b=!0,M());else{var I=ye(d);I!==null&&ee(m,I.startTime-H)}}var b=!1,A=-1,v=5,E=-1;function O(){return l?!0:!(q.unstable_now()-E<v)}function U(){if(l=!1,b){var H=q.unstable_now();E=H;var I=!0;try{e:{D=!1,S&&(S=!1,a(A),A=-1),C=!0;var T=p;try{t:{for(_(H),h=ye(f);h!==null&&!(h.expirationTime>H&&O());){var L=h.callback;if(typeof L=="function"){h.callback=null,p=h.priorityLevel;var B=L(h.expirationTime<=H);if(H=q.unstable_now(),typeof B=="function"){h.callback=B,_(H),I=!0;break t}h===ye(f)&&G(f),_(H)}else G(f);h=ye(f)}if(h!==null)I=!0;else{var w=ye(d);w!==null&&ee(m,w.startTime-H),I=!1}}break e}finally{h=null,p=T,C=!1}I=void 0}}finally{I?M():b=!1}}}var M;if(typeof o=="function")M=function(){o(U)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,W=z.port2;z.port1.onmessage=U,M=function(){W.postMessage(null)}}else M=function(){c(U,0)};function ee(H,I){A=c(function(){H(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(H){H.callback=null},q.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<H?Math.floor(1e3/H):5},q.unstable_getCurrentPriorityLevel=function(){return p},q.unstable_next=function(H){switch(p){case 1:case 2:case 3:var I=3;break;default:I=p}var T=p;p=I;try{return H()}finally{p=T}},q.unstable_requestPaint=function(){l=!0},q.unstable_runWithPriority=function(H,I){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var T=p;p=H;try{return I()}finally{p=T}},q.unstable_scheduleCallback=function(H,I,T){var L=q.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?L+T:L):T=L,H){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=T+B,H={id:y++,callback:I,priorityLevel:H,startTime:T,expirationTime:B,sortIndex:-1},T>L?(H.sortIndex=T,ae(d,H),ye(f)===null&&H===ye(d)&&(S?(a(A),A=-1):S=!0,ee(m,T-L))):(H.sortIndex=B,ae(f,H),D||C||(D=!0,b||(b=!0,M()))),H},q.unstable_shouldYield=O,q.unstable_wrapCallback=function(H){var I=p;return function(){var T=p;p=I;try{return H.apply(this,arguments)}finally{p=T}}}})(Lo)),Lo}var Uf;function uv(){return Uf||(Uf=1,Mo.exports=cv()),Mo.exports}var Oo={exports:{}},pt={};var Nf;function hv(){if(Nf)return pt;Nf=1;var q=Ho();function ae(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 ye(){}var G={d:{f:ye,r:function(){throw Error(ae(522))},D:ye,C:ye,L:ye,m:ye,X:ye,S:ye,M:ye},p:0,findDOMNode:null},ce=Symbol.for("react.portal");function Se(f,d,y){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ce,key:h==null?null:""+h,children:f,containerInfo:d,implementation:y}}var te=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 pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,pt.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(ae(299));return Se(f,d,null,y)},pt.flushSync=function(f){var d=te.T,y=G.p;try{if(te.T=null,G.p=2,f)return f()}finally{te.T=d,G.p=y,G.d.f()}},pt.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))},pt.prefetchDNS=function(f){typeof f=="string"&&G.d.D(f)},pt.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})}},pt.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)},pt.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})}},pt.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)},pt.requestFormReset=function(f){G.d.r(f)},pt.unstable_batchedUpdates=function(f,d){return f(d)},pt.useFormState=function(f,d,y){return te.H.useFormState(f,d,y)},pt.useFormStatus=function(){return te.H.useHostTransitionStatus()},pt.version="19.2.4",pt}var jf;function fv(){if(jf)return Oo.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(ae){console.error(ae)}}return q(),Oo.exports=hv(),Oo.exports}var qf;function dv(){if(qf)return Wr;qf=1;var q=uv(),ae=Ho(),ye=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 ce(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Se(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 te(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(Se(e)!==e)throw Error(G(188))}function d(e){var t=e.alternate;if(!t){if(t=Se(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"),D=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"),A=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function M(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var z=Symbol.for("react.client.reference");function W(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===z?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 D: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 A:return t=e.displayName||null,t!==null?t:W(e.type)||"Memo";case v:t=e._payload,e=e._init;try{return W(e(t))}catch{}}return null}var ee=Array.isArray,H=ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=ye.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T={pending:!1,data:null,method:null,action:null},L=[],B=-1;function w(e){return{current:e}}function N(e){0>B||(e.current=L[B],L[B]=null,B--)}function X(e,t){B++,L[B]=e.current,e.current=t}var se=w(null),ne=w(null),ue=w(null),x=w(null);function K(e,t){switch(X(ue,t),X(ne,e),X(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),X(se,e)}function Z(){N(se),N(ne),N(ue)}function $(e){e.memoizedState!==null&&X(x,e);var t=se.current,i=tf(t,e.type);t!==i&&(X(ne,e),X(se,i))}function me(e){ne.current===e&&(N(se),N(ne)),x.current===e&&(N(x),Xr._currentValue=T)}var oe,Re;function Ne(e){if(oe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||"",Re=-1<i.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+oe+e+Re}var tt=!1;function Bt(e,t){if(!e||tt)return"";tt=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(Q){var P=Q}Reflect.construct(e,[],re)}else{try{re.call()}catch(Q){P=Q}e.call(re.prototype)}}else{try{throw Error()}catch(Q){P=Q}(re=e())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(Q){if(Q&&P&&typeof Q.stack=="string")return[Q.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 k=g.split(`
4
+ `),V=R.split(`
5
+ `);for(r=s=0;s<k.length&&!k[s].includes("DetermineComponentFrameRoot");)s++;for(;r<V.length&&!V[r].includes("DetermineComponentFrameRoot");)r++;if(s===k.length||r===V.length)for(s=k.length-1,r=V.length-1;1<=s&&0<=r&&k[s]!==V[r];)r--;for(;1<=s&&0<=r;s--,r--)if(k[s]!==V[r]){if(s!==1||r!==1)do if(s--,r--,0>r||k[s]!==V[r]){var J=`
6
+ `+k[s].replace(" at new "," at ");return e.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",e.displayName)),J}while(1<=s&&0<=r);break}}}finally{tt=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Ne(i):""}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ne(e.type);case 16:return Ne("Lazy");case 13:return e.child!==t&&t!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return Bt(e.type,!1);case 11:return Bt(e.type.render,!1);case 1:return Bt(e.type,!0);case 31:return Ne("Activity");default:return""}}function ii(e){try{var t="",i=null;do t+=Ee(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
7
+ Error generating stack: `+s.message+`
8
+ `+s.stack}}var St=Object.prototype.hasOwnProperty,ut=q.unstable_scheduleCallback,wt=q.unstable_cancelCallback,ci=q.unstable_shouldYield,mt=q.unstable_requestPaint,Qe=q.unstable_now,Je=q.unstable_getCurrentPriorityLevel,kt=q.unstable_ImmediatePriority,Jt=q.unstable_UserBlockingPriority,yt=q.unstable_NormalPriority,Li=q.unstable_LowPriority,Dt=q.unstable_IdlePriority,ui=q.log,Ye=q.unstable_setDisableYieldValue,hi=null,ht=null;function si(e){if(typeof ui=="function"&&Ye(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(hi,e)}catch{}}var bt=Math.clz32?Math.clz32:dl,hl=Math.log,fl=Math.LN2;function dl(e){return e>>>=0,e===0?32:31-(hl(e)/fl|0)|0}var he=256,_e=262144,Me=4194304;function Oe(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 ri(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=Oe(s):(g&=R,g!==0?r=Oe(g):i||(i=R&~e,i!==0&&(r=Oe(i))))):(R=s&~n,R!==0?r=Oe(R):g!==0?r=Oe(g):i||(i=s&~e,i!==0&&(r=Oe(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 Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xe(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 it(){var e=Me;return Me<<=1,(Me&62914560)===0&&(Me=4194304),e}function Ct(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function fi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _l(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,k=e.expirationTimes,V=e.hiddenUpdates;for(i=g&~i;0<i;){var J=31-bt(i),re=1<<J;R[J]=0,k[J]=-1;var P=V[J];if(P!==null)for(V[J]=null,J=0;J<P.length;J++){var Q=P[J];Q!==null&&(Q.lane&=-536870913)}i&=~re}s!==0&&zo(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(g&~t))}function zo(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 Uo(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 No(e,t){var i=t&-t;return i=(i&42)!==0?1:vl(i),(i&(e.suspendedLanes|t))!==0?0:i}function vl(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 gl(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jo(){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 Oi=Math.random().toString(36).slice(2),ft="__reactFiber$"+Oi,At="__reactProps$"+Oi,bs="__reactContainer$"+Oi,ml="__reactEvents$"+Oi,Pf="__reactListeners$"+Oi,Qf="__reactHandles$"+Oi,Io="__reactResources$"+Oi,lr="__reactMarker$"+Oi;function pl(e){delete e[ft],delete e[At],delete e[ml],delete e[Pf],delete e[Qf]}function Cs(e){var t=e[ft];if(t)return t;for(var i=e.parentNode;i;){if(t=i[bs]||i[ft]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=cf(e);e!==null;){if(i=e[ft])return i;e=cf(e)}return t}e=i,i=e.parentNode}return null}function Es(e){if(e=e[ft]||e[bs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ar(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(G(33))}function ws(e){var t=e[Io];return t||(t=e[Io]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ot(e){e[lr]=!0}var Yo=new Set,Ko={};function ss(e,t){Ds(e,t),Ds(e+"Capture",t)}function Ds(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 St.call(Xo,e)?!0:St.call(Go,e)?!1:Wf.test(e)?Xo[e]=!0:(Go[e]=!0,!1)}function Zr(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 Jr(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function di(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 Yt(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 Sl(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 $r(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 Kt(e){return e.replace($f,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function yl(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=""+Yt(t)):e.value!==""+Yt(t)&&(e.value=""+Yt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?bl(e,g,Yt(t)):i!=null?bl(e,g,Yt(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=""+Yt(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)){Sl(e);return}i=i!=null?""+Yt(i):"",t=t!=null?""+Yt(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),Sl(e)}function bl(e,t,i){t==="number"&&$r(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function As(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=""+Yt(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=""+Yt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Yt(i):""}function Wo(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(G(92));if(ee(s)){if(1<s.length)throw Error(G(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Yt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Sl(e)}function Ts(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 Cl(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 en(e){return id.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _i(){}var El=null;function wl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xs=null,Rs=null;function $o(e){var t=Es(e);if(t&&(e=t.stateNode)){var i=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(yl(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="'+Kt(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[At]||null;if(!r)throw Error(G(90));yl(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&&As(e,!!i.multiple,t,!1)}}}var Dl=!1;function ec(e,t,i){if(Dl)return e(t,i);Dl=!0;try{var s=e(t);return s}finally{if(Dl=!1,(xs!==null||Rs!==null)&&(Yn(),xs&&(t=xs,e=Rs,Rs=xs=null,$o(t),e)))for(t=0;t<e.length;t++)$o(e[t])}}function or(e,t){var i=e.stateNode;if(i===null)return null;var s=i[At]||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 vi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Al=!1;if(vi)try{var cr={};Object.defineProperty(cr,"passive",{get:function(){Al=!0}}),window.addEventListener("test",cr,cr),window.removeEventListener("test",cr,cr)}catch{Al=!1}var Bi=null,Tl=null,tn=null;function tc(){if(tn)return tn;var e,t=Tl,i=t.length,s,r="value"in Bi?Bi.value:Bi.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 tn=r.slice(e,1<s?1-s:void 0)}function sn(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 rn(){return!0}function ic(){return!1}function Tt(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)?rn: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=rn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Tt(rs),ur=h({},rs,{view:0,detail:0}),sd=Tt(ur),xl,Rl,hr,ln=h({},ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ll,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==hr&&(hr&&e.type==="mousemove"?(xl=e.screenX-hr.screenX,Rl=e.screenY-hr.screenY):Rl=xl=0,hr=e),xl)},movementY:function(e){return"movementY"in e?e.movementY:Rl}}),sc=Tt(ln),rd=h({},ln,{dataTransfer:0}),nd=Tt(rd),ld=h({},ur,{relatedTarget:0}),Ml=Tt(ld),ad=h({},rs,{animationName:0,elapsedTime:0,pseudoElement:0}),od=Tt(ad),cd=h({},rs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ud=Tt(cd),hd=h({},rs,{data:0}),rc=Tt(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 Ll(){return vd}var gd=h({},ur,{key:function(e){if(e.key){var t=fd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=sn(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:Ll,charCode:function(e){return e.type==="keypress"?sn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?sn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),md=Tt(gd),pd=h({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nc=Tt(pd),Sd=h({},ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ll}),yd=Tt(Sd),bd=h({},rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cd=Tt(bd),Ed=h({},ln,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),wd=Tt(Ed),Dd=h({},rs,{newState:0,oldState:0}),Ad=Tt(Dd),Td=[9,13,27,32],Ol=vi&&"CompositionEvent"in window,fr=null;vi&&"documentMode"in document&&(fr=document.documentMode);var xd=vi&&"TextEvent"in window&&!fr,lc=vi&&(!Ol||fr&&8<fr&&11>=fr),ac=" ",oc=!1;function cc(e,t){switch(e){case"keyup":return Td.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 Ms=!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(Ms)return e==="compositionend"||!Ol&&cc(e,t)?(e=tc(),tn=Tl=Bi=null,Ms=!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){xs?Rs?Rs.push(s):Rs=[s]:xs=s,t=Qn(t,"onChange"),0<t.length&&(i=new nn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var dr=null,_r=null;function Od(e){Ph(e,0)}function an(e){var t=ar(e);if(Vo(t))return e}function dc(e,t){if(e==="change")return t}var _c=!1;if(vi){var Bl;if(vi){var kl="oninput"in document;if(!kl){var vc=document.createElement("div");vc.setAttribute("oninput","return;"),kl=typeof vc.oninput=="function"}Bl=kl}else Bl=!1;_c=Bl&&(!document.documentMode||9<document.documentMode)}function gc(){dr&&(dr.detachEvent("onpropertychange",mc),_r=dr=null)}function mc(e){if(e.propertyName==="value"&&an(_r)){var t=[];fc(t,_r,e,wl(e)),ec(Od,t)}}function Bd(e,t,i){e==="focusin"?(gc(),dr=t,_r=i,dr.attachEvent("onpropertychange",mc)):e==="focusout"&&gc()}function kd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return an(_r)}function Hd(e,t){if(e==="click")return an(t)}function zd(e,t){if(e==="input"||e==="change")return an(t)}function Ud(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:Ud;function vr(e,t){if(Ht(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(!St.call(t,r)||!Ht(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=$r(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=$r(e.document)}return t}function Hl(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=vi&&"documentMode"in document&&11>=document.documentMode,Ls=null,zl=null,gr=null,Ul=!1;function Cc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ul||Ls==null||Ls!==$r(s)||(s=Ls,"selectionStart"in s&&Hl(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}),gr&&vr(gr,s)||(gr=s,s=Qn(zl,"onSelect"),0<s.length&&(t=new nn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Ls)))}function ns(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Os={animationend:ns("Animation","AnimationEnd"),animationiteration:ns("Animation","AnimationIteration"),animationstart:ns("Animation","AnimationStart"),transitionrun:ns("Transition","TransitionRun"),transitionstart:ns("Transition","TransitionStart"),transitioncancel:ns("Transition","TransitionCancel"),transitionend:ns("Transition","TransitionEnd")},Nl={},Ec={};vi&&(Ec=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function ls(e){if(Nl[e])return Nl[e];if(!Os[e])return e;var t=Os[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ec)return Nl[e]=t[i];return e}var wc=ls("animationend"),Dc=ls("animationiteration"),Ac=ls("animationstart"),jd=ls("transitionrun"),qd=ls("transitionstart"),Id=ls("transitioncancel"),Tc=ls("transitionend"),xc=new Map,jl="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(" ");jl.push("scrollEnd");function $t(e,t){xc.set(e,t),ss(t,[e])}var on=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=[],Bs=0,ql=0;function cn(){for(var e=Bs,t=ql=Bs=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 un(e,t,i,s){Gt[Bs++]=e,Gt[Bs++]=t,Gt[Bs++]=i,Gt[Bs++]=s,ql|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Il(e,t,i,s){return un(e,t,i,s),hn(e)}function as(e,t){return un(e,null,null,t),hn(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 hn(e){if(50<Nr)throw Nr=0,Wa=null,Error(G(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ks={};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 zt(e,t,i,s){return new Yd(e,t,i,s)}function Yl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gi(e,t){var i=e.alternate;return i===null?(i=zt(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 fn(e,t,i,s,r,n){var g=0;if(s=e,typeof e=="function")Yl(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=zt(31,i,t,r),e.elementType=E,e.lanes=n,e;case S:return os(i.children,r,n,t);case l:g=8,r|=24;break;case c:return e=zt(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case m:return e=zt(13,i,t,r),e.elementType=m,e.lanes=n,e;case b:return e=zt(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 A: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=zt(g,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function os(e,t,i,s){return e=zt(7,e,s,t),e.lanes=i,e}function Kl(e,t,i){return e=zt(6,e,null,t),e.lanes=i,e}function Lc(e){var t=zt(18,null,null,0);return t.stateNode=e,t}function Gl(e,t,i){return t=zt(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:ii(t)},Oc.set(e,t),t)}return{value:e,source:t,stack:ii(t)}}var Hs=[],zs=0,dn=null,mr=0,Ft=[],Vt=0,ki=null,ni=1,li="";function mi(e,t){Hs[zs++]=mr,Hs[zs++]=dn,dn=e,mr=t}function Bc(e,t,i){Ft[Vt++]=ni,Ft[Vt++]=li,Ft[Vt++]=ki,ki=e;var s=ni;e=li;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,ni=1<<32-bt(t)+r|i<<r|s,li=n+e}else ni=1<<n|i<<r|s,li=e}function Xl(e){e.return!==null&&(mi(e,1),Bc(e,1,0))}function Fl(e){for(;e===dn;)dn=Hs[--zs],Hs[zs]=null,mr=Hs[--zs],Hs[zs]=null;for(;e===ki;)ki=Ft[--Vt],Ft[Vt]=null,li=Ft[--Vt],Ft[Vt]=null,ni=Ft[--Vt],Ft[Vt]=null}function kc(e,t){Ft[Vt++]=ni,Ft[Vt++]=li,Ft[Vt++]=ki,ni=t.id,li=t.overflow,ki=e}var dt=null,Fe=null,Le=!1,Hi=null,Pt=!1,Vl=Error(G(519));function zi(e){var t=Error(G(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pr(Xt(t,e)),Vl}function Hc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[ft]=e,t[At]=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<qr.length;i++)Ae(qr[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=_i),t=!0):t=!1,t||zi(e,!0)}function zc(e){for(dt=e.return;dt;)switch(dt.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:dt=dt.return}}function Us(e){if(e!==dt)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")||ho(e.type,e.memoizedProps)),i=!i),i&&Fe&&zi(e),zc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Fe=of(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Fe=of(e)}else t===27?(t=Fe,Wi(e.type)?(e=mo,mo=null,Fe=e):Fe=t):Fe=dt?Wt(e.stateNode.nextSibling):null;return!0}function cs(){Fe=dt=null,Le=!1}function Pl(){var e=Hi;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),Hi=null),e}function pr(e){Hi===null?Hi=[e]:Hi.push(e)}var Ql=w(null),us=null,pi=null;function Ui(e,t,i){X(Ql,t._currentValue),t._currentValue=i}function Si(e){e._currentValue=Ql.current,N(Ql)}function Wl(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 Zl(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 k=0;k<t.length;k++)if(R.context===t[k]){n.lanes|=i,R=n.alternate,R!==null&&(R.lanes|=i),Wl(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),Wl(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 Ns(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;Ht(r.pendingProps.value,g.value)||(e!==null?e.push(R):e=[R])}}else if(r===x.current){if(g=r.alternate,g===null)throw Error(G(387));g.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Xr):e=[Xr])}r=r.return}e!==null&&Zl(t,e,i,s),t.flags|=262144}function _n(e){for(e=e.firstContext;e!==null;){if(!Ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hs(e){us=e,pi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return Uc(us,e)}function vn(e,t){return us===null&&hs(e),Uc(e,t)}function Uc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},pi===null){if(e===null)throw Error(G(308));pi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pi=pi.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,st={$$typeof:o,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jl(){return{controller:new Kd,data:new Map,refCount:0}}function Sr(e){e.refCount--,e.refCount===0&&Gd(Xd,function(){e.controller.abort()})}var yr=null,$l=0,js=0,qs=null;function Fd(e,t){if(yr===null){var i=yr=[];$l=0,js=io(),qs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return $l++,t.then(Nc,Nc),t}function Nc(){if(--$l===0&&yr!==null){qs!==null&&(qs.status="fulfilled");var e=yr;yr=null,js=0,qs=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=H.S;H.S=function(e,t){Ch=Qe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fd(e,t),jc!==null&&jc(e,t)};var fs=w(null);function ea(){var e=fs.current;return e!==null?e:Ge.pooledCache}function gn(e,t){t===null?X(fs,fs.current):X(fs,t.pool)}function qc(){var e=ea();return e===null?null:{parent:st._currentValue,pool:e}}var Is=Error(G(460)),ta=Error(G(474)),mn=Error(G(542)),pn={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(_i,_i),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(_i,_i);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 _s=t,Is}}function ds(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(_s=i,Is):i}}var _s=null;function Kc(){if(_s===null)throw Error(G(459));var e=_s;return _s=null,e}function Gc(e){if(e===Is||e===mn)throw Error(G(483))}var Ys=null,br=0;function Sn(e){var t=br;return br+=1,Ys===null&&(Ys=[]),Yc(Ys,e,t)}function Cr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yn(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 F=Y.deletions;F===null?(Y.deletions=[j],Y.flags|=16):F.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=gi(Y,j),Y.index=0,Y.sibling=null,Y}function n(Y,j,F){return Y.index=F,e?(F=Y.alternate,F!==null?(F=F.index,F<j?(Y.flags|=67108866,j):F):(Y.flags|=67108866,j)):(Y.flags|=1048576,j)}function g(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function R(Y,j,F,ie){return j===null||j.tag!==6?(j=Kl(F,Y.mode,ie),j.return=Y,j):(j=r(j,F),j.return=Y,j)}function k(Y,j,F,ie){var ve=F.type;return ve===S?J(Y,j,F.props.children,ie,F.key):j!==null&&(j.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===v&&ds(ve)===j.type)?(j=r(j,F.props),Cr(j,F),j.return=Y,j):(j=fn(F.type,F.key,F.props,null,Y.mode,ie),Cr(j,F),j.return=Y,j)}function V(Y,j,F,ie){return j===null||j.tag!==4||j.stateNode.containerInfo!==F.containerInfo||j.stateNode.implementation!==F.implementation?(j=Gl(F,Y.mode,ie),j.return=Y,j):(j=r(j,F.children||[]),j.return=Y,j)}function J(Y,j,F,ie,ve){return j===null||j.tag!==7?(j=os(F,Y.mode,ie,ve),j.return=Y,j):(j=r(j,F),j.return=Y,j)}function re(Y,j,F){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Kl(""+j,Y.mode,F),j.return=Y,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case C:return F=fn(j.type,j.key,j.props,null,Y.mode,F),Cr(F,j),F.return=Y,F;case D:return j=Gl(j,Y.mode,F),j.return=Y,j;case v:return j=ds(j),re(Y,j,F)}if(ee(j)||M(j))return j=os(j,Y.mode,F,null),j.return=Y,j;if(typeof j.then=="function")return re(Y,Sn(j),F);if(j.$$typeof===o)return re(Y,vn(Y,j),F);yn(Y,j)}return null}function P(Y,j,F,ie){var ve=j!==null?j.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return ve!==null?null:R(Y,j,""+F,ie);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case C:return F.key===ve?k(Y,j,F,ie):null;case D:return F.key===ve?V(Y,j,F,ie):null;case v:return F=ds(F),P(Y,j,F,ie)}if(ee(F)||M(F))return ve!==null?null:J(Y,j,F,ie,null);if(typeof F.then=="function")return P(Y,j,Sn(F),ie);if(F.$$typeof===o)return P(Y,j,vn(Y,F),ie);yn(Y,F)}return null}function Q(Y,j,F,ie,ve){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Y=Y.get(F)||null,R(j,Y,""+ie,ve);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case C:return Y=Y.get(ie.key===null?F:ie.key)||null,k(j,Y,ie,ve);case D:return Y=Y.get(ie.key===null?F:ie.key)||null,V(j,Y,ie,ve);case v:return ie=ds(ie),Q(Y,j,F,ie,ve)}if(ee(ie)||M(ie))return Y=Y.get(F)||null,J(j,Y,ie,ve,null);if(typeof ie.then=="function")return Q(Y,j,F,Sn(ie),ve);if(ie.$$typeof===o)return Q(Y,j,F,vn(j,ie),ve);yn(j,ie)}return null}function fe(Y,j,F,ie){for(var ve=null,Be=null,de=j,we=j=0,xe=null;de!==null&&we<F.length;we++){de.index>we?(xe=de,de=null):xe=de.sibling;var ke=P(Y,de,F[we],ie);if(ke===null){de===null&&(de=xe);break}e&&de&&ke.alternate===null&&t(Y,de),j=n(ke,j,we),Be===null?ve=ke:Be.sibling=ke,Be=ke,de=xe}if(we===F.length)return i(Y,de),Le&&mi(Y,we),ve;if(de===null){for(;we<F.length;we++)de=re(Y,F[we],ie),de!==null&&(j=n(de,j,we),Be===null?ve=de:Be.sibling=de,Be=de);return Le&&mi(Y,we),ve}for(de=s(de);we<F.length;we++)xe=Q(de,Y,we,F[we],ie),xe!==null&&(e&&xe.alternate!==null&&de.delete(xe.key===null?we:xe.key),j=n(xe,j,we),Be===null?ve=xe:Be.sibling=xe,Be=xe);return e&&de.forEach(function(ts){return t(Y,ts)}),Le&&mi(Y,we),ve}function ge(Y,j,F,ie){if(F==null)throw Error(G(151));for(var ve=null,Be=null,de=j,we=j=0,xe=null,ke=F.next();de!==null&&!ke.done;we++,ke=F.next()){de.index>we?(xe=de,de=null):xe=de.sibling;var ts=P(Y,de,ke.value,ie);if(ts===null){de===null&&(de=xe);break}e&&de&&ts.alternate===null&&t(Y,de),j=n(ts,j,we),Be===null?ve=ts:Be.sibling=ts,Be=ts,de=xe}if(ke.done)return i(Y,de),Le&&mi(Y,we),ve;if(de===null){for(;!ke.done;we++,ke=F.next())ke=re(Y,ke.value,ie),ke!==null&&(j=n(ke,j,we),Be===null?ve=ke:Be.sibling=ke,Be=ke);return Le&&mi(Y,we),ve}for(de=s(de);!ke.done;we++,ke=F.next())ke=Q(de,Y,we,ke.value,ie),ke!==null&&(e&&ke.alternate!==null&&de.delete(ke.key===null?we:ke.key),j=n(ke,j,we),Be===null?ve=ke:Be.sibling=ke,Be=ke);return e&&de.forEach(function(rv){return t(Y,rv)}),Le&&mi(Y,we),ve}function Ie(Y,j,F,ie){if(typeof F=="object"&&F!==null&&F.type===S&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case C:e:{for(var ve=F.key;j!==null;){if(j.key===ve){if(ve=F.type,ve===S){if(j.tag===7){i(Y,j.sibling),ie=r(j,F.props.children),ie.return=Y,Y=ie;break e}}else if(j.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===v&&ds(ve)===j.type){i(Y,j.sibling),ie=r(j,F.props),Cr(ie,F),ie.return=Y,Y=ie;break e}i(Y,j);break}else t(Y,j);j=j.sibling}F.type===S?(ie=os(F.props.children,Y.mode,ie,F.key),ie.return=Y,Y=ie):(ie=fn(F.type,F.key,F.props,null,Y.mode,ie),Cr(ie,F),ie.return=Y,Y=ie)}return g(Y);case D:e:{for(ve=F.key;j!==null;){if(j.key===ve)if(j.tag===4&&j.stateNode.containerInfo===F.containerInfo&&j.stateNode.implementation===F.implementation){i(Y,j.sibling),ie=r(j,F.children||[]),ie.return=Y,Y=ie;break e}else{i(Y,j);break}else t(Y,j);j=j.sibling}ie=Gl(F,Y.mode,ie),ie.return=Y,Y=ie}return g(Y);case v:return F=ds(F),Ie(Y,j,F,ie)}if(ee(F))return fe(Y,j,F,ie);if(M(F)){if(ve=M(F),typeof ve!="function")throw Error(G(150));return F=ve.call(F),ge(Y,j,F,ie)}if(typeof F.then=="function")return Ie(Y,j,Sn(F),ie);if(F.$$typeof===o)return Ie(Y,j,vn(Y,F),ie);yn(Y,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,j!==null&&j.tag===6?(i(Y,j.sibling),ie=r(j,F),ie.return=Y,Y=ie):(i(Y,j),ie=Kl(F,Y.mode,ie),ie.return=Y,Y=ie),g(Y)):i(Y,j)}return function(Y,j,F,ie){try{br=0;var ve=Ie(Y,j,F,ie);return Ys=null,ve}catch(de){if(de===Is||de===mn)throw de;var Be=zt(29,de,null,Y.mode);return Be.lanes=ie,Be.return=Y,Be}}}var vs=Xc(!0),Fc=Xc(!1),Ni=!1;function ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sa(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 ji(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(He&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=hn(e),Rc(e,null,i),t}return un(e,s,t,i),hn(e)}function Er(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,Uo(e,i)}}function ra(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 na=!1;function wr(){if(na){var e=qs;if(e!==null)throw e}}function Dr(e,t,i,s){na=!1;var r=e.updateQueue;Ni=!1;var n=r.firstBaseUpdate,g=r.lastBaseUpdate,R=r.shared.pending;if(R!==null){r.shared.pending=null;var k=R,V=k.next;k.next=null,g===null?n=V:g.next=V,g=k;var J=e.alternate;J!==null&&(J=J.updateQueue,R=J.lastBaseUpdate,R!==g&&(R===null?J.firstBaseUpdate=V:R.next=V,J.lastBaseUpdate=k))}if(n!==null){var re=r.baseState;g=0,J=V=k=null,R=n;do{var P=R.lane&-536870913,Q=P!==R.lane;if(Q?(Te&P)===P:(s&P)===P){P!==0&&P===js&&(na=!0),J!==null&&(J=J.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var fe=e,ge=R;P=t;var Ie=i;switch(ge.tag){case 1:if(fe=ge.payload,typeof fe=="function"){re=fe.call(Ie,re,P);break e}re=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=ge.payload,P=typeof fe=="function"?fe.call(Ie,re,P):fe,P==null)break e;re=h({},re,P);break e;case 2:Ni=!0}}P=R.callback,P!==null&&(e.flags|=64,Q&&(e.flags|=8192),Q=r.callbacks,Q===null?r.callbacks=[P]:Q.push(P))}else Q={lane:P,tag:R.tag,payload:R.payload,callback:R.callback,next:null},J===null?(V=J=Q,k=re):J=J.next=Q,g|=P;if(R=R.next,R===null){if(R=r.shared.pending,R===null)break;Q=R,R=Q.next,Q.next=null,r.lastBaseUpdate=Q,r.shared.pending=null}}while(!0);J===null&&(k=re),r.baseState=k,r.firstBaseUpdate=V,r.lastBaseUpdate=J,n===null&&(r.shared.lanes=0),Xi|=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 Ks=w(null),bn=w(0);function Qc(e,t){e=xi,X(bn,e),X(Ks,t),xi=e|t.baseLanes}function la(){X(bn,xi),X(Ks,Ks.current)}function aa(){xi=bn.current,N(Ks),N(bn)}var Ut=w(null),Qt=null;function Ii(e){var t=e.alternate;X($e,$e.current&1),X(Ut,e),Qt===null&&(t===null||Ks.current!==null||t.memoizedState!==null)&&(Qt=e)}function oa(e){X($e,$e.current),X(Ut,e),Qt===null&&(Qt=e)}function Wc(e){e.tag===22?(X($e,$e.current),X(Ut,e),Qt===null&&(Qt=e)):Yi()}function Yi(){X($e,$e.current),X(Ut,Ut.current)}function Nt(e){N(Ut),Qt===e&&(Qt=null),N($e)}var $e=w(0);function Cn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||vo(i)||go(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 yi=0,Ce=null,je=null,rt=null,En=!1,Gs=!1,gs=!1,wn=0,Ar=0,Xs=null,Pd=0;function We(){throw Error(G(321))}function ca(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ht(e[i],t[i]))return!1;return!0}function ua(e,t,i,s,r,n){return yi=n,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?Bu:Da,gs=!1,n=i(s,r),gs=!1,Gs&&(n=Jc(t,i,s,r)),Zc(e),n}function Zc(e){H.H=Rr;var t=je!==null&&je.next!==null;if(yi=0,rt=je=Ce=null,En=!1,Ar=0,Xs=null,t)throw Error(G(300));e===null||nt||(e=e.dependencies,e!==null&&_n(e)&&(nt=!0))}function Jc(e,t,i,s){Ce=e;var r=0;do{if(Gs&&(Xs=null),Ar=0,Gs=!1,25<=r)throw Error(G(301));if(r+=1,rt=je=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}H.H=ku,n=t(i,s)}while(Gs);return n}function Qd(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?Tr(t):t,e=e.useState()[0],(je!==null?je.memoizedState:null)!==e&&(Ce.flags|=1024),t}function ha(){var e=wn!==0;return wn=0,e}function fa(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function da(e){if(En){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}En=!1}yi=0,rt=je=Ce=null,Gs=!1,Ar=wn=0,Xs=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?Ce.memoizedState=rt=e:rt=rt.next=e,rt}function et(){if(je===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=rt===null?Ce.memoizedState:rt.next;if(t!==null)rt=t,je=e;else{if(e===null)throw Ce.alternate===null?Error(G(467)):Error(G(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},rt===null?Ce.memoizedState=rt=e:rt=rt.next=e}return rt}function Dn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tr(e){var t=Ar;return Ar+=1,Xs===null&&(Xs=[]),e=Yc(Xs,e,t),t=Ce,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?Bu:Da),e}function An(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Tr(e);if(e.$$typeof===o)return _t(e)}throw Error(G(438,String(e)))}function _a(e){var t=null,i=Ce.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ce.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=Dn(),Ce.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]=O;return t.index++,i}function bi(e,t){return typeof t=="function"?t(e):t}function Tn(e){var t=et();return va(t,je,e)}function va(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,k=null,V=t,J=!1;do{var re=V.lane&-536870913;if(re!==V.lane?(Te&re)===re:(yi&re)===re){var P=V.revertLane;if(P===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),re===js&&(J=!0);else if((yi&P)===P){V=V.next,P===js&&(J=!0);continue}else re={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},k===null?(R=k=re,g=n):k=k.next=re,Ce.lanes|=P,Xi|=P;re=V.action,gs&&i(n,re),n=V.hasEagerState?V.eagerState:i(n,re)}else P={lane:re,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},k===null?(R=k=P,g=n):k=k.next=P,Ce.lanes|=re,Xi|=re;V=V.next}while(V!==null&&V!==t);if(k===null?g=n:k.next=R,!Ht(n,e.memoizedState)&&(nt=!0,J&&(i=qs,i!==null)))throw i;e.memoizedState=n,e.baseState=g,e.baseQueue=k,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ga(e){var t=et(),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);Ht(n,t.memoizedState)||(nt=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function $c(e,t,i){var s=Ce,r=et(),n=Le;if(n){if(i===void 0)throw Error(G(407));i=i()}else i=t();var g=!Ht((je||r).memoizedState,i);if(g&&(r.memoizedState=i,nt=!0),r=r.queue,Sa(iu.bind(null,s,r,e),[e]),r.getSnapshot!==t||g||rt!==null&&rt.memoizedState.tag&1){if(s.flags|=2048,Fs(9,{destroy:void 0},tu.bind(null,s,r,i,t),null),Ge===null)throw Error(G(349));n||(yi&127)!==0||eu(s,t,i)}return i}function eu(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ce.updateQueue,t===null?(t=Dn(),Ce.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!Ht(e,i)}catch{return!0}}function ru(e){var t=as(e,2);t!==null&&Ot(t,e,2)}function ma(e){var t=Et();if(typeof e=="function"){var i=e;if(e=i(),gs){si(!0);try{i()}finally{si(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:e},t}function nu(e,t,i,s){return e.baseState=i,va(e,je,typeof s=="function"?s:bi)}function Wd(e,t,i,s,r){if(Mn(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)}};H.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=H.T,g={};H.T=g;try{var R=i(r,s),k=H.S;k!==null&&k(g,R),au(e,t,R)}catch(V){pa(e,t,V)}finally{n!==null&&g.types!==null&&(n.types=g.types),H.T=n}}else try{n=i(r,s),au(e,t,n)}catch(V){pa(e,t,V)}}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 pa(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 pa(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=Ge.formState;if(i!==null){e:{var s=Ce;if(Le){if(Fe){t:{for(var r=Fe,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){Fe=Wt(r.nextSibling),s=r.data==="F!";break e}}zi(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,Ce,s),s.dispatch=i,s=ma(!1),n=wa.bind(null,Ce,!1,s.queue),s=Et(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=Wd.bind(null,Ce,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function fu(e){var t=et();return du(t,je,e)}function du(e,t,i){if(t=va(e,t,uu)[0],e=Tn(bi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Tr(t)}catch(g){throw g===Is?mn:g}else s=t;t=et();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Ce.flags|=2048,Fs(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=et(),i=je;if(i!==null)return du(t,i,e);et(),t=t.memoizedState,i=et();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Fs(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ce.updateQueue,t===null&&(t=Dn(),Ce.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 et().memoizedState}function xn(e,t,i,s){var r=Et();Ce.flags|=e,r.memoizedState=Fs(1|t,{destroy:void 0},i,s===void 0?null:s)}function Rn(e,t,i,s){var r=et();s=s===void 0?null:s;var n=r.memoizedState.inst;je!==null&&s!==null&&ca(s,je.memoizedState.deps)?r.memoizedState=Fs(t,n,i,s):(Ce.flags|=e,r.memoizedState=Fs(1|t,n,i,s))}function gu(e,t){xn(8390656,8,e,t)}function Sa(e,t){Rn(2048,8,e,t)}function Jd(e){Ce.flags|=4;var t=Ce.updateQueue;if(t===null)t=Dn(),Ce.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function mu(e){var t=et().memoizedState;return Jd({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(G(440));return t.impl.apply(void 0,arguments)}}function pu(e,t){return Rn(4,2,e,t)}function Su(e,t){return Rn(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,Rn(4,4,yu.bind(null,t,e),i)}function ya(){}function Cu(e,t){var i=et();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ca(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Eu(e,t){var i=et();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ca(t,s[1]))return s[0];if(s=e(),gs){si(!0);try{e()}finally{si(!1)}}return i.memoizedState=[s,t],s}function ba(e,t,i){return i===void 0||(yi&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=wh(),Ce.lanes|=e,Xi|=e,i)}function wu(e,t,i,s){return Ht(i,t)?i:Ks.current!==null?(e=ba(e,i,s),Ht(e,t)||(nt=!0),e):(yi&42)===0||(yi&1073741824)!==0&&(Te&261930)===0?(nt=!0,e.memoizedState=i):(e=wh(),Ce.lanes|=e,Xi|=e,t)}function Du(e,t,i,s,r){var n=I.p;I.p=n!==0&&8>n?n:8;var g=H.T,R={};H.T=R,wa(e,!1,t,i);try{var k=r(),V=H.S;if(V!==null&&V(R,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var J=Vd(k,s);xr(e,t,J,It(e))}else xr(e,t,s,It(e))}catch(re){xr(e,t,{then:function(){},status:"rejected",reason:re},It())}finally{I.p=n,g!==null&&R.types!==null&&(g.types=R.types),H.T=g}}function $d(){}function Ca(e,t,i,s){if(e.tag!==5)throw Error(G(476));var r=Au(e).queue;Du(e,r,t,T,i===null?$d:function(){return Tu(e),i(s)})}function Au(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:T,baseState:T,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:T},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Tu(e){var t=Au(e);t.next===null&&(t=e.alternate.memoizedState),xr(e,t.next.queue,{},It())}function Ea(){return _t(Xr)}function xu(){return et().memoizedState}function Ru(){return et().memoizedState}function e_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=It();e=ji(i);var s=qi(t,e,i);s!==null&&(Ot(s,t,i),Er(s,t,i)),t={cache:Jl()},e.payload=t;return}t=t.return}}function t_(e,t,i){var s=It();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Mn(e)?Lu(t,i):(i=Il(e,t,i,s),i!==null&&(Ot(i,e,s),Ou(i,t,s)))}function Mu(e,t,i){var s=It();xr(e,t,i,s)}function xr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Mn(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,Ht(R,g))return un(e,t,r,0),Ge===null&&cn(),!1}catch{}if(i=Il(e,t,r,s),i!==null)return Ot(i,e,s),Ou(i,t,s),!0}return!1}function wa(e,t,i,s){if(s={lane:2,revertLane:io(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Mn(e)){if(t)throw Error(G(479))}else t=Il(e,i,s,2),t!==null&&Ot(t,e,2)}function Mn(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function Lu(e,t){Gs=En=!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,Uo(e,i)}}var Rr={readContext:_t,use:An,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useInsertionEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useSyncExternalStore:We,useId:We,useHostTransitionStatus:We,useFormState:We,useActionState:We,useOptimistic:We,useMemoCache:We,useCacheRefresh:We};Rr.useEffectEvent=We;var Bu={readContext:_t,use:An,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:gu,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,xn(4194308,4,yu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return xn(4194308,4,e,t)},useInsertionEffect:function(e,t){xn(4,2,e,t)},useMemo:function(e,t){var i=Et();t=t===void 0?null:t;var s=e();if(gs){si(!0);try{e()}finally{si(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Et();if(i!==void 0){var r=i(t);if(gs){si(!0);try{i(t)}finally{si(!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,Ce,e),[s.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=ma(e);var t=e.queue,i=Mu.bind(null,Ce,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:ya,useDeferredValue:function(e,t){var i=Et();return ba(i,e,t)},useTransition:function(){var e=ma(!1);return e=Du.bind(null,Ce,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Ce,r=Et();if(Le){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,Fs(9,{destroy:void 0},tu.bind(null,s,n,i,t),null),i},useId:function(){var e=Et(),t=Ge.identifierPrefix;if(Le){var i=li,s=ni;i=(s&~(1<<32-bt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=wn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Pd++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ea,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=wa.bind(null,Ce,!0,i),i.dispatch=t,[e,t]},useMemoCache:_a,useCacheRefresh:function(){return Et().memoizedState=e_.bind(null,Ce)},useEffectEvent:function(e){var t=Et(),i={impl:e};return t.memoizedState=i,function(){if((He&2)!==0)throw Error(G(440));return i.impl.apply(void 0,arguments)}}},Da={readContext:_t,use:An,useCallback:Cu,useContext:_t,useEffect:Sa,useImperativeHandle:bu,useInsertionEffect:pu,useLayoutEffect:Su,useMemo:Eu,useReducer:Tn,useRef:vu,useState:function(){return Tn(bi)},useDebugValue:ya,useDeferredValue:function(e,t){var i=et();return wu(i,je.memoizedState,e,t)},useTransition:function(){var e=Tn(bi)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Tr(e),t]},useSyncExternalStore:$c,useId:xu,useHostTransitionStatus:Ea,useFormState:fu,useActionState:fu,useOptimistic:function(e,t){var i=et();return nu(i,je,e,t)},useMemoCache:_a,useCacheRefresh:Ru};Da.useEffectEvent=mu;var ku={readContext:_t,use:An,useCallback:Cu,useContext:_t,useEffect:Sa,useImperativeHandle:bu,useInsertionEffect:pu,useLayoutEffect:Su,useMemo:Eu,useReducer:ga,useRef:vu,useState:function(){return ga(bi)},useDebugValue:ya,useDeferredValue:function(e,t){var i=et();return je===null?ba(i,e,t):wu(i,je.memoizedState,e,t)},useTransition:function(){var e=ga(bi)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Tr(e),t]},useSyncExternalStore:$c,useId:xu,useHostTransitionStatus:Ea,useFormState:_u,useActionState:_u,useOptimistic:function(e,t){var i=et();return je!==null?nu(i,je,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:_a,useCacheRefresh:Ru};ku.useEffectEvent=mu;function Aa(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 Ta={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=It(),r=ji(s);r.payload=t,i!=null&&(r.callback=i),t=qi(e,r,s),t!==null&&(Ot(t,e,s),Er(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=It(),r=ji(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=qi(e,r,s),t!==null&&(Ot(t,e,s),Er(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=It(),s=ji(i);s.tag=2,t!=null&&(s.callback=t),t=qi(e,s,i),t!==null&&(Ot(t,e,i),Er(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?!vr(i,s)||!vr(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&&Ta.enqueueReplaceState(t,t.state,null)}function ms(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){on(e)}function Nu(e){console.error(e)}function ju(e){on(e)}function Ln(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 xa(e,t,i){return i=ji(i),i.tag=3,i.payload={element:null},i.callback=function(){Ln(e,t)},i}function Iu(e){return e=ji(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"&&(Fi===null?Fi=new Set([this]):Fi.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&&Ns(t,i,r,!0),i=Ut.current,i!==null){switch(i.tag){case 31:case 13:return Qt===null?Kn():i.alternate===null&&Ze===0&&(Ze=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===pn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),$a(e,s,r)),!1;case 22:return i.flags|=65536,s===pn?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)),$a(e,s,r)),!1}throw Error(G(435,i.tag))}return $a(e,s,r),Kn(),!1}if(Le)return t=Ut.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Vl&&(e=Error(G(422),{cause:s}),pr(Xt(e,i)))):(s!==Vl&&(t=Error(G(423),{cause:s}),pr(Xt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Xt(s,i),r=xa(e.stateNode,s,r),ra(e,r),Ze!==4&&(Ze=2)),!1;var n=Error(G(520),{cause:s});if(n=Xt(n,i),Ur===null?Ur=[n]:Ur.push(n),Ze!==4&&(Ze=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=xa(i.stateNode,s,e),ra(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"&&(Fi===null||!Fi.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Iu(r),Yu(r,e,i,s),ra(i,r),!1}i=i.return}while(i!==null);return!1}var Ra=Error(G(461)),nt=!1;function vt(e,t,i,s){t.child=e===null?Fc(t,null,i,s):vs(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 hs(t),s=ua(e,t,i,g,n,r),R=ha(),e!==null&&!nt?(fa(e,t,r),Ci(e,t,r)):(Le&&R&&Xl(t),t.flags|=1,vt(e,t,s,r),t.child)}function Gu(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!Yl(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Xu(e,t,n,s,r)):(e=fn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Ua(e,r)){var g=n.memoizedProps;if(i=i.compare,i=i!==null?i:vr,i(g,s)&&e.ref===t.ref)return Ci(e,t,r)}return t.flags|=1,e=gi(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(vr(n,s)&&e.ref===t.ref)if(nt=!1,t.pendingProps=s=n,Ua(e,r))(e.flags&131072)!==0&&(nt=!0);else return t.lanes=e.lanes,Ci(e,t,r)}return Ma(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&&gn(t,n!==null?n.cachePool:null),n!==null?Qc(t,n):la(),Wc(t);else return s=t.lanes=536870912,Vu(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(gn(t,n.cachePool),Qc(t,n),Yi(),t.memoizedState=null):(e!==null&&gn(t,null),la(),Yi());return vt(e,t,r,i),t.child}function Mr(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=ea();return n=n===null?null:{parent:st._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&gn(t,null),la(),Wc(t),e!==null&&Ns(e,t,s,!0),t.childLanes=r,null}function On(e,t){return t=kn({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 vs(t,e.child,null,i),e=On(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function s_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(s.mode==="hidden")return e=On(t,s),t.lanes=536870912,Mr(null,e);if(oa(t),(e=Fe)?(e=af(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki!==null?{id:ni,overflow:li}:null,retryLane:536870912,hydrationErrors:null},i=Lc(e),i.return=t,t.child=i,dt=t,Fe=null)):e=null,e===null)throw zi(t);return t.lanes=536870912,null}return On(t,s)}var n=e.memoizedState;if(n!==null){var g=n.dehydrated;if(oa(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(nt||Ns(e,t,i,!1),r=(i&e.childLanes)!==0,nt||r){if(s=Ge,s!==null&&(g=No(s,i),g!==0&&g!==n.retryLane))throw n.retryLane=g,as(e,g),Ot(s,e,g),Ra;Kn(),t=Pu(e,t,i)}else e=n.treeContext,Fe=Wt(g.nextSibling),dt=t,Le=!0,Hi=null,Pt=!1,e!==null&&kc(t,e),t=On(t,s),t.flags|=4096;return t}return e=gi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bn(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(G(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Ma(e,t,i,s,r){return hs(t),i=ua(e,t,i,s,void 0,r),s=ha(),e!==null&&!nt?(fa(e,t,r),Ci(e,t,r)):(Le&&s&&Xl(t),t.flags|=1,vt(e,t,i,r),t.child)}function Qu(e,t,i,s,r,n){return hs(t),t.updateQueue=null,i=Jc(t,s,i,r),Zc(e),s=ha(),e!==null&&!nt?(fa(e,t,n),Ci(e,t,n)):(Le&&s&&Xl(t),t.flags|=1,vt(e,t,i,n),t.child)}function Wu(e,t,i,s,r){if(hs(t),t.stateNode===null){var n=ks,g=i.contextType;typeof g=="object"&&g!==null&&(n=_t(g)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Ta,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},ia(t),g=i.contextType,n.context=typeof g=="object"&&g!==null?_t(g):ks,n.state=t.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(Aa(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&&Ta.enqueueReplaceState(n,n.state,null),Dr(t,s,n,r),wr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var R=t.memoizedProps,k=ms(i,R);n.props=k;var V=n.context,J=i.contextType;g=ks,typeof J=="object"&&J!==null&&(g=_t(J));var re=i.getDerivedStateFromProps;J=typeof re=="function"||typeof n.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,J||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(R||V!==g)&&zu(t,n,s,g),Ni=!1;var P=t.memoizedState;n.state=P,Dr(t,s,n,r),wr(),V=t.memoizedState,R||P!==V||Ni?(typeof re=="function"&&(Aa(t,i,re,s),V=t.memoizedState),(k=Ni||Hu(t,i,k,s,P,V,g))?(J||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=V),n.props=s,n.state=V,n.context=g,s=k):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,sa(e,t),g=t.memoizedProps,J=ms(i,g),n.props=J,re=t.pendingProps,P=n.context,V=i.contextType,k=ks,typeof V=="object"&&V!==null&&(k=_t(V)),R=i.getDerivedStateFromProps,(V=typeof R=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(g!==re||P!==k)&&zu(t,n,s,k),Ni=!1,P=t.memoizedState,n.state=P,Dr(t,s,n,r),wr();var Q=t.memoizedState;g!==re||P!==Q||Ni||e!==null&&e.dependencies!==null&&_n(e.dependencies)?(typeof R=="function"&&(Aa(t,i,R,s),Q=t.memoizedState),(J=Ni||Hu(t,i,J,s,P,Q,k)||e!==null&&e.dependencies!==null&&_n(e.dependencies))?(V||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,Q,k),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,Q,k)),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=Q),n.props=s,n.state=Q,n.context=k,s=J):(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,Bn(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=vs(t,e.child,null,r),t.child=vs(t,null,i,r)):vt(e,t,i,r),t.memoizedState=n.state,e=t.child):e=Ci(e,t,r),e}function Zu(e,t,i,s){return cs(),t.flags|=256,vt(e,t,i,s),t.child}var La={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oa(e){return{baseLanes:e,cachePool:qc()}}function Ba(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=qt),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:($e.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(r?Ii(t):Yi(),(e=Fe)?(e=af(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki!==null?{id:ni,overflow:li}:null,retryLane:536870912,hydrationErrors:null},i=Lc(e),i.return=t,t.child=i,dt=t,Fe=null)):e=null,e===null)throw zi(t);return go(e)?t.lanes=32:t.lanes=536870912,null}var R=s.children;return s=s.fallback,r?(Yi(),r=t.mode,R=kn({mode:"hidden",children:R},r),s=os(s,r,i,null),R.return=t,s.return=t,R.sibling=s,t.child=R,s=t.child,s.memoizedState=Oa(i),s.childLanes=Ba(e,g,i),t.memoizedState=La,Mr(null,s)):(Ii(t),ka(t,R))}var k=e.memoizedState;if(k!==null&&(R=k.dehydrated,R!==null)){if(n)t.flags&256?(Ii(t),t.flags&=-257,t=Ha(e,t,i)):t.memoizedState!==null?(Yi(),t.child=e.child,t.flags|=128,t=null):(Yi(),R=s.fallback,r=t.mode,s=kn({mode:"visible",children:s.children},r),R=os(R,r,i,null),R.flags|=2,s.return=t,R.return=t,s.sibling=R,t.child=s,vs(t,e.child,null,i),s=t.child,s.memoizedState=Oa(i),s.childLanes=Ba(e,g,i),t.memoizedState=La,t=Mr(null,s));else if(Ii(t),go(R)){if(g=R.nextSibling&&R.nextSibling.dataset,g)var V=g.dgst;g=V,s=Error(G(419)),s.stack="",s.digest=g,pr({value:s,source:null,stack:null}),t=Ha(e,t,i)}else if(nt||Ns(e,t,i,!1),g=(i&e.childLanes)!==0,nt||g){if(g=Ge,g!==null&&(s=No(g,i),s!==0&&s!==k.retryLane))throw k.retryLane=s,as(e,s),Ot(g,e,s),Ra;vo(R)||Kn(),t=Ha(e,t,i)}else vo(R)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,Fe=Wt(R.nextSibling),dt=t,Le=!0,Hi=null,Pt=!1,e!==null&&kc(t,e),t=ka(t,s.children),t.flags|=4096);return t}return r?(Yi(),R=s.fallback,r=t.mode,k=e.child,V=k.sibling,s=gi(k,{mode:"hidden",children:s.children}),s.subtreeFlags=k.subtreeFlags&65011712,V!==null?R=gi(V,R):(R=os(R,r,i,null),R.flags|=2),R.return=t,s.return=t,s.sibling=R,t.child=s,Mr(null,s),s=t.child,R=e.child.memoizedState,R===null?R=Oa(i):(r=R.cachePool,r!==null?(k=st._currentValue,r=r.parent!==k?{parent:k,pool:k}:r):r=qc(),R={baseLanes:R.baseLanes|i,cachePool:r}),s.memoizedState=R,s.childLanes=Ba(e,g,i),t.memoizedState=La,Mr(e.child,s)):(Ii(t),i=e.child,e=i.sibling,i=gi(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 ka(e,t){return t=kn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function kn(e,t){return e=zt(22,e,null,t),e.lanes=0,e}function Ha(e,t,i){return vs(t,e.child,null,i),e=ka(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),Wl(e.return,t,i)}function za(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=$e.current,R=(g&2)!==0;if(R?(g=g&1|2,t.flags|=128):g&=1,X($e,g),vt(e,t,s,i),s=Le?mr: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&&Cn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),za(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&&Cn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}za(t,!0,i,null,n,s);break;case"together":za(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ci(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Xi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ns(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=gi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=gi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ua(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_n(e)))}function r_(e,t,i){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Ui(t,st,e.memoizedState.cache),cs();break;case 27:case 5:$(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Ui(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oa(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ii(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Ju(e,t,i):(Ii(t),e=Ci(e,t,i),e!==null?e.sibling:null);Ii(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Ns(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),X($e,$e.current),s)break;return null;case 22:return t.lanes=0,Fu(e,t,i,t.pendingProps);case 24:Ui(t,st,e.memoizedState.cache)}return Ci(e,t,i)}function th(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)nt=!0;else{if(!Ua(e,i)&&(t.flags&128)===0)return nt=!1,r_(e,t,i);nt=(e.flags&131072)!==0}else nt=!1,Le&&(t.flags&1048576)!==0&&Bc(t,mr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ds(t.elementType),t.type=e,typeof e=="function")Yl(e)?(s=ms(e,s),t.tag=1,t=Wu(null,t,e,s,i)):(t.tag=0,t=Ma(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===A){t.tag=14,t=Gu(null,t,e,s,i);break e}}throw t=W(e)||e,Error(G(306,t,""))}}return t;case 0:return Ma(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=ms(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,sa(e,t),Dr(t,s,null,i);var g=t.memoizedState;if(s=g.cache,Ui(t,st,s),s!==n.cache&&Zl(t,[st],i,!0),wr(),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),pr(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,Fe=Wt(e.firstChild),dt=t,Le=!0,Hi=null,Pt=!0,i=Fc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(cs(),s===r){t=Ci(e,t,i);break e}vt(e,t,s,i)}t=t.child}return t;case 26:return Bn(e,t),e===null?(i=df(t.type,null,t.pendingProps,null))?t.memoizedState=i:Le||(i=t.type,e=t.pendingProps,s=Wn(ue.current).createElement(i),s[ft]=t,s[At]=e,gt(s,i,e),ot(s),t.stateNode=s):t.memoizedState=df(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $(t),e===null&&Le&&(s=t.stateNode=uf(t.type,t.pendingProps,ue.current),dt=t,Pt=!0,r=Fe,Wi(t.type)?(mo=r,Fe=Wt(s.firstChild)):Fe=r),vt(e,t,t.pendingProps.children,i),Bn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((r=s=Fe)&&(s=k_(s,t.type,t.pendingProps,Pt),s!==null?(t.stateNode=s,dt=t,Fe=Wt(s.firstChild),Pt=!1,r=!0):r=!1),r||zi(t)),$(t),r=t.type,n=t.pendingProps,g=e!==null?e.memoizedProps:null,s=n.children,ho(r,n)?s=null:g!==null&&ho(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=ua(e,t,Qd,null,null,i),Xr._currentValue=r),Bn(e,t),vt(e,t,s,i),t.child;case 6:return e===null&&Le&&((e=i=Fe)&&(i=H_(i,t.pendingProps,Pt),i!==null?(t.stateNode=i,dt=t,Fe=null,e=!0):e=!1),e||zi(t)),null;case 13:return Ju(e,t,i);case 4:return K(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=vs(t,null,s,i):vt(e,t,s,i),t.child;case 11:return Ku(e,t,t.type,t.pendingProps,i);case 7:return vt(e,t,t.pendingProps,i),t.child;case 8:return vt(e,t,t.pendingProps.children,i),t.child;case 12:return vt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Ui(t,t.type,s.value),vt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,hs(t),r=_t(r),s=s(r),t.flags|=1,vt(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 hs(t),s=_t(st),e===null?(r=ea(),r===null&&(r=Ge,n=Jl(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},ia(t),Ui(t,st,r)):((e.lanes&i)!==0&&(sa(e,t),Dr(t,null,null,i),wr()),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),Ui(t,st,s)):(s=n.cache,Ui(t,st,s),s!==r.cache&&Zl(t,[st],i,!0))),vt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(G(156,t.tag))}function Ei(e){e.flags|=4}function Na(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(xh())e.flags|=8192;else throw _s=pn,ta}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(xh())e.flags|=8192;else throw _s=pn,ta}function Hn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?it():536870912,e.lanes|=t,Ws|=t)}function Lr(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 Ve(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(Fl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ve(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Si(st),Z(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Us(t)?Ei(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Pl())),Ve(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(Ei(t),n!==null?(Ve(t),ih(t,n)):(Ve(t),Na(t,r,null,s,i))):n?n!==e.memoizedState?(Ei(t),Ve(t),ih(t,n)):(Ve(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Ei(t),Ve(t),Na(t,r,e,s,i)),null;case 27:if(me(t),i=ue.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ei(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return Ve(t),null}e=se.current,Us(t)?Hc(t):(e=uf(r,s,i),t.stateNode=e,Ei(t))}return Ve(t),null;case 5:if(me(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ei(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return Ve(t),null}if(n=se.current,Us(t))Hc(t);else{var g=Wn(ue.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[ft]=t,n[At]=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(gt(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&&Ei(t)}}return Ve(t),Na(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Ei(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(G(166));if(e=ue.current,Us(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=dt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[ft]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Jh(e.nodeValue,i)),e||zi(t,!0)}else e=Wn(e).createTextNode(s),e[ft]=t,t.stateNode=e}return Ve(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Us(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[ft]=t}else cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),e=!1}else i=Pl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(G(558))}return Ve(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Us(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[ft]=t}else cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),r=!1}else r=Pl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,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),Hn(t,t.updateQueue),Ve(t),null);case 4:return Z(),e===null&&lo(t.stateNode.containerInfo),Ve(t),null;case 10:return Si(t.type),Ve(t),null;case 19:if(N($e),s=t.memoizedState,s===null)return Ve(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)Lr(s,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=Cn(e),n!==null){for(t.flags|=128,Lr(s,!1),e=n.updateQueue,t.updateQueue=e,Hn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Mc(i,e),i=i.sibling;return X($e,$e.current&1|2),Le&&mi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Qe()>qn&&(t.flags|=128,r=!0,Lr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Cn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Hn(t,e),Lr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Le)return Ve(t),null}else 2*Qe()-s.renderingStartTime>qn&&i!==536870912&&(t.flags|=128,r=!0,Lr(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=Qe(),e.sibling=null,i=$e.current,X($e,r?i&1|2:i&1),Le&&mi(t,s.treeForkCount),e):(Ve(t),null);case 22:case 23:return Nt(t),aa(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),i=t.updateQueue,i!==null&&Hn(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(fs),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Si(st),Ve(t),null;case 25:return null;case 30:return null}throw Error(G(156,t.tag))}function l_(e,t){switch(Fl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Si(st),Z(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(G(340));cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N($e),null;case 4:return Z(),null;case 10:return Si(t.type),null;case 22:case 23:return Nt(t),aa(),e!==null&&N(fs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Si(st),null;case 25:return null;default:return null}}function sh(e,t){switch(Fl(t),t.tag){case 3:Si(st),Z();break;case 26:case 27:case 5:me(t);break;case 4:Z();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:N($e);break;case 10:Si(t.type);break;case 22:case 23:Nt(t),aa(),e!==null&&N(fs);break;case 24:Si(st)}}function Or(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){Ue(t,t.return,R)}}function Ki(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 k=i,V=R;try{V()}catch(J){Ue(r,k,J)}}}s=s.next}while(s!==n)}}catch(J){Ue(t,t.return,J)}}function rh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Pc(t,i)}catch(s){Ue(e,e.return,s)}}}function nh(e,t,i){i.props=ms(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Ue(e,t,s)}}function Br(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){Ue(e,t,r)}}function ai(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){Ue(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){Ue(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){Ue(e,e.return,r)}}function ja(e,t,i){try{var s=e.stateNode;x_(s,e.type,i,t),s[At]=t}catch(r){Ue(e,e.return,r)}}function ah(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wi(e.type)||e.tag===4}function qa(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&&Wi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ia(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=_i));else if(s!==4&&(s===27&&Wi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Ia(e,t,i),e=e.sibling;e!==null;)Ia(e,t,i),e=e.sibling}function zn(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&Wi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(zn(e,t,i),e=e.sibling;e!==null;)zn(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]);gt(t,s,i),t[ft]=e,t[At]=i}catch(n){Ue(e,e.return,n)}}var wi=!1,lt=!1,Ya=!1,ch=typeof WeakSet=="function"?WeakSet:Set,ct=null;function a_(e,t){if(e=e.containerInfo,co=sl,e=bc(e),Hl(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,k=-1,V=0,J=0,re=e,P=null;t:for(;;){for(var Q;re!==i||r!==0&&re.nodeType!==3||(R=g+r),re!==n||s!==0&&re.nodeType!==3||(k=g+s),re.nodeType===3&&(g+=re.nodeValue.length),(Q=re.firstChild)!==null;)P=re,re=Q;for(;;){if(re===e)break t;if(P===i&&++V===r&&(R=g),P===n&&++J===s&&(k=g),(Q=re.nextSibling)!==null)break;re=P,P=re.parentNode}re=Q}i=R===-1||k===-1?null:{start:R,end:k}}else i=null}i=i||{start:0,end:0}}else i=null;for(uo={focusedElem:e,selectionRange:i},sl=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,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=ms(i.type,r);e=s.getSnapshotBeforeUpdate(fe,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(ge){Ue(i,i.return,ge)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)_o(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_o(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,ct=e;break}ct=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&&Or(5,i);break;case 1:if(Ai(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(g){Ue(i,i.return,g)}else{var r=ms(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ue(i,i.return,g)}}s&64&&rh(i),s&512&&Br(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){Ue(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&&Br(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=g_.bind(null,i),z_(e,i))));break;case 22:if(s=i.memoizedState!==null||wi,!s){t=t!==null&&t.memoizedState!==null||lt,r=wi;var n=lt;wi=s,(lt=t)&&!n?Ti(e,i,(i.subtreeFlags&8772)!==0):Ai(e,i),wi=r,lt=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&&pl(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 Pe=null,xt=!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(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(hi,i)}catch{}switch(i.tag){case 26:lt||ai(i,t),Di(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:lt||ai(i,t);var s=Pe,r=xt;Wi(i.type)&&(Pe=i.stateNode,xt=!1),Di(e,t,i),Yr(i.stateNode),Pe=s,xt=r;break;case 5:lt||ai(i,t);case 6:if(s=Pe,r=xt,Pe=null,Di(e,t,i),Pe=s,xt=r,Pe!==null)if(xt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(i.stateNode)}catch(n){Ue(i,t,n)}else try{Pe.removeChild(i.stateNode)}catch(n){Ue(i,t,n)}break;case 18:Pe!==null&&(xt?(e=Pe,nf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),rr(e)):nf(Pe,i.stateNode));break;case 4:s=Pe,r=xt,Pe=i.stateNode.containerInfo,xt=!0,Di(e,t,i),Pe=s,xt=r;break;case 0:case 11:case 14:case 15:Ki(2,i,t),lt||Ki(4,i,t),Di(e,t,i);break;case 1:lt||(ai(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:lt=(s=lt)||i.memoizedState!==null,Di(e,t,i),lt=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{rr(e)}catch(i){Ue(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{rr(e)}catch(i){Ue(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 Un(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 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(Wi(R.type)){Pe=R.stateNode,xt=!1;break e}break;case 5:Pe=R.stateNode,xt=!1;break e;case 3:case 4:Pe=R.stateNode.containerInfo,xt=!0;break e}R=R.return}if(Pe===null)throw Error(G(160));fh(n,g,r),Pe=null,xt=!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:Rt(t,e),Mt(e),s&4&&(Ki(3,e,e.return),Or(3,e),Ki(5,e,e.return));break;case 1:Rt(t,e),Mt(e),s&512&&(lt||i===null||ai(i,i.return)),s&64&&wi&&(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(Rt(t,e),Mt(e),s&512&&(lt||i===null||ai(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[lr]||n[ft]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),gt(n,s,i),n[ft]=e,ot(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),gt(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),gt(n,s,i),r.head.appendChild(n);break;default:throw Error(G(468,s))}n[ft]=e,ot(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&&ja(e,e.memoizedProps,i.memoizedProps)}break;case 27:Rt(t,e),Mt(e),s&512&&(lt||i===null||ai(i,i.return)),i!==null&&s&4&&ja(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Rt(t,e),Mt(e),s&512&&(lt||i===null||ai(i,i.return)),e.flags&32){r=e.stateNode;try{Ts(r,"")}catch(fe){Ue(e,e.return,fe)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,ja(e,r,i!==null?i.memoizedProps:r)),s&1024&&(Ya=!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){Ue(e,e.return,fe)}}break;case 3:if($n=null,r=ei,ei=Zn(t.containerInfo),Rt(t,e),ei=r,Mt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{rr(t.containerInfo)}catch(fe){Ue(e,e.return,fe)}Ya&&(Ya=!1,gh(e));break;case 4:s=ei,ei=Zn(e.stateNode.containerInfo),Rt(t,e),Mt(e),ei=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,Un(e,s)));break;case 13:Rt(t,e),Mt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(jn=Qe()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 22:r=e.memoizedState!==null;var k=i!==null&&i.memoizedState!==null,V=wi,J=lt;if(wi=V||r,lt=J||k,Rt(t,e),lt=J,wi=V,Mt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||k||wi||lt||ps(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){k=i=t;try{if(n=k.stateNode,r)g=n.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{R=k.stateNode;var re=k.memoizedProps.style,P=re!=null&&re.hasOwnProperty("display")?re.display:null;R.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(fe){Ue(k,k.return,fe)}}}else if(t.tag===6){if(i===null){k=t;try{k.stateNode.nodeValue=r?"":k.memoizedProps}catch(fe){Ue(k,k.return,fe)}}}else if(t.tag===18){if(i===null){k=t;try{var Q=k.stateNode;r?lf(Q,!0):lf(k.stateNode,!1)}catch(fe){Ue(k,k.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,Un(e,i))));break;case 19:Rt(t,e),Mt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 30:break;case 21:break;default:Rt(t,e),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=qa(e);zn(e,n,r);break;case 5:var g=i.stateNode;i.flags&32&&(Ts(g,""),i.flags&=-33);var R=qa(e);zn(e,R,g);break;case 3:case 4:var k=i.stateNode.containerInfo,V=qa(e);Ia(e,V,k);break;default:throw Error(G(161))}}catch(J){Ue(e,e.return,J)}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 ps(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ki(4,t,t.return),ps(t);break;case 1:ai(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&nh(t,t.return,i),ps(t);break;case 27:Yr(t.stateNode);case 26:case 5:ai(t,t.return),ps(t);break;case 22:t.memoizedState===null&&ps(t);break;case 30:ps(t);break;default:ps(t)}e=e.sibling}}function 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),Or(4,n);break;case 1:if(Ti(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(V){Ue(s,s.return,V)}if(s=n,r=s.updateQueue,r!==null){var R=s.stateNode;try{var k=r.shared.hiddenCallbacks;if(k!==null)for(r.shared.hiddenCallbacks=null,r=0;r<k.length;r++)Vc(k[r],R)}catch(V){Ue(s,s.return,V)}}i&&g&64&&rh(n),Br(n,n.return);break;case 27:oh(n);case 26:case 5:Ti(r,n,i),i&&s===null&&g&4&&lh(n),Br(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),Br(n,n.return);break;case 30:break;default:Ti(r,n,i)}t=t.sibling}}function Ka(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&&Sr(i))}function Ga(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Sr(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&&Or(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&&Sr(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(k){Ue(t,t.return,k)}}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):kr(e,t):n._visibility&2?ti(e,t,i,s):(n._visibility|=2,Vs(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Ka(g,t);break;case 24:ti(e,t,i,s),r&2048&&Ga(t.alternate,t);break;default:ti(e,t,i,s)}}function Vs(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,k=s,V=g.flags;switch(g.tag){case 0:case 11:case 15:Vs(n,g,R,k,r),Or(8,g);break;case 23:break;case 22:var J=g.stateNode;g.memoizedState!==null?J._visibility&2?Vs(n,g,R,k,r):kr(n,g):(J._visibility|=2,Vs(n,g,R,k,r)),r&&V&2048&&Ka(g.alternate,g);break;case 24:Vs(n,g,R,k,r),r&&V&2048&&Ga(g.alternate,g);break;default:Vs(n,g,R,k,r)}t=t.sibling}}function kr(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:kr(i,s),r&2048&&Ka(s.alternate,s);break;case 24:kr(i,s),r&2048&&Ga(s.alternate,s);break;default:kr(i,s)}t=t.sibling}}var Hr=8192;function Ps(e,t,i){if(e.subtreeFlags&Hr)for(e=e.child;e!==null;)ph(e,t,i),e=e.sibling}function ph(e,t,i){switch(e.tag){case 26:Ps(e,t,i),e.flags&Hr&&e.memoizedState!==null&&P_(i,ei,e.memoizedState,e.memoizedProps);break;case 5:Ps(e,t,i);break;case 3:case 4:var s=ei;ei=Zn(e.stateNode.containerInfo),Ps(e,t,i),ei=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Hr,Hr=16777216,Ps(e,t,i),Hr=s):Ps(e,t,i));break;default:Ps(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 zr(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];ct=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:zr(e),e.flags&2048&&Ki(9,e,e.return);break;case 3:zr(e);break;case 12:zr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nn(e)):zr(e);break;default:zr(e)}}function Nn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ct=s,bh(s,e)}Sh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ki(8,t,t.return),Nn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Nn(t));break;default:Nn(t)}e=e.sibling}}function bh(e,t){for(;ct!==null;){var i=ct;switch(i.tag){case 0:case 11:case 15:Ki(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:Sr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ct=s;else e:for(i=e;ct!==null;){s=ct;var r=s.sibling,n=s.return;if(hh(s),s===i){ct=null;break e}if(r!==null){r.return=n,ct=r;break e}ct=n}}}var c_={getCacheForType:function(e){var t=_t(st),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return _t(st).controller.signal}},u_=typeof WeakMap=="function"?WeakMap:Map,He=0,Ge=null,De=null,Te=0,ze=0,jt=null,Gi=!1,Qs=!1,Xa=!1,xi=0,Ze=0,Xi=0,Ss=0,Fa=0,qt=0,Ws=0,Ur=null,Lt=null,Va=!1,jn=0,Ch=0,qn=1/0,In=null,Fi=null,at=0,Vi=null,Zs=null,Ri=0,Pa=0,Qa=null,Eh=null,Nr=0,Wa=null;function It(){return(He&2)!==0&&Te!==0?Te&-Te:H.T!==null?io():jo()}function wh(){if(qt===0)if((Te&536870912)===0||Le){var e=_e;_e<<=1,(_e&3932160)===0&&(_e=262144),qt=e}else qt=536870912;return e=Ut.current,e!==null&&(e.flags|=32),qt}function Ot(e,t,i){(e===Ge&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&(Js(e,0),Pi(e,Te,qt,!1)),fi(e,i),((He&2)===0||e!==Ge)&&(e===Ge&&((He&2)===0&&(Ss|=i),Ze===4&&Pi(e,Te,qt,!1)),oi(e))}function Dh(e,t,i){if((He&6)!==0)throw Error(G(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ke(e,t),r=s?d_(e,t):Ja(e,t,!0),n=s;do{if(r===0){Qs&&!s&&Pi(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!h_(i)){r=Ja(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=Ur;var k=R.current.memoizedState.isDehydrated;if(k&&(Js(R,g).flags|=256),g=Ja(R,g,!1),g!==2){if(Xa&&!k){R.errorRecoveryDisabledLanes|=n,Ss|=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){Js(e,0),Pi(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:Pi(s,t,qt,!Gi);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(G(329))}if((t&62914560)===t&&(r=jn+300-Qe(),10<r)){if(Pi(s,t,qt,!Gi),ri(s,0,!0)!==0)break e;Ri=t,s.timeoutHandle=sf(Ah.bind(null,s,i,Lt,In,Va,t,qt,Ss,Ws,Gi,n,"Throttled",-0,0),r);break e}Ah(s,i,Lt,In,Va,t,qt,Ss,Ws,Gi,n,null,-0,0)}}break}while(!0);oi(e)}function Ah(e,t,i,s,r,n,g,R,k,V,J,re,P,Q){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:_i},ph(t,n,re);var fe=(n&62914560)===n?jn-Qe():(n&4194048)===n?Ch-Qe():0;if(fe=Q_(re,fe),fe!==null){Ri=n,e.cancelPendingCommit=fe(kh.bind(null,e,t,n,i,s,r,g,R,k,J,re,null,P,Q)),Pi(e,n,g,!V);return}}kh(e,t,n,i,s,r,g,R,k)}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(!Ht(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 Pi(e,t,i,s){t&=~Fa,t&=~Ss,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&&zo(e,i,t)}function Yn(){return(He&6)===0?(jr(0),!1):!0}function Za(){if(De!==null){if(ze===0)var e=De.return;else e=De,pi=us=null,da(e),Ys=null,br=0,e=De;for(;e!==null;)sh(e.alternate,e),e=e.return;De=null}}function Js(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,L_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ri=0,Za(),Ge=e,De=i=gi(e.current,null),Te=t,ze=0,jt=null,Gi=!1,Qs=Ke(e,t),Xa=!1,Ws=qt=Fa=Ss=Xi=Ze=0,Lt=Ur=null,Va=!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 xi=t,cn(),i}function Th(e,t){Ce=null,H.H=Rr,t===Is||t===mn?(t=Kc(),ze=3):t===ta?(t=Kc(),ze=4):ze=t===Ra?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jt=t,De===null&&(Ze=1,Ln(e,Xt(t,e.current)))}function xh(){var e=Ut.current;return e===null?!0:(Te&4194048)===Te?Qt===null:(Te&62914560)===Te||(Te&536870912)!==0?e===Qt:!1}function Rh(){var e=H.H;return H.H=Rr,e===null?Rr:e}function Mh(){var e=H.A;return H.A=c_,e}function Kn(){Ze=4,Gi||(Te&4194048)!==Te&&Ut.current!==null||(Qs=!0),(Xi&134217727)===0&&(Ss&134217727)===0||Ge===null||Pi(Ge,Te,qt,!1)}function Ja(e,t,i){var s=He;He|=2;var r=Rh(),n=Mh();(Ge!==e||Te!==t)&&(In=null,Js(e,t)),t=!1;var g=Ze;e:do try{if(ze!==0&&De!==null){var R=De,k=jt;switch(ze){case 8:Za(),g=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(t=!0);var V=ze;if(ze=0,jt=null,$s(e,R,k,V),i&&Qs){g=0;break e}break;default:V=ze,ze=0,jt=null,$s(e,R,k,V)}}f_(),g=Ze;break}catch(J){Th(e,J)}while(!0);return t&&e.shellSuspendCounter++,pi=us=null,He=s,H.H=r,H.A=n,De===null&&(Ge=null,Te=0,cn()),g}function f_(){for(;De!==null;)Lh(De)}function d_(e,t){var i=He;He|=2;var s=Rh(),r=Mh();Ge!==e||Te!==t?(In=null,qn=Qe()+500,Js(e,t)):Qs=Ke(e,t);e:do try{if(ze!==0&&De!==null){t=De;var n=jt;t:switch(ze){case 1:ze=0,jt=null,$s(e,t,n,1);break;case 2:case 9:if(Ic(n)){ze=0,jt=null,Oh(t);break}t=function(){ze!==2&&ze!==9||Ge!==e||(ze=7),oi(e)},n.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:Ic(n)?(ze=0,jt=null,Oh(t)):(ze=0,jt=null,$s(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){ze=0,jt=null;var k=R.sibling;if(k!==null)De=k;else{var V=R.return;V!==null?(De=V,Gn(V)):De=null}break t}}ze=0,jt=null,$s(e,t,n,5);break;case 6:ze=0,jt=null,$s(e,t,n,6);break;case 8:Za(),Ze=6;break e;default:throw Error(G(462))}}__();break}catch(J){Th(e,J)}while(!0);return pi=us=null,H.H=s,H.A=r,He=i,De!==null?0:(Ge=null,Te=0,cn(),Ze)}function __(){for(;De!==null&&!ci();)Lh(De)}function Lh(e){var t=th(e.alternate,e,xi);e.memoizedProps=e.pendingProps,t===null?Gn(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,Te);break;case 11:t=Qu(i,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:da(t);default:sh(i,t),t=De=Mc(t,xi),t=th(i,t,xi)}e.memoizedProps=e.pendingProps,t===null?Gn(e):De=t}function $s(e,t,i,s){pi=us=null,da(t),Ys=null,br=0;var r=t.return;try{if(i_(e,r,t,i,Te)){Ze=1,Ln(e,Xt(i,e.current)),De=null;return}}catch(n){if(r!==null)throw De=r,n;Ze=1,Ln(e,Xt(i,e.current)),De=null;return}t.flags&32768?(Le||s===1?e=!0:Qs||(Te&536870912)!==0?e=!1:(Gi=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ut.current,s!==null&&s.tag===13&&(s.flags|=16384))),Bh(t,e)):Gn(t)}function Gn(e){var t=e;do{if((t.flags&32768)!==0){Bh(t,Gi);return}e=t.return;var i=n_(t.alternate,t,xi);if(i!==null){De=i;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);Ze===0&&(Ze=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);Ze=6,De=null}function kh(e,t,i,s,r,n,g,R,k){e.cancelPendingCommit=null;do Xn();while(at!==0);if((He&6)!==0)throw Error(G(327));if(t!==null){if(t===e.current)throw Error(G(177));if(n=t.lanes|t.childLanes,n|=ql,_l(e,i,n,g,R,k),e===Ge&&(De=Ge=null,Te=0),Zs=t,Vi=e,Ri=i,Pa=n,Qa=r,Eh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,p_(yt,function(){return jh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=H.T,H.T=null,r=I.p,I.p=2,g=He,He|=4;try{a_(e,t,i)}finally{He=g,I.p=r,H.T=s}}at=1,Hh(),zh(),Uh()}}function Hh(){if(at===1){at=0;var e=Vi,t=Zs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=H.T,H.T=null;var s=I.p;I.p=2;var r=He;He|=4;try{vh(t,e);var n=uo,g=bc(e.containerInfo),R=n.focusedElem,k=n.selectionRange;if(g!==R&&R&&R.ownerDocument&&yc(R.ownerDocument.documentElement,R)){if(k!==null&&Hl(R)){var V=k.start,J=k.end;if(J===void 0&&(J=V),"selectionStart"in R)R.selectionStart=V,R.selectionEnd=Math.min(J,R.value.length);else{var re=R.ownerDocument||document,P=re&&re.defaultView||window;if(P.getSelection){var Q=P.getSelection(),fe=R.textContent.length,ge=Math.min(k.start,fe),Ie=k.end===void 0?ge:Math.min(k.end,fe);!Q.extend&&ge>Ie&&(g=Ie,Ie=ge,ge=g);var Y=Sc(R,ge),j=Sc(R,Ie);if(Y&&j&&(Q.rangeCount!==1||Q.anchorNode!==Y.node||Q.anchorOffset!==Y.offset||Q.focusNode!==j.node||Q.focusOffset!==j.offset)){var F=re.createRange();F.setStart(Y.node,Y.offset),Q.removeAllRanges(),ge>Ie?(Q.addRange(F),Q.extend(j.node,j.offset)):(F.setEnd(j.node,j.offset),Q.addRange(F))}}}}for(re=[],Q=R;Q=Q.parentNode;)Q.nodeType===1&&re.push({element:Q,left:Q.scrollLeft,top:Q.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}}sl=!!co,uo=co=null}finally{He=r,I.p=s,H.T=i}}e.current=t,at=2}}function zh(){if(at===2){at=0;var e=Vi,t=Zs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=H.T,H.T=null;var s=I.p;I.p=2;var r=He;He|=4;try{uh(e,t.alternate,t)}finally{He=r,I.p=s,H.T=i}}at=3}}function Uh(){if(at===4||at===3){at=0,mt();var e=Vi,t=Zs,i=Ri,s=Eh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,Zs=Vi=null,Nh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Fi=null),gl(i),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(hi,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=H.T,r=I.p,I.p=2,H.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{H.T=t,I.p=r}}(Ri&3)!==0&&Xn(),oi(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Wa?Nr++:(Nr=0,Wa=e):Nr=0,jr(0)}}function Nh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Sr(t)))}function Xn(){return Hh(),zh(),Uh(),jh()}function jh(){if(at!==5)return!1;var e=Vi,t=Pa;Pa=0;var i=gl(Ri),s=H.T,r=I.p;try{I.p=32>i?32:i,H.T=null,i=Qa,Qa=null;var n=Vi,g=Ri;if(at=0,Zs=Vi=null,Ri=0,(He&6)!==0)throw Error(G(331));var R=He;if(He|=4,yh(n.current),mh(n,n.current,g,i),He=R,jr(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(hi,n)}catch{}return!0}finally{I.p=r,H.T=s,Nh(e,t)}}function qh(e,t,i){t=Xt(i,t),t=xa(e.stateNode,t,2),e=qi(e,t,2),e!==null&&(fi(e,2),oi(e))}function Ue(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"&&(Fi===null||!Fi.has(s))){e=Xt(i,e),i=Iu(2),s=qi(t,i,2),s!==null&&(Yu(i,s,t,e),fi(s,2),oi(s));break}}t=t.return}}function $a(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)||(Xa=!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,Ge===e&&(Te&i)===i&&(Ze===4||Ze===3&&(Te&62914560)===Te&&300>Qe()-jn?(He&2)===0&&Js(e,0):Fa|=i,Ws===Te&&(Ws=0)),oi(e)}function Ih(e,t){t===0&&(t=it()),e=as(e,t),e!==null&&(fi(e,t),oi(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 ut(e,t)}var Fn=null,er=null,eo=!1,Vn=!1,to=!1,Qi=0;function oi(e){e!==er&&e.next===null&&(er===null?Fn=er=e:er=er.next=e),Vn=!0,eo||(eo=!0,y_())}function jr(e,t){if(!to&&Vn){to=!0;do for(var i=!1,s=Fn;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=Te,n=ri(s,s===Ge?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||Ke(s,n)||(i=!0,Xh(s,n));s=s.next}while(i);to=!1}}function S_(){Yh()}function Yh(){Vn=eo=!1;var e=0;Qi!==0&&M_()&&(e=Qi);for(var t=Qe(),i=null,s=Fn;s!==null;){var r=s.next,n=Kh(s,t);n===0?(s.next=null,i===null?Fn=r:i.next=r,r===null&&(er=i)):(i=s,(e!==0||(n&3)!==0)&&(Vn=!0)),s=r}at!==0&&at!==5||jr(e),Qi!==0&&(Qi=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,k=r[g];k===-1?((R&i)===0||(R&s)!==0)&&(r[g]=Xe(R,t)):k<=t&&(e.expiredLanes|=R),n&=~R}if(t=Ge,i=Te,i=ri(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&wt(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ke(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&wt(s),gl(i)){case 2:case 8:i=Jt;break;case 32:i=yt;break;case 268435456:i=Dt;break;default:i=yt}return s=Gh.bind(null,e),i=ut(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&wt(s),e.callbackPriority=2,e.callbackNode=null,2}function Gh(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Xn()&&e.callbackNode!==i)return null;var s=Te;return s=ri(e,e===Ge?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Dh(e,s,t),Kh(e,Qe()),e.callbackNode!=null&&e.callbackNode===i?Gh.bind(null,e):null)}function Xh(e,t){if(Xn())return null;Dh(e,t,!0)}function y_(){O_(function(){(He&6)!==0?ut(kt,S_):Yh()})}function io(){if(Qi===0){var e=js;e===0&&(e=he,he<<=1,(he&261888)===0&&(he=256)),Qi=e}return Qi}function Fh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:en(""+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[At]||null).action),g=s.submitter;g&&(t=(t=g[At]||null)?Fh(t.formAction):g.getAttribute("formAction"),t!==null&&(n=t,g=null));var R=new nn("action","action",null,s,r);e.push({event:R,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Qi!==0){var k=g?Vh(r,g):new FormData(r);Ca(i,{pending:!0,data:k,method:r.method,action:n},null,k)}}else typeof n=="function"&&(R.preventDefault(),k=g?Vh(r,g):new FormData(r),Ca(i,{pending:!0,data:k,method:r.method,action:n},n,k))},currentTarget:r}]})}}for(var so=0;so<jl.length;so++){var ro=jl[so],C_=ro.toLowerCase(),E_=ro[0].toUpperCase()+ro.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(Tc,"onTransitionEnd"),Ds("onMouseEnter",["mouseout","mouseover"]),Ds("onMouseLeave",["mouseout","mouseover"]),Ds("onPointerEnter",["pointerout","pointerover"]),Ds("onPointerLeave",["pointerout","pointerover"]),ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ss("onBeforeInput",["compositionend","keypress","textInput","paste"]),ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(qr));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],k=R.instance,V=R.currentTarget;if(R=R.listener,k!==n&&r.isPropagationStopped())break e;n=R,r.currentTarget=V;try{n(r)}catch(J){on(J)}r.currentTarget=null,n=k}else for(g=0;g<s.length;g++){if(R=s[g],k=R.instance,V=R.currentTarget,R=R.listener,k!==n&&r.isPropagationStopped())break e;n=R,r.currentTarget=V;try{n(r)}catch(J){on(J)}r.currentTarget=null,n=k}}}}function Ae(e,t){var i=t[ml];i===void 0&&(i=t[ml]=new Set);var s=e+"__bubble";i.has(s)||(Qh(t,e,2,!1),i.add(s))}function no(e,t,i){var s=0;t&&(s|=4),Qh(i,e,s,t)}var Pn="_reactListening"+Math.random().toString(36).slice(2);function lo(e){if(!e[Pn]){e[Pn]=!0,Yo.forEach(function(i){i!=="selectionchange"&&(w_.has(i)||no(i,!1,e),no(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pn]||(t[Pn]=!0,no("selectionchange",!1,t))}}function Qh(e,t,i,s){switch(Df(t)){case 2:var r=J_;break;case 8:r=$_;break;default:r=Co}i=r.bind(null,t,i,e),r=void 0,!Al||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 ao(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 k=g.tag;if((k===3||k===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;R!==null;){if(g=Cs(R),g===null)return;if(k=g.tag,k===5||k===6||k===26||k===27){s=n=g;continue e}R=R.parentNode}}s=s.return}ec(function(){var V=n,J=wl(i),re=[];e:{var P=xc.get(e);if(P!==void 0){var Q=nn,fe=e;switch(e){case"keypress":if(sn(i)===0)break e;case"keydown":case"keyup":Q=md;break;case"focusin":fe="focus",Q=Ml;break;case"focusout":fe="blur",Q=Ml;break;case"beforeblur":case"afterblur":Q=Ml;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=sc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=nd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=yd;break;case wc:case Dc:case Ac:Q=od;break;case Tc:Q=Cd;break;case"scroll":case"scrollend":Q=sd;break;case"wheel":Q=wd;break;case"copy":case"cut":case"paste":Q=ud;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=nc;break;case"toggle":case"beforetoggle":Q=Ad}var ge=(t&4)!==0,Ie=!ge&&(e==="scroll"||e==="scrollend"),Y=ge?P!==null?P+"Capture":null:P;ge=[];for(var j=V,F;j!==null;){var ie=j;if(F=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||F===null||Y===null||(ie=or(j,Y),ie!=null&&ge.push(Ir(j,ie,F))),Ie)break;j=j.return}0<ge.length&&(P=new Q(P,fe,null,i,J),re.push({event:P,listeners:ge}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",Q=e==="mouseout"||e==="pointerout",P&&i!==El&&(fe=i.relatedTarget||i.fromElement)&&(Cs(fe)||fe[bs]))break e;if((Q||P)&&(P=J.window===J?J:(P=J.ownerDocument)?P.defaultView||P.parentWindow:window,Q?(fe=i.relatedTarget||i.toElement,Q=V,fe=fe?Cs(fe):null,fe!==null&&(Ie=Se(fe),ge=fe.tag,fe!==Ie||ge!==5&&ge!==27&&ge!==6)&&(fe=null)):(Q=null,fe=V),Q!==fe)){if(ge=sc,ie="onMouseLeave",Y="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(ge=nc,ie="onPointerLeave",Y="onPointerEnter",j="pointer"),Ie=Q==null?P:ar(Q),F=fe==null?P:ar(fe),P=new ge(ie,j+"leave",Q,i,J),P.target=Ie,P.relatedTarget=F,ie=null,Cs(J)===V&&(ge=new ge(Y,j+"enter",fe,i,J),ge.target=F,ge.relatedTarget=Ie,ie=ge),Ie=ie,Q&&fe)t:{for(ge=D_,Y=Q,j=fe,F=0,ie=Y;ie;ie=ge(ie))F++;ie=0;for(var ve=j;ve;ve=ge(ve))ie++;for(;0<F-ie;)Y=ge(Y),F--;for(;0<ie-F;)j=ge(j),ie--;for(;F--;){if(Y===j||j!==null&&Y===j.alternate){ge=Y;break t}Y=ge(Y),j=ge(j)}ge=null}else ge=null;Q!==null&&Wh(re,P,Q,ge,!1),fe!==null&&Ie!==null&&Wh(re,Ie,fe,ge,!0)}}e:{if(P=V?ar(V):window,Q=P.nodeName&&P.nodeName.toLowerCase(),Q==="select"||Q==="input"&&P.type==="file")var Be=dc;else if(hc(P))if(_c)Be=zd;else{Be=kd;var de=Bd}else Q=P.nodeName,!Q||Q.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?V&&Cl(V.elementType)&&(Be=dc):Be=Hd;if(Be&&(Be=Be(e,V))){fc(re,Be,i,J);break e}de&&de(e,P,V),e==="focusout"&&V&&P.type==="number"&&V.memoizedProps.value!=null&&bl(P,"number",P.value)}switch(de=V?ar(V):window,e){case"focusin":(hc(de)||de.contentEditable==="true")&&(Ls=de,zl=V,gr=null);break;case"focusout":gr=zl=Ls=null;break;case"mousedown":Ul=!0;break;case"contextmenu":case"mouseup":case"dragend":Ul=!1,Cc(re,i,J);break;case"selectionchange":if(Nd)break;case"keydown":case"keyup":Cc(re,i,J)}var we;if(Ol)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else Ms?cc(e,i)&&(xe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(xe="onCompositionStart");xe&&(lc&&i.locale!=="ko"&&(Ms||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&Ms&&(we=tc()):(Bi=J,Tl="value"in Bi?Bi.value:Bi.textContent,Ms=!0)),de=Qn(V,xe),0<de.length&&(xe=new rc(xe,e,null,i,J),re.push({event:xe,listeners:de}),we?xe.data=we:(we=uc(i),we!==null&&(xe.data=we)))),(we=xd?Rd(e,i):Md(e,i))&&(xe=Qn(V,"onBeforeInput"),0<xe.length&&(de=new rc("onBeforeInput","beforeinput",null,i,J),re.push({event:de,listeners:xe}),de.data=we)),b_(re,e,V,i,J)}Ph(re,t)})}function Ir(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Qn(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=or(e,i),r!=null&&s.unshift(Ir(e,r,n)),r=or(e,t),r!=null&&s.push(Ir(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,k=R.alternate,V=R.stateNode;if(R=R.tag,k!==null&&k===s)break;R!==5&&R!==26&&R!==27||V===null||(k=V,r?(V=or(i,n),V!=null&&g.unshift(Ir(i,V,k))):r||(V=or(i,n),V!=null&&g.push(Ir(i,V,k)))),i=i.return}g.length!==0&&e.push({event:t,listeners:g})}var A_=/\r\n?/g,T_=/\u0000|\uFFFD/g;function Zh(e){return(typeof e=="string"?e:""+e).replace(A_,`
9
+ `).replace(T_,"")}function Jh(e,t){return t=Zh(t),Zh(e)===t}function qe(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Ts(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Ts(e,""+s);break;case"className":Jr(e,"class",s);break;case"tabIndex":Jr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Jr(e,i,s);break;case"style":Jo(e,s,n);break;case"data":if(t!=="object"){Jr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=en(""+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"&&qe(e,t,"name",r.name,r,null),qe(e,t,"formEncType",r.formEncType,r,null),qe(e,t,"formMethod",r.formMethod,r,null),qe(e,t,"formTarget",r.formTarget,r,null)):(qe(e,t,"encType",r.encType,r,null),qe(e,t,"method",r.method,r,null),qe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=en(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=_i);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=en(""+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),Zr(e,"popover",s);break;case"xlinkActuate":di(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":di(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":di(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":di(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":di(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":di(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":di(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":di(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":di(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Zr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=td.get(i)||i,Zr(e,i,s))}}function oo(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"?Ts(e,s):(typeof s=="number"||typeof s=="bigint")&&Ts(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=_i);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[At]||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,""):Zr(e,i,s)}}}function gt(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:qe(e,t,n,g,i,null)}}r&&qe(e,t,"srcSet",i.srcSet,i,null),s&&qe(e,t,"src",i.src,i,null);return;case"input":Ae("invalid",e);var R=n=g=r=null,k=null,V=null;for(s in i)if(i.hasOwnProperty(s)){var J=i[s];if(J!=null)switch(s){case"name":r=J;break;case"type":g=J;break;case"checked":k=J;break;case"defaultChecked":V=J;break;case"value":n=J;break;case"defaultValue":R=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(G(137,t));break;default:qe(e,t,s,J,i,null)}}Po(e,n,R,k,V,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:qe(e,t,r,R,i,null)}t=n,i=g,e.multiple=!!s,t!=null?As(e,!!s,t,!1):i!=null&&As(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:qe(e,t,g,R,i,null)}Wo(e,s,r,n);return;case"option":for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null)&&(k==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":qe(e,t,k,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<qr.length;s++)Ae(qr[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(V in i)if(i.hasOwnProperty(V)&&(s=i[V],s!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:qe(e,t,V,s,i,null)}return;default:if(Cl(t)){for(J in i)i.hasOwnProperty(J)&&(s=i[J],s!==void 0&&oo(e,t,J,s,i,void 0));return}}for(R in i)i.hasOwnProperty(R)&&(s=i[R],s!=null&&qe(e,t,R,s,i,null))}function x_(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,k=null,V=null,J=null;for(Q in i){var re=i[Q];if(i.hasOwnProperty(Q)&&re!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":k=re;default:s.hasOwnProperty(Q)||qe(e,t,Q,null,s,re)}}for(var P in s){var Q=s[P];if(re=i[P],s.hasOwnProperty(P)&&(Q!=null||re!=null))switch(P){case"type":n=Q;break;case"name":r=Q;break;case"checked":V=Q;break;case"defaultChecked":J=Q;break;case"value":g=Q;break;case"defaultValue":R=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(G(137,t));break;default:Q!==re&&qe(e,t,P,Q,s,re)}}yl(e,g,R,k,V,J,n,r);return;case"select":Q=g=R=P=null;for(n in i)if(k=i[n],i.hasOwnProperty(n)&&k!=null)switch(n){case"value":break;case"multiple":Q=k;default:s.hasOwnProperty(n)||qe(e,t,n,null,s,k)}for(r in s)if(n=s[r],k=i[r],s.hasOwnProperty(r)&&(n!=null||k!=null))switch(r){case"value":P=n;break;case"defaultValue":R=n;break;case"multiple":g=n;default:n!==k&&qe(e,t,r,n,s,k)}t=R,i=g,s=Q,P!=null?As(e,!!i,P,!1):!!s!=!!i&&(t!=null?As(e,!!i,t,!0):As(e,!!i,i?[]:"",!1));return;case"textarea":Q=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:qe(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":Q=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(G(91));break;default:r!==n&&qe(e,t,g,r,s,n)}Qo(e,P,Q);return;case"option":for(var fe in i)P=i[fe],i.hasOwnProperty(fe)&&P!=null&&!s.hasOwnProperty(fe)&&(fe==="selected"?e.selected=!1:qe(e,t,fe,null,s,P));for(k in s)P=s[k],Q=i[k],s.hasOwnProperty(k)&&P!==Q&&(P!=null||Q!=null)&&(k==="selected"?e.selected=P&&typeof P!="function"&&typeof P!="symbol":qe(e,t,k,P,s,Q));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 ge in i)P=i[ge],i.hasOwnProperty(ge)&&P!=null&&!s.hasOwnProperty(ge)&&qe(e,t,ge,null,s,P);for(V in s)if(P=s[V],Q=i[V],s.hasOwnProperty(V)&&P!==Q&&(P!=null||Q!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(G(137,t));break;default:qe(e,t,V,P,s,Q)}return;default:if(Cl(t)){for(var Ie in i)P=i[Ie],i.hasOwnProperty(Ie)&&P!==void 0&&!s.hasOwnProperty(Ie)&&oo(e,t,Ie,void 0,s,P);for(J in s)P=s[J],Q=i[J],!s.hasOwnProperty(J)||P===Q||P===void 0&&Q===void 0||oo(e,t,J,P,s,Q);return}}for(var Y in i)P=i[Y],i.hasOwnProperty(Y)&&P!=null&&!s.hasOwnProperty(Y)&&qe(e,t,Y,null,s,P);for(re in s)P=s[re],Q=i[re],!s.hasOwnProperty(re)||P===Q||P==null&&Q==null||qe(e,t,re,P,s,Q)}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 k=i[s],V=k.startTime;if(V>R)break;var J=k.transferSize,re=k.initiatorType;J&&$h(re)&&(k=k.responseEnd,g+=J*(k<R?1:(R-V)/(k-V)))}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 co=null,uo=null;function Wn(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 ho(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fo=null;function M_(){var e=window.event;return e&&e.type==="popstate"?e===fo?!1:(fo=e,!0):(fo=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 Wi(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),rr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Yr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Yr(i);for(var n=i.firstChild;n;){var g=n.nextSibling,R=n.nodeName;n[lr]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=g}}else i==="body"&&Yr(e.ownerDocument.body);i=r}while(i);rr(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 _o(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":_o(i),pl(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[lr])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 H_(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 vo(e){return e.data==="$?"||e.data==="$~"}function go(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 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 mo=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=Wn(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 Yr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pl(e)}var Zt=new Map,hf=new Set;function Zn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Mi=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=Mi.f(),t=Yn();return e||t}function N_(e){var t=Es(e);t!==null&&t.tag===5&&t.type==="form"?Tu(t):Mi.r(e)}var tr=typeof document>"u"?null:document;function ff(e,t,i){var s=tr;if(s&&typeof t=="string"&&t){var r=Kt(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"),gt(t,"link",e),ot(t),s.head.appendChild(t)))}}function j_(e){Mi.D(e),ff("dns-prefetch",e,null)}function q_(e,t){Mi.C(e,t),ff("preconnect",e,t)}function I_(e,t,i){Mi.L(e,t,i);var s=tr;if(s&&e&&t){var r='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Kt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Kt(i.imageSizes)+'"]')):r+='[href="'+Kt(e)+'"]';var n=r;switch(t){case"style":n=ir(e);break;case"script":n=sr(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(Kr(n))||t==="script"&&s.querySelector(Gr(n))||(t=s.createElement("link"),gt(t,"link",e),ot(t),s.head.appendChild(t)))}}function Y_(e,t){Mi.m(e,t);var i=tr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Kt(s)+'"][href="'+Kt(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=sr(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(Gr(n)))return}s=i.createElement("link"),gt(s,"link",e),ot(s),i.head.appendChild(s)}}}function K_(e,t,i){Mi.S(e,t,i);var s=tr;if(s&&e){var r=ws(s).hoistableStyles,n=ir(e);t=t||"default";var g=r.get(n);if(!g){var R={loading:0,preload:null};if(g=s.querySelector(Kr(n)))R.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(n))&&po(e,i);var k=g=s.createElement("link");ot(k),gt(k,"link",e),k._p=new Promise(function(V,J){k.onload=V,k.onerror=J}),k.addEventListener("load",function(){R.loading|=1}),k.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Jn(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:R},r.set(n,g)}}}function G_(e,t){Mi.X(e,t);var i=tr;if(i&&e){var s=ws(i).hoistableScripts,r=sr(e),n=s.get(r);n||(n=i.querySelector(Gr(r)),n||(e=h({src:e,async:!0},t),(t=Zt.get(r))&&So(e,t),n=i.createElement("script"),ot(n),gt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function X_(e,t){Mi.M(e,t);var i=tr;if(i&&e){var s=ws(i).hoistableScripts,r=sr(e),n=s.get(r);n||(n=i.querySelector(Gr(r)),n||(e=h({src:e,async:!0,type:"module"},t),(t=Zt.get(r))&&So(e,t),n=i.createElement("script"),ot(n),gt(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=ue.current)?Zn(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=ir(i.href),i=ws(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=ir(i.href);var n=ws(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(Kr(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||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=sr(i),i=ws(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(G(444,e))}}function ir(e){return'href="'+Kt(e)+'"'}function Kr(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}),gt(t,"link",i),ot(t),e.head.appendChild(t))}function sr(e){return'[src="'+Kt(e)+'"]'}function Gr(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~="'+Kt(i.href)+'"]');if(s)return t.instance=s,ot(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"),ot(s),gt(s,"style",r),Jn(s,i.precedence,e),t.instance=s;case"stylesheet":r=ir(i.href);var n=e.querySelector(Kr(r));if(n)return t.state.loading|=4,t.instance=n,ot(n),n;s=_f(i),(r=Zt.get(r))&&po(s,r),n=(e.ownerDocument||e).createElement("link"),ot(n);var g=n;return g._p=new Promise(function(R,k){g.onload=R,g.onerror=k}),gt(n,"link",s),t.state.loading|=4,Jn(n,i.precedence,e),t.instance=n;case"script":return n=sr(i.src),(r=e.querySelector(Gr(n)))?(t.instance=r,ot(r),r):(s=i,(r=Zt.get(n))&&(s=h({},i),So(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),ot(r),gt(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,Jn(s,i.precedence,e));return t.instance}function Jn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),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 po(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function So(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $n=null;function gf(e,t,i){if($n===null){var s=new Map,r=$n=new Map;r.set(i,s)}else r=$n,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[lr]||n[ft]||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=ir(s.href),n=t.querySelector(Kr(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=el.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,ot(n);return}n=t.ownerDocument||t,s=_f(s),(r=Zt.get(r))&&po(s,r),n=n.createElement("link"),ot(n);var g=n;g._p=new Promise(function(R,k){g.onload=R,g.onerror=k}),gt(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=el.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var yo=0;function Q_(e,t){return e.stylesheets&&e.count===0&&il(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&il(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&yo===0&&(yo=62500*R_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&il(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>yo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function el(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)il(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tl=null;function il(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tl=new Map,t.forEach(W_,e),tl=null,el.call(e))}function W_(e,t){if(!(t.state.loading&4)){var i=tl.get(e);if(i)var s=i.get(null);else{i=new Map,tl.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=el.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 Xr={$$typeof:o,Provider:null,Consumer:null,_currentValue:T,_currentValue2:T,_threadCount:0};function Z_(e,t,i,s,r,n,g,R,k){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=Ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ct(0),this.hiddenUpdates=Ct(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function Sf(e,t,i,s,r,n,g,R,k,V,J,re){return e=new Z_(e,t,i,g,k,V,J,re,R),t=1,n===!0&&(t|=24),n=zt(3,null,null,t),e.current=n,n.stateNode=e,t=Jl(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},ia(n),e}function yf(e){return e?(e=ks,e):ks}function bf(e,t,i,s,r,n){r=yf(r),s.context===null?s.context=r:s.pendingContext=r,s=ji(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=qi(e,s,t),i!==null&&(Ot(i,e,t),Er(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 bo(e,t){Cf(e,t),(e=e.alternate)&&Cf(e,t)}function Ef(e){if(e.tag===13||e.tag===31){var t=as(e,67108864);t!==null&&Ot(t,e,67108864),bo(e,67108864)}}function wf(e){if(e.tag===13||e.tag===31){var t=It();t=vl(t);var i=as(e,t);i!==null&&Ot(i,e,t),bo(e,t)}}var sl=!0;function J_(e,t,i,s){var r=H.T;H.T=null;var n=I.p;try{I.p=2,Co(e,t,i,s)}finally{I.p=n,H.T=r}}function $_(e,t,i,s){var r=H.T;H.T=null;var n=I.p;try{I.p=8,Co(e,t,i,s)}finally{I.p=n,H.T=r}}function Co(e,t,i,s){if(sl){var r=Eo(s);if(r===null)ao(e,t,s,rl,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=Es(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var g=Oe(n.pendingLanes);if(g!==0){var R=n;for(R.pendingLanes|=2,R.entangledLanes|=2;g;){var k=1<<31-bt(g);R.entanglements[1]|=k,g&=~k}oi(n),(He&6)===0&&(qn=Qe()+500,jr(0))}}break;case 31:case 13:R=as(n,2),R!==null&&Ot(R,n,2),Yn(),bo(n,2)}if(n=Eo(s),n===null&&ao(e,t,s,rl,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else ao(e,t,s,null,i)}}function Eo(e){return e=wl(e),wo(e)}var rl=null;function wo(e){if(rl=null,e=Cs(e),e!==null){var t=Se(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=te(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 rl=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(Je()){case kt:return 2;case Jt:return 8;case yt:case Li:return 32;case Dt:return 268435456;default:return 32}default:return 32}}var Do=!1,Zi=null,Ji=null,$i=null,Fr=new Map,Vr=new Map,es=[],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":Zi=null;break;case"dragenter":case"dragleave":Ji=null;break;case"mouseover":case"mouseout":$i=null;break;case"pointerover":case"pointerout":Fr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vr.delete(t.pointerId)}}function Pr(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=Es(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 Zi=Pr(Zi,e,t,i,s,r),!0;case"dragenter":return Ji=Pr(Ji,e,t,i,s,r),!0;case"mouseover":return $i=Pr($i,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return Fr.set(n,Pr(Fr.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,Vr.set(n,Pr(Vr.get(n)||null,e,t,i,s,r)),!0}return!1}function Tf(e){var t=Cs(e.target);if(t!==null){var i=Se(t);if(i!==null){if(t=i.tag,t===13){if(t=te(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 nl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Eo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);El=s,i.target.dispatchEvent(s),El=null}else return t=Es(i),t!==null&&Ef(t),e.blockedOn=i,!1;t.shift()}return!0}function xf(e,t,i){nl(e)&&i.delete(t)}function iv(){Do=!1,Zi!==null&&nl(Zi)&&(Zi=null),Ji!==null&&nl(Ji)&&(Ji=null),$i!==null&&nl($i)&&($i=null),Fr.forEach(xf),Vr.forEach(xf)}function ll(e,t){e.blockedOn===t&&(e.blockedOn=null,Do||(Do=!0,q.unstable_scheduleCallback(q.unstable_NormalPriority,iv)))}var al=null;function Rf(e){al!==e&&(al=e,q.unstable_scheduleCallback(q.unstable_NormalPriority,function(){al===e&&(al=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(wo(s||i)===null)continue;break}var n=Es(i);n!==null&&(e.splice(t,3),t-=3,Ca(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function rr(e){function t(k){return ll(k,e)}Zi!==null&&ll(Zi,e),Ji!==null&&ll(Ji,e),$i!==null&&ll($i,e),Fr.forEach(t),Vr.forEach(t);for(var i=0;i<es.length;i++){var s=es[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<es.length&&(i=es[0],i.blockedOn===null);)Tf(i),i.blockedOn===null&&es.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[At]||null;if(typeof n=="function")g||Rf(i);else if(g){var R=null;if(n&&n.hasAttribute("formAction")){if(r=n,g=n[At]||null)R=g.formAction;else if(wo(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 Ao(e){this._internalRoot=e}ol.prototype.render=Ao.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var i=t.current,s=It();bf(i,s,e,t,null,null)},ol.prototype.unmount=Ao.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),Yn(),t[bs]=null}};function ol(e){this._internalRoot=e}ol.prototype.unstable_scheduleHydration=function(e){if(e){var t=jo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<es.length&&t!==0&&t<es[i].priority;i++);es.splice(i,0,e),i===0&&Tf(e)}};var Lf=ae.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:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cl.isDisabled&&cl.supportsFiber)try{hi=cl.inject(sv),ht=cl}catch{}}return Wr.createRoot=function(e,t){if(!ce(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[bs]=t.current,lo(e),new Ao(t)},Wr.hydrateRoot=function(e,t,i){if(!ce(e))throw Error(G(299));var s=!1,r="",n=Uu,g=Nu,R=ju,k=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&&(k=i.formState)),t=Sf(e,1,!0,t,i??null,s,r,k,n,g,R,Mf),t.context=yf(null),i=t.current,s=It(),s=vl(s),r=ji(s),r.callback=null,qi(i,r,s),i=s,t.current.lanes=i,fi(t,i),oi(t),e[bs]=t.current,lo(e),new ol(t)},Wr.version="19.2.4",Wr}var If;function _v(){if(If)return Ro.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(ae){console.error(ae)}}return q(),Ro.exports=dv(),Ro.exports}var vv=_v();const gv=Ff(vv);var Bo={exports:{}},Yf;function mv(){return Yf||(Yf=1,(function(q,ae){(function(ye,G){q.exports=G()})(self,(()=>(()=>{var ye={};return(()=>{var G=ye;Object.defineProperty(G,"__esModule",{value:!0}),G.FitAddon=void 0,G.FitAddon=class{activate(ce){this._terminal=ce}dispose(){}fit(){const ce=this.proposeDimensions();if(!ce||!this._terminal||isNaN(ce.cols)||isNaN(ce.rows))return;const Se=this._terminal._core;this._terminal.rows===ce.rows&&this._terminal.cols===ce.cols||(Se._renderService.clear(),this._terminal.resize(ce.cols,ce.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ce=this._terminal._core,Se=ce._renderService.dimensions;if(Se.css.cell.width===0||Se.css.cell.height===0)return;const te=this._terminal.options.scrollback===0?0:ce.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")))-te;return{cols:Math.max(2,Math.floor(p/Se.css.cell.width)),rows:Math.max(1,Math.floor(h/Se.css.cell.height))}}}})(),ye})()))})(Bo)),Bo.exports}var pv=mv(),ko={exports:{}},Kf;function Sv(){return Kf||(Kf=1,(function(q,ae){(function(ye,G){q.exports=G()})(self,(()=>(()=>{var ye={4567:function(te,u,f){var d=this&&this.__decorate||function(o,_,m,b){var A,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 O=o.length-1;O>=0;O--)(A=o[O])&&(E=(v<3?A(E):v>3?A(_,m,E):A(_,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),D=f(844),S=f(5596),l=f(4725),c=f(3656);let a=u.AccessibilityManager=class extends D.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,D.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 A=o;A<=_;A++){const v=m.translateBufferLineToString(m.ydisp+A,!0),E=(m.ydisp+A+1).toString(),O=this._rowElements[A];O&&(v.length===0?O.innerText=" ":O.textContent=v,O.setAttribute("aria-posinset",E),O.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 A,v;if(_===0?(A=m,v=this._rowElements.pop(),this._rowContainer.removeChild(v)):(A=this._rowElements.shift(),v=m,this._rowContainer.removeChild(A)),A.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:(te,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,D,S){p=d(p=f(p),D.decPrivateModes.bracketedPasteMode&&S.rawOptions.ignoreBracketedPasteMode!==!0),D.triggerDataEvent(p,!0),C.value=""}function h(p,C,D){const S=D.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,D,S){p.stopPropagation(),p.clipboardData&&y(p.clipboardData.getData("text/plain"),C,D,S)},u.paste=y,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(p,C,D,S,l){h(p,C,D),l&&S.rightClickSelect(p),C.value=S.selectionText,C.select()}},7239:(te,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:(te,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(te,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 A=l.length-1;A>=0;A--)(_=l[A])&&(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),D=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,(A=>{var v,E;if(this._isMouseOut)return;const O=A?.map((U=>({link:U})));(v=this._activeProviderReplies)===null||v===void 0||v.set(m,O),_=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],A=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=A;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((A=>this._linkAtPosition(A.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 A=(o=this._activeProviderReplies.get(b))===null||o===void 0?void 0:o.find((v=>this._linkAtPosition(v.link,c)));if(A){a=!0,this._handleNewLink(A);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,D.IBufferService)],S)},9042:(te,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(te,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 A=-1,v=-1,E=!1;for(let O=0;O<b;O++)if(v!==-1||a.hasContent(O)){if(a.loadCell(O,m),m.hasExtendedAttrs()&&m.extended.urlId){if(v===-1){v=O,A=m.extended.urlId;continue}E=m.extended.urlId!==A}else v!==-1&&(E=!0);if(E||v!==-1&&O===b-1){const U=(c=this._oscLinkService.getLinkData(A))===null||c===void 0?void 0:c.uri;if(U){const M={start:{x:v+1,y:S},end:{x:O+(E||O!==b-1?0:1),y:S}};let z=!1;if(!_?.allowNonHttpProtocols)try{const W=new URL(U);["http:","https:"].includes(W.protocol)||(z=!0)}catch{z=!0}z||o.push({text:U,range:M,activate:(W,ee)=>_?_.activate(W,ee,M):D(0,ee),hover:(W,ee)=>{var H;return(H=_?.hover)===null||H===void 0?void 0:H.call(_,W,ee,M)},leave:(W,ee)=>{var H;return(H=_?.leave)===null||H===void 0?void 0:H.call(_,W,ee,M)}})}E=!1,m.hasExtendedAttrs()&&m.extended.urlId?(v=O,A=m.extended.urlId):(v=-1,A=-1)}}l(o)}};function D(S,l){if(confirm(`Do you want to navigate to ${l}?
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:(te,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:(te,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:(te,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),D=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),A=f(3230),v=f(9312),E=f(4725),O=f(6731),U=f(8055),M=f(8969),z=f(8460),W=f(844),ee=f(6114),H=f(8437),I=f(2584),T=f(7399),L=f(5941),B=f(9074),w=f(2585),N=f(5435),X=f(4567),se=typeof window<"u"?window.document:null;class ne extends M.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(x={}){super(x),this.browser=ee,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new W.MutableDisposable),this._onCursorMove=this.register(new z.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new z.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new z.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new z.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new z.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new z.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new z.EventEmitter),this._onBlur=this.register(new z.EventEmitter),this._onA11yCharEmitter=this.register(new z.EventEmitter),this._onA11yTabEmitter=this.register(new z.EventEmitter),this._onWillOpen=this.register(new z.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,z.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,z.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,z.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,z.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((K=>this._afterResize(K.cols,K.rows)))),this.register((0,W.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(x){if(this._themeService)for(const K of x){let Z,$="";switch(K.index){case 256:Z="foreground",$="10";break;case 257:Z="background",$="11";break;case 258:Z="cursor",$="12";break;default:Z="ansi",$="4;"+K.index}switch(K.type){case 0:const me=U.color.toColorRGB(Z==="ansi"?this._themeService.colors.ansi[K.index]:this._themeService.colors[Z]);this.coreService.triggerDataEvent(`${I.C0.ESC}]${$};${(0,L.toRgbString)(me)}${I.C1_ESCAPED.ST}`);break;case 1:if(Z==="ansi")this._themeService.modifyColors((oe=>oe.ansi[K.index]=U.rgba.toColor(...K.color)));else{const oe=Z;this._themeService.modifyColors((Re=>Re[oe]=U.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(x){x?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(X.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(x){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[I"),this.updateCursorStyle(x),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var x;return(x=this.textarea)===null||x===void 0?void 0:x.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 x=this.buffer.ybase+this.buffer.y,K=this.buffer.lines.get(x);if(!K)return;const Z=Math.min(this.buffer.x,this.cols-1),$=this._renderService.dimensions.css.cell.height,me=K.getWidth(Z),oe=this._renderService.dimensions.css.cell.width*me,Re=this.buffer.y*this._renderService.dimensions.css.cell.height,Ne=Z*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ne+"px",this.textarea.style.top=Re+"px",this.textarea.style.width=oe+"px",this.textarea.style.height=$+"px",this.textarea.style.lineHeight=$+"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 x=K=>(0,d.handlePasteEvent)(K,this.textarea,this.coreService,this.optionsService);this.register((0,y.addDisposableDomListener)(this.textarea,"paste",x)),this.register((0,y.addDisposableDomListener)(this.element,"paste",x)),ee.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)}))),ee.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",(x=>this._keyUp(x)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keydown",(x=>this._keyDown(x)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keypress",(x=>this._keyPress(x)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionupdate",(x=>this._compositionHelper.compositionupdate(x)))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,y.addDisposableDomListener)(this.textarea,"input",(x=>this._inputEvent(x)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(x){var K;if(!x)throw new Error("Terminal requires a parent element.");x.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=x.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),x.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),ee.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",($=>this._handleTextAreaFocus($)))),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(O.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(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(($=>this._onRender.fire($)))),this.onResize(($=>this._renderService.resize($.cols,$.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(D.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(($=>this.scrollLines($.amount,$.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(($=>this.scrollLines($.amount,$.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw(($=>this._renderService.handleSelectionChanged($.start,$.end,$.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection(($=>{this.textarea.value=$,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event(($=>{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",($=>this._selectionService.handleMouseDown($)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(X.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",($=>this._handleScreenReaderModeOptionChange($)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",($=>{!this._overviewRulerRenderer&&$&&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 x=this,K=this.element;function Z(oe){const Re=x._mouseService.getMouseReportCoords(oe,x.screenElement);if(!Re)return!1;let Ne,tt;switch(oe.overrideType||oe.type){case"mousemove":tt=32,oe.buttons===void 0?(Ne=3,oe.button!==void 0&&(Ne=oe.button<3?oe.button:3)):Ne=1&oe.buttons?0:4&oe.buttons?1:2&oe.buttons?2:3;break;case"mouseup":tt=0,Ne=oe.button<3?oe.button:3;break;case"mousedown":tt=1,Ne=oe.button<3?oe.button:3;break;case"wheel":if(x.viewport.getLinesScrolled(oe)===0)return!1;tt=oe.deltaY<0?0:1,Ne=4;break;default:return!1}return!(tt===void 0||Ne===void 0||Ne>4)&&x.coreMouseService.triggerMouseEvent({col:Re.col,row:Re.row,x:Re.x,y:Re.y,button:Ne,action:tt,ctrl:oe.ctrlKey,alt:oe.altKey,shift:oe.shiftKey})}const $={mouseup:null,wheel:null,mousedrag:null,mousemove:null},me={mouseup:oe=>(Z(oe),oe.buttons||(this._document.removeEventListener("mouseup",$.mouseup),$.mousedrag&&this._document.removeEventListener("mousemove",$.mousedrag)),this.cancel(oe)),wheel:oe=>(Z(oe),this.cancel(oe,!0)),mousedrag:oe=>{oe.buttons&&Z(oe)},mousemove:oe=>{oe.buttons||Z(oe)}};this.register(this.coreMouseService.onProtocolChange((oe=>{oe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(oe)),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&oe?$.mousemove||(K.addEventListener("mousemove",me.mousemove),$.mousemove=me.mousemove):(K.removeEventListener("mousemove",$.mousemove),$.mousemove=null),16&oe?$.wheel||(K.addEventListener("wheel",me.wheel,{passive:!1}),$.wheel=me.wheel):(K.removeEventListener("wheel",$.wheel),$.wheel=null),2&oe?$.mouseup||(K.addEventListener("mouseup",me.mouseup),$.mouseup=me.mouseup):(this._document.removeEventListener("mouseup",$.mouseup),K.removeEventListener("mouseup",$.mouseup),$.mouseup=null),4&oe?$.mousedrag||($.mousedrag=me.mousedrag):(this._document.removeEventListener("mousemove",$.mousedrag),$.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,y.addDisposableDomListener)(K,"mousedown",(oe=>{if(oe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(oe))return Z(oe),$.mouseup&&this._document.addEventListener("mouseup",$.mouseup),$.mousedrag&&this._document.addEventListener("mousemove",$.mousedrag),this.cancel(oe)}))),this.register((0,y.addDisposableDomListener)(K,"wheel",(oe=>{if(!$.wheel){if(!this.buffer.hasScrollback){const Re=this.viewport.getLinesScrolled(oe);if(Re===0)return;const Ne=I.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(oe.deltaY<0?"A":"B");let tt="";for(let Bt=0;Bt<Math.abs(Re);Bt++)tt+=Ne;return this.coreService.triggerDataEvent(tt,!0),this.cancel(oe,!0)}return this.viewport.handleWheel(oe)?this.cancel(oe):void 0}}),{passive:!1})),this.register((0,y.addDisposableDomListener)(K,"touchstart",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(oe),this.cancel(oe)}),{passive:!0})),this.register((0,y.addDisposableDomListener)(K,"touchmove",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(oe)?void 0:this.cancel(oe)}),{passive:!1}))}refresh(x,K){var Z;(Z=this._renderService)===null||Z===void 0||Z.refreshRows(x,K)}updateCursorStyle(x){var K;!((K=this._selectionService)===null||K===void 0)&&K.shouldColumnSelect(x)?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(x,K,Z=0){var $;Z===1?(super.scrollLines(x,K,Z),this.refresh(0,this.rows-1)):($=this.viewport)===null||$===void 0||$.scrollLines(x)}paste(x){(0,d.paste)(x,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(x){this._customKeyEventHandler=x}registerLinkProvider(x){return this.linkifier2.registerLinkProvider(x)}registerCharacterJoiner(x){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const K=this._characterJoinerService.register(x);return this.refresh(0,this.rows-1),K}deregisterCharacterJoiner(x){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(x)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(x){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+x)}registerDecoration(x){return this._decorationService.registerDecoration(x)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(x,K,Z){this._selectionService.setSelection(x,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 x;(x=this._selectionService)===null||x===void 0||x.clearSelection()}selectAll(){var x;(x=this._selectionService)===null||x===void 0||x.selectAll()}selectLines(x,K){var Z;(Z=this._selectionService)===null||Z===void 0||Z.selectLines(x,K)}_keyDown(x){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(x)===!1)return!1;const K=this.browser.isMac&&this.options.macOptionIsMeta&&x.altKey;if(!K&&!this._compositionHelper.keydown(x))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;K||x.key!=="Dead"&&x.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const Z=(0,T.evaluateKeyboardEvent)(x,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(x),Z.type===3||Z.type===2){const $=this.rows-1;return this.scrollLines(Z.type===2?-$:$),this.cancel(x,!0)}return Z.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,x)||(Z.cancel&&this.cancel(x,!0),!Z.key||!!(x.key&&!x.ctrlKey&&!x.altKey&&!x.metaKey&&x.key.length===1&&x.key.charCodeAt(0)>=65&&x.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:x}),this._showCursor(),this.coreService.triggerDataEvent(Z.key,!0),!this.optionsService.rawOptions.screenReaderMode||x.altKey||x.ctrlKey?this.cancel(x,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(x,K){const Z=x.isMac&&!this.options.macOptionIsMeta&&K.altKey&&!K.ctrlKey&&!K.metaKey||x.isWindows&&K.altKey&&K.ctrlKey&&!K.metaKey||x.isWindows&&K.getModifierState("AltGraph");return K.type==="keypress"?Z:Z&&(!K.keyCode||K.keyCode>47)}_keyUp(x){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(x)===!1||((function(K){return K.keyCode===16||K.keyCode===17||K.keyCode===18})(x)||this.focus(),this.updateCursorStyle(x),this._keyPressHandled=!1)}_keyPress(x){let K;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(x)===!1)return!1;if(this.cancel(x),x.charCode)K=x.charCode;else if(x.which===null||x.which===void 0)K=x.keyCode;else{if(x.which===0||x.charCode===0)return!1;K=x.which}return!(!K||(x.altKey||x.ctrlKey||x.metaKey)&&!this._isThirdLevelShift(this.browser,x)||(K=String.fromCharCode(K),this._onKey.fire({key:K,domEvent:x}),this._showCursor(),this.coreService.triggerDataEvent(K,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(x){if(x.data&&x.inputType==="insertText"&&(!x.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const K=x.data;return this.coreService.triggerDataEvent(K,!0),this.cancel(x),!0}return!1}resize(x,K){x!==this.cols||K!==this.rows?super.resize(x,K):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(x,K){var Z,$;(Z=this._charSizeService)===null||Z===void 0||Z.measure(),($=this.viewport)===null||$===void 0||$.syncScrollArea(!0)}clear(){var x;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(H.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(x=this.viewport)===null||x===void 0||x.reset(),this.refresh(0,this.rows-1)}}reset(){var x,K;this.options.rows=this.rows,this.options.cols=this.cols;const Z=this._customKeyEventHandler;this._setup(),super.reset(),(x=this._selectionService)===null||x===void 0||x.reset(),this._decorationService.reset(),(K=this.viewport)===null||K===void 0||K.reset(),this._customKeyEventHandler=Z,this.refresh(0,this.rows-1)}clearTextureAtlas(){var x;(x=this._renderService)===null||x===void 0||x.clearTextureAtlas()}_reportFocus(){var x;!((x=this.element)===null||x===void 0)&&x.classList.contains("focus")?this.coreService.triggerDataEvent(I.C0.ESC+"[I"):this.coreService.triggerDataEvent(I.C0.ESC+"[O")}_reportWindowsOptions(x){if(this._renderService)switch(x){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 $=this._renderService.dimensions.css.cell.width.toFixed(0),me=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[6;${me};${$}t`)}}cancel(x,K){if(this.options.cancelEvents||K)return x.preventDefault(),x.stopPropagation(),!1}}u.Terminal=ne},9924:(te,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(te,u,f){var d=this&&this.__decorate||function(c,a,o,_){var m,b=arguments.length,A=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(m=c[v])&&(A=(b<3?m(A):b>3?m(a,o,A):m(a,o))||A);return b>3&&A&&Object.defineProperty(a,o,A),A},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),D=f(844),S=f(2585);let l=u.Viewport=class extends D.Disposable{constructor(c,a,o,_,m,b,A,v){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=o,this._optionsService=_,this._charSizeService=m,this._renderService=b,this._coreBrowserService=A,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=[],A=a??this._bufferService.buffer.lines.length,v=this._bufferService.buffer.lines;for(let E=c;E<A;E++){const O=v.get(E);if(!O)continue;const U=(o=v.get(E+1))===null||o===void 0?void 0:o.isWrapped;if(m+=O.translateToString(!U),!U||E===v.length-1){const M=document.createElement("div");M.textContent=m,b.push(M),m.length>0&&(_=M),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(te,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 A=l.length-1;A>=0;A--)(_=l[A])&&(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),D=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,D.IBufferService),y(2,D.IDecorationService),y(3,p.IRenderService)],S)},5871:(te,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(te,u,f){var d=this&&this.__decorate||function(_,m,b,A){var v,E=arguments.length,O=E<3?m:A===null?A=Object.getOwnPropertyDescriptor(m,b):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,m,b,A);else for(var U=_.length-1;U>=0;U--)(v=_[U])&&(O=(E<3?v(O):E>3?v(m,b,O):v(m,b))||O);return E>3&&O&&Object.defineProperty(m,b,O),O},y=this&&this.__param||function(_,m){return function(b,A){m(b,A,_)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=f(5871),p=f(3656),C=f(4725),D=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 D.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(_,m,b,A,v,E,O){var U;super(),this._viewportElement=_,this._screenElement=m,this._bufferService=b,this._decorationService=A,this._renderService=v,this._optionsService=E,this._coreBrowseService=O,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(),(U=this._viewportElement.parentElement)===null||U===void 0||U.insertBefore(this._canvas,this._viewportElement);const M=this._canvas.getContext("2d");if(!M)throw new Error("Ctx cannot be null");this._ctx=M,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,D.toDisposable)((()=>{var z;(z=this._canvas)===null||z===void 0||z.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(te,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 D=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=D=d([y(2,p.IBufferService),y(3,p.IOptionsService),y(4,p.ICoreService),y(5,h.IRenderService)],D)},9806:(te,u)=>{function f(d,y,h){const p=h.getBoundingClientRect(),C=d.getComputedStyle(h),D=parseInt(C.getPropertyValue("padding-left")),S=parseInt(C.getPropertyValue("padding-top"));return[y.clientX-p.left-D,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,D,S,l,c){if(!D)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:(te,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(A,v,E){let O=0;const U=A-h(A,E),M=v-h(v,E);for(let z=0;z<Math.abs(U-M);z++){const W=p(A,v)==="A"?-1:1,ee=E.buffer.lines.get(U+W*z);ee?.isWrapped&&O++}return O})(l,c,a);return S(b,D(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,A=c,v="";for(;b!==a||A!==o;)b+=_?1:-1,_&&b>m.cols-1?(v+=m.buffer.translateBufferLineToString(A,!1,l,b),b=0,l=0,A++):!_&&b<0&&(v+=m.buffer.translateBufferLineToString(A,!1,0,l+1),b=m.cols-1,l=b,A--);return v+m.buffer.translateBufferLineToString(A,!1,l,b)}function D(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,O,U,M,z){return y(E,U,M,z).length===0?"":S(C(v,E,v,E-h(E,M),!1,M).length,D("D",z))})(_,m,0,c,a,o)+y(m,c,a,o)+(function(v,E,O,U,M,z){let W;W=y(E,U,M,z).length>0?U-h(U,M):E;const ee=U,H=(function(I,T,L,B,w,N){let X;return X=y(L,B,w,N).length>0?B-h(B,w):T,I<L&&X<=B||I>=L&&X<B?"C":"D"})(v,E,O,U,M,z);return S(C(v,W,O,ee,H==="C",M).length,D(H,z))})(_,m,l,c,a,o);let b;if(m===c)return b=_>l?"D":"C",S(Math.abs(_-l),D(b,o));b=m>c?"D":"C";const A=Math.abs(m-c);return S((function(v,E){return E.cols-v})(m>c?l:_,a)+(A-1)*a.cols+1+((m>c?_:l)-1),D(b,o))}},1296:function(te,u,f){var d=this&&this.__decorate||function(M,z,W,ee){var H,I=arguments.length,T=I<3?z:ee===null?ee=Object.getOwnPropertyDescriptor(z,W):ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(M,z,W,ee);else for(var L=M.length-1;L>=0;L--)(H=M[L])&&(T=(I<3?H(T):I>3?H(z,W,T):H(z,W))||T);return I>3&&T&&Object.defineProperty(z,W,T),T},y=this&&this.__param||function(M,z){return function(W,ee){z(W,ee,M)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=f(3787),p=f(2550),C=f(2223),D=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-",A="xterm-bg-",v="xterm-focus",E="xterm-selection";let O=1,U=u.DomRenderer=class extends a.Disposable{constructor(M,z,W,ee,H,I,T,L,B,w){super(),this._element=M,this._screenElement=z,this._viewportElement=W,this._linkifier2=ee,this._charSizeService=I,this._optionsService=T,this._bufferService=L,this._coreBrowserService=B,this._themeService=w,this._terminalClass=O++,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,D.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=H.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 M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const z=`${this._terminalSelector} .${m} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=z,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(M){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let z=`${this._terminalSelector} .${m} { color: ${M.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;z+=`${this._terminalSelector} .${m} .xterm-dim { color: ${l.color.multiplyOpacity(M.foreground,.5).css};}`,z+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`,z+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",z+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,z+=`${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: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,z+=`${this._terminalSelector} .${E} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${E} div { position: absolute; background-color: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${E} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[W,ee]of M.ansi.entries())z+=`${this._terminalSelector} .${b}${W} { color: ${ee.css}; }${this._terminalSelector} .${b}${W}.xterm-dim { color: ${l.color.multiplyOpacity(ee,.5).css}; }${this._terminalSelector} .${A}${W} { background-color: ${ee.css}; }`;z+=`${this._terminalSelector} .${b}${C.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(M.background).css}; }${this._terminalSelector} .${b}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${A}${C.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=z}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,z){for(let W=this._rowElements.length;W<=z;W++){const ee=document.createElement("div");this._rowContainer.appendChild(ee),this._rowElements.push(ee)}for(;this._rowElements.length>z;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,z){this._refreshRowElements(M,z),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(M,z,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,z,W),this.renderRows(0,this._bufferService.rows-1),!M||!z)return;const ee=M[1]-this._bufferService.buffer.ydisp,H=z[1]-this._bufferService.buffer.ydisp,I=Math.max(ee,0),T=Math.min(H,this._bufferService.rows-1);if(I>=this._bufferService.rows||T<0)return;const L=document.createDocumentFragment();if(W){const B=M[0]>z[0];L.appendChild(this._createSelectionElement(I,B?z[0]:M[0],B?M[0]:z[0],T-I+1))}else{const B=ee===I?M[0]:0,w=I===H?z[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(I,B,w));const N=T-I-1;if(L.appendChild(this._createSelectionElement(I+1,0,this._bufferService.cols,N)),I!==T){const X=H===T?z[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(T,0,X))}}this._selectionContainer.appendChild(L)}_createSelectionElement(M,z,W,ee=1){const H=document.createElement("div");return H.style.height=ee*this.dimensions.css.cell.height+"px",H.style.top=M*this.dimensions.css.cell.height+"px",H.style.left=z*this.dimensions.css.cell.width+"px",H.style.width=this.dimensions.css.cell.width*(W-z)+"px",H}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const M of this._rowElements)M.replaceChildren()}renderRows(M,z){const W=this._bufferService.buffer,ee=W.ybase+W.y,H=Math.min(W.x,this._bufferService.cols-1),I=this._optionsService.rawOptions.cursorBlink,T=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=M;B<=z;B++){const w=B+W.ydisp,N=this._rowElements[B],X=W.lines.get(w);if(!N||!X)break;N.replaceChildren(...this._rowFactory.createRow(X,w,w===ee,T,L,H,I,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${_}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,z,W,ee,H,I){W<0&&(M=0),ee<0&&(z=0);const T=this._bufferService.rows-1;W=Math.max(Math.min(W,T),0),ee=Math.max(Math.min(ee,T),0),H=Math.min(H,this._bufferService.cols);const L=this._bufferService.buffer,B=L.ybase+L.y,w=Math.min(L.x,H-1),N=this._optionsService.rawOptions.cursorBlink,X=this._optionsService.rawOptions.cursorStyle,se=this._optionsService.rawOptions.cursorInactiveStyle;for(let ne=W;ne<=ee;++ne){const ue=ne+L.ydisp,x=this._rowElements[ne],K=L.lines.get(ue);if(!x||!K)break;x.replaceChildren(...this._rowFactory.createRow(K,ue,ue===B,X,se,w,N,this.dimensions.css.cell.width,this._widthCache,I?ne===W?M:0:-1,I?(ne===ee?z:H)-1:-1))}}};u.DomRenderer=U=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)],U)},3787:function(te,u,f){var d=this&&this.__decorate||function(b,A,v,E){var O,U=arguments.length,M=U<3?A:E===null?E=Object.getOwnPropertyDescriptor(A,v):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,A,v,E);else for(var z=b.length-1;z>=0;z--)(O=b[z])&&(M=(U<3?O(M):U>3?O(A,v,M):O(A,v))||M);return U>3&&M&&Object.defineProperty(A,v,M),M},y=this&&this.__param||function(b,A){return function(v,E){A(v,E,b)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=f(2223),p=f(643),C=f(511),D=f(2585),S=f(8055),l=f(4725),c=f(4269),a=f(6171),o=f(3734);let _=u.DomRendererRowFactory=class{constructor(b,A,v,E,O,U,M){this._document=b,this._characterJoinerService=A,this._optionsService=v,this._coreBrowserService=E,this._coreService=O,this._decorationService=U,this._themeService=M,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,A,v){this._selectionStart=b,this._selectionEnd=A,this._columnSelectMode=v}createRow(b,A,v,E,O,U,M,z,W,ee,H){const I=[],T=this._characterJoinerService.getJoinedCharacters(A),L=this._themeService.colors;let B,w=b.getNoBgTrimmedLength();v&&w<U+1&&(w=U+1);let N=0,X="",se=0,ne=0,ue=0,x=!1,K=0,Z=!1,$=0;const me=[],oe=ee!==-1&&H!==-1;for(let Re=0;Re<w;Re++){b.loadCell(Re,this._workCell);let Ne=this._workCell.getWidth();if(Ne===0)continue;let tt=!1,Bt=Re,Ee=this._workCell;if(T.length>0&&Re===T[0][0]){tt=!0;const Ye=T.shift();Ee=new c.JoinedCellData(this._workCell,b.translateToString(!0,Ye[0],Ye[1]),Ye[1]-Ye[0]),Bt=Ye[1]-1,Ne=Ee.getWidth()}const ii=this._isCellInSelection(Re,A),St=v&&Re===U,ut=oe&&Re>=ee&&Re<=H;let wt=!1;this._decorationService.forEachDecorationAtCell(Re,A,void 0,(Ye=>{wt=!0}));let ci=Ee.getChars()||p.WHITESPACE_CELL_CHAR;if(ci===" "&&(Ee.isUnderline()||Ee.isOverline())&&(ci=" "),$=Ne*z-W.get(ci,Ee.isBold(),Ee.isItalic()),B){if(N&&(ii&&Z||!ii&&!Z&&Ee.bg===se)&&(ii&&Z&&L.selectionForeground||Ee.fg===ne)&&Ee.extended.ext===ue&&ut===x&&$===K&&!St&&!tt&&!wt){X+=ci,N++;continue}N&&(B.textContent=X),B=this._document.createElement("span"),N=0,X=""}else B=this._document.createElement("span");if(se=Ee.bg,ne=Ee.fg,ue=Ee.extended.ext,x=ut,K=$,Z=ii,tt&&U>=Re&&U<=Bt&&(U=Re),!this._coreService.isCursorHidden&&St){if(me.push("xterm-cursor"),this._coreBrowserService.isFocused)M&&me.push("xterm-cursor-blink"),me.push(E==="bar"?"xterm-cursor-bar":E==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":me.push("xterm-cursor-outline");break;case"block":me.push("xterm-cursor-block");break;case"bar":me.push("xterm-cursor-bar");break;case"underline":me.push("xterm-cursor-underline")}}if(Ee.isBold()&&me.push("xterm-bold"),Ee.isItalic()&&me.push("xterm-italic"),Ee.isDim()&&me.push("xterm-dim"),X=Ee.isInvisible()?p.WHITESPACE_CELL_CHAR:Ee.getChars()||p.WHITESPACE_CELL_CHAR,Ee.isUnderline()&&(me.push(`xterm-underline-${Ee.extended.underlineStyle}`),X===" "&&(X=" "),!Ee.isUnderlineColorDefault()))if(Ee.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${o.AttributeData.toColorRGB(Ee.getUnderlineColor()).join(",")})`;else{let Ye=Ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ee.isBold()&&Ye<8&&(Ye+=8),B.style.textDecorationColor=L.ansi[Ye].css}Ee.isOverline()&&(me.push("xterm-overline"),X===" "&&(X=" ")),Ee.isStrikethrough()&&me.push("xterm-strikethrough"),ut&&(B.style.textDecoration="underline");let mt=Ee.getFgColor(),Qe=Ee.getFgColorMode(),Je=Ee.getBgColor(),kt=Ee.getBgColorMode();const Jt=!!Ee.isInverse();if(Jt){const Ye=mt;mt=Je,Je=Ye;const hi=Qe;Qe=kt,kt=hi}let yt,Li,Dt,ui=!1;switch(this._decorationService.forEachDecorationAtCell(Re,A,void 0,(Ye=>{Ye.options.layer!=="top"&&ui||(Ye.backgroundColorRGB&&(kt=50331648,Je=Ye.backgroundColorRGB.rgba>>8&16777215,yt=Ye.backgroundColorRGB),Ye.foregroundColorRGB&&(Qe=50331648,mt=Ye.foregroundColorRGB.rgba>>8&16777215,Li=Ye.foregroundColorRGB),ui=Ye.options.layer==="top")})),!ui&&ii&&(yt=this._coreBrowserService.isFocused?L.selectionBackgroundOpaque:L.selectionInactiveBackgroundOpaque,Je=yt.rgba>>8&16777215,kt=50331648,ui=!0,L.selectionForeground&&(Qe=50331648,mt=L.selectionForeground.rgba>>8&16777215,Li=L.selectionForeground)),ui&&me.push("xterm-decoration-top"),kt){case 16777216:case 33554432:Dt=L.ansi[Je],me.push(`xterm-bg-${Je}`);break;case 50331648:Dt=S.rgba.toColor(Je>>16,Je>>8&255,255&Je),this._addStyle(B,`background-color:#${m((Je>>>0).toString(16),"0",6)}`);break;default:Jt?(Dt=L.foreground,me.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Dt=L.background}switch(yt||Ee.isDim()&&(yt=S.color.multiplyOpacity(Dt,.5)),Qe){case 16777216:case 33554432:Ee.isBold()&&mt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(mt+=8),this._applyMinimumContrast(B,Dt,L.ansi[mt],Ee,yt,void 0)||me.push(`xterm-fg-${mt}`);break;case 50331648:const Ye=S.rgba.toColor(mt>>16&255,mt>>8&255,255&mt);this._applyMinimumContrast(B,Dt,Ye,Ee,yt,Li)||this._addStyle(B,`color:#${m(mt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Dt,L.foreground,Ee,yt,void 0)||Jt&&me.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}me.length&&(B.className=me.join(" "),me.length=0),St||tt||wt?B.textContent=X:N++,$!==this.defaultSpacing&&(B.style.letterSpacing=`${$}px`),I.push(B),Re=Bt}return B&&N&&(B.textContent=X),I}_applyMinimumContrast(b,A,v,E,O,U){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.excludeFromContrastRatioDemands)(E.getCode()))return!1;const M=this._getContrastCache(E);let z;if(O||U||(z=M.getColor(A.rgba,v.rgba)),z===void 0){const W=this._optionsService.rawOptions.minimumContrastRatio/(E.isDim()?2:1);z=S.color.ensureContrastRatio(O||A,U||v,W),M.setColor((O||A).rgba,(U||v).rgba,z??null)}return!!z&&(this._addStyle(b,`color:${z.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,A){b.setAttribute("style",`${b.getAttribute("style")||""}${A};`)}_isCellInSelection(b,A){const v=this._selectionStart,E=this._selectionEnd;return!(!v||!E)&&(this._columnSelectMode?v[0]<=E[0]?b>=v[0]&&A>=v[1]&&b<E[0]&&A<=E[1]:b<v[0]&&A>=v[1]&&b>=E[0]&&A<=E[1]:A>v[1]&&A<E[1]||v[1]===E[1]&&A===v[1]&&b>=v[0]&&b<E[0]||v[1]<E[1]&&A===E[1]&&b<E[0]||v[1]<E[1]&&A===v[1]&&b>=v[0])}};function m(b,A,v){for(;b.length<v;)b=A+b;return b}u.DomRendererRowFactory=_=d([y(1,l.ICharacterJoinerService),y(2,D.IOptionsService),y(3,l.ICoreBrowserService),y(4,D.ICoreService),y(5,D.IDecorationService),y(6,l.IThemeService)],_)},2550:(te,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 D=0;d&&(D|=1),y&&(D|=2),C=this._measure(f,D),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:(te,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:(te,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:(te,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(te,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 A=l.length-1;A>=0;A--)(_=l[A])&&(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 D=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=D=d([y(2,h.IOptionsService)],D);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(te,u,f){var d=this&&this.__decorate||function(c,a,o,_){var m,b=arguments.length,A=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(m=c[v])&&(A=(b<3?m(A):b>3?m(a,o,A):m(a,o))||A);return b>3&&A&&Object.defineProperty(a,o,A),A},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),D=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,A=0,v=0,E=o.getFg(0),O=o.getBg(0);for(let U=0;U<o.getTrimmedLength();U++)if(o.loadCell(U,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==O){if(U-b>1){const M=this._getJoinedRanges(m,v,A,o,b);for(let z=0;z<M.length;z++)_.push(M[z])}b=U,v=A,E=this._workCell.fg,O=this._workCell.bg}A+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const U=this._getJoinedRanges(m,v,A,o,b);for(let M=0;M<U.length;M++)_.push(U[M])}return _}_getJoinedRanges(a,o,_,m,b){const A=a.substring(o,_);let v=[];try{v=this._characterJoiners[0].handler(A)}catch(E){console.error(E)}for(let E=1;E<this._characterJoiners.length;E++)try{const O=this._characterJoiners[E].handler(A);for(let U=0;U<O.length;U++)Vf._mergeRanges(v,O[U])}catch(O){console.error(O)}return this._stringRangesToCellRanges(v,m,b),v}_stringRangesToCellRanges(a,o,_){let m=0,b=!1,A=0,v=a[m];if(v){for(let E=_;E<this._bufferService.cols;E++){const O=o.getWidth(E),U=o.getString(E).length||p.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!b&&v[0]<=A&&(v[0]=E,b=!0),v[1]<=A){if(v[1]=E,v=a[++m],!v)break;v[0]<=A?(v[0]=E,b=!0):b=!1}A+=U}}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,D.IBufferService)],l)},5114:(te,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(te,u,f){var d=this&&this.__decorate||function(D,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(D,S,l,c);else for(var m=D.length-1;m>=0;m--)(a=D[m])&&(_=(o<3?a(_):o>3?a(S,l,_):a(S,l))||_);return o>3&&_&&Object.defineProperty(S,l,_),_},y=this&&this.__param||function(D,S){return function(l,c){S(l,c,D)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=f(4725),p=f(9806);let C=u.MouseService=class{constructor(D,S){this._renderService=D,this._charSizeService=S}getCoords(D,S,l,c,a){return(0,p.getCoords)(window,D,S,l,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(D,S){const l=(0,p.getCoordsRelativeToElement)(window,D,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(te,u,f){var d=this&&this.__decorate||function(_,m,b,A){var v,E=arguments.length,O=E<3?m:A===null?A=Object.getOwnPropertyDescriptor(m,b):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,m,b,A);else for(var U=_.length-1;U>=0;U--)(v=_[U])&&(O=(E<3?v(O):E>3?v(m,b,O):v(m,b))||O);return E>3&&O&&Object.defineProperty(m,b,O),O},y=this&&this.__param||function(_,m){return function(b,A){m(b,A,_)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=f(3656),p=f(6193),C=f(5596),D=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,A,v,E,O,U){if(super(),this._rowCount=_,this._charSizeService=A,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(O.window,((M,z)=>this._renderRows(M,z))),this.register(this._renderDebouncer),this._screenDprMonitor=new C.ScreenDprMonitor(O.window),this._screenDprMonitor.setListener((()=>this.handleDevicePixelRatioChange())),this.register(this._screenDprMonitor),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var M;return(M=this._renderer.value)===null||M===void 0?void 0:M.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)(O.window,"resize",(()=>this.handleDevicePixelRatioChange()))),this.register(U.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in O.window){const M=new O.window.IntersectionObserver((z=>this._handleIntersectionChange(z[z.length-1])),{threshold:0});M.observe(m),this.register({dispose:()=>M.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 A;this._selectionState.start=_,this._selectionState.end=m,this._selectionState.columnSelectMode=b,(A=this._renderer.value)===null||A===void 0||A.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,D.ICharSizeService),y(4,a.IDecorationService),y(5,a.IBufferService),y(6,D.ICoreBrowserService),y(7,D.IThemeService)],o)},9312:function(te,u,f){var d=this&&this.__decorate||function(v,E,O,U){var M,z=arguments.length,W=z<3?E:U===null?U=Object.getOwnPropertyDescriptor(E,O):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(v,E,O,U);else for(var ee=v.length-1;ee>=0;ee--)(M=v[ee])&&(W=(z<3?M(W):z>3?M(E,O,W):M(E,O))||W);return z>3&&W&&Object.defineProperty(E,O,W),W},y=this&&this.__param||function(v,E){return function(O,U){E(O,U,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=f(9806),p=f(9504),C=f(456),D=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 A=u.SelectionService=class extends l.Disposable{constructor(v,E,O,U,M,z,W,ee,H){super(),this._element=v,this._screenElement=E,this._linkifier=O,this._bufferService=U,this._coreService=M,this._mouseService=z,this._optionsService=W,this._renderService=ee,this._coreBrowserService=H,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 O=this._bufferService.buffer,U=[];if(this._activeSelectionMode===3){if(v[0]===E[0])return"";const M=v[0]<E[0]?v[0]:E[0],z=v[0]<E[0]?E[0]:v[0];for(let W=v[1];W<=E[1];W++){const ee=O.translateBufferLineToString(W,!0,M,z);U.push(ee)}}else{const M=v[1]===E[1]?E[0]:void 0;U.push(O.translateBufferLineToString(v[1],!0,v[0],M));for(let z=v[1]+1;z<=E[1]-1;z++){const W=O.lines.get(z),ee=O.translateBufferLineToString(z,!0);W?.isWrapped?U[U.length-1]+=ee:U.push(ee)}if(v[1]!==E[1]){const z=O.lines.get(E[1]),W=O.translateBufferLineToString(E[1],!0,0,E[0]);z&&z.isWrapped?U[U.length-1]+=W:U.push(W)}}return U.map((M=>M.replace(b," "))).join(c.isWindows?`\r
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),O=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!!(O&&U&&E)&&this._areCoordsInSelection(E,O,U)}isCellInSelection(v,E){const O=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!(!O||!U)&&this._areCoordsInSelection([v,E],O,U)}_areCoordsInSelection(v,E,O){return v[1]>E[1]&&v[1]<O[1]||E[1]===O[1]&&v[1]===E[1]&&v[0]>=E[0]&&v[0]<O[0]||E[1]<O[1]&&v[1]===O[1]&&v[0]<O[0]||E[1]<O[1]&&v[1]===E[1]&&v[0]>=E[0]}_selectWordAtCursor(v,E){var O,U;const M=(U=(O=this._linkifier.currentLink)===null||O===void 0?void 0:O.link)===null||U===void 0?void 0:U.range;if(M)return this._model.selectionStart=[M.start.x-1,M.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(M,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const z=this._getMouseBufferCoords(v);return!!z&&(this._selectWordAt(z,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 O=this._renderService.dimensions.css.canvas.height;return E>=0&&E<=O?0:(E>O&&(E-=O),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 O=this._bufferService.buffer;if(this._model.selectionEnd[1]<O.lines.length){const U=O.lines.get(this._model.selectionEnd[1]);U&&U.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 O=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const U=(0,p.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(U,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const v=this._model.finalSelectionStart,E=this._model.finalSelectionEnd,O=!(!v||!E||v[0]===E[0]&&v[1]===E[1]);O?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,O)):this._oldHasSelection&&this._fireOnSelectionChange(v,E,O)}_fireOnSelectionChange(v,E,O){this._oldSelectionStart=v,this._oldSelectionEnd=E,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(v){this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim((E=>this._handleTrim(E)))}_convertViewportColToCharacterIndex(v,E){let O=E;for(let U=0;E>=U;U++){const M=v.loadCell(U,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:M>1&&E!==U&&(O+=M-1)}return O}setSelection(v,E,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,E],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(v){this._isClickInSelection(v)||(this._selectWordAtCursor(v,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(v,E,O=!0,U=!0){if(v[0]>=this._bufferService.cols)return;const M=this._bufferService.buffer,z=M.lines.get(v[1]);if(!z)return;const W=M.translateBufferLineToString(v[1],!1);let ee=this._convertViewportColToCharacterIndex(z,v[0]),H=ee;const I=v[0]-ee;let T=0,L=0,B=0,w=0;if(W.charAt(ee)===" "){for(;ee>0&&W.charAt(ee-1)===" ";)ee--;for(;H<W.length&&W.charAt(H+1)===" ";)H++}else{let se=v[0],ne=v[0];z.getWidth(se)===0&&(T++,se--),z.getWidth(ne)===2&&(L++,ne++);const ue=z.getString(ne).length;for(ue>1&&(w+=ue-1,H+=ue-1);se>0&&ee>0&&!this._isCharWordSeparator(z.loadCell(se-1,this._workCell));){z.loadCell(se-1,this._workCell);const x=this._workCell.getChars().length;this._workCell.getWidth()===0?(T++,se--):x>1&&(B+=x-1,ee-=x-1),ee--,se--}for(;ne<z.length&&H+1<W.length&&!this._isCharWordSeparator(z.loadCell(ne+1,this._workCell));){z.loadCell(ne+1,this._workCell);const x=this._workCell.getChars().length;this._workCell.getWidth()===2?(L++,ne++):x>1&&(w+=x-1,H+=x-1),H++,ne++}}H++;let N=ee+I-T+B,X=Math.min(this._bufferService.cols,H-ee+T+L-B-w);if(E||W.slice(ee,H).trim()!==""){if(O&&N===0&&z.getCodePoint(0)!==32){const se=M.lines.get(v[1]-1);if(se&&z.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 ue=this._bufferService.cols-ne.start;N-=ue,X+=ue}}}if(U&&N+X===this._bufferService.cols&&z.getCodePoint(this._bufferService.cols-1)!==32){const se=M.lines.get(v[1]+1);if(se?.isWrapped&&se.getCodePoint(0)!==32){const ne=this._getWordAt([0,v[1]+1],!1,!1,!0);ne&&(X+=ne.length)}}return{start:N,length:X}}}_selectWordAt(v,E){const O=this._getWordAt(v,E);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[O.start,v[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(v){const E=this._getWordAt(v,!0);if(E){let O=v[1];for(;E.start<0;)E.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,O]}}_isCharWordSeparator(v){return v.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(v.getChars())>=0}_selectLineAt(v){const E=this._bufferService.buffer.getWrappedRangeForLine(v),O={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)(O,this._bufferService.cols)}};u.SelectionService=A=d([y(3,_.IBufferService),y(4,_.ICoreService),y(5,D.IMouseService),y(6,_.IOptionsService),y(7,D.IRenderService),y(8,D.ICoreBrowserService)],A)},4725:(te,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(te,u,f){var d=this&&this.__decorate||function(A,v,E,O){var U,M=arguments.length,z=M<3?v:O===null?O=Object.getOwnPropertyDescriptor(v,E):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(A,v,E,O);else for(var W=A.length-1;W>=0;W--)(U=A[W])&&(z=(M<3?U(z):M>3?U(v,E,z):U(v,E))||z);return M>3&&z&&Object.defineProperty(v,E,z),z},y=this&&this.__param||function(A,v){return function(E,O){v(E,O,A)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=f(7239),p=f(8055),C=f(8460),D=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 A=[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 O=v[E/36%6|0],U=v[E/6%6|0],M=v[E%6];A.push({css:p.channels.toCss(O,U,M),rgba:p.channels.toRgba(O,U,M)})}for(let E=0;E<24;E++){const O=8+10*E;A.push({css:p.channels.toCss(O,O,O),rgba:p.channels.toRgba(O,O,O)})}return A})());let m=u.ThemeService=class extends D.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,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(A={}){const v=this._colors;if(v.foreground=b(A.foreground,l),v.background=b(A.background,c),v.cursor=b(A.cursor,a),v.cursorAccent=b(A.cursorAccent,o),v.selectionBackgroundTransparent=b(A.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=b(A.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=A.selectionForeground?b(A.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(A.black,u.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=b(A.red,u.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=b(A.green,u.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=b(A.yellow,u.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=b(A.blue,u.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=b(A.magenta,u.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=b(A.cyan,u.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=b(A.white,u.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=b(A.brightBlack,u.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=b(A.brightRed,u.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=b(A.brightGreen,u.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=b(A.brightYellow,u.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=b(A.brightBlue,u.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=b(A.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=b(A.brightCyan,u.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=b(A.brightWhite,u.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const E=Math.min(v.ansi.length-16,A.extendedAnsi.length);for(let O=0;O<E;O++)v.ansi[O+16]=b(A.extendedAnsi[O],u.DEFAULT_ANSI_COLORS[O+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(A){this._restoreColor(A),this._onChangeColors.fire(this.colors)}_restoreColor(A){if(A!==void 0)switch(A){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[A]=this._restoreColors.ansi[A]}else for(let v=0;v<this._restoreColors.ansi.length;++v)this._colors.ansi[v]=this._restoreColors.ansi[v]}modifyColors(A){A(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(A,v){if(A!==void 0)try{return p.css.toColor(A)}catch{}return v}u.ThemeService=m=d([y(0,S.IOptionsService)],m)},6349:(te,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 D=new Array(C);for(let S=0;S<Math.min(C,this.length);S++)D[S]=this._array[this._getCyclicIndex(S)];this._array=D,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let D=this._length;D<C;D++)this._array[D]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,D){this._array[this._getCyclicIndex(C)]=D}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,D,...S){if(D){for(let l=C;l<this._length-D;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+D)];this._length-=D,this.onDeleteEmitter.fire({index:C,amount:D})}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,D,S){if(!(D<=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=D-1;c>=0;c--)this.set(C+c+S,this.get(C+c));const l=C+D+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<D;l++)this.set(C+l+S,this.get(C+l))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}u.CircularList=h},1439:(te,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:(te,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 D,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,A,v,E){return E!==void 0?`#${o(b)}${o(A)}${o(v)}${o(E)}`:`#${o(b)}${o(A)}${o(v)}`},m.toRgba=function(b,A,v,E=255){return(b<<24|A<<16|v<<8|E)>>>0}})(D||(u.channels=D={})),(function(m){function b(A,v){return C=Math.round(255*v),[y,h,p]=a.toChannels(A.rgba),{css:D.toCss(y,h,p,C),rgba:D.toRgba(y,h,p,C)}}m.blend=function(A,v){if(C=(255&v.rgba)/255,C===1)return{css:v.css,rgba:v.rgba};const E=v.rgba>>24&255,O=v.rgba>>16&255,U=v.rgba>>8&255,M=A.rgba>>24&255,z=A.rgba>>16&255,W=A.rgba>>8&255;return y=M+Math.round((E-M)*C),h=z+Math.round((O-z)*C),p=W+Math.round((U-W)*C),{css:D.toCss(y,h,p),rgba:D.toRgba(y,h,p)}},m.isOpaque=function(A){return(255&A.rgba)==255},m.ensureContrastRatio=function(A,v,E){const O=a.ensureContrastRatio(A.rgba,v.rgba,E);if(O)return a.toColor(O>>24&255,O>>16&255,O>>8&255)},m.opaque=function(A){const v=(255|A.rgba)>>>0;return[y,h,p]=a.toChannels(v),{css:D.toCss(y,h,p),rgba:v}},m.opacity=b,m.multiplyOpacity=function(A,v){return C=255&A.rgba,b(A,C*v/255)},m.toColorRGB=function(A){return[A.rgba>>24&255,A.rgba>>16&255,A.rgba>>8&255]}})(S||(u.color=S={})),(function(m){let b,A;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",A=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||!A)throw new Error("css.toColor: Unsupported css format");if(b.fillStyle=A,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:D.toRgba(y,h,p,C),css:v}}})(l||(u.css=l={})),(function(m){function b(A,v,E){const O=A/255,U=v/255,M=E/255;return .2126*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))+.7152*(U<=.03928?U/12.92:Math.pow((U+.055)/1.055,2.4))+.0722*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))}m.relativeLuminance=function(A){return b(A>>16&255,A>>8&255,255&A)},m.relativeLuminance2=b})(c||(u.rgb=c={})),(function(m){function b(v,E,O){const U=v>>24&255,M=v>>16&255,z=v>>8&255;let W=E>>24&255,ee=E>>16&255,H=E>>8&255,I=_(c.relativeLuminance2(W,ee,H),c.relativeLuminance2(U,M,z));for(;I<O&&(W>0||ee>0||H>0);)W-=Math.max(0,Math.ceil(.1*W)),ee-=Math.max(0,Math.ceil(.1*ee)),H-=Math.max(0,Math.ceil(.1*H)),I=_(c.relativeLuminance2(W,ee,H),c.relativeLuminance2(U,M,z));return(W<<24|ee<<16|H<<8|255)>>>0}function A(v,E,O){const U=v>>24&255,M=v>>16&255,z=v>>8&255;let W=E>>24&255,ee=E>>16&255,H=E>>8&255,I=_(c.relativeLuminance2(W,ee,H),c.relativeLuminance2(U,M,z));for(;I<O&&(W<255||ee<255||H<255);)W=Math.min(255,W+Math.ceil(.1*(255-W))),ee=Math.min(255,ee+Math.ceil(.1*(255-ee))),H=Math.min(255,H+Math.ceil(.1*(255-H))),I=_(c.relativeLuminance2(W,ee,H),c.relativeLuminance2(U,M,z));return(W<<24|ee<<16|H<<8|255)>>>0}m.ensureContrastRatio=function(v,E,O){const U=c.relativeLuminance(v>>8),M=c.relativeLuminance(E>>8);if(_(U,M)<O){if(M<U){const ee=b(v,E,O),H=_(U,c.relativeLuminance(ee>>8));if(H<O){const I=A(v,E,O);return H>_(U,c.relativeLuminance(I>>8))?ee:I}return ee}const z=A(v,E,O),W=_(U,c.relativeLuminance(z>>8));if(W<O){const ee=b(v,E,O);return W>_(U,c.relativeLuminance(ee>>8))?z:ee}return z}},m.reduceLuminance=b,m.increaseLuminance=A,m.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]},m.toColor=function(v,E,O,U){return{css:D.toCss(v,E,O,U),rgba:D.toRgba(v,E,O,U)}}})(a||(u.rgba=a={})),u.toPaddedHex=o,u.contrastRatio=_},8969:(te,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),D=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),A=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((U=>{var M;(M=this._onScrollApi)===null||M===void 0||M.fire(U.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(U){for(const M in U)this.optionsService.options[M]=U[M]}constructor(U){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 D.OptionsService(U)),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(A.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((M=>{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((M=>{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(((M,z)=>this._inputHandler.parse(M,z)))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(U,M){this._writeBuffer.write(U,M)}writeSync(U,M){this._logService.logLevel<=y.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(U,M)}resize(U,M){isNaN(U)||isNaN(M)||(U=Math.max(U,C.MINIMUM_COLS),M=Math.max(M,C.MINIMUM_ROWS),this._bufferService.resize(U,M))}scroll(U,M=!1){this._bufferService.scroll(U,M)}scrollLines(U,M,z){this._bufferService.scrollLines(U,M,z)}scrollPages(U){this.scrollLines(U*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(U){const M=U-this._bufferService.buffer.ydisp;M!==0&&this.scrollLines(M)}registerEscHandler(U,M){return this._inputHandler.registerEscHandler(U,M)}registerDcsHandler(U,M){return this._inputHandler.registerDcsHandler(U,M)}registerCsiHandler(U,M){return this._inputHandler.registerCsiHandler(U,M)}registerOscHandler(U,M){return this._inputHandler.registerOscHandler(U,M)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let U=!1;const M=this.optionsService.rawOptions.windowsPty;M&&M.buildNumber!==void 0&&M.buildNumber!==void 0?U=M.backend==="conpty"&&M.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(U=!0),U?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const U=[];U.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),U.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const M of U)M.dispose()}))}}}u.CoreTerminal=E},8460:(te,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(te,u,f){var d=this&&this.__decorate||function(I,T,L,B){var w,N=arguments.length,X=N<3?T:B===null?B=Object.getOwnPropertyDescriptor(T,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")X=Reflect.decorate(I,T,L,B);else for(var se=I.length-1;se>=0;se--)(w=I[se])&&(X=(N<3?w(X):N>3?w(T,L,X):w(T,L))||X);return N>3&&X&&Object.defineProperty(T,L,X),X},y=this&&this.__param||function(I,T){return function(L,B){T(L,B,I)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=f(2584),p=f(7116),C=f(2015),D=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),A=f(6351),v=f(5941),E={"(":0,")":1,"*":2,"+":3,"-":1,".":2},O=131072;function U(I,T){if(I>24)return T.setWinLines||!1;switch(I){case 1:return!!T.restoreWin;case 2:return!!T.minimizeWin;case 3:return!!T.setWinPosition;case 4:return!!T.setWinSizePixels;case 5:return!!T.raiseWin;case 6:return!!T.lowerWin;case 7:return!!T.refreshWin;case 8:return!!T.setWinSizeChars;case 9:return!!T.maximizeWin;case 10:return!!T.fullscreenWin;case 11:return!!T.getWinState;case 13:return!!T.getWinPosition;case 14:return!!T.getWinSizePixels;case 15:return!!T.getScreenSizePixels;case 16:return!!T.getCellSizePixels;case 18:return!!T.getWinSizeChars;case 19:return!!T.getScreenSizeChars;case 20:return!!T.getIconTitle;case 21:return!!T.getWinTitle;case 22:return!!T.pushTitle;case 23:return!!T.popTitle;case 24:return!!T.setWinLines}return!1}var M;(function(I){I[I.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",I[I.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(u.WindowsOptionsReportType=M={}));let z=0;class W extends D.Disposable{getAttrData(){return this._curAttrData}constructor(T,L,B,w,N,X,se,ne,ue=new C.EscapeSequenceParser){super(),this._bufferService=T,this._charsetService=L,this._coreService=B,this._logService=w,this._optionsService=N,this._oscLinkService=X,this._coreMouseService=se,this._unicodeService=ne,this._parser=ue,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 ee(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((x=>this._activeBuffer=x.activeBuffer))),this._parser.setCsiHandlerFallback(((x,K)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(x),params:K.toArray()})})),this._parser.setEscHandlerFallback((x=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(x)})})),this._parser.setExecuteHandlerFallback((x=>{this._logService.debug("Unknown EXECUTE code: ",{code:x})})),this._parser.setOscHandlerFallback(((x,K,Z)=>{this._logService.debug("Unknown OSC code: ",{identifier:x,action:K,data:Z})})),this._parser.setDcsHandlerFallback(((x,K,Z)=>{K==="HOOK"&&(Z=Z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(x),action:K,payload:Z})})),this._parser.setPrintHandler(((x,K,Z)=>this.print(x,K,Z))),this._parser.registerCsiHandler({final:"@"},(x=>this.insertChars(x))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(x=>this.scrollLeft(x))),this._parser.registerCsiHandler({final:"A"},(x=>this.cursorUp(x))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(x=>this.scrollRight(x))),this._parser.registerCsiHandler({final:"B"},(x=>this.cursorDown(x))),this._parser.registerCsiHandler({final:"C"},(x=>this.cursorForward(x))),this._parser.registerCsiHandler({final:"D"},(x=>this.cursorBackward(x))),this._parser.registerCsiHandler({final:"E"},(x=>this.cursorNextLine(x))),this._parser.registerCsiHandler({final:"F"},(x=>this.cursorPrecedingLine(x))),this._parser.registerCsiHandler({final:"G"},(x=>this.cursorCharAbsolute(x))),this._parser.registerCsiHandler({final:"H"},(x=>this.cursorPosition(x))),this._parser.registerCsiHandler({final:"I"},(x=>this.cursorForwardTab(x))),this._parser.registerCsiHandler({final:"J"},(x=>this.eraseInDisplay(x,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(x=>this.eraseInDisplay(x,!0))),this._parser.registerCsiHandler({final:"K"},(x=>this.eraseInLine(x,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(x=>this.eraseInLine(x,!0))),this._parser.registerCsiHandler({final:"L"},(x=>this.insertLines(x))),this._parser.registerCsiHandler({final:"M"},(x=>this.deleteLines(x))),this._parser.registerCsiHandler({final:"P"},(x=>this.deleteChars(x))),this._parser.registerCsiHandler({final:"S"},(x=>this.scrollUp(x))),this._parser.registerCsiHandler({final:"T"},(x=>this.scrollDown(x))),this._parser.registerCsiHandler({final:"X"},(x=>this.eraseChars(x))),this._parser.registerCsiHandler({final:"Z"},(x=>this.cursorBackwardTab(x))),this._parser.registerCsiHandler({final:"`"},(x=>this.charPosAbsolute(x))),this._parser.registerCsiHandler({final:"a"},(x=>this.hPositionRelative(x))),this._parser.registerCsiHandler({final:"b"},(x=>this.repeatPrecedingCharacter(x))),this._parser.registerCsiHandler({final:"c"},(x=>this.sendDeviceAttributesPrimary(x))),this._parser.registerCsiHandler({prefix:">",final:"c"},(x=>this.sendDeviceAttributesSecondary(x))),this._parser.registerCsiHandler({final:"d"},(x=>this.linePosAbsolute(x))),this._parser.registerCsiHandler({final:"e"},(x=>this.vPositionRelative(x))),this._parser.registerCsiHandler({final:"f"},(x=>this.hVPosition(x))),this._parser.registerCsiHandler({final:"g"},(x=>this.tabClear(x))),this._parser.registerCsiHandler({final:"h"},(x=>this.setMode(x))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(x=>this.setModePrivate(x))),this._parser.registerCsiHandler({final:"l"},(x=>this.resetMode(x))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(x=>this.resetModePrivate(x))),this._parser.registerCsiHandler({final:"m"},(x=>this.charAttributes(x))),this._parser.registerCsiHandler({final:"n"},(x=>this.deviceStatus(x))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(x=>this.deviceStatusPrivate(x))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(x=>this.softReset(x))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(x=>this.setCursorStyle(x))),this._parser.registerCsiHandler({final:"r"},(x=>this.setScrollRegion(x))),this._parser.registerCsiHandler({final:"s"},(x=>this.saveCursor(x))),this._parser.registerCsiHandler({final:"t"},(x=>this.windowOptions(x))),this._parser.registerCsiHandler({final:"u"},(x=>this.restoreCursor(x))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(x=>this.insertColumns(x))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(x=>this.deleteColumns(x))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(x=>this.selectProtected(x))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(x=>this.requestMode(x,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(x=>this.requestMode(x,!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((x=>(this.setTitle(x),this.setIconName(x),!0)))),this._parser.registerOscHandler(1,new b.OscHandler((x=>this.setIconName(x)))),this._parser.registerOscHandler(2,new b.OscHandler((x=>this.setTitle(x)))),this._parser.registerOscHandler(4,new b.OscHandler((x=>this.setOrReportIndexedColor(x)))),this._parser.registerOscHandler(8,new b.OscHandler((x=>this.setHyperlink(x)))),this._parser.registerOscHandler(10,new b.OscHandler((x=>this.setOrReportFgColor(x)))),this._parser.registerOscHandler(11,new b.OscHandler((x=>this.setOrReportBgColor(x)))),this._parser.registerOscHandler(12,new b.OscHandler((x=>this.setOrReportCursorColor(x)))),this._parser.registerOscHandler(104,new b.OscHandler((x=>this.restoreIndexedColor(x)))),this._parser.registerOscHandler(110,new b.OscHandler((x=>this.restoreFgColor(x)))),this._parser.registerOscHandler(111,new b.OscHandler((x=>this.restoreBgColor(x)))),this._parser.registerOscHandler(112,new b.OscHandler((x=>this.restoreCursorColor(x)))),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 x in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:x},(()=>this.selectCharset("("+x))),this._parser.registerEscHandler({intermediates:")",final:x},(()=>this.selectCharset(")"+x))),this._parser.registerEscHandler({intermediates:"*",final:x},(()=>this.selectCharset("*"+x))),this._parser.registerEscHandler({intermediates:"+",final:x},(()=>this.selectCharset("+"+x))),this._parser.registerEscHandler({intermediates:"-",final:x},(()=>this.selectCharset("-"+x))),this._parser.registerEscHandler({intermediates:".",final:x},(()=>this.selectCharset("."+x))),this._parser.registerEscHandler({intermediates:"/",final:x},(()=>this.selectCharset("/"+x)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((x=>(this._logService.error("Parsing error: ",x),x))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new A.DcsHandler(((x,K)=>this.requestStatusString(x,K))))}_preserveStack(T,L,B,w){this._parseStack.paused=!0,this._parseStack.cursorStartX=T,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=B,this._parseStack.position=w}_logSlowResolvingAsync(T){this._logService.logLevel<=m.LogLevelEnum.WARN&&Promise.race([T,new Promise(((L,B)=>setTimeout((()=>B("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(T,L){let B,w=this._activeBuffer.x,N=this._activeBuffer.y,X=0;const se=this._parseStack.paused;if(se){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(B),B;w=this._parseStack.cursorStartX,N=this._parseStack.cursorStartY,this._parseStack.paused=!1,T.length>O&&(X=this._parseStack.position+O)}if(this._logService.logLevel<=m.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof T=="string"?` "${T}"`:` "${Array.prototype.map.call(T,(ne=>String.fromCharCode(ne))).join("")}"`),typeof T=="string"?T.split("").map((ne=>ne.charCodeAt(0))):T),this._parseBuffer.length<T.length&&this._parseBuffer.length<O&&(this._parseBuffer=new Uint32Array(Math.min(T.length,O))),se||this._dirtyRowTracker.clearRange(),T.length>O)for(let ne=X;ne<T.length;ne+=O){const ue=ne+O<T.length?ne+O:T.length,x=typeof T=="string"?this._stringDecoder.decode(T.substring(ne,ue),this._parseBuffer):this._utf8Decoder.decode(T.subarray(ne,ue),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,x))return this._preserveStack(w,N,x,ne),this._logSlowResolvingAsync(B),B}else if(!se){const ne=typeof T=="string"?this._stringDecoder.decode(T,this._parseBuffer):this._utf8Decoder.decode(T,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(T,L,B){let w,N;const X=this._charsetService.charset,se=this._optionsService.rawOptions.screenReaderMode,ne=this._bufferService.cols,ue=this._coreService.decPrivateModes.wraparound,x=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-L>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodePoint(this._activeBuffer.x-1,0,1,K.fg,K.bg,K.extended);for(let $=L;$<B;++$){if(w=T[$],N=this._unicodeService.wcwidth(w),w<127&&X){const me=X[String.fromCharCode(w)];me&&(w=me.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(ue){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(x&&(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-L>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-L>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(T,L){return T.final!=="t"||T.prefix||T.intermediates?this._parser.registerCsiHandler(T,L):this._parser.registerCsiHandler(T,(B=>!U(B.params[0],this._optionsService.rawOptions.windowOptions)||L(B)))}registerDcsHandler(T,L){return this._parser.registerDcsHandler(T,new A.DcsHandler(L))}registerEscHandler(T,L){return this._parser.registerEscHandler(T,L)}registerOscHandler(T,L){return this._parser.registerOscHandler(T,new b.OscHandler(L))}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 T;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&&(!((T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||T===void 0)&&T.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const T=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-T),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(T=this._bufferService.cols-1){this._activeBuffer.x=Math.min(T,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(T,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=T,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=T,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(T,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+T,this._activeBuffer.y+L)}cursorUp(T){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,T.params[0]||1)):this._moveCursor(0,-(T.params[0]||1)),!0}cursorDown(T){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,T.params[0]||1)):this._moveCursor(0,T.params[0]||1),!0}cursorForward(T){return this._moveCursor(T.params[0]||1,0),!0}cursorBackward(T){return this._moveCursor(-(T.params[0]||1),0),!0}cursorNextLine(T){return this.cursorDown(T),this._activeBuffer.x=0,!0}cursorPrecedingLine(T){return this.cursorUp(T),this._activeBuffer.x=0,!0}cursorCharAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(T){return this._setCursor(T.length>=2?(T.params[1]||1)-1:0,(T.params[0]||1)-1),!0}charPosAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(T){return this._moveCursor(T.params[0]||1,0),!0}linePosAbsolute(T){return this._setCursor(this._activeBuffer.x,(T.params[0]||1)-1),!0}vPositionRelative(T){return this._moveCursor(0,T.params[0]||1),!0}hVPosition(T){return this.cursorPosition(T),!0}tabClear(T){const L=T.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=T.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=T.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(T){const L=T.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(T,L,B,w=!1,N=!1){const X=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);X.replaceCells(L,B,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),N),w&&(X.isWrapped=!1)}_resetBufferLine(T,L=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+T),B.isWrapped=!1)}eraseInDisplay(T,L=!1){let B;switch(this._restrictCursor(this._bufferService.cols),T.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,L);B<this._bufferService.rows;B++)this._resetBufferLine(B,L);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,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,L);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(T,L=!1){switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(T){this._restrictCursor();let L=T.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(;L--;)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(T){this._restrictCursor();let L=T.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;L--;)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(T){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(T){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(T){let L=T.params[0]||1;for(;L--;)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(T){let L=T.params[0]||1;for(;L--;)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(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=T.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,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=T.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,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=T.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,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=T.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,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(T){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(T.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(T){if(!this._parser.precedingCodepoint)return!0;const L=T.params[0]||1,B=new Uint32Array(L);for(let w=0;w<L;++w)B[w]=this._parser.precedingCodepoint;return this.print(B,0,B.length),!0}sendDeviceAttributesPrimary(T){return T.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(T){return T.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(T.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(T){return(this._optionsService.rawOptions.termName+"").indexOf(T)===0}setMode(T){for(let L=0;L<T.length;L++)switch(T.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(T){for(let L=0;L<T.length;L++)switch(T.params[L]){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(T){for(let L=0;L<T.length;L++)switch(T.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(T){for(let L=0;L<T.length;L++)switch(T.params[L]){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(),T.params[L]===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(T,L){const B=this._coreService.decPrivateModes,{activeProtocol:w,activeEncoding:N}=this._coreMouseService,X=this._coreService,{buffers:se,cols:ne}=this._bufferService,{active:ue,alt:x}=se,K=this._optionsService.rawOptions,Z=Re=>Re?1:2,$=T.params[0];return me=$,oe=L?$===2?4:$===4?Z(X.modes.insertMode):$===12?3:$===20?Z(K.convertEol):0:$===1?Z(B.applicationCursorKeys):$===3?K.windowOptions.setWinLines?ne===80?2:ne===132?1:0:0:$===6?Z(B.origin):$===7?Z(B.wraparound):$===8?3:$===9?Z(w==="X10"):$===12?Z(K.cursorBlink):$===25?Z(!X.isCursorHidden):$===45?Z(B.reverseWraparound):$===66?Z(B.applicationKeypad):$===67?4:$===1e3?Z(w==="VT200"):$===1002?Z(w==="DRAG"):$===1003?Z(w==="ANY"):$===1004?Z(B.sendFocus):$===1005?4:$===1006?Z(N==="SGR"):$===1015?4:$===1016?Z(N==="SGR_PIXELS"):$===1048?1:$===47||$===1047||$===1049?Z(ue===x):$===2004?Z(B.bracketedPasteMode):0,X.triggerDataEvent(`${h.C0.ESC}[${L?"":"?"}${me};${oe}$y`),!0;var me,oe}_updateAttrColor(T,L,B,w,N){return L===2?(T|=50331648,T&=-16777216,T|=_.AttributeData.fromColorRGB([B,w,N])):L===5&&(T&=-50331904,T|=33554432|255&B),T}_extractColor(T,L,B){const w=[0,0,-1,0,0,0];let N=0,X=0;do{if(w[X+N]=T.params[L+X],T.hasSubParams(L+X)){const se=T.getSubParams(L+X);let ne=0;do w[1]===5&&(N=1),w[X+ne+1+N]=se[ne];while(++ne<se.length&&ne+X+1+N<w.length);break}if(w[1]===5&&X+N>=2||w[1]===2&&X+N>=5)break;w[1]&&(N=1)}while(++X+L<T.length&&X+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 X}_processUnderline(T,L){L.extended=L.extended.clone(),(!~T||T>5)&&(T=1),L.extended.underlineStyle=T,L.fg|=268435456,T===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(T){T.fg=l.DEFAULT_ATTR_DATA.fg,T.bg=l.DEFAULT_ATTR_DATA.bg,T.extended=T.extended.clone(),T.extended.underlineStyle=0,T.extended.underlineColor&=-67108864,T.updateExtended()}charAttributes(T){if(T.length===1&&T.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=T.length;let B;const w=this._curAttrData;for(let N=0;N<L;N++)B=T.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(T.hasSubParams(N)?T.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(T,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(T){switch(T.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${L};${B}R`)}return!0}deviceStatusPrivate(T){if(T.params[0]===6){const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${L};${B}R`)}return!0}softReset(T){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(T){const L=T.params[0]||1;switch(L){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=L%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(T){const L=T.params[0]||1;let B;return(T.length<2||(B=T.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(T){if(!U(T.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=T.length>1?T.params[1]:0;switch(T.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(T){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(T){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(T){return this._windowTitle=T,this._onTitleChange.fire(T),!0}setIconName(T){return this._iconName=T,!0}setOrReportIndexedColor(T){const L=[],B=T.split(";");for(;B.length>1;){const w=B.shift(),N=B.shift();if(/^\d+$/.exec(w)){const X=parseInt(w);if(H(X))if(N==="?")L.push({type:0,index:X});else{const se=(0,v.parseColor)(N);se&&L.push({type:1,index:X,color:se})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(T){const L=T.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(T,L){this._getCurrentLinkId()&&this._finishHyperlink();const B=T.split(":");let w;const N=B.findIndex((X=>X.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:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(T,L){const B=T.split(";");for(let w=0;w<B.length&&!(L>=this._specialColors.length);++w,++L)if(B[w]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const N=(0,v.parseColor)(B[w]);N&&this._onColor.fire([{type:1,index:this._specialColors[L],color:N}])}return!0}setOrReportFgColor(T){return this._setOrReportSpecialColor(T,0)}setOrReportBgColor(T){return this._setOrReportSpecialColor(T,1)}setOrReportCursorColor(T){return this._setOrReportSpecialColor(T,2)}restoreIndexedColor(T){if(!T)return this._onColor.fire([{type:2}]),!0;const L=[],B=T.split(";");for(let w=0;w<B.length;++w)if(/^\d+$/.exec(B[w])){const N=parseInt(B[w]);H(N)&&L.push({type:2,index:N})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(T){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(T){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(T){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(T){return T.length!==2?(this.selectDefaultCharset(),!0):(T[0]==="/"||this._charsetService.setgCharset(E[T[0]],p.CHARSETS[T[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 T=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,T,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(T){return this._charsetService.setgLevel(T),!0}screenAlignmentPattern(){const T=new o.CellData;T.content=4194373,T.fg=this._curAttrData.fg,T.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const B=this._activeBuffer.ybase+this._activeBuffer.y+L,w=this._activeBuffer.lines.get(B);w&&(w.fill(T),w.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(T,L){const B=this._bufferService.buffer,w=this._optionsService.rawOptions;return(N=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${N}${h.C0.ESC}\\`),!0))(T==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:T==='"p'?'P1$r61;1"p':T==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:T==="m"?"P1$r0m":T===" q"?`P1$r${{block:2,underline:4,bar:6}[w.cursorStyle]-(w.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(T,L){this._dirtyRowTracker.markRangeDirty(T,L)}}u.InputHandler=W;let ee=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,T){I>T&&(z=I,I=T,T=z),I<this.start&&(this.start=I),T>this.end&&(this.end=T)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function H(I){return 0<=I&&I<256}ee=d([y(0,m.IBufferService)],ee)},844:(te,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:(te,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:(te,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:(te,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:(te,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 D=0,S=0,l=C.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(D=Date.now(),this._tasks[this._i]()||this._i++,D=Math.max(1,Date.now()-D),S=Math.max(D,S),c=C.timeRemaining(),1.5*S>c)return l-D<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-D))}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 D=Date.now()+C;return{timeRemaining:()=>Math.max(0,D-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:(te,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:(te,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:(te,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),D=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=D.CellData.fromCharData([0,S.NULL_CELL_CHAR,S.NULL_CELL_WIDTH,S.NULL_CELL_CODE]),this._whitespaceCell=D.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 A=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+A+1?(this.ybase--,A++,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),A&&(this.y+=A),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 A=0;A<this.lines.length;A++)m+=+this.lines.get(A).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 A=this.lines.length-1;A>=0;A--){let v=this.lines.get(A);if(!v||!v.isWrapped&&v.getTrimmedLength()<=a)continue;const E=[v];for(;v.isWrapped&&A>0;)v=this.lines.get(--A),E.unshift(v);const O=this.ybase+this.y;if(O>=A&&O<A+E.length)continue;const U=E[E.length-1].getTrimmedLength(),M=(0,C.reflowSmallerGetNewLineLengths)(E,this._cols,a),z=M.length-E.length;let W;W=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+z):Math.max(0,this.lines.length-this.lines.maxLength+z);const ee=[];for(let w=0;w<z;w++){const N=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);ee.push(N)}ee.length>0&&(m.push({start:A+E.length+b,newLines:ee}),b+=ee.length),E.push(...ee);let H=M.length-1,I=M[H];I===0&&(H--,I=M[H]);let T=E.length-z-1,L=U;for(;T>=0;){const w=Math.min(L,I);if(E[H]===void 0)break;if(E[H].copyCellsFrom(E[T],L-w,I-w,w,!0),I-=w,I===0&&(H--,I=M[H]),L-=w,L===0){T--;const N=Math.max(T,0);L=(0,C.getWrappedLineTrimmedLength)(E,N,this._cols)}}for(let w=0;w<E.length;w++)M[w]<a&&E[w].setCell(M[w],_);let B=z-W;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+z,this.ybase+o-1)}if(m.length>0){const A=[],v=[];for(let H=0;H<this.lines.length;H++)v.push(this.lines.get(H));const E=this.lines.length;let O=E-1,U=0,M=m[U];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let z=0;for(let H=Math.min(this.lines.maxLength-1,E+b-1);H>=0;H--)if(M&&M.start>O+z){for(let I=M.newLines.length-1;I>=0;I--)this.lines.set(H--,M.newLines[I]);H++,A.push({index:O+1,amount:M.newLines.length}),z+=M.newLines.length,M=m[++U]}else this.lines.set(H,v[O--]);let W=0;for(let H=A.length-1;H>=0;H--)A[H].index+=W,this.lines.onInsertEmitter.fire(A[H]),W+=A[H].amount;const ee=Math.max(0,E+b-this.lines.maxLength);ee>0&&this.lines.onTrimEmitter.fire(ee)}}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:(te,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 D{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 D(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 A=o-1;A>=0;A--){for(let v=0;v<3;v++)this._data[3*(a+A)+v]=m[3*(c+A)+v];268435456&m[3*(c+A)+2]&&(this._extendedAttrs[a+A]=l._extendedAttrs[c+A])}else for(let A=0;A<o;A++){for(let v=0;v<3;v++)this._data[3*(a+A)+v]=m[3*(c+A)+v];268435456&m[3*(c+A)+2]&&(this._extendedAttrs[a+A]=l._extendedAttrs[c+A])}const b=Object.keys(l._combined);for(let A=0;A<b.length;A++){const v=parseInt(b[A],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=D},4841:(te,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:(te,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 D=[];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,O=h-_,U=Math.min(E,O);a[o].copyCellsFrom(a[m],b,_,U,!1),_+=U,_===h&&(o++,_=0),b+=U,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 A=0;for(let v=a.length-1;v>0&&(v>o||a[v].getTrimmedLength()===0);v--)A++;A>0&&(D.push(S+a.length-A),D.push(A)),S+=a.length-1}return D},u.reflowLargerCreateNewLayout=function(d,y){const h=[];let p=0,C=y[p],D=0;for(let S=0;S<d.length;S++)if(C===S){const l=y[++p];d.onDeleteEmitter.fire({index:S-D,amount:l}),S+=l-1,D+=l,C=y[++p]}else h.push(S);return{layout:h,countRemoved:D}},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 D=0,S=0,l=0;for(;l<C;){if(C-l<h){p.push(C-l);break}D+=h;const c=f(d,S,y);D>c&&(D-=c,S++);const a=d[S].getWidth(D-1)===2;a&&D--;const o=a?h-1:h;p.push(o),l+=o}return p},u.getWrappedLineTrimmedLength=f},5295:(te,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(D,S){super(),this._optionsService=D,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(D){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(D),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(D,S){this._normal.resize(D,S),this._alt.resize(D,S),this.setupTabStops(D)}setupTabStops(D){this._normal.setupTabStops(D),this._alt.setupTabStops(D)}}u.BufferSet=p},511:(te,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(D){const S=new p;return S.setFromCharData(D),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(D){this.fg=D[y.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(D[y.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(D[y.CHAR_DATA_CHAR_INDEX].length===2){const l=D[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const c=D[y.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(l-55296)+c-56320+65536|D[y.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=D[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|D[y.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=D[y.CHAR_DATA_CHAR_INDEX],this.content=2097152|D[y.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=p},643:(te,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:(te,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:(te,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:(te,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:(te,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,D){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&&!D||!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:(te,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 D=f.charCodeAt(C);if(55296<=D&&D<=56319){if(++C>=y)return this._interim=D,h;const S=f.charCodeAt(C);56320<=S&&S<=57343?d[h++]=1024*(D-55296)+S-56320+65536:(d[h++]=D,d[h++]=S)}else D!==65279&&(d[h++]=D)}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,D,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,A=0;for(;(b=63&this.interim[++A])&&A<4;)m<<=6,m|=b;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=v-A;for(;c<E;){if(c>=y)return 0;if(b=f[c++],(192&b)!=128){c--,_=!0;break}this.interim[A++]=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&(D=f[o+3]));)d[S++]=h,d[S++]=p,d[S++]=C,d[S++]=D,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(D=f[o++],(192&D)!=128){o--;continue}if(l=(7&h)<<18|(63&p)<<12|(63&C)<<6|63&D,l<65536||l>1114111)continue;d[S++]=l}}return S}}},225:(te,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 D,S=0,l=C.length-1;if(p<C[0][0]||p>C[l][1])return!1;for(;l>=S;)if(D=S+l>>1,p>C[D][1])S=D+1;else{if(!(p<C[D][0]))return!0;l=D-1}return!1})(h,d)?0:h>=131072&&h<=196605||h>=196608&&h<=262141?2:1}}},5981:(te,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,D){if(D!==void 0&&this._syncCalls>D)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,D){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(D),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(D)}_innerWrite(C=0,D=!0){const S=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],c=this._action(l,D);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:(te,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),D=C.length<2?"0"+C:C;switch(p){case 4:return C[0];case 8:return D;case 12:return(D+D).slice(0,3);default:return D+D}}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 D=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/D*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/D*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/D*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,D=[0,0,0];for(let S=0;S<3;++S){const l=parseInt(p.slice(C*S,C*S+C),16);D[S]=C===1?l<<4:C===2?l:C===3?l>>4:l>>8}return D}},u.toRgbString=function(h,p=16){const[C,D,S]=h;return`rgb:${y(C,p)}/${y(D,p)}/${y(S,p)}`}},5770:(te,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(te,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(D,S){this._handlers[D]===void 0&&(this._handlers[D]=[]);const l=this._handlers[D];return l.push(S),{dispose:()=>{const c=l.indexOf(S);c!==-1&&l.splice(c,1)}}}clearHandler(D){this._handlers[D]&&delete this._handlers[D]}setHandlerFallback(D){this._handlerFb=D}reset(){if(this._active.length)for(let D=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;D>=0;--D)this._active[D].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(D,S){if(this.reset(),this._ident=D,this._active=this._handlers[D]||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(D,S,l){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(D,S,l);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(D,S,l))}unhook(D,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(D),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",D);this._active=p,this._ident=0}};const C=new y.Params;C.addParam(0),u.DcsHandler=class{constructor(D){this._handler=D,this._data="",this._params=C,this._hitLimit=!1}hook(D){this._params=D.length>1||D.params[0]?D.clone():C,this._data="",this._hitLimit=!1}put(D,S,l){this._hitLimit||(this._data+=(0,d.utf32ToString)(D,S,l),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(D){let S=!1;if(this._hitLimit)S=!1;else if(D&&(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:(te,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 D=160;u.VT500_TRANSITION_TABLE=(function(){const l=new C(4095),c=Array.apply(null,Array(256)).map(((A,v)=>v)),a=(A,v)=>c.slice(A,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(D,0,2,0),l.add(D,8,5,8),l.add(D,6,0,6),l.add(D,11,0,11),l.add(D,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,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=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,A=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let v=A;v<a;++v){switch(m=c[v],b=this._transitions.table[this.currentState<<8|(m<160?m:D)],b>>4){case 2:for(let z=v+1;;++z){if(z>=a||(m=c[z])<32||m>126&&m<D){this._printHandler(c,v,z),v=z-1;break}if(++z>=a||(m=c[z])<32||m>126&&m<D){this._printHandler(c,v,z),v=z-1;break}if(++z>=a||(m=c[z])<32||m>126&&m<D){this._printHandler(c,v,z),v=z-1;break}if(++z>=a||(m=c[z])<32||m>126&&m<D){this._printHandler(c,v,z),v=z-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 O=E?E.length-1:-1;for(;O>=0&&(_=E[O](this._params),_!==!0);O--)if(_ instanceof Promise)return this._preserveStack(3,E,O,b,v),_;O<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 U=this._escHandlers[this._collect<<8|m];let M=U?U.length-1:-1;for(;M>=0&&(_=U[M](),_!==!0);M--)if(_ instanceof Promise)return this._preserveStack(4,U,M,b,v),_;M<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 z=v+1;;++z)if(z>=a||(m=c[z])===24||m===26||m===27||m>127&&m<D){this._dcsParser.put(c,v,z),v=z-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 z=v+1;;z++)if(z>=a||(m=c[z])<32||m>127&&m<D){this._oscParser.put(c,v,z),v=z-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:(te,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 D=this._handlers[p];return D.push(C),{dispose:()=>{const S=D.indexOf(C);S!==-1&&D.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,D){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(p,C,D);else this._handlerFb(this._id,"PUT",(0,y.utf32ToString)(p,C,D))}start(){this.reset(),this._state=1}put(p,C,D){if(this._state!==3){if(this._state===1)for(;C<D;){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&&D-C>0&&this._put(p,C,D)}}end(p,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let D=!1,S=this._active.length-1,l=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,D=C,l=this._stack.fallThrough,this._stack.paused=!1),!l&&D===!1){for(;S>=0&&(D=this._active[S].end(p),D!==!0);S--)if(D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,D;S--}for(;S>=0;S--)if(D=this._active[S].end(!1),D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,D}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,D){this._hitLimit||(this._data+=(0,y.utf32ToString)(p,C,D),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((D=>(this._data="",this._hitLimit=!1,D)));return this._data="",this._hitLimit=!1,C}}},8742:(te,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 D=h[C];if(Array.isArray(D))for(let S=0;S<D.length;++S)p.addSubParam(D[S]);else p.addParam(D)}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,D=255&this._subParamsIdx[p];D-C>0&&h.push(Array.prototype.slice.call(this._subParams,C,D))}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,D=255&this._subParamsIdx[p];D-C>0&&(h[p]=this._subParams.slice(C,D))}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,D=C[p-1];C[p-1]=~D?Math.min(10*D+h,f):h}}u.Params=d},5741:(te,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:(te,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:(te,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:(te,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(D){super(),this._core=D,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:(te,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:(te,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(te,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 A=l.length-1;A>=0;A--)(_=l[A])&&(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),D=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,D.IOptionsService)],S)},7994:(te,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(te,u,f){var d=this&&this.__decorate||function(o,_,m,b){var A,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 O=o.length-1;O>=0;O--)(A=o[O])&&(E=(v<3?A(E):v>3?A(_,m,E):A(_,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),D={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(D))this.addProtocol(m,D[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(te,u,f){var d=this&&this.__decorate||function(a,o,_,m){var b,A=arguments.length,v=A<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=(A<3?b(v):A>3?b(o,_,v):b(o,_))||v);return A>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),D=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,D.IBufferService),y(1,D.ILogService),y(2,D.IOptionsService)],c)},9074:(te,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,D=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,A;let v=0,E=0;for(const O of this._decorations.getKeyIterator(o))v=(m=O.options.x)!==null&&m!==void 0?m:0,E=v+((b=O.options.width)!==null&&b!==void 0?b:1),a>=v&&a<E&&(!_||((A=O.options.layer)!==null&&A!==void 0?A:"bottom")===_)&&(yield O)}forEachDecorationAtCell(a,o,_,m){this._decorations.forEachByKey(o,(b=>{var A,v,E;C=(A=b.options.x)!==null&&A!==void 0?A:0,D=C+((v=b.options.width)!==null&&v!==void 0?v:1),a>=C&&a<D&&(!_||((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:(te,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[D,S]of C)this.set(D,S)}set(C,D){const S=this._entries.get(C);return this._entries.set(C,D),S}forEach(C){for(const[D,S]of this._entries.entries())C(D,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 D=(0,y.getServiceDependencies)(p).sort(((c,a)=>c.index-a.index)),S=[];for(const c of D){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=D.length>0?D[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(te,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 A=l.length-1;A>=0;A--)(_=l[A])&&(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 D,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()))),D=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){D=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(D.logLevel!==p.LogLevelEnum.TRACE)return o.apply(this,_);D.trace(`GlyphRenderer#${o.name}(${_.map((b=>JSON.stringify(b))).join(", ")})`);const m=o.apply(this,_);return D.trace(`GlyphRenderer#${o.name} return`,m),m}}},7302:(te,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(te,u,f){var d=this&&this.__decorate||function(C,D,S,l){var c,a=arguments.length,o=a<3?D:l===null?l=Object.getOwnPropertyDescriptor(D,S):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(C,D,S,l);else for(var _=C.length-1;_>=0;_--)(c=C[_])&&(o=(a<3?c(o):a>3?c(D,S,o):c(D,S))||o);return a>3&&o&&Object.defineProperty(D,S,o),o},y=this&&this.__param||function(C,D){return function(S,l){D(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 D=this._bufferService.buffer;if(C.id===void 0){const _=D.addMarker(D.ybase+D.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,D.ybase+D.y),c.id;const a=D.addMarker(D.ybase+D.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,D){const S=this._dataByLinkId.get(C);if(S&&S.lines.every((l=>l.line!==D))){const l=this._bufferService.buffer.addMarker(D);S.lines.push(l),l.onDispose((()=>this._removeMarkerFromLink(S,l)))}}getLinkData(C){var D;return(D=this._dataByLinkId.get(C))===null||D===void 0?void 0:D.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,D){const S=C.lines.indexOf(D);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:(te,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,D){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,D)};return h.toString=()=>y,u.serviceRegistry.set(y,h),h}},2585:(te,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:(te,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 D=0;D<C;++D){let S=h.charCodeAt(D);if(55296<=S&&S<=56319){if(++D>=C)return p+this.wcwidth(S);const l=h.charCodeAt(D);56320<=l&&l<=57343?S=1024*(S-55296)+l-56320+65536:p+=this.wcwidth(l)}p+=this.wcwidth(S)}return p}}}},G={};function ce(te){var u=G[te];if(u!==void 0)return u.exports;var f=G[te]={exports:{}};return ye[te].call(f.exports,f,f.exports,ce),f.exports}var Se={};return(()=>{var te=Se;Object.defineProperty(te,"__esModule",{value:!0}),te.Terminal=void 0;const u=ce(9042),f=ce(3236),d=ce(844),y=ce(5741),h=ce(8285),p=ce(7975),C=ce(7090),D=["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(D.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")}}te.Terminal=S})(),Se})()))})(ko)),ko.exports}var yv=Sv();function is(q="req"){return`${q}_${Math.random().toString(36).slice(2,10)}`}function ul(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 nr(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:ae=>q.onChange(ae.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 ae=q.connectionPhase==="connected";return le.jsx(ul,{title:"连接",children:le.jsxs("div",{className:"space-y-3",children:[le.jsx(nr,{label:"WebSocket 地址",value:q.wsUrl,onChange:q.onWsUrlChange}),le.jsx(nr,{label:"访问令牌",value:q.clientToken,onChange:q.onClientTokenChange}),le.jsx(nr,{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:ye=>q.onPairingCodeChange(ye.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:"flex gap-3",children:[le.jsx("button",{className:"flex-1 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:ae?"重新连接":q.connectionPhase==="connecting"?"连接中":"连接"}),le.jsx("button",{className:"rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200 disabled:opacity-40",disabled:!ae,onClick:q.onRefresh,children:"刷新"}),le.jsx("button",{className:"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 Cv(q){return le.jsx(ul,{title:"创建会话",children:le.jsxs("form",{className:"space-y-3",onSubmit:q.onSubmit,children:[le.jsx(nr,{label:"名称",value:q.createName,onChange:q.onCreateNameChange,placeholder:"claude-main",disabled:!q.canControl}),le.jsx(nr,{label:"工作目录",value:q.createCwd,onChange:q.onCreateCwdChange,placeholder:"/Users/...",disabled:!q.canControl}),le.jsx(nr,{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 Ev=[{value:"all",label:"全部"},{value:"running",label:"运行中"},{value:"exited",label:"已退出"}];function wv(q){return le.jsx(ul,{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:ae=>q.onSessionQueryChange(ae.target.value),placeholder:"搜索会话名称或目录"}),le.jsx("div",{className:"flex flex-wrap gap-2",children:Ev.map(ae=>le.jsx("button",{className:`min-h-11 rounded-full px-3 py-2 text-sm ${q.statusFilter===ae.value?"bg-sky-500 text-slate-950":"border border-slate-700 text-slate-200"}`,type:"button",onClick:()=>q.onStatusFilterChange(ae.value),children:ae.label},ae.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(ae=>le.jsxs("div",{"data-session-name":ae.name,className:`w-full rounded-2xl border px-4 py-3 text-left transition ${ae.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:ae.name}),le.jsx("p",{className:"mt-1 text-xs text-slate-400",children:ae.cwd})]}),le.jsx("span",{className:`rounded-full px-2.5 py-1 text-[11px] ${ae.status==="running"?"bg-emerald-500/15 text-emerald-300":"bg-slate-700 text-slate-300"}`,children:ae.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(ae.sid)?"border-amber-400/50 text-amber-200":"border-slate-700 text-slate-200"}`,type:"button",onClick:()=>q.onTogglePinnedSession(ae.sid),children:q.pinnedSids.includes(ae.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(ae.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:ae.status!=="running"||!q.canControl,onClick:()=>q.onKillSession(ae.sid),children:"关闭"})]})]},ae.sid))]})})}function Dv(q){return le.jsx(ul,{title:q.activeSession?`${q.activeSession.name} · ${q.activeSession.status==="running"?"运行中":"已退出"}`:"当前未选择会话",children: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:ae,label:ye})=>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(ae),children:ye},ae))}),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:ae=>q.onCommandChange(ae.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:ae=>q.onPasteBufferChange(ae.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。适合查看流式输出、补命令和关闭会话,不适合重度长文本输入。"})]})})}const Av=[{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",xv="demo-client-token",ys="pc-main",Xf="termpilot-app-state";function Rv(){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 Mv(q){const ae=new URL(q);return ae.protocol=ae.protocol==="wss:"?"https:":"http:",ae.pathname="",ae.search="",ae.hash="",ae.toString().replace(/\/$/,"")}function Lv(q){try{return new URL(q)}catch{return null}}function Ov(){const q=pe.useRef(null),ae=pe.useRef(null),ye=pe.useRef(null),G=pe.useRef(null),ce=pe.useRef(null),Se=pe.useRef(!1),te=pe.useRef(0),u=pe.useRef(ys),f=pe.useRef(ys),d=pe.useRef(!1),y=pe.useRef({}),h=pe.useRef(!1),[p,C]=pe.useState(Rv),[D,S]=pe.useState(xv),[l,c]=pe.useState(ys),[a,o]=pe.useState(!1),[_,m]=pe.useState("idle"),[b,A]=pe.useState(!1),[v,E]=pe.useState([]),[O,U]=pe.useState({}),[M,z]=pe.useState(null),[W,ee]=pe.useState([]),[H,I]=pe.useState(""),[T,L]=pe.useState("all"),[B,w]=pe.useState(""),[N,X]=pe.useState(""),[se,ne]=pe.useState(!1),[ue,x]=pe.useState(!1),[K,Z]=pe.useState(""),[$,me]=pe.useState(""),[oe,Re]=pe.useState(""),[Ne,tt]=pe.useState(""),[Bt,Ee]=pe.useState(""),ii=pe.useMemo(()=>v.find(he=>he.sid===M)??null,[M,v]),St=_==="connected",ut=St&&b,wt=pe.useMemo(()=>Lv(p),[p]),ci=pe.useMemo(()=>wt?Mv(wt.toString()):null,[wt]),mt=pe.useMemo(()=>{const he=H.trim().toLowerCase();return v.filter(_e=>T!=="all"&&_e.status!==T?!1:he?_e.name.toLowerCase().includes(he)||_e.cwd.toLowerCase().includes(he):!0).sort((_e,Me)=>{const Oe=W.includes(_e.sid),ri=W.includes(Me.sid);return Oe!==ri?Oe?-1:1:Me.startedAt.localeCompare(_e.startedAt)})},[W,H,v,T]);pe.useEffect(()=>{u.current=l},[l]),pe.useEffect(()=>{const he=l.trim()||ys;if(!St){f.current=he;return}if(f.current===he)return;f.current=he,A(!1),E([]),U({}),z(null);const _e=window.setTimeout(()=>{kt(he)},200);return()=>{window.clearTimeout(_e)}},[St,l]),pe.useEffect(()=>{try{const he=window.localStorage.getItem(Xf);if(!he)return;const _e=JSON.parse(he);_e.wsUrl&&C(_e.wsUrl),_e.clientToken&&S(_e.clientToken),typeof _e.deviceId=="string"&&_e.deviceId.trim()&&c(_e.deviceId.trim()),(typeof _e.activeSid=="string"||_e.activeSid===null)&&z(_e.activeSid??null),Array.isArray(_e.pinnedSids)&&ee(_e.pinnedSids.filter(Me=>typeof Me=="string")),typeof _e.notificationsEnabled=="boolean"&&x(_e.notificationsEnabled)}catch{}},[]),pe.useEffect(()=>{const he={wsUrl:p,clientToken:D,deviceId:l,activeSid:M,pinnedSids:W,notificationsEnabled:ue};window.localStorage.setItem(Xf,JSON.stringify(he))},[M,D,l,ue,W,p]),pe.useEffect(()=>{if(!q.current||ae.current)return;let he=null,_e=0,Me=0;return _e=window.requestAnimationFrame(()=>{if(!q.current)return;he=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 Oe=new pv.FitAddon;he.loadAddon(Oe),he.open(q.current),ae.current=he,ye.current=Oe,Me=window.requestAnimationFrame(()=>{Qe()})}),()=>{window.cancelAnimationFrame(_e),window.cancelAnimationFrame(Me),he?.dispose(),ae.current=null,ye.current=null}},[]),pe.useEffect(()=>{if(!q.current||!ye.current)return;const he=()=>{!ae.current||!Qe()||!ut||!M||ae.current.cols===0||ae.current.rows===0||Je({type:"session.resize",reqId:is("resize"),deviceId:l,sid:M,payload:{cols:ae.current.cols,rows:ae.current.rows}})},_e=new ResizeObserver(()=>he());return _e.observe(q.current),he(),()=>{_e.disconnect()}},[M,ut,l]),pe.useEffect(()=>{ae.current&&(ae.current.clear(),ae.current.write((O[M??""]??"").replace(/\n/g,`\r
18
+ `)))},[M,O]),pe.useEffect(()=>()=>{ce.current!==null&&window.clearTimeout(ce.current),G.current?.close()},[]),pe.useEffect(()=>{St&&(kt(u.current),M&&Jt(M,u.current))},[M,St]),pe.useEffect(()=>{const he=new Set(v.map(_e=>_e.sid));ee(_e=>_e.filter(Me=>he.has(Me)))},[v]),pe.useEffect(()=>{const he=d.current,_e=y.current,Me=Object.fromEntries(v.map(Oe=>[Oe.sid,Oe.status]));if(h.current&&ue&&typeof window<"u"&&"Notification"in window&&Notification.permission==="granted"&&document.hidden){he&&!b&&new Notification("TermPilot",{body:`设备 ${l} 已离线`});for(const Oe of v)_e[Oe.sid]==="running"&&Oe.status==="exited"&&new Notification("会话已退出",{body:`${Oe.name} 已结束`})}d.current=b,y.current=Me,h.current=!0},[l,b,ue,v]);function Qe(){if(!ye.current||!ae.current||!q.current||q.current.clientWidth===0||q.current.clientHeight===0)return!1;try{return ye.current.fit(),!0}catch{return!1}}function Je(he){const _e=G.current;!_e||_e.readyState!==WebSocket.OPEN||_e.send(JSON.stringify(he))}function kt(he){Je({type:"session.list",reqId:is("list"),deviceId:he??u.current})}function Jt(he,_e){Je({type:"session.replay",reqId:is("replay"),deviceId:_e??u.current,sid:he,payload:{afterSeq:-1}})}function yt(){if(Se.current)return;const he=te.current+1;te.current=he;const _e=Math.min(1e3*2**Math.min(he,4),12e3);m("reconnecting"),ce.current=window.setTimeout(()=>{ce.current=null,ht(!1)},_e)}function Li(){Se.current=!0,te.current=0,ce.current!==null&&(window.clearTimeout(ce.current),ce.current=null)}function Dt(){Li(),G.current?.close(),G.current=null,m("idle"),A(!1)}function ui(){Dt(),S(""),c(ys),o(!1),z(null),E([]),U({}),X("已清除本机保存的访问令牌,请重新配对。"),d.current=!1,y.current={},h.current=!1}function Ye(he){ee(_e=>_e.includes(he)?_e.filter(Me=>Me!==he):[he,..._e])}async function hi(){if(ue){x(!1),X("已关闭浏览器提醒。");return}if(typeof window>"u"||!("Notification"in window)){X("当前浏览器不支持通知。");return}if(await Notification.requestPermission()==="granted"){x(!0),X("已开启浏览器提醒。页面在后台时,会在会话退出或设备离线时提醒。");return}x(!1),X("通知权限未开启。")}function ht(he=!0,_e){if(!wt){X("WebSocket 地址无效,请先输入完整地址。"),m("idle");return}he&&(Se.current=!1,te.current=0),ce.current!==null&&(window.clearTimeout(ce.current),ce.current=null),G.current?.close(),m(he?"connecting":"reconnecting");const Me=new URL(wt.toString());Me.searchParams.set("role","client"),Me.searchParams.set("token",_e??D);const Oe=new WebSocket(Me);G.current=Oe,Oe.addEventListener("open",()=>{G.current===Oe&&(te.current=0,m("connected"))}),Oe.addEventListener("close",()=>{G.current===Oe&&(G.current=null),!(G.current!==null&&G.current!==Oe)&&(m(ri=>Se.current?"idle":ri),A(!1),Se.current||yt())}),Oe.addEventListener("message",ri=>{if(G.current!==Oe)return;const Ke=JSON.parse(ri.data);switch(Ke.type){case"auth.ok":{const Xe=Ke.payload.deviceId??(u.current.trim()||ys),it=u.current,Ct=!!Ke.payload.deviceId||!it.trim();o(!!Ke.payload.deviceId),u.current=Xe,Xe!==it&&(E([]),U({}),z(null)),Ct&&c(Xe),kt(Xe),M&&Jt(M,Xe)}return;case"relay.state":A(Ke.payload.agents.some(Xe=>Xe.deviceId===u.current&&Xe.online));return;case"session.list.result":if(Ke.deviceId!==u.current)return;E(Ke.payload.sessions),U(Xe=>{const it={};for(const Ct of Ke.payload.sessions)Xe[Ct.sid]&&(it[Ct.sid]=Xe[Ct.sid]);return it}),z(Xe=>{const it=Xe&&Ke.payload.sessions.some(Ct=>Ct.sid===Xe)?Xe:Ke.payload.sessions[0]?.sid??null;return it&&Jt(it,u.current),it});return;case"session.created":case"session.state":{const Xe=Ke.payload.session;if(Xe.deviceId!==u.current)return;E(it=>{const Ct=it.filter(fi=>fi.sid!==Xe.sid);return Ct.push(Xe),Ct.sort((fi,_l)=>_l.startedAt.localeCompare(fi.startedAt)),Ct}),z(it=>it??Xe.sid);return}case"session.output":if(Ke.deviceId!==u.current)return;U(Xe=>({...Xe,[Ke.sid]:Ke.payload.data}));return;case"session.exit":if(Ke.deviceId!==u.current)return;E(Xe=>Xe.map(it=>it.sid===Ke.sid?{...it,status:"exited"}:it));return;case"error":if(Ke.code==="AUTH_FAILED"||Ke.code==="AUTH_REVOKED"){Li(),m("idle"),A(!1),Ke.code==="AUTH_REVOKED"&&S(""),X(Ke.message),Oe.close();return}window.alert(Ke.message)}})}async function si(){if(!ci){X("WebSocket 地址无效,请先输入完整地址。");return}const he=B.trim().toUpperCase();if(!he){X("请先输入配对码。");return}ne(!0),X("");try{const _e=await fetch(`${ci}/api/pairings/redeem`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({pairingCode:he})}),Me=await _e.json().catch(()=>null);if(!_e.ok||!Me||!("accessToken"in Me)){const Oe=Me&&"message"in Me&&Me.message?Me.message:"配对失败";throw new Error(Oe)}E([]),U({}),z(null),c(Me.deviceId),S(Me.accessToken),w(""),X(`已绑定设备 ${Me.deviceId},现在可以直接连接。`),ht(!0,Me.accessToken)}catch(_e){const Me=_e instanceof Error?_e.message:"配对失败";X(Me)}finally{ne(!1)}}function bt(he){if(he.preventDefault(),!ut){X(b?"当前未连接 relay,无法创建会话。":`设备 ${l||ys} 当前离线,无法创建会话。`);return}Je({type:"session.create",reqId:is("create"),deviceId:l,payload:{name:oe||void 0,cwd:Ne||void 0,shell:Bt||void 0}}),Re("")}function hl(he){he.preventDefault(),!(!M||!K.trim()||!ut)&&(Je({type:"session.input",reqId:is("input"),deviceId:l,sid:M,payload:{text:`${K}
19
+ `}}),Z(""))}function fl(he){!M||!$||!ut||(Je({type:"session.input",reqId:is("paste"),deviceId:l,sid:M,payload:{text:he==="line"?`${$}
20
+ `:$}}),me(""))}function dl(he){!M||!ut||Je({type:"session.input",reqId:is("key"),deviceId:l,sid:M,payload:{key:he}})}return le.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:[le.jsx("header",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/70 p-5 shadow-2xl shadow-slate-950/40 backdrop-blur",children:le.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-end md:justify-between",children:[le.jsxs("div",{children:[le.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.25em] text-sky-300",children:"TermPilot"}),le.jsx("h1",{className:"mt-2 text-3xl font-semibold text-white",children:"手机查看和控制 tmux 会话"}),le.jsx("p",{className:"mt-2 max-w-2xl text-sm text-slate-400",children:"浏览器直接打开可用,安卓和 iPhone 都走同一套 PWA 页面。"})]}),le.jsxs("div",{className:"flex flex-wrap gap-3",children:[le.jsx(Gf,{active:St,label:_==="reconnecting"?"正在重连":St?"已连接 Relay":_==="connecting"?"连接中":"Relay 未连接"}),le.jsx(Gf,{active:b,label:b?"设备在线":"设备离线"})]})]})}),le.jsxs("section",{className:"grid gap-5 lg:grid-cols-[360px_minmax(0,1fr)]",children:[le.jsxs("div",{className:"space-y-5",children:[le.jsx(bv,{wsUrl:p,wsUrlValid:wt!==null,clientToken:D,deviceId:l,deviceIdEditable:!a,pairingCode:B,pairingMessage:N,pairingPending:se,connectionPhase:_,notificationsEnabled:ue,onWsUrlChange:C,onClientTokenChange:S,onDeviceIdChange:c,onPairingCodeChange:w,onRedeemPairingCode:()=>{si()},onConnect:()=>ht(!0),onRefresh:()=>kt(u.current),onDisconnect:Dt,onClearBinding:ui,onToggleNotifications:()=>{hi()}}),le.jsx(Cv,{canControl:ut,createName:oe,createCwd:Ne,createShell:Bt,onCreateNameChange:Re,onCreateCwdChange:tt,onCreateShellChange:Ee,onSubmit:bt}),le.jsx(wv,{canControl:ut,sessions:v,filteredSessions:mt,activeSid:M,pinnedSids:W,sessionQuery:H,statusFilter:T,onSessionQueryChange:I,onStatusFilterChange:L,onTogglePinnedSession:Ye,onSelectSession:he=>{z(he),Jt(he,u.current)},onKillSession:he=>{Je({type:"session.kill",reqId:is("kill"),deviceId:l,sid:he})}})]}),le.jsx(Dv,{activeSession:ii,activeSid:M,canControl:ut,command:K,pasteBuffer:$,shortcutKeys:Av,terminalRef:q,onCommandChange:Z,onSubmitCommand:hl,onPasteBufferChange:me,onSendPaste:fl,onSendKey:dl})]})]})}gv.createRoot(document.getElementById("root")).render(le.jsx(ov.StrictMode,{children:le.jsx(Ov,{})}));