zerogterm 0.2.0-alpha.2 → 0.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main/main/session-service.js +13 -5
- package/dist/main/main/ssh-inventory.js +4 -1
- package/dist/renderer/assets/index-Cs9gfbAs.js +17 -0
- package/dist/renderer/assets/{voice-worker-Bde9NFkO.js → voice-worker-DWb1dVxY.js} +6 -6
- package/dist/renderer/index.html +1 -1
- package/package.json +6 -2
- package/dist/renderer/assets/index-BWVjX0UX.js +0 -17
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(function(){const me=document.createElement("link").relList;if(me&&me.supports&&me.supports("modulepreload"))return;for(const de of document.querySelectorAll('link[rel="modulepreload"]'))G(de);new MutationObserver(de=>{for(const Se of de)if(Se.type==="childList")for(const ie of Se.addedNodes)ie.tagName==="LINK"&&ie.rel==="modulepreload"&&G(ie)}).observe(document,{childList:!0,subtree:!0});function le(de){const Se={};return de.integrity&&(Se.integrity=de.integrity),de.referrerPolicy&&(Se.referrerPolicy=de.referrerPolicy),de.crossOrigin==="use-credentials"?Se.credentials="include":de.crossOrigin==="anonymous"?Se.credentials="omit":Se.credentials="same-origin",Se}function G(de){if(de.ep)return;de.ep=!0;const Se=le(de);fetch(de.href,Se)}})();var Go={exports:{}},on={};var jf;function uv(){if(jf)return on;jf=1;var te=Symbol.for("react.transitional.element"),me=Symbol.for("react.fragment");function le(G,de,Se){var ie=null;if(Se!==void 0&&(ie=""+Se),de.key!==void 0&&(ie=""+de.key),"key"in de){Se={};for(var f in de)f!=="key"&&(Se[f]=de[f])}else Se=de;return de=Se.ref,{$$typeof:te,type:G,key:ie,ref:de!==void 0?de:null,props:Se}}return on.Fragment=me,on.jsx=le,on.jsxs=le,on}var Uf;function hv(){return Uf||(Uf=1,Go.exports=uv()),Go.exports}var M=hv(),Yo={exports:{}},De={};var qf;function fv(){if(qf)return De;qf=1;var te=Symbol.for("react.transitional.element"),me=Symbol.for("react.portal"),le=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),Se=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),p=Symbol.iterator;function y(w){return w===null||typeof w!="object"?null:(w=p&&w[p]||w["@@iterator"],typeof w=="function"?w:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,o={};function c(w,L,K){this.props=w,this.context=L,this.refs=o,this.updater=K||x}c.prototype.isReactComponent={},c.prototype.setState=function(w,L){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,L,"setState")},c.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function a(){}a.prototype=c.prototype;function l(w,L,K){this.props=w,this.context=L,this.refs=o,this.updater=K||x}var _=l.prototype=new a;_.constructor=l,m(_,c.prototype),_.isPureReactComponent=!0;var C=Array.isArray;function b(){}var E={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function D(w,L,K){var Q=K.ref;return{$$typeof:te,type:w,key:L,ref:Q!==void 0?Q:null,props:K}}function z(w,L){return D(w.type,L,w.props)}function N(w){return typeof w=="object"&&w!==null&&w.$$typeof===te}function q(w){var L={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(K){return L[K]})}var B=/\/+/g;function F(w,L){return typeof w=="object"&&w!==null&&w.key!=null?q(""+w.key):L.toString(36)}function ne(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(L){w.status==="pending"&&(w.status="fulfilled",w.value=L)},function(L){w.status==="pending"&&(w.status="rejected",w.reason=L)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function j(w,L,K,Q,ue){var fe=typeof w;(fe==="undefined"||fe==="boolean")&&(w=null);var I=!1;if(w===null)I=!0;else switch(fe){case"bigint":case"string":case"number":I=!0;break;case"object":switch(w.$$typeof){case te:case me:I=!0;break;case S:return I=w._init,j(I(w._payload),L,K,Q,ue)}}if(I)return ue=ue(w),I=Q===""?"."+F(w,0):Q,C(ue)?(K="",I!=null&&(K=I.replace(B,"$&/")+"/"),j(ue,L,K,"",function(oe){return oe})):ue!=null&&(N(ue)&&(ue=z(ue,K+(ue.key==null||w&&w.key===ue.key?"":(""+ue.key).replace(B,"$&/")+"/")+I)),L.push(ue)),1;I=0;var R=Q===""?".":Q+":";if(C(w))for(var $=0;$<w.length;$++)Q=w[$],fe=R+F(Q,$),I+=j(Q,L,K,fe,ue);else if($=y(w),typeof $=="function")for(w=$.call(w),$=0;!(Q=w.next()).done;)Q=Q.value,fe=R+F(Q,$++),I+=j(Q,L,K,fe,ue);else if(fe==="object"){if(typeof w.then=="function")return j(ne(w),L,K,Q,ue);throw L=String(w),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return I}function W(w,L,K){if(w==null)return w;var Q=[],ue=0;return j(w,Q,"","",function(fe){return L.call(K,fe,ue++)}),Q}function ee(w){if(w._status===-1){var L=w._result;L=L(),L.then(function(K){(w._status===0||w._status===-1)&&(w._status=1,w._result=K)},function(K){(w._status===0||w._status===-1)&&(w._status=2,w._result=K)}),w._status===-1&&(w._status=0,w._result=L)}if(w._status===1)return w._result.default;throw w._result}var A=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},O={map:W,forEach:function(w,L,K){W(w,function(){L.apply(this,arguments)},K)},count:function(w){var L=0;return W(w,function(){L++}),L},toArray:function(w){return W(w,function(L){return L})||[]},only:function(w){if(!N(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return De.Activity=u,De.Children=O,De.Component=c,De.Fragment=le,De.Profiler=de,De.PureComponent=l,De.StrictMode=G,De.Suspense=h,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,De.__COMPILER_RUNTIME={__proto__:null,c:function(w){return E.H.useMemoCache(w)}},De.cache=function(w){return function(){return w.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(w,L,K){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var Q=m({},w.props),ue=w.key;if(L!=null)for(fe in L.key!==void 0&&(ue=""+L.key),L)!v.call(L,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&L.ref===void 0||(Q[fe]=L[fe]);var fe=arguments.length-2;if(fe===1)Q.children=K;else if(1<fe){for(var I=Array(fe),R=0;R<fe;R++)I[R]=arguments[R+2];Q.children=I}return D(w.type,ue,Q)},De.createContext=function(w){return w={$$typeof:ie,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:Se,_context:w},w},De.createElement=function(w,L,K){var Q,ue={},fe=null;if(L!=null)for(Q in L.key!==void 0&&(fe=""+L.key),L)v.call(L,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ue[Q]=L[Q]);var I=arguments.length-2;if(I===1)ue.children=K;else if(1<I){for(var R=Array(I),$=0;$<I;$++)R[$]=arguments[$+2];ue.children=R}if(w&&w.defaultProps)for(Q in I=w.defaultProps,I)ue[Q]===void 0&&(ue[Q]=I[Q]);return D(w,fe,ue)},De.createRef=function(){return{current:null}},De.forwardRef=function(w){return{$$typeof:f,render:w}},De.isValidElement=N,De.lazy=function(w){return{$$typeof:S,_payload:{_status:-1,_result:w},_init:ee}},De.memo=function(w,L){return{$$typeof:d,type:w,compare:L===void 0?null:L}},De.startTransition=function(w){var L=E.T,K={};E.T=K;try{var Q=w(),ue=E.S;ue!==null&&ue(K,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(b,A)}catch(fe){A(fe)}finally{L!==null&&K.types!==null&&(L.types=K.types),E.T=L}},De.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},De.use=function(w){return E.H.use(w)},De.useActionState=function(w,L,K){return E.H.useActionState(w,L,K)},De.useCallback=function(w,L){return E.H.useCallback(w,L)},De.useContext=function(w){return E.H.useContext(w)},De.useDebugValue=function(){},De.useDeferredValue=function(w,L){return E.H.useDeferredValue(w,L)},De.useEffect=function(w,L){return E.H.useEffect(w,L)},De.useEffectEvent=function(w){return E.H.useEffectEvent(w)},De.useId=function(){return E.H.useId()},De.useImperativeHandle=function(w,L,K){return E.H.useImperativeHandle(w,L,K)},De.useInsertionEffect=function(w,L){return E.H.useInsertionEffect(w,L)},De.useLayoutEffect=function(w,L){return E.H.useLayoutEffect(w,L)},De.useMemo=function(w,L){return E.H.useMemo(w,L)},De.useOptimistic=function(w,L){return E.H.useOptimistic(w,L)},De.useReducer=function(w,L,K){return E.H.useReducer(w,L,K)},De.useRef=function(w){return E.H.useRef(w)},De.useState=function(w){return E.H.useState(w)},De.useSyncExternalStore=function(w,L,K){return E.H.useSyncExternalStore(w,L,K)},De.useTransition=function(){return E.H.useTransition()},De.version="19.2.8",De}var If;function Qo(){return If||(If=1,Yo.exports=fv()),Yo.exports}var be=Qo(),Ko={exports:{}},cn={},Vo={exports:{}},Xo={};var Gf;function dv(){return Gf||(Gf=1,(function(te){function me(j,W){var ee=j.length;j.push(W);e:for(;0<ee;){var A=ee-1>>>1,O=j[A];if(0<de(O,W))j[A]=W,j[ee]=O,ee=A;else break e}}function le(j){return j.length===0?null:j[0]}function G(j){if(j.length===0)return null;var W=j[0],ee=j.pop();if(ee!==W){j[0]=ee;e:for(var A=0,O=j.length,w=O>>>1;A<w;){var L=2*(A+1)-1,K=j[L],Q=L+1,ue=j[Q];if(0>de(K,ee))Q<O&&0>de(ue,K)?(j[A]=ue,j[Q]=ee,A=Q):(j[A]=K,j[L]=ee,A=L);else if(Q<O&&0>de(ue,ee))j[A]=ue,j[Q]=ee,A=Q;else break e}}return W}function de(j,W){var ee=j.sortIndex-W.sortIndex;return ee!==0?ee:j.id-W.id}if(te.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var Se=performance;te.unstable_now=function(){return Se.now()}}else{var ie=Date,f=ie.now();te.unstable_now=function(){return ie.now()-f}}var h=[],d=[],S=1,u=null,p=3,y=!1,x=!1,m=!1,o=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function _(j){for(var W=le(d);W!==null;){if(W.callback===null)G(d);else if(W.startTime<=j)G(d),W.sortIndex=W.expirationTime,me(h,W);else break;W=le(d)}}function C(j){if(m=!1,_(j),!x)if(le(h)!==null)x=!0,b||(b=!0,q());else{var W=le(d);W!==null&&ne(C,W.startTime-j)}}var b=!1,E=-1,v=5,D=-1;function z(){return o?!0:!(te.unstable_now()-D<v)}function N(){if(o=!1,b){var j=te.unstable_now();D=j;var W=!0;try{e:{x=!1,m&&(m=!1,a(E),E=-1),y=!0;var ee=p;try{t:{for(_(j),u=le(h);u!==null&&!(u.expirationTime>j&&z());){var A=u.callback;if(typeof A=="function"){u.callback=null,p=u.priorityLevel;var O=A(u.expirationTime<=j);if(j=te.unstable_now(),typeof O=="function"){u.callback=O,_(j),W=!0;break t}u===le(h)&&G(h),_(j)}else G(h);u=le(h)}if(u!==null)W=!0;else{var w=le(d);w!==null&&ne(C,w.startTime-j),W=!1}}break e}finally{u=null,p=ee,y=!1}W=void 0}}finally{W?q():b=!1}}}var q;if(typeof l=="function")q=function(){l(N)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,F=B.port2;B.port1.onmessage=N,q=function(){F.postMessage(null)}}else q=function(){c(N,0)};function ne(j,W){E=c(function(){j(te.unstable_now())},W)}te.unstable_IdlePriority=5,te.unstable_ImmediatePriority=1,te.unstable_LowPriority=4,te.unstable_NormalPriority=3,te.unstable_Profiling=null,te.unstable_UserBlockingPriority=2,te.unstable_cancelCallback=function(j){j.callback=null},te.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<j?Math.floor(1e3/j):5},te.unstable_getCurrentPriorityLevel=function(){return p},te.unstable_next=function(j){switch(p){case 1:case 2:case 3:var W=3;break;default:W=p}var ee=p;p=W;try{return j()}finally{p=ee}},te.unstable_requestPaint=function(){o=!0},te.unstable_runWithPriority=function(j,W){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ee=p;p=j;try{return W()}finally{p=ee}},te.unstable_scheduleCallback=function(j,W,ee){var A=te.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?A+ee:A):ee=A,j){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=ee+O,j={id:S++,callback:W,priorityLevel:j,startTime:ee,expirationTime:O,sortIndex:-1},ee>A?(j.sortIndex=ee,me(d,j),le(h)===null&&j===le(d)&&(m?(a(E),E=-1):m=!0,ne(C,ee-A))):(j.sortIndex=O,me(h,j),x||y||(x=!0,b||(b=!0,q()))),j},te.unstable_shouldYield=z,te.unstable_wrapCallback=function(j){var W=p;return function(){var ee=p;p=W;try{return j.apply(this,arguments)}finally{p=ee}}}})(Xo)),Xo}var Yf;function _v(){return Yf||(Yf=1,Vo.exports=dv()),Vo.exports}var Wo={exports:{}},At={};var Kf;function vv(){if(Kf)return At;Kf=1;var te=Qo();function me(h){var d="https://react.dev/errors/"+h;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)d+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function le(){}var G={d:{f:le,r:function(){throw Error(me(522))},D:le,C:le,L:le,m:le,X:le,S:le,M:le},p:0,findDOMNode:null},de=Symbol.for("react.portal");function Se(h,d,S){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:de,key:u==null?null:""+u,children:h,containerInfo:d,implementation:S}}var ie=te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,d){if(h==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,At.createPortal=function(h,d){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(me(299));return Se(h,d,null,S)},At.flushSync=function(h){var d=ie.T,S=G.p;try{if(ie.T=null,G.p=2,h)return h()}finally{ie.T=d,G.p=S,G.d.f()}},At.preconnect=function(h,d){typeof h=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,G.d.C(h,d))},At.prefetchDNS=function(h){typeof h=="string"&&G.d.D(h)},At.preinit=function(h,d){if(typeof h=="string"&&d&&typeof d.as=="string"){var S=d.as,u=f(S,d.crossOrigin),p=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;S==="style"?G.d.S(h,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:u,integrity:p,fetchPriority:y}):S==="script"&&G.d.X(h,{crossOrigin:u,integrity:p,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},At.preinitModule=function(h,d){if(typeof h=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var S=f(d.as,d.crossOrigin);G.d.M(h,{crossOrigin:S,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&G.d.M(h)},At.preload=function(h,d){if(typeof h=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var S=d.as,u=f(S,d.crossOrigin);G.d.L(h,S,{crossOrigin:u,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})}},At.preloadModule=function(h,d){if(typeof h=="string")if(d){var S=f(d.as,d.crossOrigin);G.d.m(h,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:S,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else G.d.m(h)},At.requestFormReset=function(h){G.d.r(h)},At.unstable_batchedUpdates=function(h,d){return h(d)},At.useFormState=function(h,d,S){return ie.H.useFormState(h,d,S)},At.useFormStatus=function(){return ie.H.useHostTransitionStatus()},At.version="19.2.8",At}var Vf;function mv(){if(Vf)return Wo.exports;Vf=1;function te(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(te)}catch(me){console.error(me)}}return te(),Wo.exports=vv(),Wo.exports}var Xf;function gv(){if(Xf)return cn;Xf=1;var te=_v(),me=Qo(),le=mv();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 de(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 ie(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 f(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 h(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 h(r),e;if(n===s)return h(r),t;n=n.sibling}throw Error(G(188))}if(i.return!==s.return)i=r,s=n;else{for(var g=!1,T=r.child;T;){if(T===i){g=!0,i=r,s=n;break}if(T===s){g=!0,s=r,i=n;break}T=T.sibling}if(!g){for(T=n.child;T;){if(T===i){g=!0,i=n,s=r;break}if(T===s){g=!0,s=n,i=r;break}T=T.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 S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var u=Object.assign,p=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=N&&e[N]||e["@@iterator"],typeof e=="function"?e:null)}var B=Symbol.for("react.client.reference");function F(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===B?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case m:return"Fragment";case c:return"Profiler";case o:return"StrictMode";case C:return"Suspense";case b:return"SuspenseList";case D:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case l: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 E:return t=e.displayName||null,t!==null?t:F(e.type)||"Memo";case v:t=e._payload,e=e._init;try{return F(e(t))}catch{}}return null}var ne=Array.isArray,j=me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=le.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},A=[],O=-1;function w(e){return{current:e}}function L(e){0>O||(e.current=A[O],A[O]=null,O--)}function K(e,t){O++,A[O]=e.current,e.current=t}var Q=w(null),ue=w(null),fe=w(null),I=w(null);function R(e,t){switch(K(fe,t),K(ue,e),K(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?lf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=lf(t),e=of(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(Q),K(Q,e)}function $(){L(Q),L(ue),L(fe)}function oe(e){e.memoizedState!==null&&K(I,e);var t=Q.current,i=of(t,e.type);t!==i&&(K(ue,e),K(Q,i))}function ve(e){ue.current===e&&(L(Q),L(ue)),I.current===e&&(L(I),rn._currentValue=ee)}var _e,Ae;function je(e){if(_e===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||"",Ae=-1<i.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+_e+e+Ae}var Ke=!1;function tt(e,t){if(!e||Ke)return"";Ke=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(Z){var P=Z}Reflect.construct(e,[],ae)}else{try{ae.call()}catch(Z){P=Z}e.call(ae.prototype)}}else{try{throw Error()}catch(Z){P=Z}(ae=e())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(Z){if(Z&&P&&typeof Z.stack=="string")return[Z.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],T=n[1];if(g&&T){var H=g.split(`
|
|
4
|
+
`),X=T.split(`
|
|
5
|
+
`);for(r=s=0;s<H.length&&!H[s].includes("DetermineComponentFrameRoot");)s++;for(;r<X.length&&!X[r].includes("DetermineComponentFrameRoot");)r++;if(s===H.length||r===X.length)for(s=H.length-1,r=X.length-1;1<=s&&0<=r&&H[s]!==X[r];)r--;for(;1<=s&&0<=r;s--,r--)if(H[s]!==X[r]){if(s!==1||r!==1)do if(s--,r--,0>r||H[s]!==X[r]){var se=`
|
|
6
|
+
`+H[s].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=s&&0<=r);break}}}finally{Ke=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?je(i):""}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je("Lazy");case 13:return e.child!==t&&t!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return tt(e.type,!1);case 11:return tt(e.type.render,!1);case 1:return tt(e.type,!0);case 31:return je("Activity");default:return""}}function ni(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 ai=Object.prototype.hasOwnProperty,qi=te.unstable_scheduleCallback,li=te.unstable_cancelCallback,Si=te.unstable_shouldYield,gt=te.unstable_requestPaint,Je=te.unstable_now,Tt=te.unstable_getCurrentPriorityLevel,oi=te.unstable_ImmediatePriority,di=te.unstable_UserBlockingPriority,Lt=te.unstable_NormalPriority,yi=te.unstable_LowPriority,et=te.unstable_IdlePriority,Le=te.log,Ue=te.unstable_setDisableYieldValue,Wt=null,ft=null;function _i(e){if(typeof Le=="function"&&Ue(e),ft&&typeof ft.setStrictMode=="function")try{ft.setStrictMode(Wt,e)}catch{}}var Ve=Math.clz32?Math.clz32:Ot,Ma=Math.log,La=Math.LN2;function Ot(e){return e>>>=0,e===0?32:31-(Ma(e)/La|0)|0}var Rt=256,Bs=262144,ks=4194304;function bi(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 fs(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 T=s&134217727;return T!==0?(s=T&~n,s!==0?r=bi(s):(g&=T,g!==0?r=bi(g):i||(i=T&~e,i!==0&&(r=bi(i))))):(T=s&~n,T!==0?r=bi(T):g!==0?r=bi(g):i||(i=s&~e,i!==0&&(r=bi(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 Ii(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function un(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 ds(){var e=ks;return ks<<=1,(ks&62914560)===0&&(ks=4194304),e}function mr(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function _s(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oa(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 T=e.entanglements,H=e.expirationTimes,X=e.hiddenUpdates;for(i=g&~i;0<i;){var se=31-Ve(i),ae=1<<se;T[se]=0,H[se]=-1;var P=X[se];if(P!==null)for(X[se]=null,se=0;se<P.length;se++){var Z=P[se];Z!==null&&(Z.lane&=-536870913)}i&=~ae}s!==0&&gr(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(g&~t))}function gr(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Ve(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function hn(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Ve(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function pr(e,t){var i=t&-t;return i=(i&42)!==0?1:Hs(i),(i&(e.suspendedLanes|t))!==0?0:i}function Hs(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 Sr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function fn(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Lf(e.type))}function k(e,t){var i=W.p;try{return W.p=e,t()}finally{W.p=i}}var ce=Math.random().toString(36).slice(2),J="__reactFiber$"+ce,he="__reactProps$"+ce,we="__reactContainer$"+ce,xe="__reactEvents$"+ce,Me="__reactListeners$"+ce,rt="__reactHandles$"+ce,Ge="__reactResources$"+ce,Oe="__reactMarker$"+ce;function Ut(e){delete e[J],delete e[he],delete e[xe],delete e[Me],delete e[rt]}function Qe(e){var t=e[J];if(t)return t;for(var i=e.parentNode;i;){if(t=i[we]||i[J]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=vf(e);e!==null;){if(i=e[J])return i;e=vf(e)}return t}e=i,i=e.parentNode}return null}function Pt(e){if(e=e[J]||e[we]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(G(33))}function ci(e){var t=e[Ge];return t||(t=e[Ge]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[Oe]=!0}var vs=new Set,dn={};function Gi(e,t){Dt(e,t),Dt(e+"Capture",t)}function Dt(e,t){for(dn[e]=t,e=0;e<t.length;e++)vs.add(t[e])}var Ba=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]*$"),Ns={},ms={};function id(e){return ai.call(ms,e)?!0:ai.call(Ns,e)?!1:Ba.test(e)?ms[e]=!0:(Ns[e]=!0,!1)}function _n(e,t,i){if(id(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 vn(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Ci(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $o(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sd(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 ka(e){if(!e._valueTracker){var t=$o(e)?"checked":"value";e._valueTracker=sd(e,t,""+e[t])}}function Jo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=$o(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function mn(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 rd=/[\n"\\]/g;function Zt(e){return e.replace(rd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ha(e,t,i,s,r,n,g,T){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=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Na(e,g,Ft(t)):i!=null?Na(e,g,Ft(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+Ft(T):e.removeAttribute("name")}function ec(e,t,i,s,r,n,g,T){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)){ka(e);return}i=i!=null?""+Ft(i):"",t=t!=null?""+Ft(t):i,T||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=T?e.checked:!!s,e.defaultChecked=!!s,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ka(e)}function Na(e,t,i){t==="number"&&mn(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function zs(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=""+Ft(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 tc(e,t,i){if(t!=null&&(t=""+Ft(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Ft(i):""}function ic(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(G(92));if(ne(s)){if(1<s.length)throw Error(G(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Ft(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),ka(e)}function js(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var nd=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function sc(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||nd.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function rc(e,t,i){if(t!=null&&typeof t!="object")throw Error(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&&sc(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&sc(e,n,t[n])}function za(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 ad=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ld=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function gn(e){return ld.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ei(){}var ja=null;function Ua(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Us=null,qs=null;function nc(e){var t=Pt(e);if(t&&(e=t.stateNode)){var i=e[he]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ha(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="'+Zt(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[he]||null;if(!r)throw Error(G(90));Ha(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&&Jo(s)}break e;case"textarea":tc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&zs(e,!!i.multiple,t,!1)}}}var qa=!1;function ac(e,t,i){if(qa)return e(t,i);qa=!0;try{var s=e(t);return s}finally{if(qa=!1,(Us!==null||qs!==null)&&(ra(),Us&&(t=Us,e=qs,qs=Us=null,nc(t),e)))for(t=0;t<e.length;t++)nc(e[t])}}function yr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[he]||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 wi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ia=!1;if(wi)try{var br={};Object.defineProperty(br,"passive",{get:function(){Ia=!0}}),window.addEventListener("test",br,br),window.removeEventListener("test",br,br)}catch{Ia=!1}var Yi=null,Ga=null,pn=null;function lc(){if(pn)return pn;var e,t=Ga,i=t.length,s,r="value"in Yi?Yi.value:Yi.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 pn=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 yn(){return!0}function oc(){return!1}function Bt(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 T in e)e.hasOwnProperty(T)&&(i=e[T],this[T]=i?i(n):n[T]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?yn:oc,this.isPropagationStopped=oc,this}return u(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=yn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=yn)},persist:function(){},isPersistent:yn}),t}var gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=Bt(gs),Cr=u({},gs,{view:0,detail:0}),od=Bt(Cr),Ya,Ka,Er,Cn=u({},Cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xa,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!==Er&&(Er&&e.type==="mousemove"?(Ya=e.screenX-Er.screenX,Ka=e.screenY-Er.screenY):Ka=Ya=0,Er=e),Ya)},movementY:function(e){return"movementY"in e?e.movementY:Ka}}),cc=Bt(Cn),cd=u({},Cn,{dataTransfer:0}),ud=Bt(cd),hd=u({},Cr,{relatedTarget:0}),Va=Bt(hd),fd=u({},gs,{animationName:0,elapsedTime:0,pseudoElement:0}),dd=Bt(fd),_d=u({},gs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vd=Bt(_d),md=u({},gs,{data:0}),uc=Bt(md),gd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pd={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"},Sd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sd[e])?!!t[e]:!1}function Xa(){return yd}var bd=u({},Cr,{key:function(e){if(e.key){var t=gd[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"?pd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xa,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}}),Cd=Bt(bd),Ed=u({},Cn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hc=Bt(Ed),wd=u({},Cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xa}),xd=Bt(wd),Dd=u({},gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ad=Bt(Dd),Td=u({},Cn,{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}),Rd=Bt(Td),Md=u({},gs,{newState:0,oldState:0}),Ld=Bt(Md),Od=[9,13,27,32],Wa=wi&&"CompositionEvent"in window,wr=null;wi&&"documentMode"in document&&(wr=document.documentMode);var Bd=wi&&"TextEvent"in window&&!wr,fc=wi&&(!Wa||wr&&8<wr&&11>=wr),dc=" ",_c=!1;function vc(e,t){switch(e){case"keyup":return Od.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Is=!1;function kd(e,t){switch(e){case"compositionend":return mc(t);case"keypress":return t.which!==32?null:(_c=!0,dc);case"textInput":return e=t.data,e===dc&&_c?null:e;default:return null}}function Hd(e,t){if(Is)return e==="compositionend"||!Wa&&vc(e,t)?(e=lc(),pn=Ga=Yi=null,Is=!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 fc&&t.locale!=="ko"?null:t.data;default:return null}}var Nd={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function gc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Nd[e.type]:t==="textarea"}function pc(e,t,i,s){Us?qs?qs.push(s):qs=[s]:Us=s,t=ha(t,"onChange"),0<t.length&&(i=new bn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var xr=null,Dr=null;function zd(e){ef(e,0)}function En(e){var t=pt(e);if(Jo(t))return e}function Sc(e,t){if(e==="change")return t}var yc=!1;if(wi){var Pa;if(wi){var Fa="oninput"in document;if(!Fa){var bc=document.createElement("div");bc.setAttribute("oninput","return;"),Fa=typeof bc.oninput=="function"}Pa=Fa}else Pa=!1;yc=Pa&&(!document.documentMode||9<document.documentMode)}function Cc(){xr&&(xr.detachEvent("onpropertychange",Ec),Dr=xr=null)}function Ec(e){if(e.propertyName==="value"&&En(Dr)){var t=[];pc(t,Dr,e,Ua(e)),ac(zd,t)}}function jd(e,t,i){e==="focusin"?(Cc(),xr=t,Dr=i,xr.attachEvent("onpropertychange",Ec)):e==="focusout"&&Cc()}function Ud(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return En(Dr)}function qd(e,t){if(e==="click")return En(t)}function Id(e,t){if(e==="input"||e==="change")return En(t)}function Gd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qt=typeof Object.is=="function"?Object.is:Gd;function Ar(e,t){if(qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!ai.call(t,r)||!qt(e[r],t[r]))return!1}return!0}function wc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xc(e,t){var i=wc(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=wc(i)}}function Dc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ac(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=mn(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=mn(e.document)}return t}function Za(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 Yd=wi&&"documentMode"in document&&11>=document.documentMode,Gs=null,Qa=null,Tr=null,$a=!1;function Tc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;$a||Gs==null||Gs!==mn(s)||(s=Gs,"selectionStart"in s&&Za(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}),Tr&&Ar(Tr,s)||(Tr=s,s=ha(Qa,"onSelect"),0<s.length&&(t=new bn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Gs)))}function ps(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ys={animationend:ps("Animation","AnimationEnd"),animationiteration:ps("Animation","AnimationIteration"),animationstart:ps("Animation","AnimationStart"),transitionrun:ps("Transition","TransitionRun"),transitionstart:ps("Transition","TransitionStart"),transitioncancel:ps("Transition","TransitionCancel"),transitionend:ps("Transition","TransitionEnd")},Ja={},Rc={};wi&&(Rc=document.createElement("div").style,"AnimationEvent"in window||(delete Ys.animationend.animation,delete Ys.animationiteration.animation,delete Ys.animationstart.animation),"TransitionEvent"in window||delete Ys.transitionend.transition);function Ss(e){if(Ja[e])return Ja[e];if(!Ys[e])return e;var t=Ys[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Rc)return Ja[e]=t[i];return e}var Mc=Ss("animationend"),Lc=Ss("animationiteration"),Oc=Ss("animationstart"),Kd=Ss("transitionrun"),Vd=Ss("transitionstart"),Xd=Ss("transitioncancel"),Bc=Ss("transitionend"),kc=new Map,el="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(" ");el.push("scrollEnd");function ui(e,t){kc.set(e,t),Gi(t,[e])}var wn=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Qt=[],Ks=0,tl=0;function xn(){for(var e=Ks,t=tl=Ks=0;t<e;){var i=Qt[t];Qt[t++]=null;var s=Qt[t];Qt[t++]=null;var r=Qt[t];Qt[t++]=null;var n=Qt[t];if(Qt[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&&Hc(i,r,n)}}function Dn(e,t,i,s){Qt[Ks++]=e,Qt[Ks++]=t,Qt[Ks++]=i,Qt[Ks++]=s,tl|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function il(e,t,i,s){return Dn(e,t,i,s),An(e)}function ys(e,t){return Dn(e,null,null,t),An(e)}function Hc(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-Ve(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function An(e){if(50<Zr)throw Zr=0,ho=null,Error(G(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Vs={};function Wd(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 It(e,t,i,s){return new Wd(e,t,i,s)}function sl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xi(e,t){var i=e.alternate;return i===null?(i=It(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 Nc(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 Tn(e,t,i,s,r,n){var g=0;if(s=e,typeof e=="function")sl(e)&&(g=1);else if(typeof e=="string")g=$_(e,i,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case D:return e=It(31,i,t,r),e.elementType=D,e.lanes=n,e;case m:return bs(i.children,r,n,t);case o:g=8,r|=24;break;case c:return e=It(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case C:return e=It(13,i,t,r),e.elementType=C,e.lanes=n,e;case b:return e=It(19,i,t,r),e.elementType=b,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:g=10;break e;case a:g=9;break e;case _:g=11;break e;case E: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=It(g,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function bs(e,t,i,s){return e=It(7,e,s,t),e.lanes=i,e}function rl(e,t,i){return e=It(6,e,null,t),e.lanes=i,e}function zc(e){var t=It(18,null,null,0);return t.stateNode=e,t}function nl(e,t,i){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var jc=new WeakMap;function $t(e,t){if(typeof e=="object"&&e!==null){var i=jc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ni(t)},jc.set(e,t),t)}return{value:e,source:t,stack:ni(t)}}var Xs=[],Ws=0,Rn=null,Rr=0,Jt=[],ei=0,Ki=null,vi=1,mi="";function Di(e,t){Xs[Ws++]=Rr,Xs[Ws++]=Rn,Rn=e,Rr=t}function Uc(e,t,i){Jt[ei++]=vi,Jt[ei++]=mi,Jt[ei++]=Ki,Ki=e;var s=vi;e=mi;var r=32-Ve(s)-1;s&=~(1<<r),i+=1;var n=32-Ve(t)+r;if(30<n){var g=r-r%5;n=(s&(1<<g)-1).toString(32),s>>=g,r-=g,vi=1<<32-Ve(t)+r|i<<r|s,mi=n+e}else vi=1<<n|i<<r|s,mi=e}function al(e){e.return!==null&&(Di(e,1),Uc(e,1,0))}function ll(e){for(;e===Rn;)Rn=Xs[--Ws],Xs[Ws]=null,Rr=Xs[--Ws],Xs[Ws]=null;for(;e===Ki;)Ki=Jt[--ei],Jt[ei]=null,mi=Jt[--ei],Jt[ei]=null,vi=Jt[--ei],Jt[ei]=null}function qc(e,t){Jt[ei++]=vi,Jt[ei++]=mi,Jt[ei++]=Ki,vi=t.id,mi=t.overflow,Ki=e}var Ct=null,it=null,ze=!1,Vi=null,ti=!1,ol=Error(G(519));function Xi(e){var t=Error(G(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mr($t(t,e)),ol}function Ic(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[J]=e,t[he]=s,i){case"dialog":ke("cancel",t),ke("close",t);break;case"iframe":case"object":case"embed":ke("load",t);break;case"video":case"audio":for(i=0;i<$r.length;i++)ke($r[i],t);break;case"source":ke("error",t);break;case"img":case"image":case"link":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"input":ke("invalid",t),ec(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":ke("invalid",t);break;case"textarea":ke("invalid",t),ic(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||nf(t.textContent,i)?(s.popover!=null&&(ke("beforetoggle",t),ke("toggle",t)),s.onScroll!=null&&ke("scroll",t),s.onScrollEnd!=null&&ke("scrollend",t),s.onClick!=null&&(t.onclick=Ei),t=!0):t=!1,t||Xi(e,!0)}function Gc(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:ti=!1;return;case 27:case 3:ti=!0;return;default:Ct=Ct.return}}function Ps(e){if(e!==Ct)return!1;if(!ze)return Gc(e),ze=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Ao(e.type,e.memoizedProps)),i=!i),i&&it&&Xi(e),Gc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));it=_f(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));it=_f(e)}else t===27?(t=it,as(e.type)?(e=Oo,Oo=null,it=e):it=t):it=Ct?si(e.stateNode.nextSibling):null;return!0}function Cs(){it=Ct=null,ze=!1}function cl(){var e=Vi;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),Vi=null),e}function Mr(e){Vi===null?Vi=[e]:Vi.push(e)}var ul=w(null),Es=null,Ai=null;function Wi(e,t,i){K(ul,t._currentValue),t._currentValue=i}function Ti(e){e._currentValue=ul.current,L(ul)}function hl(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 fl(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 T=n;n=r;for(var H=0;H<t.length;H++)if(T.context===t[H]){n.lanes|=i,T=n.alternate,T!==null&&(T.lanes|=i),hl(n.return,i,e),s||(g=null);break e}n=T.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),hl(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 Fs(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 T=r.type;qt(r.pendingProps.value,g.value)||(e!==null?e.push(T):e=[T])}}else if(r===I.current){if(g=r.alternate,g===null)throw Error(G(387));g.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(rn):e=[rn])}r=r.return}e!==null&&fl(t,e,i,s),t.flags|=262144}function Mn(e){for(e=e.firstContext;e!==null;){if(!qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ws(e){Es=e,Ai=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return Yc(Es,e)}function Ln(e,t){return Es===null&&ws(e),Yc(e,t)}function Yc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ai===null){if(e===null)throw Error(G(308));Ai=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ai=Ai.next=t;return i}var Pd=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()})}},Fd=te.unstable_scheduleCallback,Zd=te.unstable_NormalPriority,dt={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dl(){return{controller:new Pd,data:new Map,refCount:0}}function Lr(e){e.refCount--,e.refCount===0&&Fd(Zd,function(){e.controller.abort()})}var Or=null,_l=0,Zs=0,Qs=null;function Qd(e,t){if(Or===null){var i=Or=[];_l=0,Zs=po(),Qs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return _l++,t.then(Kc,Kc),t}function Kc(){if(--_l===0&&Or!==null){Qs!==null&&(Qs.status="fulfilled");var e=Or;Or=null,Zs=0,Qs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function $d(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 Vc=j.S;j.S=function(e,t){Th=Je(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Qd(e,t),Vc!==null&&Vc(e,t)};var xs=w(null);function vl(){var e=xs.current;return e!==null?e:$e.pooledCache}function On(e,t){t===null?K(xs,xs.current):K(xs,t.pool)}function Xc(){var e=vl();return e===null?null:{parent:dt._currentValue,pool:e}}var $s=Error(G(460)),ml=Error(G(474)),Bn=Error(G(542)),kn={then:function(){}};function Wc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Pc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Ei,Ei),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zc(e),e;default:if(typeof t.status=="string")t.then(Ei,Ei);else{if(e=$e,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,Zc(e),e}throw As=t,$s}}function Ds(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(As=i,$s):i}}var As=null;function Fc(){if(As===null)throw Error(G(459));var e=As;return As=null,e}function Zc(e){if(e===$s||e===Bn)throw Error(G(483))}var Js=null,Br=0;function Hn(e){var t=Br;return Br+=1,Js===null&&(Js=[]),Pc(Js,e,t)}function kr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Nn(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 Qc(e){function t(Y,U){if(e){var V=Y.deletions;V===null?(Y.deletions=[U],Y.flags|=16):V.push(U)}}function i(Y,U){if(!e)return null;for(;U!==null;)t(Y,U),U=U.sibling;return null}function s(Y){for(var U=new Map;Y!==null;)Y.key!==null?U.set(Y.key,Y):U.set(Y.index,Y),Y=Y.sibling;return U}function r(Y,U){return Y=xi(Y,U),Y.index=0,Y.sibling=null,Y}function n(Y,U,V){return Y.index=V,e?(V=Y.alternate,V!==null?(V=V.index,V<U?(Y.flags|=67108866,U):V):(Y.flags|=67108866,U)):(Y.flags|=1048576,U)}function g(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function T(Y,U,V,re){return U===null||U.tag!==6?(U=rl(V,Y.mode,re),U.return=Y,U):(U=r(U,V),U.return=Y,U)}function H(Y,U,V,re){var ye=V.type;return ye===m?se(Y,U,V.props.children,re,V.key):U!==null&&(U.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===v&&Ds(ye)===U.type)?(U=r(U,V.props),kr(U,V),U.return=Y,U):(U=Tn(V.type,V.key,V.props,null,Y.mode,re),kr(U,V),U.return=Y,U)}function X(Y,U,V,re){return U===null||U.tag!==4||U.stateNode.containerInfo!==V.containerInfo||U.stateNode.implementation!==V.implementation?(U=nl(V,Y.mode,re),U.return=Y,U):(U=r(U,V.children||[]),U.return=Y,U)}function se(Y,U,V,re,ye){return U===null||U.tag!==7?(U=bs(V,Y.mode,re,ye),U.return=Y,U):(U=r(U,V),U.return=Y,U)}function ae(Y,U,V){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=rl(""+U,Y.mode,V),U.return=Y,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case y:return V=Tn(U.type,U.key,U.props,null,Y.mode,V),kr(V,U),V.return=Y,V;case x:return U=nl(U,Y.mode,V),U.return=Y,U;case v:return U=Ds(U),ae(Y,U,V)}if(ne(U)||q(U))return U=bs(U,Y.mode,V,null),U.return=Y,U;if(typeof U.then=="function")return ae(Y,Hn(U),V);if(U.$$typeof===l)return ae(Y,Ln(Y,U),V);Nn(Y,U)}return null}function P(Y,U,V,re){var ye=U!==null?U.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return ye!==null?null:T(Y,U,""+V,re);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case y:return V.key===ye?H(Y,U,V,re):null;case x:return V.key===ye?X(Y,U,V,re):null;case v:return V=Ds(V),P(Y,U,V,re)}if(ne(V)||q(V))return ye!==null?null:se(Y,U,V,re,null);if(typeof V.then=="function")return P(Y,U,Hn(V),re);if(V.$$typeof===l)return P(Y,U,Ln(Y,V),re);Nn(Y,V)}return null}function Z(Y,U,V,re,ye){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Y=Y.get(V)||null,T(U,Y,""+re,ye);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case y:return Y=Y.get(re.key===null?V:re.key)||null,H(U,Y,re,ye);case x:return Y=Y.get(re.key===null?V:re.key)||null,X(U,Y,re,ye);case v:return re=Ds(re),Z(Y,U,V,re,ye)}if(ne(re)||q(re))return Y=Y.get(V)||null,se(U,Y,re,ye,null);if(typeof re.then=="function")return Z(Y,U,V,Hn(re),ye);if(re.$$typeof===l)return Z(Y,U,V,Ln(U,re),ye);Nn(U,re)}return null}function ge(Y,U,V,re){for(var ye=null,qe=null,pe=U,Re=U=0,Ne=null;pe!==null&&Re<V.length;Re++){pe.index>Re?(Ne=pe,pe=null):Ne=pe.sibling;var Ie=P(Y,pe,V[Re],re);if(Ie===null){pe===null&&(pe=Ne);break}e&&pe&&Ie.alternate===null&&t(Y,pe),U=n(Ie,U,Re),qe===null?ye=Ie:qe.sibling=Ie,qe=Ie,pe=Ne}if(Re===V.length)return i(Y,pe),ze&&Di(Y,Re),ye;if(pe===null){for(;Re<V.length;Re++)pe=ae(Y,V[Re],re),pe!==null&&(U=n(pe,U,Re),qe===null?ye=pe:qe.sibling=pe,qe=pe);return ze&&Di(Y,Re),ye}for(pe=s(pe);Re<V.length;Re++)Ne=Z(pe,Y,Re,V[Re],re),Ne!==null&&(e&&Ne.alternate!==null&&pe.delete(Ne.key===null?Re:Ne.key),U=n(Ne,U,Re),qe===null?ye=Ne:qe.sibling=Ne,qe=Ne);return e&&pe.forEach(function(hs){return t(Y,hs)}),ze&&Di(Y,Re),ye}function Ce(Y,U,V,re){if(V==null)throw Error(G(151));for(var ye=null,qe=null,pe=U,Re=U=0,Ne=null,Ie=V.next();pe!==null&&!Ie.done;Re++,Ie=V.next()){pe.index>Re?(Ne=pe,pe=null):Ne=pe.sibling;var hs=P(Y,pe,Ie.value,re);if(hs===null){pe===null&&(pe=Ne);break}e&&pe&&hs.alternate===null&&t(Y,pe),U=n(hs,U,Re),qe===null?ye=hs:qe.sibling=hs,qe=hs,pe=Ne}if(Ie.done)return i(Y,pe),ze&&Di(Y,Re),ye;if(pe===null){for(;!Ie.done;Re++,Ie=V.next())Ie=ae(Y,Ie.value,re),Ie!==null&&(U=n(Ie,U,Re),qe===null?ye=Ie:qe.sibling=Ie,qe=Ie);return ze&&Di(Y,Re),ye}for(pe=s(pe);!Ie.done;Re++,Ie=V.next())Ie=Z(pe,Y,Re,Ie.value,re),Ie!==null&&(e&&Ie.alternate!==null&&pe.delete(Ie.key===null?Re:Ie.key),U=n(Ie,U,Re),qe===null?ye=Ie:qe.sibling=Ie,qe=Ie);return e&&pe.forEach(function(cv){return t(Y,cv)}),ze&&Di(Y,Re),ye}function Ze(Y,U,V,re){if(typeof V=="object"&&V!==null&&V.type===m&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case y:e:{for(var ye=V.key;U!==null;){if(U.key===ye){if(ye=V.type,ye===m){if(U.tag===7){i(Y,U.sibling),re=r(U,V.props.children),re.return=Y,Y=re;break e}}else if(U.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===v&&Ds(ye)===U.type){i(Y,U.sibling),re=r(U,V.props),kr(re,V),re.return=Y,Y=re;break e}i(Y,U);break}else t(Y,U);U=U.sibling}V.type===m?(re=bs(V.props.children,Y.mode,re,V.key),re.return=Y,Y=re):(re=Tn(V.type,V.key,V.props,null,Y.mode,re),kr(re,V),re.return=Y,Y=re)}return g(Y);case x:e:{for(ye=V.key;U!==null;){if(U.key===ye)if(U.tag===4&&U.stateNode.containerInfo===V.containerInfo&&U.stateNode.implementation===V.implementation){i(Y,U.sibling),re=r(U,V.children||[]),re.return=Y,Y=re;break e}else{i(Y,U);break}else t(Y,U);U=U.sibling}re=nl(V,Y.mode,re),re.return=Y,Y=re}return g(Y);case v:return V=Ds(V),Ze(Y,U,V,re)}if(ne(V))return ge(Y,U,V,re);if(q(V)){if(ye=q(V),typeof ye!="function")throw Error(G(150));return V=ye.call(V),Ce(Y,U,V,re)}if(typeof V.then=="function")return Ze(Y,U,Hn(V),re);if(V.$$typeof===l)return Ze(Y,U,Ln(Y,V),re);Nn(Y,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,U!==null&&U.tag===6?(i(Y,U.sibling),re=r(U,V),re.return=Y,Y=re):(i(Y,U),re=rl(V,Y.mode,re),re.return=Y,Y=re),g(Y)):i(Y,U)}return function(Y,U,V,re){try{Br=0;var ye=Ze(Y,U,V,re);return Js=null,ye}catch(pe){if(pe===$s||pe===Bn)throw pe;var qe=It(29,pe,null,Y.mode);return qe.lanes=re,qe.return=Y,qe}}}var Ts=Qc(!0),$c=Qc(!1),Pi=!1;function gl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pl(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 Fi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Zi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ye&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=An(e),Hc(e,null,i),t}return Dn(e,s,t,i),An(e)}function Hr(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,hn(e,i)}}function Sl(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 yl=!1;function Nr(){if(yl){var e=Qs;if(e!==null)throw e}}function zr(e,t,i,s){yl=!1;var r=e.updateQueue;Pi=!1;var n=r.firstBaseUpdate,g=r.lastBaseUpdate,T=r.shared.pending;if(T!==null){r.shared.pending=null;var H=T,X=H.next;H.next=null,g===null?n=X:g.next=X,g=H;var se=e.alternate;se!==null&&(se=se.updateQueue,T=se.lastBaseUpdate,T!==g&&(T===null?se.firstBaseUpdate=X:T.next=X,se.lastBaseUpdate=H))}if(n!==null){var ae=r.baseState;g=0,se=X=H=null,T=n;do{var P=T.lane&-536870913,Z=P!==T.lane;if(Z?(He&P)===P:(s&P)===P){P!==0&&P===Zs&&(yl=!0),se!==null&&(se=se.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var ge=e,Ce=T;P=t;var Ze=i;switch(Ce.tag){case 1:if(ge=Ce.payload,typeof ge=="function"){ae=ge.call(Ze,ae,P);break e}ae=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Ce.payload,P=typeof ge=="function"?ge.call(Ze,ae,P):ge,P==null)break e;ae=u({},ae,P);break e;case 2:Pi=!0}}P=T.callback,P!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=r.callbacks,Z===null?r.callbacks=[P]:Z.push(P))}else Z={lane:P,tag:T.tag,payload:T.payload,callback:T.callback,next:null},se===null?(X=se=Z,H=ae):se=se.next=Z,g|=P;if(T=T.next,T===null){if(T=r.shared.pending,T===null)break;Z=T,T=Z.next,Z.next=null,r.lastBaseUpdate=Z,r.shared.pending=null}}while(!0);se===null&&(H=ae),r.baseState=H,r.firstBaseUpdate=X,r.lastBaseUpdate=se,n===null&&(r.shared.lanes=0),ts|=g,e.lanes=g,e.memoizedState=ae}}function Jc(e,t){if(typeof e!="function")throw Error(G(191,e));e.call(t)}function eu(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Jc(i[e],t)}var er=w(null),zn=w(0);function tu(e,t){e=zi,K(zn,e),K(er,t),zi=e|t.baseLanes}function bl(){K(zn,zi),K(er,er.current)}function Cl(){zi=zn.current,L(er),L(zn)}var Gt=w(null),ii=null;function Qi(e){var t=e.alternate;K(ut,ut.current&1),K(Gt,e),ii===null&&(t===null||er.current!==null||t.memoizedState!==null)&&(ii=e)}function El(e){K(ut,ut.current),K(Gt,e),ii===null&&(ii=e)}function iu(e){e.tag===22?(K(ut,ut.current),K(Gt,e),ii===null&&(ii=e)):$i()}function $i(){K(ut,ut.current),K(Gt,Gt.current)}function Yt(e){L(Gt),ii===e&&(ii=null),L(ut)}var ut=w(0);function jn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Mo(i)||Lo(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 Ri=0,Te=null,Pe=null,_t=null,Un=!1,tr=!1,Rs=!1,qn=0,jr=0,ir=null,Jd=0;function ot(){throw Error(G(321))}function wl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!qt(e[i],t[i]))return!1;return!0}function xl(e,t,i,s,r,n){return Ri=n,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Uu:ql,Rs=!1,n=i(s,r),Rs=!1,tr&&(n=ru(t,i,s,r)),su(e),n}function su(e){j.H=Ir;var t=Pe!==null&&Pe.next!==null;if(Ri=0,_t=Pe=Te=null,Un=!1,jr=0,ir=null,t)throw Error(G(300));e===null||vt||(e=e.dependencies,e!==null&&Mn(e)&&(vt=!0))}function ru(e,t,i,s){Te=e;var r=0;do{if(tr&&(ir=null),jr=0,tr=!1,25<=r)throw Error(G(301));if(r+=1,_t=Pe=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}j.H=qu,n=t(i,s)}while(tr);return n}function e_(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?Ur(t):t,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(Te.flags|=1024),t}function Dl(){var e=qn!==0;return qn=0,e}function Al(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Tl(e){if(Un){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Un=!1}Ri=0,_t=Pe=Te=null,tr=!1,jr=qn=0,ir=null}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Te.memoizedState=_t=e:_t=_t.next=e,_t}function ht(){if(Pe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=_t===null?Te.memoizedState:_t.next;if(t!==null)_t=t,Pe=e;else{if(e===null)throw Te.alternate===null?Error(G(467)):Error(G(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},_t===null?Te.memoizedState=_t=e:_t=_t.next=e}return _t}function In(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ur(e){var t=jr;return jr+=1,ir===null&&(ir=[]),e=Pc(ir,e,t),t=Te,(_t===null?t.memoizedState:_t.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Uu:ql),e}function Gn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ur(e);if(e.$$typeof===l)return Et(e)}throw Error(G(438,String(e)))}function Rl(e){var t=null,i=Te.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Te.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=In(),Te.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=z;return t.index++,i}function Mi(e,t){return typeof t=="function"?t(e):t}function Yn(e){var t=ht();return Ml(t,Pe,e)}function Ml(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 T=g=null,H=null,X=t,se=!1;do{var ae=X.lane&-536870913;if(ae!==X.lane?(He&ae)===ae:(Ri&ae)===ae){var P=X.revertLane;if(P===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ae===Zs&&(se=!0);else if((Ri&P)===P){X=X.next,P===Zs&&(se=!0);continue}else ae={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},H===null?(T=H=ae,g=n):H=H.next=ae,Te.lanes|=P,ts|=P;ae=X.action,Rs&&i(n,ae),n=X.hasEagerState?X.eagerState:i(n,ae)}else P={lane:ae,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},H===null?(T=H=P,g=n):H=H.next=P,Te.lanes|=ae,ts|=ae;X=X.next}while(X!==null&&X!==t);if(H===null?g=n:H.next=T,!qt(n,e.memoizedState)&&(vt=!0,se&&(i=Qs,i!==null)))throw i;e.memoizedState=n,e.baseState=g,e.baseQueue=H,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Ll(e){var t=ht(),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);qt(n,t.memoizedState)||(vt=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function nu(e,t,i){var s=Te,r=ht(),n=ze;if(n){if(i===void 0)throw Error(G(407));i=i()}else i=t();var g=!qt((Pe||r).memoizedState,i);if(g&&(r.memoizedState=i,vt=!0),r=r.queue,kl(ou.bind(null,s,r,e),[e]),r.getSnapshot!==t||g||_t!==null&&_t.memoizedState.tag&1){if(s.flags|=2048,sr(9,{destroy:void 0},lu.bind(null,s,r,i,t),null),$e===null)throw Error(G(349));n||(Ri&127)!==0||au(s,t,i)}return i}function au(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=In(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function lu(e,t,i,s){t.value=i,t.getSnapshot=s,cu(t)&&uu(e)}function ou(e,t,i){return i(function(){cu(t)&&uu(e)})}function cu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!qt(e,i)}catch{return!0}}function uu(e){var t=ys(e,2);t!==null&&jt(t,e,2)}function Ol(e){var t=Mt();if(typeof e=="function"){var i=e;if(e=i(),Rs){_i(!0);try{i()}finally{_i(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:e},t}function hu(e,t,i,s){return e.baseState=i,Ml(e,Pe,typeof s=="function"?s:Mi)}function t_(e,t,i,s,r){if(Xn(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)}};j.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,fu(t,n)):(n.next=i.next,t.pending=i.next=n)}}function fu(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=j.T,g={};j.T=g;try{var T=i(r,s),H=j.S;H!==null&&H(g,T),du(e,t,T)}catch(X){Bl(e,t,X)}finally{n!==null&&g.types!==null&&(n.types=g.types),j.T=n}}else try{n=i(r,s),du(e,t,n)}catch(X){Bl(e,t,X)}}function du(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){_u(e,t,s)},function(s){return Bl(e,t,s)}):_u(e,t,i)}function _u(e,t,i){t.status="fulfilled",t.value=i,vu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,fu(e,i)))}function Bl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,vu(t),t=t.next;while(t!==s)}e.action=null}function vu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mu(e,t){return t}function gu(e,t){if(ze){var i=$e.formState;if(i!==null){e:{var s=Te;if(ze){if(it){t:{for(var r=it,n=ti;r.nodeType!==8;){if(!n){r=null;break t}if(r=si(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){it=si(r.nextSibling),s=r.data==="F!";break e}}Xi(s)}s=!1}s&&(t=i[0])}}return i=Mt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mu,lastRenderedState:t},i.queue=s,i=Nu.bind(null,Te,s),s.dispatch=i,s=Ol(!1),n=Ul.bind(null,Te,!1,s.queue),s=Mt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=t_.bind(null,Te,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function pu(e){var t=ht();return Su(t,Pe,e)}function Su(e,t,i){if(t=Ml(e,t,mu)[0],e=Yn(Mi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ur(t)}catch(g){throw g===$s?Bn:g}else s=t;t=ht();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,sr(9,{destroy:void 0},i_.bind(null,r,i),null)),[s,n,e]}function i_(e,t){e.action=t}function yu(e){var t=ht(),i=Pe;if(i!==null)return Su(t,i,e);ht(),t=t.memoizedState,i=ht();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function sr(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Te.updateQueue,t===null&&(t=In(),Te.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function bu(){return ht().memoizedState}function Kn(e,t,i,s){var r=Mt();Te.flags|=e,r.memoizedState=sr(1|t,{destroy:void 0},i,s===void 0?null:s)}function Vn(e,t,i,s){var r=ht();s=s===void 0?null:s;var n=r.memoizedState.inst;Pe!==null&&s!==null&&wl(s,Pe.memoizedState.deps)?r.memoizedState=sr(t,n,i,s):(Te.flags|=e,r.memoizedState=sr(1|t,n,i,s))}function Cu(e,t){Kn(8390656,8,e,t)}function kl(e,t){Vn(2048,8,e,t)}function s_(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=In(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Eu(e){var t=ht().memoizedState;return s_({ref:t,nextImpl:e}),function(){if((Ye&2)!==0)throw Error(G(440));return t.impl.apply(void 0,arguments)}}function wu(e,t){return Vn(4,2,e,t)}function xu(e,t){return Vn(4,4,e,t)}function Du(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 Au(e,t,i){i=i!=null?i.concat([e]):null,Vn(4,4,Du.bind(null,t,e),i)}function Hl(){}function Tu(e,t){var i=ht();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&wl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Ru(e,t){var i=ht();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&wl(t,s[1]))return s[0];if(s=e(),Rs){_i(!0);try{e()}finally{_i(!1)}}return i.memoizedState=[s,t],s}function Nl(e,t,i){return i===void 0||(Ri&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Mh(),Te.lanes|=e,ts|=e,i)}function Mu(e,t,i,s){return qt(i,t)?i:er.current!==null?(e=Nl(e,i,s),qt(e,t)||(vt=!0),e):(Ri&42)===0||(Ri&1073741824)!==0&&(He&261930)===0?(vt=!0,e.memoizedState=i):(e=Mh(),Te.lanes|=e,ts|=e,t)}function Lu(e,t,i,s,r){var n=W.p;W.p=n!==0&&8>n?n:8;var g=j.T,T={};j.T=T,Ul(e,!1,t,i);try{var H=r(),X=j.S;if(X!==null&&X(T,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var se=$d(H,s);qr(e,t,se,Xt(e))}else qr(e,t,s,Xt(e))}catch(ae){qr(e,t,{then:function(){},status:"rejected",reason:ae},Xt())}finally{W.p=n,g!==null&&T.types!==null&&(g.types=T.types),j.T=g}}function r_(){}function zl(e,t,i,s){if(e.tag!==5)throw Error(G(476));var r=Ou(e).queue;Lu(e,r,t,ee,i===null?r_:function(){return Bu(e),i(s)})}function Ou(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:ee},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bu(e){var t=Ou(e);t.next===null&&(t=e.alternate.memoizedState),qr(e,t.next.queue,{},Xt())}function jl(){return Et(rn)}function ku(){return ht().memoizedState}function Hu(){return ht().memoizedState}function n_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Xt();e=Fi(i);var s=Zi(t,e,i);s!==null&&(jt(s,t,i),Hr(s,t,i)),t={cache:dl()},e.payload=t;return}t=t.return}}function a_(e,t,i){var s=Xt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Xn(e)?zu(t,i):(i=il(e,t,i,s),i!==null&&(jt(i,e,s),ju(i,t,s)))}function Nu(e,t,i){var s=Xt();qr(e,t,i,s)}function qr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Xn(e))zu(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,T=n(g,i);if(r.hasEagerState=!0,r.eagerState=T,qt(T,g))return Dn(e,t,r,0),$e===null&&xn(),!1}catch{}if(i=il(e,t,r,s),i!==null)return jt(i,e,s),ju(i,t,s),!0}return!1}function Ul(e,t,i,s){if(s={lane:2,revertLane:po(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Xn(e)){if(t)throw Error(G(479))}else t=il(e,i,s,2),t!==null&&jt(t,e,2)}function Xn(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function zu(e,t){tr=Un=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function ju(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,hn(e,i)}}var Ir={readContext:Et,use:Gn,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};Ir.useEffectEvent=ot;var Uu={readContext:Et,use:Gn,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:Cu,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Kn(4194308,4,Du.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Kn(4194308,4,e,t)},useInsertionEffect:function(e,t){Kn(4,2,e,t)},useMemo:function(e,t){var i=Mt();t=t===void 0?null:t;var s=e();if(Rs){_i(!0);try{e()}finally{_i(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Mt();if(i!==void 0){var r=i(t);if(Rs){_i(!0);try{i(t)}finally{_i(!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=a_.bind(null,Te,e),[s.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ol(e);var t=e.queue,i=Nu.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Hl,useDeferredValue:function(e,t){var i=Mt();return Nl(i,e,t)},useTransition:function(){var e=Ol(!1);return e=Lu.bind(null,Te,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Te,r=Mt();if(ze){if(i===void 0)throw Error(G(407));i=i()}else{if(i=t(),$e===null)throw Error(G(349));(He&127)!==0||au(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,Cu(ou.bind(null,s,n,e),[e]),s.flags|=2048,sr(9,{destroy:void 0},lu.bind(null,s,n,i,t),null),i},useId:function(){var e=Mt(),t=$e.identifierPrefix;if(ze){var i=mi,s=vi;i=(s&~(1<<32-Ve(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=qn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Jd++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:jl,useFormState:gu,useActionState:gu,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ul.bind(null,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:Rl,useCacheRefresh:function(){return Mt().memoizedState=n_.bind(null,Te)},useEffectEvent:function(e){var t=Mt(),i={impl:e};return t.memoizedState=i,function(){if((Ye&2)!==0)throw Error(G(440));return i.impl.apply(void 0,arguments)}}},ql={readContext:Et,use:Gn,useCallback:Tu,useContext:Et,useEffect:kl,useImperativeHandle:Au,useInsertionEffect:wu,useLayoutEffect:xu,useMemo:Ru,useReducer:Yn,useRef:bu,useState:function(){return Yn(Mi)},useDebugValue:Hl,useDeferredValue:function(e,t){var i=ht();return Mu(i,Pe.memoizedState,e,t)},useTransition:function(){var e=Yn(Mi)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:Ur(e),t]},useSyncExternalStore:nu,useId:ku,useHostTransitionStatus:jl,useFormState:pu,useActionState:pu,useOptimistic:function(e,t){var i=ht();return hu(i,Pe,e,t)},useMemoCache:Rl,useCacheRefresh:Hu};ql.useEffectEvent=Eu;var qu={readContext:Et,use:Gn,useCallback:Tu,useContext:Et,useEffect:kl,useImperativeHandle:Au,useInsertionEffect:wu,useLayoutEffect:xu,useMemo:Ru,useReducer:Ll,useRef:bu,useState:function(){return Ll(Mi)},useDebugValue:Hl,useDeferredValue:function(e,t){var i=ht();return Pe===null?Nl(i,e,t):Mu(i,Pe.memoizedState,e,t)},useTransition:function(){var e=Ll(Mi)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:Ur(e),t]},useSyncExternalStore:nu,useId:ku,useHostTransitionStatus:jl,useFormState:yu,useActionState:yu,useOptimistic:function(e,t){var i=ht();return Pe!==null?hu(i,Pe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Rl,useCacheRefresh:Hu};qu.useEffectEvent=Eu;function Il(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:u({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Gl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Xt(),r=Fi(s);r.payload=t,i!=null&&(r.callback=i),t=Zi(e,r,s),t!==null&&(jt(t,e,s),Hr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Xt(),r=Fi(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Zi(e,r,s),t!==null&&(jt(t,e,s),Hr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Xt(),s=Fi(i);s.tag=2,t!=null&&(s.callback=t),t=Zi(e,s,i),t!==null&&(jt(t,e,i),Hr(t,e,i))}};function Iu(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?!Ar(i,s)||!Ar(r,n):!0}function Gu(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&&Gl.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=u({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Yu(e){wn(e)}function Ku(e){console.error(e)}function Vu(e){wn(e)}function Wn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Xu(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 Yl(e,t,i){return i=Fi(i),i.tag=3,i.payload={element:null},i.callback=function(){Wn(e,t)},i}function Wu(e){return e=Fi(e),e.tag=3,e}function Pu(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(){Xu(t,i,s)}}var g=i.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Xu(t,i,s),typeof r!="function"&&(is===null?is=new Set([this]):is.add(this));var T=s.stack;this.componentDidCatch(s.value,{componentStack:T!==null?T:""})})}function l_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Fs(t,i,r,!0),i=Gt.current,i!==null){switch(i.tag){case 31:case 13:return ii===null?na():i.alternate===null&&ct===0&&(ct=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===kn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),vo(e,s,r)),!1;case 22:return i.flags|=65536,s===kn?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)),vo(e,s,r)),!1}throw Error(G(435,i.tag))}return vo(e,s,r),na(),!1}if(ze)return t=Gt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==ol&&(e=Error(G(422),{cause:s}),Mr($t(e,i)))):(s!==ol&&(t=Error(G(423),{cause:s}),Mr($t(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=$t(s,i),r=Yl(e.stateNode,s,r),Sl(e,r),ct!==4&&(ct=2)),!1;var n=Error(G(520),{cause:s});if(n=$t(n,i),Fr===null?Fr=[n]:Fr.push(n),ct!==4&&(ct=2),t===null)return!0;s=$t(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=Yl(i.stateNode,s,e),Sl(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"&&(is===null||!is.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Wu(r),Pu(r,e,i,s),Sl(i,r),!1}i=i.return}while(i!==null);return!1}var Kl=Error(G(461)),vt=!1;function wt(e,t,i,s){t.child=e===null?$c(t,null,i,s):Ts(t,e.child,i,s)}function Fu(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var g={};for(var T in s)T!=="ref"&&(g[T]=s[T])}else g=s;return ws(t),s=xl(e,t,i,g,n,r),T=Dl(),e!==null&&!vt?(Al(e,t,r),Li(e,t,r)):(ze&&T&&al(t),t.flags|=1,wt(e,t,s,r),t.child)}function Zu(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!sl(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Qu(e,t,n,s,r)):(e=Tn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!$l(e,r)){var g=n.memoizedProps;if(i=i.compare,i=i!==null?i:Ar,i(g,s)&&e.ref===t.ref)return Li(e,t,r)}return t.flags|=1,e=xi(n,s),e.ref=t.ref,e.return=t,t.child=e}function Qu(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(Ar(n,s)&&e.ref===t.ref)if(vt=!1,t.pendingProps=s=n,$l(e,r))(e.flags&131072)!==0&&(vt=!0);else return t.lanes=e.lanes,Li(e,t,r)}return Vl(e,t,i,s,r)}function $u(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 Ju(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&On(t,n!==null?n.cachePool:null),n!==null?tu(t,n):bl(),iu(t);else return s=t.lanes=536870912,Ju(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(On(t,n.cachePool),tu(t,n),$i(),t.memoizedState=null):(e!==null&&On(t,null),bl(),$i());return wt(e,t,r,i),t.child}function Gr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ju(e,t,i,s,r){var n=vl();return n=n===null?null:{parent:dt._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&On(t,null),bl(),iu(t),e!==null&&Fs(e,t,s,!0),t.childLanes=r,null}function Pn(e,t){return t=Zn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function eh(e,t,i){return Ts(t,e.child,null,i),e=Pn(t,t.pendingProps),e.flags|=2,Yt(t),t.memoizedState=null,e}function o_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(s.mode==="hidden")return e=Pn(t,s),t.lanes=536870912,Gr(null,e);if(El(t),(e=it)?(e=df(e,ti),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki!==null?{id:vi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},i=zc(e),i.return=t,t.child=i,Ct=t,it=null)):e=null,e===null)throw Xi(t);return t.lanes=536870912,null}return Pn(t,s)}var n=e.memoizedState;if(n!==null){var g=n.dehydrated;if(El(t),r)if(t.flags&256)t.flags&=-257,t=eh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(G(558));else if(vt||Fs(e,t,i,!1),r=(i&e.childLanes)!==0,vt||r){if(s=$e,s!==null&&(g=pr(s,i),g!==0&&g!==n.retryLane))throw n.retryLane=g,ys(e,g),jt(s,e,g),Kl;na(),t=eh(e,t,i)}else e=n.treeContext,it=si(g.nextSibling),Ct=t,ze=!0,Vi=null,ti=!1,e!==null&&qc(t,e),t=Pn(t,s),t.flags|=4096;return t}return e=xi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Fn(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 Vl(e,t,i,s,r){return ws(t),i=xl(e,t,i,s,void 0,r),s=Dl(),e!==null&&!vt?(Al(e,t,r),Li(e,t,r)):(ze&&s&&al(t),t.flags|=1,wt(e,t,i,r),t.child)}function th(e,t,i,s,r,n){return ws(t),t.updateQueue=null,i=ru(t,s,i,r),su(e),s=Dl(),e!==null&&!vt?(Al(e,t,n),Li(e,t,n)):(ze&&s&&al(t),t.flags|=1,wt(e,t,i,n),t.child)}function ih(e,t,i,s,r){if(ws(t),t.stateNode===null){var n=Vs,g=i.contextType;typeof g=="object"&&g!==null&&(n=Et(g)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Gl,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},gl(t),g=i.contextType,n.context=typeof g=="object"&&g!==null?Et(g):Vs,n.state=t.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(Il(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&&Gl.enqueueReplaceState(n,n.state,null),zr(t,s,n,r),Nr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var T=t.memoizedProps,H=Ms(i,T);n.props=H;var X=n.context,se=i.contextType;g=Vs,typeof se=="object"&&se!==null&&(g=Et(se));var ae=i.getDerivedStateFromProps;se=typeof ae=="function"||typeof n.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,se||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(T||X!==g)&&Gu(t,n,s,g),Pi=!1;var P=t.memoizedState;n.state=P,zr(t,s,n,r),Nr(),X=t.memoizedState,T||P!==X||Pi?(typeof ae=="function"&&(Il(t,i,ae,s),X=t.memoizedState),(H=Pi||Iu(t,i,H,s,P,X,g))?(se||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=X),n.props=s,n.state=X,n.context=g,s=H):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,pl(e,t),g=t.memoizedProps,se=Ms(i,g),n.props=se,ae=t.pendingProps,P=n.context,X=i.contextType,H=Vs,typeof X=="object"&&X!==null&&(H=Et(X)),T=i.getDerivedStateFromProps,(X=typeof T=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(g!==ae||P!==H)&&Gu(t,n,s,H),Pi=!1,P=t.memoizedState,n.state=P,zr(t,s,n,r),Nr();var Z=t.memoizedState;g!==ae||P!==Z||Pi||e!==null&&e.dependencies!==null&&Mn(e.dependencies)?(typeof T=="function"&&(Il(t,i,T,s),Z=t.memoizedState),(se=Pi||Iu(t,i,se,s,P,Z,H)||e!==null&&e.dependencies!==null&&Mn(e.dependencies))?(X||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,Z,H),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,Z,H)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=Z),n.props=s,n.state=Z,n.context=H,s=se):(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,Fn(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=Ts(t,e.child,null,r),t.child=Ts(t,null,i,r)):wt(e,t,i,r),t.memoizedState=n.state,e=t.child):e=Li(e,t,r),e}function sh(e,t,i,s){return Cs(),t.flags|=256,wt(e,t,i,s),t.child}var Xl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wl(e){return{baseLanes:e,cachePool:Xc()}}function Pl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Vt),e}function rh(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:(ut.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(r?Qi(t):$i(),(e=it)?(e=df(e,ti),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki!==null?{id:vi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},i=zc(e),i.return=t,t.child=i,Ct=t,it=null)):e=null,e===null)throw Xi(t);return Lo(e)?t.lanes=32:t.lanes=536870912,null}var T=s.children;return s=s.fallback,r?($i(),r=t.mode,T=Zn({mode:"hidden",children:T},r),s=bs(s,r,i,null),T.return=t,s.return=t,T.sibling=s,t.child=T,s=t.child,s.memoizedState=Wl(i),s.childLanes=Pl(e,g,i),t.memoizedState=Xl,Gr(null,s)):(Qi(t),Fl(t,T))}var H=e.memoizedState;if(H!==null&&(T=H.dehydrated,T!==null)){if(n)t.flags&256?(Qi(t),t.flags&=-257,t=Zl(e,t,i)):t.memoizedState!==null?($i(),t.child=e.child,t.flags|=128,t=null):($i(),T=s.fallback,r=t.mode,s=Zn({mode:"visible",children:s.children},r),T=bs(T,r,i,null),T.flags|=2,s.return=t,T.return=t,s.sibling=T,t.child=s,Ts(t,e.child,null,i),s=t.child,s.memoizedState=Wl(i),s.childLanes=Pl(e,g,i),t.memoizedState=Xl,t=Gr(null,s));else if(Qi(t),Lo(T)){if(g=T.nextSibling&&T.nextSibling.dataset,g)var X=g.dgst;g=X,s=Error(G(419)),s.stack="",s.digest=g,Mr({value:s,source:null,stack:null}),t=Zl(e,t,i)}else if(vt||Fs(e,t,i,!1),g=(i&e.childLanes)!==0,vt||g){if(g=$e,g!==null&&(s=pr(g,i),s!==0&&s!==H.retryLane))throw H.retryLane=s,ys(e,s),jt(g,e,s),Kl;Mo(T)||na(),t=Zl(e,t,i)}else Mo(T)?(t.flags|=192,t.child=e.child,t=null):(e=H.treeContext,it=si(T.nextSibling),Ct=t,ze=!0,Vi=null,ti=!1,e!==null&&qc(t,e),t=Fl(t,s.children),t.flags|=4096);return t}return r?($i(),T=s.fallback,r=t.mode,H=e.child,X=H.sibling,s=xi(H,{mode:"hidden",children:s.children}),s.subtreeFlags=H.subtreeFlags&65011712,X!==null?T=xi(X,T):(T=bs(T,r,i,null),T.flags|=2),T.return=t,s.return=t,s.sibling=T,t.child=s,Gr(null,s),s=t.child,T=e.child.memoizedState,T===null?T=Wl(i):(r=T.cachePool,r!==null?(H=dt._currentValue,r=r.parent!==H?{parent:H,pool:H}:r):r=Xc(),T={baseLanes:T.baseLanes|i,cachePool:r}),s.memoizedState=T,s.childLanes=Pl(e,g,i),t.memoizedState=Xl,Gr(e.child,s)):(Qi(t),i=e.child,e=i.sibling,i=xi(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 Fl(e,t){return t=Zn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Zn(e,t){return e=It(22,e,null,t),e.lanes=0,e}function Zl(e,t,i){return Ts(t,e.child,null,i),e=Fl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nh(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),hl(e.return,t,i)}function Ql(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 ah(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var g=ut.current,T=(g&2)!==0;if(T?(g=g&1|2,t.flags|=128):g&=1,K(ut,g),wt(e,t,s,i),s=ze?Rr:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nh(e,i,t);else if(e.tag===19)nh(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&&jn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),Ql(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&&jn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}Ql(t,!0,i,null,n,s);break;case"together":Ql(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Li(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ts|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Fs(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=xi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=xi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function $l(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Mn(e)))}function c_(e,t,i){switch(t.tag){case 3:R(t,t.stateNode.containerInfo),Wi(t,dt,e.memoizedState.cache),Cs();break;case 27:case 5:oe(t);break;case 4:R(t,t.stateNode.containerInfo);break;case 10:Wi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,El(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Qi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?rh(e,t,i):(Qi(t),e=Li(e,t,i),e!==null?e.sibling:null);Qi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Fs(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return ah(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),K(ut,ut.current),s)break;return null;case 22:return t.lanes=0,$u(e,t,i,t.pendingProps);case 24:Wi(t,dt,e.memoizedState.cache)}return Li(e,t,i)}function lh(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!$l(e,i)&&(t.flags&128)===0)return vt=!1,c_(e,t,i);vt=(e.flags&131072)!==0}else vt=!1,ze&&(t.flags&1048576)!==0&&Uc(t,Rr,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")sl(e)?(s=Ms(e,s),t.tag=1,t=ih(null,t,e,s,i)):(t.tag=0,t=Vl(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=Fu(null,t,e,s,i);break e}else if(r===E){t.tag=14,t=Zu(null,t,e,s,i);break e}}throw t=F(e)||e,Error(G(306,t,""))}}return t;case 0:return Vl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Ms(s,t.pendingProps),ih(e,t,s,r,i);case 3:e:{if(R(t,t.stateNode.containerInfo),e===null)throw Error(G(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,pl(e,t),zr(t,s,null,i);var g=t.memoizedState;if(s=g.cache,Wi(t,dt,s),s!==n.cache&&fl(t,[dt],i,!0),Nr(),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=sh(e,t,s,i);break e}else if(s!==r){r=$t(Error(G(424)),t),Mr(r),t=sh(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,it=si(e.firstChild),Ct=t,ze=!0,Vi=null,ti=!0,i=$c(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Cs(),s===r){t=Li(e,t,i);break e}wt(e,t,s,i)}t=t.child}return t;case 26:return Fn(e,t),e===null?(i=Sf(t.type,null,t.pendingProps,null))?t.memoizedState=i:ze||(i=t.type,e=t.pendingProps,s=fa(fe.current).createElement(i),s[J]=t,s[he]=e,xt(s,i,e),nt(s),t.stateNode=s):t.memoizedState=Sf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return oe(t),e===null&&ze&&(s=t.stateNode=mf(t.type,t.pendingProps,fe.current),Ct=t,ti=!0,r=it,as(t.type)?(Oo=r,it=si(s.firstChild)):it=r),wt(e,t,t.pendingProps.children,i),Fn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((r=s=it)&&(s=U_(s,t.type,t.pendingProps,ti),s!==null?(t.stateNode=s,Ct=t,it=si(s.firstChild),ti=!1,r=!0):r=!1),r||Xi(t)),oe(t),r=t.type,n=t.pendingProps,g=e!==null?e.memoizedProps:null,s=n.children,Ao(r,n)?s=null:g!==null&&Ao(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=xl(e,t,e_,null,null,i),rn._currentValue=r),Fn(e,t),wt(e,t,s,i),t.child;case 6:return e===null&&ze&&((e=i=it)&&(i=q_(i,t.pendingProps,ti),i!==null?(t.stateNode=i,Ct=t,it=null,e=!0):e=!1),e||Xi(t)),null;case 13:return rh(e,t,i);case 4:return R(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ts(t,null,s,i):wt(e,t,s,i),t.child;case 11:return Fu(e,t,t.type,t.pendingProps,i);case 7:return wt(e,t,t.pendingProps,i),t.child;case 8:return wt(e,t,t.pendingProps.children,i),t.child;case 12:return wt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Wi(t,t.type,s.value),wt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,ws(t),r=Et(r),s=s(r),t.flags|=1,wt(e,t,s,i),t.child;case 14:return Zu(e,t,t.type,t.pendingProps,i);case 15:return Qu(e,t,t.type,t.pendingProps,i);case 19:return ah(e,t,i);case 31:return o_(e,t,i);case 22:return $u(e,t,i,t.pendingProps);case 24:return ws(t),s=Et(dt),e===null?(r=vl(),r===null&&(r=$e,n=dl(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},gl(t),Wi(t,dt,r)):((e.lanes&i)!==0&&(pl(e,t),zr(t,null,null,i),Nr()),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),Wi(t,dt,s)):(s=n.cache,Wi(t,dt,s),s!==r.cache&&fl(t,[dt],i,!0))),wt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(G(156,t.tag))}function Oi(e){e.flags|=4}function Jl(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(kh())e.flags|=8192;else throw As=kn,ml}else e.flags&=-16777217}function oh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wf(t))if(kh())e.flags|=8192;else throw As=kn,ml}function Qn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ds():536870912,e.lanes|=t,lr|=t)}function Yr(e,t){if(!ze)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 st(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 u_(e,t,i){var s=t.pendingProps;switch(ll(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return st(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ti(dt),$(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ps(t)?Oi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,cl())),st(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(Oi(t),n!==null?(st(t),oh(t,n)):(st(t),Jl(t,r,null,s,i))):n?n!==e.memoizedState?(Oi(t),st(t),oh(t,n)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Oi(t),st(t),Jl(t,r,e,s,i)),null;case 27:if(ve(t),i=fe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Oi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return st(t),null}e=Q.current,Ps(t)?Ic(t):(e=mf(r,s,i),t.stateNode=e,Oi(t))}return st(t),null;case 5:if(ve(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Oi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return st(t),null}if(n=Q.current,Ps(t))Ic(t);else{var g=fa(fe.current);switch(n){case 1:n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=g.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?g.createElement("select",{is:s.is}):g.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?g.createElement(r,{is:s.is}):g.createElement(r)}}n[J]=t,n[he]=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(xt(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&&Oi(t)}}return st(t),Jl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Oi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(G(166));if(e=fe.current,Ps(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=Ct,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[J]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||nf(e.nodeValue,i)),e||Xi(t,!0)}else e=fa(e).createTextNode(s),e[J]=t,t.stateNode=e}return st(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ps(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[J]=t}else Cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else i=cl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Yt(t),t):(Yt(t),null);if((t.flags&128)!==0)throw Error(G(558))}return st(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ps(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[J]=t}else Cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),r=!1}else r=cl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Yt(t),t):(Yt(t),null)}return Yt(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),Qn(t,t.updateQueue),st(t),null);case 4:return $(),e===null&&Co(t.stateNode.containerInfo),st(t),null;case 10:return Ti(t.type),st(t),null;case 19:if(L(ut),s=t.memoizedState,s===null)return st(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)Yr(s,!1);else{if(ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=jn(e),n!==null){for(t.flags|=128,Yr(s,!1),e=n.updateQueue,t.updateQueue=e,Qn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Nc(i,e),i=i.sibling;return K(ut,ut.current&1|2),ze&&Di(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Je()>ia&&(t.flags|=128,r=!0,Yr(s,!1),t.lanes=4194304)}else{if(!r)if(e=jn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Qn(t,e),Yr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!ze)return st(t),null}else 2*Je()-s.renderingStartTime>ia&&i!==536870912&&(t.flags|=128,r=!0,Yr(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=Je(),e.sibling=null,i=ut.current,K(ut,r?i&1|2:i&1),ze&&Di(t,s.treeForkCount),e):(st(t),null);case 22:case 23:return Yt(t),Cl(),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&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),i=t.updateQueue,i!==null&&Qn(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&&L(xs),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ti(dt),st(t),null;case 25:return null;case 30:return null}throw Error(G(156,t.tag))}function h_(e,t){switch(ll(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ti(dt),$(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(Yt(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(Yt(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 L(ut),null;case 4:return $(),null;case 10:return Ti(t.type),null;case 22:case 23:return Yt(t),Cl(),e!==null&&L(xs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ti(dt),null;case 25:return null;default:return null}}function ch(e,t){switch(ll(t),t.tag){case 3:Ti(dt),$();break;case 26:case 27:case 5:ve(t);break;case 4:$();break;case 31:t.memoizedState!==null&&Yt(t);break;case 13:Yt(t);break;case 19:L(ut);break;case 10:Ti(t.type);break;case 22:case 23:Yt(t),Cl(),e!==null&&L(xs);break;case 24:Ti(dt)}}function Kr(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(T){We(t,t.return,T)}}function Ji(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,T=g.destroy;if(T!==void 0){g.destroy=void 0,r=t;var H=i,X=T;try{X()}catch(se){We(r,H,se)}}}s=s.next}while(s!==n)}}catch(se){We(t,t.return,se)}}function uh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{eu(t,i)}catch(s){We(e,e.return,s)}}}function hh(e,t,i){i.props=Ms(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){We(e,t,s)}}function Vr(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){We(e,t,r)}}function gi(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){We(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){We(e,t,r)}else i.current=null}function fh(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){We(e,e.return,r)}}function eo(e,t,i){try{var s=e.stateNode;B_(s,e.type,i,t),s[he]=t}catch(r){We(e,e.return,r)}}function dh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&as(e.type)||e.tag===4}function to(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dh(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&&as(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 io(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=Ei));else if(s!==4&&(s===27&&as(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(io(e,t,i),e=e.sibling;e!==null;)io(e,t,i),e=e.sibling}function $n(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&&as(e.type)&&(i=e.stateNode),e=e.child,e!==null))for($n(e,t,i),e=e.sibling;e!==null;)$n(e,t,i),e=e.sibling}function _h(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);xt(t,s,i),t[J]=e,t[he]=i}catch(n){We(e,e.return,n)}}var Bi=!1,mt=!1,so=!1,vh=typeof WeakSet=="function"?WeakSet:Set,bt=null;function f_(e,t){if(e=e.containerInfo,xo=Sa,e=Ac(e),Za(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,T=-1,H=-1,X=0,se=0,ae=e,P=null;t:for(;;){for(var Z;ae!==i||r!==0&&ae.nodeType!==3||(T=g+r),ae!==n||s!==0&&ae.nodeType!==3||(H=g+s),ae.nodeType===3&&(g+=ae.nodeValue.length),(Z=ae.firstChild)!==null;)P=ae,ae=Z;for(;;){if(ae===e)break t;if(P===i&&++X===r&&(T=g),P===n&&++se===s&&(H=g),(Z=ae.nextSibling)!==null)break;ae=P,P=ae.parentNode}ae=Z}i=T===-1||H===-1?null:{start:T,end:H}}else i=null}i=i||{start:0,end:0}}else i=null;for(Do={focusedElem:e,selectionRange:i},Sa=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,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 ge=Ms(i.type,r);e=s.getSnapshotBeforeUpdate(ge,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ce){We(i,i.return,Ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Ro(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ro(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,bt=e;break}bt=t.return}}function mh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Hi(e,i),s&4&&Kr(5,i);break;case 1:if(Hi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(g){We(i,i.return,g)}else{var r=Ms(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){We(i,i.return,g)}}s&64&&uh(i),s&512&&Vr(i,i.return);break;case 3:if(Hi(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{eu(e,t)}catch(g){We(i,i.return,g)}}break;case 27:t===null&&s&4&&_h(i);case 26:case 5:Hi(e,i),t===null&&s&4&&fh(i),s&512&&Vr(i,i.return);break;case 12:Hi(e,i);break;case 31:Hi(e,i),s&4&&Sh(e,i);break;case 13:Hi(e,i),s&4&&yh(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=b_.bind(null,i),I_(e,i))));break;case 22:if(s=i.memoizedState!==null||Bi,!s){t=t!==null&&t.memoizedState!==null||mt,r=Bi;var n=mt;Bi=s,(mt=t)&&!n?Ni(e,i,(i.subtreeFlags&8772)!==0):Hi(e,i),Bi=r,mt=n}break;case 30:break;default:Hi(e,i)}}function gh(e){var t=e.alternate;t!==null&&(e.alternate=null,gh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ut(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 at=null,kt=!1;function ki(e,t,i){for(i=i.child;i!==null;)ph(e,t,i),i=i.sibling}function ph(e,t,i){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(Wt,i)}catch{}switch(i.tag){case 26:mt||gi(i,t),ki(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:mt||gi(i,t);var s=at,r=kt;as(i.type)&&(at=i.stateNode,kt=!1),ki(e,t,i),en(i.stateNode),at=s,kt=r;break;case 5:mt||gi(i,t);case 6:if(s=at,r=kt,at=null,ki(e,t,i),at=s,kt=r,at!==null)if(kt)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(i.stateNode)}catch(n){We(i,t,n)}else try{at.removeChild(i.stateNode)}catch(n){We(i,t,n)}break;case 18:at!==null&&(kt?(e=at,hf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),vr(e)):hf(at,i.stateNode));break;case 4:s=at,r=kt,at=i.stateNode.containerInfo,kt=!0,ki(e,t,i),at=s,kt=r;break;case 0:case 11:case 14:case 15:Ji(2,i,t),mt||Ji(4,i,t),ki(e,t,i);break;case 1:mt||(gi(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&hh(i,t,s)),ki(e,t,i);break;case 21:ki(e,t,i);break;case 22:mt=(s=mt)||i.memoizedState!==null,ki(e,t,i),mt=s;break;default:ki(e,t,i)}}function Sh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{vr(e)}catch(i){We(t,t.return,i)}}}function yh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{vr(e)}catch(i){We(t,t.return,i)}}function d_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vh),t;default:throw Error(G(435,e.tag))}}function Jn(e,t){var i=d_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=C_.bind(null,e,s);s.then(r,r)}})}function Ht(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,T=g;e:for(;T!==null;){switch(T.tag){case 27:if(as(T.type)){at=T.stateNode,kt=!1;break e}break;case 5:at=T.stateNode,kt=!1;break e;case 3:case 4:at=T.stateNode.containerInfo,kt=!0;break e}T=T.return}if(at===null)throw Error(G(160));ph(n,g,r),at=null,kt=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bh(t,e),t=t.sibling}var hi=null;function bh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),Nt(e),s&4&&(Ji(3,e,e.return),Kr(3,e),Ji(5,e,e.return));break;case 1:Ht(t,e),Nt(e),s&512&&(mt||i===null||gi(i,i.return)),s&64&&Bi&&(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=hi;if(Ht(t,e),Nt(e),s&512&&(mt||i===null||gi(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[Oe]||n[J]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),xt(n,s,i),n[J]=e,nt(n),s=n;break e;case"link":var g=Cf("link","href",r).get(s+(i.href||""));if(g){for(var T=0;T<g.length;T++)if(n=g[T],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(T,1);break t}}n=r.createElement(s),xt(n,s,i),r.head.appendChild(n);break;case"meta":if(g=Cf("meta","content",r).get(s+(i.content||""))){for(T=0;T<g.length;T++)if(n=g[T],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(T,1);break t}}n=r.createElement(s),xt(n,s,i),r.head.appendChild(n);break;default:throw Error(G(468,s))}n[J]=e,nt(n),s=n}e.stateNode=s}else Ef(r,e.type,e.stateNode);else e.stateNode=bf(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?Ef(r,e.type,e.stateNode):bf(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&eo(e,e.memoizedProps,i.memoizedProps)}break;case 27:Ht(t,e),Nt(e),s&512&&(mt||i===null||gi(i,i.return)),i!==null&&s&4&&eo(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Ht(t,e),Nt(e),s&512&&(mt||i===null||gi(i,i.return)),e.flags&32){r=e.stateNode;try{js(r,"")}catch(ge){We(e,e.return,ge)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,eo(e,r,i!==null?i.memoizedProps:r)),s&1024&&(so=!0);break;case 6:if(Ht(t,e),Nt(e),s&4){if(e.stateNode===null)throw Error(G(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ge){We(e,e.return,ge)}}break;case 3:if(va=null,r=hi,hi=da(t.containerInfo),Ht(t,e),hi=r,Nt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{vr(t.containerInfo)}catch(ge){We(e,e.return,ge)}so&&(so=!1,Ch(e));break;case 4:s=hi,hi=da(e.stateNode.containerInfo),Ht(t,e),Nt(e),hi=s;break;case 12:Ht(t,e),Nt(e);break;case 31:Ht(t,e),Nt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Jn(e,s)));break;case 13:Ht(t,e),Nt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ta=Je()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Jn(e,s)));break;case 22:r=e.memoizedState!==null;var H=i!==null&&i.memoizedState!==null,X=Bi,se=mt;if(Bi=X||r,mt=se||H,Ht(t,e),mt=se,Bi=X,Nt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||H||Bi||mt||Ls(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){H=i=t;try{if(n=H.stateNode,r)g=n.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{T=H.stateNode;var ae=H.memoizedProps.style,P=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;T.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(ge){We(H,H.return,ge)}}}else if(t.tag===6){if(i===null){H=t;try{H.stateNode.nodeValue=r?"":H.memoizedProps}catch(ge){We(H,H.return,ge)}}}else if(t.tag===18){if(i===null){H=t;try{var Z=H.stateNode;r?ff(Z,!0):ff(H.stateNode,!1)}catch(ge){We(H,H.return,ge)}}}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,Jn(e,i))));break;case 19:Ht(t,e),Nt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Jn(e,s)));break;case 30:break;case 21:break;default:Ht(t,e),Nt(e)}}function Nt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(dh(s)){i=s;break}s=s.return}if(i==null)throw Error(G(160));switch(i.tag){case 27:var r=i.stateNode,n=to(e);$n(e,n,r);break;case 5:var g=i.stateNode;i.flags&32&&(js(g,""),i.flags&=-33);var T=to(e);$n(e,T,g);break;case 3:case 4:var H=i.stateNode.containerInfo,X=to(e);io(e,X,H);break;default:throw Error(G(161))}}catch(se){We(e,e.return,se)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ch(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ch(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Hi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mh(e,t.alternate,t),t=t.sibling}function Ls(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ji(4,t,t.return),Ls(t);break;case 1:gi(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&hh(t,t.return,i),Ls(t);break;case 27:en(t.stateNode);case 26:case 5:gi(t,t.return),Ls(t);break;case 22:t.memoizedState===null&&Ls(t);break;case 30:Ls(t);break;default:Ls(t)}e=e.sibling}}function Ni(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:Ni(r,n,i),Kr(4,n);break;case 1:if(Ni(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(X){We(s,s.return,X)}if(s=n,r=s.updateQueue,r!==null){var T=s.stateNode;try{var H=r.shared.hiddenCallbacks;if(H!==null)for(r.shared.hiddenCallbacks=null,r=0;r<H.length;r++)Jc(H[r],T)}catch(X){We(s,s.return,X)}}i&&g&64&&uh(n),Vr(n,n.return);break;case 27:_h(n);case 26:case 5:Ni(r,n,i),i&&s===null&&g&4&&fh(n),Vr(n,n.return);break;case 12:Ni(r,n,i);break;case 31:Ni(r,n,i),i&&g&4&&Sh(r,n);break;case 13:Ni(r,n,i),i&&g&4&&yh(r,n);break;case 22:n.memoizedState===null&&Ni(r,n,i),Vr(n,n.return);break;case 30:break;default:Ni(r,n,i)}t=t.sibling}}function ro(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&&Lr(i))}function no(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Lr(e))}function fi(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Eh(e,t,i,s),t=t.sibling}function Eh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:fi(e,t,i,s),r&2048&&Kr(9,t);break;case 1:fi(e,t,i,s);break;case 3:fi(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&&Lr(e)));break;case 12:if(r&2048){fi(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,g=n.id,T=n.onPostCommit;typeof T=="function"&&T(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(H){We(t,t.return,H)}}else fi(e,t,i,s);break;case 31:fi(e,t,i,s);break;case 13:fi(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,g=t.alternate,t.memoizedState!==null?n._visibility&2?fi(e,t,i,s):Xr(e,t):n._visibility&2?fi(e,t,i,s):(n._visibility|=2,rr(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&ro(g,t);break;case 24:fi(e,t,i,s),r&2048&&no(t.alternate,t);break;default:fi(e,t,i,s)}}function rr(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,g=t,T=i,H=s,X=g.flags;switch(g.tag){case 0:case 11:case 15:rr(n,g,T,H,r),Kr(8,g);break;case 23:break;case 22:var se=g.stateNode;g.memoizedState!==null?se._visibility&2?rr(n,g,T,H,r):Xr(n,g):(se._visibility|=2,rr(n,g,T,H,r)),r&&X&2048&&ro(g.alternate,g);break;case 24:rr(n,g,T,H,r),r&&X&2048&&no(g.alternate,g);break;default:rr(n,g,T,H,r)}t=t.sibling}}function Xr(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:Xr(i,s),r&2048&&ro(s.alternate,s);break;case 24:Xr(i,s),r&2048&&no(s.alternate,s);break;default:Xr(i,s)}t=t.sibling}}var Wr=8192;function nr(e,t,i){if(e.subtreeFlags&Wr)for(e=e.child;e!==null;)wh(e,t,i),e=e.sibling}function wh(e,t,i){switch(e.tag){case 26:nr(e,t,i),e.flags&Wr&&e.memoizedState!==null&&J_(i,hi,e.memoizedState,e.memoizedProps);break;case 5:nr(e,t,i);break;case 3:case 4:var s=hi;hi=da(e.stateNode.containerInfo),nr(e,t,i),hi=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Wr,Wr=16777216,nr(e,t,i),Wr=s):nr(e,t,i));break;default:nr(e,t,i)}}function xh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];bt=s,Ah(s,e)}xh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dh(e),e=e.sibling}function Dh(e){switch(e.tag){case 0:case 11:case 15:Pr(e),e.flags&2048&&Ji(9,e,e.return);break;case 3:Pr(e);break;case 12:Pr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ea(e)):Pr(e);break;default:Pr(e)}}function ea(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];bt=s,Ah(s,e)}xh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ji(8,t,t.return),ea(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,ea(t));break;default:ea(t)}e=e.sibling}}function Ah(e,t){for(;bt!==null;){var i=bt;switch(i.tag){case 0:case 11:case 15:Ji(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:Lr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,bt=s;else e:for(i=e;bt!==null;){s=bt;var r=s.sibling,n=s.return;if(gh(s),s===i){bt=null;break e}if(r!==null){r.return=n,bt=r;break e}bt=n}}}var __={getCacheForType:function(e){var t=Et(dt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Et(dt).controller.signal}},v_=typeof WeakMap=="function"?WeakMap:Map,Ye=0,$e=null,Be=null,He=0,Xe=0,Kt=null,es=!1,ar=!1,ao=!1,zi=0,ct=0,ts=0,Os=0,lo=0,Vt=0,lr=0,Fr=null,zt=null,oo=!1,ta=0,Th=0,ia=1/0,sa=null,is=null,St=0,ss=null,or=null,ji=0,co=0,uo=null,Rh=null,Zr=0,ho=null;function Xt(){return(Ye&2)!==0&&He!==0?He&-He:j.T!==null?po():fn()}function Mh(){if(Vt===0)if((He&536870912)===0||ze){var e=Bs;Bs<<=1,(Bs&3932160)===0&&(Bs=262144),Vt=e}else Vt=536870912;return e=Gt.current,e!==null&&(e.flags|=32),Vt}function jt(e,t,i){(e===$e&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(cr(e,0),rs(e,He,Vt,!1)),_s(e,i),((Ye&2)===0||e!==$e)&&(e===$e&&((Ye&2)===0&&(Os|=i),ct===4&&rs(e,He,Vt,!1)),pi(e))}function Lh(e,t,i){if((Ye&6)!==0)throw Error(G(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ii(e,t),r=s?p_(e,t):_o(e,t,!0),n=s;do{if(r===0){ar&&!s&&rs(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!m_(i)){r=_o(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 T=e;r=Fr;var H=T.current.memoizedState.isDehydrated;if(H&&(cr(T,g).flags|=256),g=_o(T,g,!1),g!==2){if(ao&&!H){T.errorRecoveryDisabledLanes|=n,Os|=n,r=4;break e}n=zt,zt=r,n!==null&&(zt===null?zt=n:zt.push.apply(zt,n))}r=g}if(n=!1,r!==2)continue}}if(r===1){cr(e,0),rs(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:rs(s,t,Vt,!es);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(G(329))}if((t&62914560)===t&&(r=ta+300-Je(),10<r)){if(rs(s,t,Vt,!es),fs(s,0,!0)!==0)break e;ji=t,s.timeoutHandle=cf(Oh.bind(null,s,i,zt,sa,oo,t,Vt,Os,lr,es,n,"Throttled",-0,0),r);break e}Oh(s,i,zt,sa,oo,t,Vt,Os,lr,es,n,null,-0,0)}}break}while(!0);pi(e)}function Oh(e,t,i,s,r,n,g,T,H,X,se,ae,P,Z){if(e.timeoutHandle=-1,ae=t.subtreeFlags,ae&8192||(ae&16785408)===16785408){ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ei},wh(t,n,ae);var ge=(n&62914560)===n?ta-Je():(n&4194048)===n?Th-Je():0;if(ge=ev(ae,ge),ge!==null){ji=n,e.cancelPendingCommit=ge(qh.bind(null,e,t,n,i,s,r,g,T,H,se,ae,null,P,Z)),rs(e,n,g,!X);return}}qh(e,t,n,i,s,r,g,T,H)}function m_(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],n=r.getSnapshot;r=r.value;try{if(!qt(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 rs(e,t,i,s){t&=~lo,t&=~Os,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-Ve(r),g=1<<n;s[n]=-1,r&=~g}i!==0&&gr(e,i,t)}function ra(){return(Ye&6)===0?(Qr(0),!1):!0}function fo(){if(Be!==null){if(Xe===0)var e=Be.return;else e=Be,Ai=Es=null,Tl(e),Js=null,Br=0,e=Be;for(;e!==null;)ch(e.alternate,e),e=e.return;Be=null}}function cr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,N_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ji=0,fo(),$e=e,Be=i=xi(e.current,null),He=t,Xe=0,Kt=null,es=!1,ar=Ii(e,t),ao=!1,lr=Vt=lo=Os=ts=ct=0,zt=Fr=null,oo=!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-Ve(s),n=1<<r;t|=e[r],s&=~n}return zi=t,xn(),i}function Bh(e,t){Te=null,j.H=Ir,t===$s||t===Bn?(t=Fc(),Xe=3):t===ml?(t=Fc(),Xe=4):Xe=t===Kl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kt=t,Be===null&&(ct=1,Wn(e,$t(t,e.current)))}function kh(){var e=Gt.current;return e===null?!0:(He&4194048)===He?ii===null:(He&62914560)===He||(He&536870912)!==0?e===ii:!1}function Hh(){var e=j.H;return j.H=Ir,e===null?Ir:e}function Nh(){var e=j.A;return j.A=__,e}function na(){ct=4,es||(He&4194048)!==He&&Gt.current!==null||(ar=!0),(ts&134217727)===0&&(Os&134217727)===0||$e===null||rs($e,He,Vt,!1)}function _o(e,t,i){var s=Ye;Ye|=2;var r=Hh(),n=Nh();($e!==e||He!==t)&&(sa=null,cr(e,t)),t=!1;var g=ct;e:do try{if(Xe!==0&&Be!==null){var T=Be,H=Kt;switch(Xe){case 8:fo(),g=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(t=!0);var X=Xe;if(Xe=0,Kt=null,ur(e,T,H,X),i&&ar){g=0;break e}break;default:X=Xe,Xe=0,Kt=null,ur(e,T,H,X)}}g_(),g=ct;break}catch(se){Bh(e,se)}while(!0);return t&&e.shellSuspendCounter++,Ai=Es=null,Ye=s,j.H=r,j.A=n,Be===null&&($e=null,He=0,xn()),g}function g_(){for(;Be!==null;)zh(Be)}function p_(e,t){var i=Ye;Ye|=2;var s=Hh(),r=Nh();$e!==e||He!==t?(sa=null,ia=Je()+500,cr(e,t)):ar=Ii(e,t);e:do try{if(Xe!==0&&Be!==null){t=Be;var n=Kt;t:switch(Xe){case 1:Xe=0,Kt=null,ur(e,t,n,1);break;case 2:case 9:if(Wc(n)){Xe=0,Kt=null,jh(t);break}t=function(){Xe!==2&&Xe!==9||$e!==e||(Xe=7),pi(e)},n.then(t,t);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Wc(n)?(Xe=0,Kt=null,jh(t)):(Xe=0,Kt=null,ur(e,t,n,7));break;case 5:var g=null;switch(Be.tag){case 26:g=Be.memoizedState;case 5:case 27:var T=Be;if(g?wf(g):T.stateNode.complete){Xe=0,Kt=null;var H=T.sibling;if(H!==null)Be=H;else{var X=T.return;X!==null?(Be=X,aa(X)):Be=null}break t}}Xe=0,Kt=null,ur(e,t,n,5);break;case 6:Xe=0,Kt=null,ur(e,t,n,6);break;case 8:fo(),ct=6;break e;default:throw Error(G(462))}}S_();break}catch(se){Bh(e,se)}while(!0);return Ai=Es=null,j.H=s,j.A=r,Ye=i,Be!==null?0:($e=null,He=0,xn(),ct)}function S_(){for(;Be!==null&&!Si();)zh(Be)}function zh(e){var t=lh(e.alternate,e,zi);e.memoizedProps=e.pendingProps,t===null?aa(e):Be=t}function jh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=th(i,t,t.pendingProps,t.type,void 0,He);break;case 11:t=th(i,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:Tl(t);default:ch(i,t),t=Be=Nc(t,zi),t=lh(i,t,zi)}e.memoizedProps=e.pendingProps,t===null?aa(e):Be=t}function ur(e,t,i,s){Ai=Es=null,Tl(t),Js=null,Br=0;var r=t.return;try{if(l_(e,r,t,i,He)){ct=1,Wn(e,$t(i,e.current)),Be=null;return}}catch(n){if(r!==null)throw Be=r,n;ct=1,Wn(e,$t(i,e.current)),Be=null;return}t.flags&32768?(ze||s===1?e=!0:ar||(He&536870912)!==0?e=!1:(es=e=!0,(s===2||s===9||s===3||s===6)&&(s=Gt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Uh(t,e)):aa(t)}function aa(e){var t=e;do{if((t.flags&32768)!==0){Uh(t,es);return}e=t.return;var i=u_(t.alternate,t,zi);if(i!==null){Be=i;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);ct===0&&(ct=5)}function Uh(e,t){do{var i=h_(e.alternate,e);if(i!==null){i.flags&=32767,Be=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=i}while(e!==null);ct=6,Be=null}function qh(e,t,i,s,r,n,g,T,H){e.cancelPendingCommit=null;do la();while(St!==0);if((Ye&6)!==0)throw Error(G(327));if(t!==null){if(t===e.current)throw Error(G(177));if(n=t.lanes|t.childLanes,n|=tl,Oa(e,i,n,g,T,H),e===$e&&(Be=$e=null,He=0),or=t,ss=e,ji=i,co=n,uo=r,Rh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,E_(Lt,function(){return Vh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=j.T,j.T=null,r=W.p,W.p=2,g=Ye,Ye|=4;try{f_(e,t,i)}finally{Ye=g,W.p=r,j.T=s}}St=1,Ih(),Gh(),Yh()}}function Ih(){if(St===1){St=0;var e=ss,t=or,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=j.T,j.T=null;var s=W.p;W.p=2;var r=Ye;Ye|=4;try{bh(t,e);var n=Do,g=Ac(e.containerInfo),T=n.focusedElem,H=n.selectionRange;if(g!==T&&T&&T.ownerDocument&&Dc(T.ownerDocument.documentElement,T)){if(H!==null&&Za(T)){var X=H.start,se=H.end;if(se===void 0&&(se=X),"selectionStart"in T)T.selectionStart=X,T.selectionEnd=Math.min(se,T.value.length);else{var ae=T.ownerDocument||document,P=ae&&ae.defaultView||window;if(P.getSelection){var Z=P.getSelection(),ge=T.textContent.length,Ce=Math.min(H.start,ge),Ze=H.end===void 0?Ce:Math.min(H.end,ge);!Z.extend&&Ce>Ze&&(g=Ze,Ze=Ce,Ce=g);var Y=xc(T,Ce),U=xc(T,Ze);if(Y&&U&&(Z.rangeCount!==1||Z.anchorNode!==Y.node||Z.anchorOffset!==Y.offset||Z.focusNode!==U.node||Z.focusOffset!==U.offset)){var V=ae.createRange();V.setStart(Y.node,Y.offset),Z.removeAllRanges(),Ce>Ze?(Z.addRange(V),Z.extend(U.node,U.offset)):(V.setEnd(U.node,U.offset),Z.addRange(V))}}}}for(ae=[],Z=T;Z=Z.parentNode;)Z.nodeType===1&&ae.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<ae.length;T++){var re=ae[T];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Sa=!!xo,Do=xo=null}finally{Ye=r,W.p=s,j.T=i}}e.current=t,St=2}}function Gh(){if(St===2){St=0;var e=ss,t=or,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=j.T,j.T=null;var s=W.p;W.p=2;var r=Ye;Ye|=4;try{mh(e,t.alternate,t)}finally{Ye=r,W.p=s,j.T=i}}St=3}}function Yh(){if(St===4||St===3){St=0,gt();var e=ss,t=or,i=ji,s=Rh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?St=5:(St=0,or=ss=null,Kh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(is=null),Sr(i),t=t.stateNode,ft&&typeof ft.onCommitFiberRoot=="function")try{ft.onCommitFiberRoot(Wt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=j.T,r=W.p,W.p=2,j.T=null;try{for(var n=e.onRecoverableError,g=0;g<s.length;g++){var T=s[g];n(T.value,{componentStack:T.stack})}}finally{j.T=t,W.p=r}}(ji&3)!==0&&la(),pi(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===ho?Zr++:(Zr=0,ho=e):Zr=0,Qr(0)}}function Kh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Lr(t)))}function la(){return Ih(),Gh(),Yh(),Vh()}function Vh(){if(St!==5)return!1;var e=ss,t=co;co=0;var i=Sr(ji),s=j.T,r=W.p;try{W.p=32>i?32:i,j.T=null,i=uo,uo=null;var n=ss,g=ji;if(St=0,or=ss=null,ji=0,(Ye&6)!==0)throw Error(G(331));var T=Ye;if(Ye|=4,Dh(n.current),Eh(n,n.current,g,i),Ye=T,Qr(0,!1),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(Wt,n)}catch{}return!0}finally{W.p=r,j.T=s,Kh(e,t)}}function Xh(e,t,i){t=$t(i,t),t=Yl(e.stateNode,t,2),e=Zi(e,t,2),e!==null&&(_s(e,2),pi(e))}function We(e,t,i){if(e.tag===3)Xh(e,e,i);else for(;t!==null;){if(t.tag===3){Xh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(is===null||!is.has(s))){e=$t(i,e),i=Wu(2),s=Zi(t,i,2),s!==null&&(Pu(i,s,t,e),_s(s,2),pi(s));break}}t=t.return}}function vo(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new v_;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)||(ao=!0,r.add(i),e=y_.bind(null,e,t,i),t.then(e,e))}function y_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,$e===e&&(He&i)===i&&(ct===4||ct===3&&(He&62914560)===He&&300>Je()-ta?(Ye&2)===0&&cr(e,0):lo|=i,lr===He&&(lr=0)),pi(e)}function Wh(e,t){t===0&&(t=ds()),e=ys(e,t),e!==null&&(_s(e,t),pi(e))}function b_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Wh(e,i)}function C_(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),Wh(e,i)}function E_(e,t){return qi(e,t)}var oa=null,hr=null,mo=!1,ca=!1,go=!1,ns=0;function pi(e){e!==hr&&e.next===null&&(hr===null?oa=hr=e:hr=hr.next=e),ca=!0,mo||(mo=!0,x_())}function Qr(e,t){if(!go&&ca){go=!0;do for(var i=!1,s=oa;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var g=s.suspendedLanes,T=s.pingedLanes;n=(1<<31-Ve(42|e)+1)-1,n&=r&~(g&~T),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Qh(s,n))}else n=He,n=fs(s,s===$e?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||Ii(s,n)||(i=!0,Qh(s,n));s=s.next}while(i);go=!1}}function w_(){Ph()}function Ph(){ca=mo=!1;var e=0;ns!==0&&H_()&&(e=ns);for(var t=Je(),i=null,s=oa;s!==null;){var r=s.next,n=Fh(s,t);n===0?(s.next=null,i===null?oa=r:i.next=r,r===null&&(hr=i)):(i=s,(e!==0||(n&3)!==0)&&(ca=!0)),s=r}St!==0&&St!==5||Qr(e),ns!==0&&(ns=0)}function Fh(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var g=31-Ve(n),T=1<<g,H=r[g];H===-1?((T&i)===0||(T&s)!==0)&&(r[g]=un(T,t)):H<=t&&(e.expiredLanes|=T),n&=~T}if(t=$e,i=He,i=fs(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&li(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ii(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&li(s),Sr(i)){case 2:case 8:i=di;break;case 32:i=Lt;break;case 268435456:i=et;break;default:i=Lt}return s=Zh.bind(null,e),i=qi(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&li(s),e.callbackPriority=2,e.callbackNode=null,2}function Zh(e,t){if(St!==0&&St!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(la()&&e.callbackNode!==i)return null;var s=He;return s=fs(e,e===$e?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Lh(e,s,t),Fh(e,Je()),e.callbackNode!=null&&e.callbackNode===i?Zh.bind(null,e):null)}function Qh(e,t){if(la())return null;Lh(e,t,!0)}function x_(){z_(function(){(Ye&6)!==0?qi(oi,w_):Ph()})}function po(){if(ns===0){var e=Zs;e===0&&(e=Rt,Rt<<=1,(Rt&261888)===0&&(Rt=256)),ns=e}return ns}function $h(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:gn(""+e)}function Jh(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 D_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=$h((r[he]||null).action),g=s.submitter;g&&(t=(t=g[he]||null)?$h(t.formAction):g.getAttribute("formAction"),t!==null&&(n=t,g=null));var T=new bn("action","action",null,s,r);e.push({event:T,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ns!==0){var H=g?Jh(r,g):new FormData(r);zl(i,{pending:!0,data:H,method:r.method,action:n},null,H)}}else typeof n=="function"&&(T.preventDefault(),H=g?Jh(r,g):new FormData(r),zl(i,{pending:!0,data:H,method:r.method,action:n},n,H))},currentTarget:r}]})}}for(var So=0;So<el.length;So++){var yo=el[So],A_=yo.toLowerCase(),T_=yo[0].toUpperCase()+yo.slice(1);ui(A_,"on"+T_)}ui(Mc,"onAnimationEnd"),ui(Lc,"onAnimationIteration"),ui(Oc,"onAnimationStart"),ui("dblclick","onDoubleClick"),ui("focusin","onFocus"),ui("focusout","onBlur"),ui(Kd,"onTransitionRun"),ui(Vd,"onTransitionStart"),ui(Xd,"onTransitionCancel"),ui(Bc,"onTransitionEnd"),Dt("onMouseEnter",["mouseout","mouseover"]),Dt("onMouseLeave",["mouseout","mouseover"]),Dt("onPointerEnter",["pointerout","pointerover"]),Dt("onPointerLeave",["pointerout","pointerover"]),Gi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $r="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(" "),R_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($r));function ef(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 T=s[g],H=T.instance,X=T.currentTarget;if(T=T.listener,H!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=X;try{n(r)}catch(se){wn(se)}r.currentTarget=null,n=H}else for(g=0;g<s.length;g++){if(T=s[g],H=T.instance,X=T.currentTarget,T=T.listener,H!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=X;try{n(r)}catch(se){wn(se)}r.currentTarget=null,n=H}}}}function ke(e,t){var i=t[xe];i===void 0&&(i=t[xe]=new Set);var s=e+"__bubble";i.has(s)||(tf(t,e,2,!1),i.add(s))}function bo(e,t,i){var s=0;t&&(s|=4),tf(i,e,s,t)}var ua="_reactListening"+Math.random().toString(36).slice(2);function Co(e){if(!e[ua]){e[ua]=!0,vs.forEach(function(i){i!=="selectionchange"&&(R_.has(i)||bo(i,!1,e),bo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ua]||(t[ua]=!0,bo("selectionchange",!1,t))}}function tf(e,t,i,s){switch(Lf(t)){case 2:var r=sv;break;case 8:r=rv;break;default:r=zo}i=r.bind(null,t,i,e),r=void 0,!Ia||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 Eo(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 T=s.stateNode.containerInfo;if(T===r)break;if(g===4)for(g=s.return;g!==null;){var H=g.tag;if((H===3||H===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;T!==null;){if(g=Qe(T),g===null)return;if(H=g.tag,H===5||H===6||H===26||H===27){s=n=g;continue e}T=T.parentNode}}s=s.return}ac(function(){var X=n,se=Ua(i),ae=[];e:{var P=kc.get(e);if(P!==void 0){var Z=bn,ge=e;switch(e){case"keypress":if(Sn(i)===0)break e;case"keydown":case"keyup":Z=Cd;break;case"focusin":ge="focus",Z=Va;break;case"focusout":ge="blur",Z=Va;break;case"beforeblur":case"afterblur":Z=Va;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":Z=cc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=ud;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=xd;break;case Mc:case Lc:case Oc:Z=dd;break;case Bc:Z=Ad;break;case"scroll":case"scrollend":Z=od;break;case"wheel":Z=Rd;break;case"copy":case"cut":case"paste":Z=vd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=hc;break;case"toggle":case"beforetoggle":Z=Ld}var Ce=(t&4)!==0,Ze=!Ce&&(e==="scroll"||e==="scrollend"),Y=Ce?P!==null?P+"Capture":null:P;Ce=[];for(var U=X,V;U!==null;){var re=U;if(V=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||V===null||Y===null||(re=yr(U,Y),re!=null&&Ce.push(Jr(U,re,V))),Ze)break;U=U.return}0<Ce.length&&(P=new Z(P,ge,null,i,se),ae.push({event:P,listeners:Ce}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",P&&i!==ja&&(ge=i.relatedTarget||i.fromElement)&&(Qe(ge)||ge[we]))break e;if((Z||P)&&(P=se.window===se?se:(P=se.ownerDocument)?P.defaultView||P.parentWindow:window,Z?(ge=i.relatedTarget||i.toElement,Z=X,ge=ge?Qe(ge):null,ge!==null&&(Ze=Se(ge),Ce=ge.tag,ge!==Ze||Ce!==5&&Ce!==27&&Ce!==6)&&(ge=null)):(Z=null,ge=X),Z!==ge)){if(Ce=cc,re="onMouseLeave",Y="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=hc,re="onPointerLeave",Y="onPointerEnter",U="pointer"),Ze=Z==null?P:pt(Z),V=ge==null?P:pt(ge),P=new Ce(re,U+"leave",Z,i,se),P.target=Ze,P.relatedTarget=V,re=null,Qe(se)===X&&(Ce=new Ce(Y,U+"enter",ge,i,se),Ce.target=V,Ce.relatedTarget=Ze,re=Ce),Ze=re,Z&&ge)t:{for(Ce=M_,Y=Z,U=ge,V=0,re=Y;re;re=Ce(re))V++;re=0;for(var ye=U;ye;ye=Ce(ye))re++;for(;0<V-re;)Y=Ce(Y),V--;for(;0<re-V;)U=Ce(U),re--;for(;V--;){if(Y===U||U!==null&&Y===U.alternate){Ce=Y;break t}Y=Ce(Y),U=Ce(U)}Ce=null}else Ce=null;Z!==null&&sf(ae,P,Z,Ce,!1),ge!==null&&Ze!==null&&sf(ae,Ze,ge,Ce,!0)}}e:{if(P=X?pt(X):window,Z=P.nodeName&&P.nodeName.toLowerCase(),Z==="select"||Z==="input"&&P.type==="file")var qe=Sc;else if(gc(P))if(yc)qe=Id;else{qe=Ud;var pe=jd}else Z=P.nodeName,!Z||Z.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?X&&za(X.elementType)&&(qe=Sc):qe=qd;if(qe&&(qe=qe(e,X))){pc(ae,qe,i,se);break e}pe&&pe(e,P,X),e==="focusout"&&X&&P.type==="number"&&X.memoizedProps.value!=null&&Na(P,"number",P.value)}switch(pe=X?pt(X):window,e){case"focusin":(gc(pe)||pe.contentEditable==="true")&&(Gs=pe,Qa=X,Tr=null);break;case"focusout":Tr=Qa=Gs=null;break;case"mousedown":$a=!0;break;case"contextmenu":case"mouseup":case"dragend":$a=!1,Tc(ae,i,se);break;case"selectionchange":if(Yd)break;case"keydown":case"keyup":Tc(ae,i,se)}var Re;if(Wa)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Is?vc(e,i)&&(Ne="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ne="onCompositionStart");Ne&&(fc&&i.locale!=="ko"&&(Is||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Is&&(Re=lc()):(Yi=se,Ga="value"in Yi?Yi.value:Yi.textContent,Is=!0)),pe=ha(X,Ne),0<pe.length&&(Ne=new uc(Ne,e,null,i,se),ae.push({event:Ne,listeners:pe}),Re?Ne.data=Re:(Re=mc(i),Re!==null&&(Ne.data=Re)))),(Re=Bd?kd(e,i):Hd(e,i))&&(Ne=ha(X,"onBeforeInput"),0<Ne.length&&(pe=new uc("onBeforeInput","beforeinput",null,i,se),ae.push({event:pe,listeners:Ne}),pe.data=Re)),D_(ae,e,X,i,se)}ef(ae,t)})}function Jr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function ha(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=yr(e,i),r!=null&&s.unshift(Jr(e,r,n)),r=yr(e,t),r!=null&&s.push(Jr(e,r,n))),e.tag===3)return s;e=e.return}return[]}function M_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function sf(e,t,i,s,r){for(var n=t._reactName,g=[];i!==null&&i!==s;){var T=i,H=T.alternate,X=T.stateNode;if(T=T.tag,H!==null&&H===s)break;T!==5&&T!==26&&T!==27||X===null||(H=X,r?(X=yr(i,n),X!=null&&g.unshift(Jr(i,X,H))):r||(X=yr(i,n),X!=null&&g.push(Jr(i,X,H)))),i=i.return}g.length!==0&&e.push({event:t,listeners:g})}var L_=/\r\n?/g,O_=/\u0000|\uFFFD/g;function rf(e){return(typeof e=="string"?e:""+e).replace(L_,`
|
|
9
|
+
`).replace(O_,"")}function nf(e,t){return t=rf(t),rf(e)===t}function Fe(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||js(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&js(e,""+s);break;case"className":vn(e,"class",s);break;case"tabIndex":vn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":vn(e,i,s);break;case"style":rc(e,s,n);break;case"data":if(t!=="object"){vn(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=gn(""+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"&&Fe(e,t,"name",r.name,r,null),Fe(e,t,"formEncType",r.formEncType,r,null),Fe(e,t,"formMethod",r.formMethod,r,null),Fe(e,t,"formTarget",r.formTarget,r,null)):(Fe(e,t,"encType",r.encType,r,null),Fe(e,t,"method",r.method,r,null),Fe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=gn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Ei);break;case"onScroll":s!=null&&ke("scroll",e);break;case"onScrollEnd":s!=null&&ke("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=gn(""+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":ke("beforetoggle",e),ke("toggle",e),_n(e,"popover",s);break;case"xlinkActuate":Ci(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ci(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ci(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ci(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ci(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ci(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ci(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ci(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ci(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":_n(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=ad.get(i)||i,_n(e,i,s))}}function wo(e,t,i,s,r,n){switch(i){case"style":rc(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"?js(e,s):(typeof s=="number"||typeof s=="bigint")&&js(e,""+s);break;case"onScroll":s!=null&&ke("scroll",e);break;case"onScrollEnd":s!=null&&ke("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Ei);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!dn.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[he]||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,""):_n(e,i,s)}}}function xt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",e),ke("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:Fe(e,t,n,g,i,null)}}r&&Fe(e,t,"srcSet",i.srcSet,i,null),s&&Fe(e,t,"src",i.src,i,null);return;case"input":ke("invalid",e);var T=n=g=r=null,H=null,X=null;for(s in i)if(i.hasOwnProperty(s)){var se=i[s];if(se!=null)switch(s){case"name":r=se;break;case"type":g=se;break;case"checked":H=se;break;case"defaultChecked":X=se;break;case"value":n=se;break;case"defaultValue":T=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(G(137,t));break;default:Fe(e,t,s,se,i,null)}}ec(e,n,T,H,X,g,r,!1);return;case"select":ke("invalid",e),s=g=n=null;for(r in i)if(i.hasOwnProperty(r)&&(T=i[r],T!=null))switch(r){case"value":n=T;break;case"defaultValue":g=T;break;case"multiple":s=T;default:Fe(e,t,r,T,i,null)}t=n,i=g,e.multiple=!!s,t!=null?zs(e,!!s,t,!1):i!=null&&zs(e,!!s,i,!0);return;case"textarea":ke("invalid",e),n=r=s=null;for(g in i)if(i.hasOwnProperty(g)&&(T=i[g],T!=null))switch(g){case"value":s=T;break;case"defaultValue":r=T;break;case"children":n=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(G(91));break;default:Fe(e,t,g,T,i,null)}ic(e,s,r,n);return;case"option":for(H in i)i.hasOwnProperty(H)&&(s=i[H],s!=null)&&(H==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Fe(e,t,H,s,i,null));return;case"dialog":ke("beforetoggle",e),ke("toggle",e),ke("cancel",e),ke("close",e);break;case"iframe":case"object":ke("load",e);break;case"video":case"audio":for(s=0;s<$r.length;s++)ke($r[s],e);break;case"image":ke("error",e),ke("load",e);break;case"details":ke("toggle",e);break;case"embed":case"source":case"link":ke("error",e),ke("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(X in i)if(i.hasOwnProperty(X)&&(s=i[X],s!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:Fe(e,t,X,s,i,null)}return;default:if(za(t)){for(se in i)i.hasOwnProperty(se)&&(s=i[se],s!==void 0&&wo(e,t,se,s,i,void 0));return}}for(T in i)i.hasOwnProperty(T)&&(s=i[T],s!=null&&Fe(e,t,T,s,i,null))}function B_(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,T=null,H=null,X=null,se=null;for(Z in i){var ae=i[Z];if(i.hasOwnProperty(Z)&&ae!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":H=ae;default:s.hasOwnProperty(Z)||Fe(e,t,Z,null,s,ae)}}for(var P in s){var Z=s[P];if(ae=i[P],s.hasOwnProperty(P)&&(Z!=null||ae!=null))switch(P){case"type":n=Z;break;case"name":r=Z;break;case"checked":X=Z;break;case"defaultChecked":se=Z;break;case"value":g=Z;break;case"defaultValue":T=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(G(137,t));break;default:Z!==ae&&Fe(e,t,P,Z,s,ae)}}Ha(e,g,T,H,X,se,n,r);return;case"select":Z=g=T=P=null;for(n in i)if(H=i[n],i.hasOwnProperty(n)&&H!=null)switch(n){case"value":break;case"multiple":Z=H;default:s.hasOwnProperty(n)||Fe(e,t,n,null,s,H)}for(r in s)if(n=s[r],H=i[r],s.hasOwnProperty(r)&&(n!=null||H!=null))switch(r){case"value":P=n;break;case"defaultValue":T=n;break;case"multiple":g=n;default:n!==H&&Fe(e,t,r,n,s,H)}t=T,i=g,s=Z,P!=null?zs(e,!!i,P,!1):!!s!=!!i&&(t!=null?zs(e,!!i,t,!0):zs(e,!!i,i?[]:"",!1));return;case"textarea":Z=P=null;for(T in i)if(r=i[T],i.hasOwnProperty(T)&&r!=null&&!s.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Fe(e,t,T,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":Z=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(G(91));break;default:r!==n&&Fe(e,t,g,r,s,n)}tc(e,P,Z);return;case"option":for(var ge in i)P=i[ge],i.hasOwnProperty(ge)&&P!=null&&!s.hasOwnProperty(ge)&&(ge==="selected"?e.selected=!1:Fe(e,t,ge,null,s,P));for(H in s)P=s[H],Z=i[H],s.hasOwnProperty(H)&&P!==Z&&(P!=null||Z!=null)&&(H==="selected"?e.selected=P&&typeof P!="function"&&typeof P!="symbol":Fe(e,t,H,P,s,Z));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 Ce in i)P=i[Ce],i.hasOwnProperty(Ce)&&P!=null&&!s.hasOwnProperty(Ce)&&Fe(e,t,Ce,null,s,P);for(X in s)if(P=s[X],Z=i[X],s.hasOwnProperty(X)&&P!==Z&&(P!=null||Z!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(G(137,t));break;default:Fe(e,t,X,P,s,Z)}return;default:if(za(t)){for(var Ze in i)P=i[Ze],i.hasOwnProperty(Ze)&&P!==void 0&&!s.hasOwnProperty(Ze)&&wo(e,t,Ze,void 0,s,P);for(se in s)P=s[se],Z=i[se],!s.hasOwnProperty(se)||P===Z||P===void 0&&Z===void 0||wo(e,t,se,P,s,Z);return}}for(var Y in i)P=i[Y],i.hasOwnProperty(Y)&&P!=null&&!s.hasOwnProperty(Y)&&Fe(e,t,Y,null,s,P);for(ae in s)P=s[ae],Z=i[ae],!s.hasOwnProperty(ae)||P===Z||P==null&&Z==null||Fe(e,t,ae,P,s,Z)}function af(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k_(){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,T=r.duration;if(n&&T&&af(g)){for(g=0,T=r.responseEnd,s+=1;s<i.length;s++){var H=i[s],X=H.startTime;if(X>T)break;var se=H.transferSize,ae=H.initiatorType;se&&af(ae)&&(H=H.responseEnd,g+=se*(H<T?1:(T-X)/(H-X)))}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 xo=null,Do=null;function fa(e){return e.nodeType===9?e:e.ownerDocument}function lf(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 of(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 Ao(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 To=null;function H_(){var e=window.event;return e&&e.type==="popstate"?e===To?!1:(To=e,!0):(To=null,!1)}var cf=typeof setTimeout=="function"?setTimeout:void 0,N_=typeof clearTimeout=="function"?clearTimeout:void 0,uf=typeof Promise=="function"?Promise:void 0,z_=typeof queueMicrotask=="function"?queueMicrotask:typeof uf<"u"?function(e){return uf.resolve(null).then(e).catch(j_)}:cf;function j_(e){setTimeout(function(){throw e})}function as(e){return e==="head"}function hf(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),vr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")en(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,en(i);for(var n=i.firstChild;n;){var g=n.nextSibling,T=n.nodeName;n[Oe]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=g}}else i==="body"&&en(e.ownerDocument.body);i=r}while(i);vr(t)}function ff(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 Ro(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":Ro(i),Ut(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function U_(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[Oe])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=si(e.nextSibling),e===null)break}return null}function q_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=si(e.nextSibling),e===null))return null;return e}function df(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=si(e.nextSibling),e===null))return null;return e}function Mo(e){return e.data==="$?"||e.data==="$~"}function Lo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function I_(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 si(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 Oo=null;function _f(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return si(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function vf(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 mf(e,t,i){switch(t=fa(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 en(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ut(e)}var ri=new Map,gf=new Set;function da(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ui=W.d;W.d={f:G_,r:Y_,D:K_,C:V_,L:X_,m:W_,X:F_,S:P_,M:Z_};function G_(){var e=Ui.f(),t=ra();return e||t}function Y_(e){var t=Pt(e);t!==null&&t.tag===5&&t.type==="form"?Bu(t):Ui.r(e)}var fr=typeof document>"u"?null:document;function pf(e,t,i){var s=fr;if(s&&typeof t=="string"&&t){var r=Zt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),gf.has(r)||(gf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),xt(t,"link",e),nt(t),s.head.appendChild(t)))}}function K_(e){Ui.D(e),pf("dns-prefetch",e,null)}function V_(e,t){Ui.C(e,t),pf("preconnect",e,t)}function X_(e,t,i){Ui.L(e,t,i);var s=fr;if(s&&e&&t){var r='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Zt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Zt(i.imageSizes)+'"]')):r+='[href="'+Zt(e)+'"]';var n=r;switch(t){case"style":n=dr(e);break;case"script":n=_r(e)}ri.has(n)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),ri.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(tn(n))||t==="script"&&s.querySelector(sn(n))||(t=s.createElement("link"),xt(t,"link",e),nt(t),s.head.appendChild(t)))}}function W_(e,t){Ui.m(e,t);var i=fr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Zt(s)+'"][href="'+Zt(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=_r(e)}if(!ri.has(n)&&(e=u({rel:"modulepreload",href:e},t),ri.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(sn(n)))return}s=i.createElement("link"),xt(s,"link",e),nt(s),i.head.appendChild(s)}}}function P_(e,t,i){Ui.S(e,t,i);var s=fr;if(s&&e){var r=ci(s).hoistableStyles,n=dr(e);t=t||"default";var g=r.get(n);if(!g){var T={loading:0,preload:null};if(g=s.querySelector(tn(n)))T.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=ri.get(n))&&Bo(e,i);var H=g=s.createElement("link");nt(H),xt(H,"link",e),H._p=new Promise(function(X,se){H.onload=X,H.onerror=se}),H.addEventListener("load",function(){T.loading|=1}),H.addEventListener("error",function(){T.loading|=2}),T.loading|=4,_a(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:T},r.set(n,g)}}}function F_(e,t){Ui.X(e,t);var i=fr;if(i&&e){var s=ci(i).hoistableScripts,r=_r(e),n=s.get(r);n||(n=i.querySelector(sn(r)),n||(e=u({src:e,async:!0},t),(t=ri.get(r))&&ko(e,t),n=i.createElement("script"),nt(n),xt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function Z_(e,t){Ui.M(e,t);var i=fr;if(i&&e){var s=ci(i).hoistableScripts,r=_r(e),n=s.get(r);n||(n=i.querySelector(sn(r)),n||(e=u({src:e,async:!0,type:"module"},t),(t=ri.get(r))&&ko(e,t),n=i.createElement("script"),nt(n),xt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function Sf(e,t,i,s){var r=(r=fe.current)?da(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=dr(i.href),i=ci(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=dr(i.href);var n=ci(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(tn(e)))&&!n._p&&(g.instance=n,g.state.loading=5),ri.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},ri.set(e,i),n||Q_(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=_r(i),i=ci(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 dr(e){return'href="'+Zt(e)+'"'}function tn(e){return'link[rel="stylesheet"]['+e+"]"}function yf(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function Q_(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}),xt(t,"link",i),nt(t),e.head.appendChild(t))}function _r(e){return'[src="'+Zt(e)+'"]'}function sn(e){return"script[async]"+e}function bf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Zt(i.href)+'"]');if(s)return t.instance=s,nt(s),s;var r=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),nt(s),xt(s,"style",r),_a(s,i.precedence,e),t.instance=s;case"stylesheet":r=dr(i.href);var n=e.querySelector(tn(r));if(n)return t.state.loading|=4,t.instance=n,nt(n),n;s=yf(i),(r=ri.get(r))&&Bo(s,r),n=(e.ownerDocument||e).createElement("link"),nt(n);var g=n;return g._p=new Promise(function(T,H){g.onload=T,g.onerror=H}),xt(n,"link",s),t.state.loading|=4,_a(n,i.precedence,e),t.instance=n;case"script":return n=_r(i.src),(r=e.querySelector(sn(n)))?(t.instance=r,nt(r),r):(s=i,(r=ri.get(n))&&(s=u({},i),ko(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),nt(r),xt(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,_a(s,i.precedence,e));return t.instance}function _a(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 T=s[g];if(T.dataset.precedence===t)n=T;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 Bo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ko(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var va=null;function Cf(e,t,i){if(va===null){var s=new Map,r=va=new Map;r.set(i,s)}else r=va,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[Oe]||n[J]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var g=n.getAttribute(t)||"";g=e+g;var T=s.get(g);T?T.push(n):s.set(g,[n])}}return s}function Ef(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function $_(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 wf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function J_(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=dr(s.href),n=t.querySelector(tn(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ma.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,nt(n);return}n=t.ownerDocument||t,s=yf(s),(r=ri.get(r))&&Bo(s,r),n=n.createElement("link"),nt(n);var g=n;g._p=new Promise(function(T,H){g.onload=T,g.onerror=H}),xt(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=ma.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Ho=0;function ev(e,t){return e.stylesheets&&e.count===0&&pa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&pa(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&Ho===0&&(Ho=62500*k_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pa(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>Ho?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function ma(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ga=null;function pa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ga=new Map,t.forEach(tv,e),ga=null,ma.call(e))}function tv(e,t){if(!(t.state.loading&4)){var i=ga.get(e);if(i)var s=i.get(null);else{i=new Map,ga.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=ma.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 rn={$$typeof:l,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function iv(e,t,i,s,r,n,g,T,H){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=mr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mr(0),this.hiddenUpdates=mr(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function xf(e,t,i,s,r,n,g,T,H,X,se,ae){return e=new iv(e,t,i,g,H,X,se,ae,T),t=1,n===!0&&(t|=24),n=It(3,null,null,t),e.current=n,n.stateNode=e,t=dl(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},gl(n),e}function Df(e){return e?(e=Vs,e):Vs}function Af(e,t,i,s,r,n){r=Df(r),s.context===null?s.context=r:s.pendingContext=r,s=Fi(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=Zi(e,s,t),i!==null&&(jt(i,e,t),Hr(i,e,t))}function Tf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function No(e,t){Tf(e,t),(e=e.alternate)&&Tf(e,t)}function Rf(e){if(e.tag===13||e.tag===31){var t=ys(e,67108864);t!==null&&jt(t,e,67108864),No(e,67108864)}}function Mf(e){if(e.tag===13||e.tag===31){var t=Xt();t=Hs(t);var i=ys(e,t);i!==null&&jt(i,e,t),No(e,t)}}var Sa=!0;function sv(e,t,i,s){var r=j.T;j.T=null;var n=W.p;try{W.p=2,zo(e,t,i,s)}finally{W.p=n,j.T=r}}function rv(e,t,i,s){var r=j.T;j.T=null;var n=W.p;try{W.p=8,zo(e,t,i,s)}finally{W.p=n,j.T=r}}function zo(e,t,i,s){if(Sa){var r=jo(s);if(r===null)Eo(e,t,s,ya,i),Of(e,s);else if(av(r,e,t,i,s))s.stopPropagation();else if(Of(e,s),t&4&&-1<nv.indexOf(e)){for(;r!==null;){var n=Pt(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var g=bi(n.pendingLanes);if(g!==0){var T=n;for(T.pendingLanes|=2,T.entangledLanes|=2;g;){var H=1<<31-Ve(g);T.entanglements[1]|=H,g&=~H}pi(n),(Ye&6)===0&&(ia=Je()+500,Qr(0))}}break;case 31:case 13:T=ys(n,2),T!==null&&jt(T,n,2),ra(),No(n,2)}if(n=jo(s),n===null&&Eo(e,t,s,ya,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else Eo(e,t,s,null,i)}}function jo(e){return e=Ua(e),Uo(e)}var ya=null;function Uo(e){if(ya=null,e=Qe(e),e!==null){var t=Se(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=ie(t),e!==null)return e;e=null}else if(i===31){if(e=f(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 ya=e,null}function Lf(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(Tt()){case oi:return 2;case di:return 8;case Lt:case yi:return 32;case et:return 268435456;default:return 32}default:return 32}}var qo=!1,ls=null,os=null,cs=null,nn=new Map,an=new Map,us=[],nv="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 Of(e,t){switch(e){case"focusin":case"focusout":ls=null;break;case"dragenter":case"dragleave":os=null;break;case"mouseover":case"mouseout":cs=null;break;case"pointerover":case"pointerout":nn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":an.delete(t.pointerId)}}function ln(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=Pt(t),t!==null&&Rf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function av(e,t,i,s,r){switch(t){case"focusin":return ls=ln(ls,e,t,i,s,r),!0;case"dragenter":return os=ln(os,e,t,i,s,r),!0;case"mouseover":return cs=ln(cs,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return nn.set(n,ln(nn.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,an.set(n,ln(an.get(n)||null,e,t,i,s,r)),!0}return!1}function Bf(e){var t=Qe(e.target);if(t!==null){var i=Se(t);if(i!==null){if(t=i.tag,t===13){if(t=ie(i),t!==null){e.blockedOn=t,k(e.priority,function(){Mf(i)});return}}else if(t===31){if(t=f(i),t!==null){e.blockedOn=t,k(e.priority,function(){Mf(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 ba(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=jo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ja=s,i.target.dispatchEvent(s),ja=null}else return t=Pt(i),t!==null&&Rf(t),e.blockedOn=i,!1;t.shift()}return!0}function kf(e,t,i){ba(e)&&i.delete(t)}function lv(){qo=!1,ls!==null&&ba(ls)&&(ls=null),os!==null&&ba(os)&&(os=null),cs!==null&&ba(cs)&&(cs=null),nn.forEach(kf),an.forEach(kf)}function Ca(e,t){e.blockedOn===t&&(e.blockedOn=null,qo||(qo=!0,te.unstable_scheduleCallback(te.unstable_NormalPriority,lv)))}var Ea=null;function Hf(e){Ea!==e&&(Ea=e,te.unstable_scheduleCallback(te.unstable_NormalPriority,function(){Ea===e&&(Ea=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(Uo(s||i)===null)continue;break}var n=Pt(i);n!==null&&(e.splice(t,3),t-=3,zl(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function vr(e){function t(H){return Ca(H,e)}ls!==null&&Ca(ls,e),os!==null&&Ca(os,e),cs!==null&&Ca(cs,e),nn.forEach(t),an.forEach(t);for(var i=0;i<us.length;i++){var s=us[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<us.length&&(i=us[0],i.blockedOn===null);)Bf(i),i.blockedOn===null&&us.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[he]||null;if(typeof n=="function")g||Hf(i);else if(g){var T=null;if(n&&n.hasAttribute("formAction")){if(r=n,g=n[he]||null)T=g.formAction;else if(Uo(r)!==null)continue}else T=g.action;typeof T=="function"?i[s+1]=T:(i.splice(s,3),s-=3),Hf(i)}}}function Nf(){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 Io(e){this._internalRoot=e}wa.prototype.render=Io.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var i=t.current,s=Xt();Af(i,s,e,t,null,null)},wa.prototype.unmount=Io.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Af(e.current,2,null,e,null,null),ra(),t[we]=null}};function wa(e){this._internalRoot=e}wa.prototype.unstable_scheduleHydration=function(e){if(e){var t=fn();e={blockedOn:null,target:e,priority:t};for(var i=0;i<us.length&&t!==0&&t<us[i].priority;i++);us.splice(i,0,e),i===0&&Bf(e)}};var zf=me.version;if(zf!=="19.2.8")throw Error(G(527,zf,"19.2.8"));W.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?S(e):null,e=e===null?null:e.stateNode,e};var ov={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xa.isDisabled&&xa.supportsFiber)try{Wt=xa.inject(ov),ft=xa}catch{}}return cn.createRoot=function(e,t){if(!de(e))throw Error(G(299));var i=!1,s="",r=Yu,n=Ku,g=Vu;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=xf(e,1,!1,null,null,i,s,null,r,n,g,Nf),e[we]=t.current,Co(e),new Io(t)},cn.hydrateRoot=function(e,t,i){if(!de(e))throw Error(G(299));var s=!1,r="",n=Yu,g=Ku,T=Vu,H=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(n=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError),i.formState!==void 0&&(H=i.formState)),t=xf(e,1,!0,t,i??null,s,r,H,n,g,T,Nf),t.context=Df(null),i=t.current,s=Xt(),s=Hs(s),r=Fi(s),r.callback=null,Zi(i,r,s),i=s,t.current.lanes=i,_s(t,i),pi(t),e[we]=t.current,Co(e),new wa(t)},cn.version="19.2.8",cn}var Wf;function pv(){if(Wf)return Ko.exports;Wf=1;function te(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(te)}catch(me){console.error(me)}}return te(),Ko.exports=gv(),Ko.exports}var Sv=pv(),Po={exports:{}},Pf;function yv(){return Pf||(Pf=1,(function(te,me){(function(le,G){te.exports=G()})(globalThis,(()=>(()=>{var le={4567:function(ie,f,h){var d=this&&this.__decorate||function(a,l,_,C){var b,E=arguments.length,v=E<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,l,_,C);else for(var D=a.length-1;D>=0;D--)(b=a[D])&&(v=(E<3?b(v):E>3?b(l,_,v):b(l,_))||v);return E>3&&v&&Object.defineProperty(l,_,v),v},S=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(f,"__esModule",{value:!0}),f.AccessibilityManager=void 0;const u=h(9042),p=h(9924),y=h(844),x=h(4725),m=h(2585),o=h(3656);let c=f.AccessibilityManager=class extends y.Disposable{constructor(a,l,_,C){super(),this._terminal=a,this._coreBrowserService=_,this._renderService=C,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let b=0;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);if(this._topBoundaryFocusListener=b=>this._handleBoundaryFocus(b,0),this._bottomBoundaryFocusListener=b=>this._handleBoundaryFocus(b,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((b=>this._handleResize(b.rows)))),this.register(this._terminal.onRender((b=>this._refreshRows(b.start,b.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((b=>this._handleChar(b)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
10
|
+
`)))),this.register(this._terminal.onA11yTab((b=>this._handleTab(b)))),this.register(this._terminal.onKey((b=>this._handleKey(b.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,o.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(a){for(let l=0;l<a;l++)this._handleChar(" ")}_handleChar(a){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
|
|
11
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(a){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(a)||this._charsToConsume.push(a)}_refreshRows(a,l){this._liveRegionDebouncer.refresh(a,l,this._terminal.rows)}_renderRows(a,l){const _=this._terminal.buffer,C=_.lines.length.toString();for(let b=a;b<=l;b++){const E=_.lines.get(_.ydisp+b),v=[],D=E?.translateToString(!0,void 0,void 0,v)||"",z=(_.ydisp+b+1).toString(),N=this._rowElements[b];N&&(D.length===0?(N.innerText=" ",this._rowColumns.set(N,[0,1])):(N.textContent=D,this._rowColumns.set(N,v)),N.setAttribute("aria-posinset",z),N.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(a,l){const _=a.target,C=this._rowElements[l===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||a.relatedTarget!==C)return;let b,E;if(l===0?(b=_,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(b=this._rowElements.shift(),E=_,this._rowContainer.removeChild(b)),b.removeEventListener("focus",this._topBoundaryFocusListener),E.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const v=this._createAccessibilityTreeNode();this._rowElements.unshift(v),this._rowContainer.insertAdjacentElement("afterbegin",v)}else{const v=this._createAccessibilityTreeNode();this._rowElements.push(v),this._rowContainer.appendChild(v)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),a.preventDefault(),a.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const a=document.getSelection();if(!a)return;if(a.isCollapsed)return void(this._rowContainer.contains(a.anchorNode)&&this._terminal.clearSelection());if(!a.anchorNode||!a.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:a.anchorNode,offset:a.anchorOffset},_={node:a.focusNode,offset:a.focusOffset};if((l.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===_.node&&l.offset>_.offset)&&([l,_]=[_,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const C=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:C,offset:C.textContent?.length??0}),!this._rowContainer.contains(_.node))return;const b=({node:D,offset:z})=>{const N=D instanceof Text?D.parentNode:D;let q=parseInt(N?.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const B=this._rowColumns.get(N);if(!B)return console.warn("columns is null. Race condition?"),null;let F=z<B.length?B[z]:B.slice(-1)[0]+1;return F>=this._terminal.cols&&(++q,F=0),{row:q,column:F}},E=b(l),v=b(_);if(E&&v){if(E.row>v.row||E.row===v.row&&E.column>=v.column)throw new Error("invalid range");this._terminal.select(E.column,E.row,(v.row-E.row)*this._terminal.cols-E.column+v.column)}}_handleResize(a){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const a=this._coreBrowserService.mainDocument.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a}_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 a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a])}}_refreshRowDimensions(a){a.style.height=`${this._renderService.dimensions.css.cell.height}px`}};f.AccessibilityManager=c=d([S(1,m.IInstantiationService),S(2,x.ICoreBrowserService),S(3,x.IRenderService)],c)},3614:(ie,f)=>{function h(p){return p.replace(/\r?\n/g,"\r")}function d(p,y){return y?"\x1B[200~"+p+"\x1B[201~":p}function S(p,y,x,m){p=d(p=h(p),x.decPrivateModes.bracketedPasteMode&&m.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(p,!0),y.value=""}function u(p,y,x){const m=x.getBoundingClientRect(),o=p.clientX-m.left-10,c=p.clientY-m.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${o}px`,y.style.top=`${c}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(f,"__esModule",{value:!0}),f.rightClickHandler=f.moveTextAreaUnderMouseCursor=f.paste=f.handlePasteEvent=f.copyHandler=f.bracketTextForPaste=f.prepareTextForTerminal=void 0,f.prepareTextForTerminal=h,f.bracketTextForPaste=d,f.copyHandler=function(p,y){p.clipboardData&&p.clipboardData.setData("text/plain",y.selectionText),p.preventDefault()},f.handlePasteEvent=function(p,y,x,m){p.stopPropagation(),p.clipboardData&&S(p.clipboardData.getData("text/plain"),y,x,m)},f.paste=S,f.moveTextAreaUnderMouseCursor=u,f.rightClickHandler=function(p,y,x,m,o){u(p,y,x),o&&m.rightClickSelect(p),y.value=m.selectionText,y.select()}},7239:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ColorContrastCache=void 0;const d=h(1505);f.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(S,u,p){this._css.set(S,u,p)}getCss(S,u){return this._css.get(S,u)}setColor(S,u,p){this._color.set(S,u,p)}getColor(S,u){return this._color.get(S,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.addDisposableDomListener=void 0,f.addDisposableDomListener=function(h,d,S,u){h.addEventListener(d,S,u);let p=!1;return{dispose:()=>{p||(p=!0,h.removeEventListener(d,S,u))}}}},3551:function(ie,f,h){var d=this&&this.__decorate||function(c,a,l,_){var C,b=arguments.length,E=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,a,l,_);else for(var v=c.length-1;v>=0;v--)(C=c[v])&&(E=(b<3?C(E):b>3?C(a,l,E):C(a,l))||E);return b>3&&E&&Object.defineProperty(a,l,E),E},S=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(f,"__esModule",{value:!0}),f.Linkifier=void 0;const u=h(3656),p=h(8460),y=h(844),x=h(2585),m=h(4725);let o=f.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(c,a,l,_,C){super(),this._element=c,this._mouseService=a,this._renderService=l,this._bufferService=_,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){this._lastMouseEvent=c;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!a)return;this._isMouseOut=!1;const l=c.composedPath();for(let _=0;_<l.length;_++){const C=l[_];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&a.x===this._lastBufferCell.x&&a.y===this._lastBufferCell.y||(this._handleHover(a),this._lastBufferCell=a)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,a){this._activeProviderReplies&&a||(this._activeProviderReplies?.forEach((_=>{_?.forEach((C=>{C.link.dispose&&C.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let l=!1;for(const[_,C]of this._linkProviderService.linkProviders.entries())a?this._activeProviderReplies?.get(_)&&(l=this._checkLinkProviderResult(_,c,l)):C.provideLinks(c.y,(b=>{if(this._isMouseOut)return;const E=b?.map((v=>({link:v})));this._activeProviderReplies?.set(_,E),l=this._checkLinkProviderResult(_,c,l),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,a){const l=new Set;for(let _=0;_<a.size;_++){const C=a.get(_);if(C)for(let b=0;b<C.length;b++){const E=C[b],v=E.link.range.start.y<c?0:E.link.range.start.x,D=E.link.range.end.y>c?this._bufferService.cols:E.link.range.end.x;for(let z=v;z<=D;z++){if(l.has(z)){C.splice(b--,1);break}l.add(z)}}}}_checkLinkProviderResult(c,a,l){if(!this._activeProviderReplies)return l;const _=this._activeProviderReplies.get(c);let C=!1;for(let b=0;b<c;b++)this._activeProviderReplies.has(b)&&!this._activeProviderReplies.get(b)||(C=!0);if(!C&&_){const b=_.find((E=>this._linkAtPosition(E.link,a)));b&&(l=!0,this._handleNewLink(b))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let b=0;b<this._activeProviderReplies.size;b++){const E=this._activeProviderReplies.get(b)?.find((v=>this._linkAtPosition(v.link,a)));if(E){l=!0,this._handleNewLink(E);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);a&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,a)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,a){this._currentLink&&this._lastMouseEvent&&(!c||!a||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(c.link,a)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:l=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:l=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const _=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(_,C),this._lastMouseEvent)){const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._askForLink(b,!1)}}))))}_linkHover(c,a,l){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(l,a.text)}_fireUnderlineEvent(c,a){const l=c.range,_=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-_-1,l.end.x,l.end.y-_-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(c,a,l){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(l,a.text)}_linkAtPosition(c,a){const l=c.range.start.y*this._bufferService.cols+c.range.start.x,_=c.range.end.y*this._bufferService.cols+c.range.end.x,C=a.y*this._bufferService.cols+a.x;return l<=C&&C<=_}_positionFromMouseEvent(c,a,l){const _=l.getCoords(c,a,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,a,l,_,C){return{x1:c,y1:a,x2:l,y2:_,cols:this._bufferService.cols,fg:C}}};f.Linkifier=o=d([S(1,m.IMouseService),S(2,m.IRenderService),S(3,x.IBufferService),S(4,m.ILinkProviderService)],o)},9042:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.tooMuchOutput=f.promptLabel=void 0,f.promptLabel="Terminal input",f.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(ie,f,h){var d=this&&this.__decorate||function(m,o,c,a){var l,_=arguments.length,C=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(m,o,c,a);else for(var b=m.length-1;b>=0;b--)(l=m[b])&&(C=(_<3?l(C):_>3?l(o,c,C):l(o,c))||C);return _>3&&C&&Object.defineProperty(o,c,C),C},S=this&&this.__param||function(m,o){return function(c,a){o(c,a,m)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OscLinkProvider=void 0;const u=h(511),p=h(2585);let y=f.OscLinkProvider=class{constructor(m,o,c){this._bufferService=m,this._optionsService=o,this._oscLinkService=c}provideLinks(m,o){const c=this._bufferService.buffer.lines.get(m-1);if(!c)return void o(void 0);const a=[],l=this._optionsService.rawOptions.linkHandler,_=new u.CellData,C=c.getTrimmedLength();let b=-1,E=-1,v=!1;for(let D=0;D<C;D++)if(E!==-1||c.hasContent(D)){if(c.loadCell(D,_),_.hasExtendedAttrs()&&_.extended.urlId){if(E===-1){E=D,b=_.extended.urlId;continue}v=_.extended.urlId!==b}else E!==-1&&(v=!0);if(v||E!==-1&&D===C-1){const z=this._oscLinkService.getLinkData(b)?.uri;if(z){const N={start:{x:E+1,y:m},end:{x:D+(v||D!==C-1?0:1),y:m}};let q=!1;if(!l?.allowNonHttpProtocols)try{const B=new URL(z);["http:","https:"].includes(B.protocol)||(q=!0)}catch{q=!0}q||a.push({text:z,range:N,activate:(B,F)=>l?l.activate(B,F,N):x(0,F),hover:(B,F)=>l?.hover?.(B,F,N),leave:(B,F)=>l?.leave?.(B,F,N)})}v=!1,_.hasExtendedAttrs()&&_.extended.urlId?(E=D,b=_.extended.urlId):(E=-1,b=-1)}}o(a)}};function x(m,o){if(confirm(`Do you want to navigate to ${o}?
|
|
12
|
+
|
|
13
|
+
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}}f.OscLinkProvider=y=d([S(0,p.IBufferService),S(1,p.IOptionsService),S(2,p.IOscLinkService)],y)},6193:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.RenderDebouncer=void 0,f.RenderDebouncer=class{constructor(h,d){this._renderCallback=h,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(h){return this._refreshCallbacks.push(h),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(h,d,S){this._rowCount=S,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const h of this._refreshCallbacks)h(0);this._refreshCallbacks=[]}}},3236:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const d=h(3614),S=h(3656),u=h(3551),p=h(9042),y=h(3730),x=h(1680),m=h(3107),o=h(5744),c=h(2950),a=h(1296),l=h(428),_=h(4269),C=h(5114),b=h(8934),E=h(3230),v=h(9312),D=h(4725),z=h(6731),N=h(8055),q=h(8969),B=h(8460),F=h(844),ne=h(6114),j=h(8437),W=h(2584),ee=h(7399),A=h(5941),O=h(9074),w=h(2585),L=h(5435),K=h(4567),Q=h(779);class ue extends q.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(I={}){super(I),this.browser=ne,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new F.MutableDisposable),this._onCursorMove=this.register(new B.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new B.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new B.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new B.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new B.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new B.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new B.EventEmitter),this._onBlur=this.register(new B.EventEmitter),this._onA11yCharEmitter=this.register(new B.EventEmitter),this._onA11yTabEmitter=this.register(new B.EventEmitter),this._onWillOpen=this.register(new B.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(w.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Q.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((R,$)=>this.refresh(R,$)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((R=>this._reportWindowsOptions(R)))),this.register(this._inputHandler.onColor((R=>this._handleColorEvent(R)))),this.register((0,B.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,B.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((R=>this._afterResize(R.cols,R.rows)))),this.register((0,F.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(I){if(this._themeService)for(const R of I){let $,oe="";switch(R.index){case 256:$="foreground",oe="10";break;case 257:$="background",oe="11";break;case 258:$="cursor",oe="12";break;default:$="ansi",oe="4;"+R.index}switch(R.type){case 0:const ve=N.color.toColorRGB($==="ansi"?this._themeService.colors.ansi[R.index]:this._themeService.colors[$]);this.coreService.triggerDataEvent(`${W.C0.ESC}]${oe};${(0,A.toRgbString)(ve)}${W.C1_ESCAPED.ST}`);break;case 1:if($==="ansi")this._themeService.modifyColors((_e=>_e.ansi[R.index]=N.channels.toColor(...R.color)));else{const _e=$;this._themeService.modifyColors((Ae=>Ae[_e]=N.channels.toColor(...R.color)))}break;case 2:this._themeService.restoreColor(R.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(I){I?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(K.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(I){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(W.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(W.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 I=this.buffer.ybase+this.buffer.y,R=this.buffer.lines.get(I);if(!R)return;const $=Math.min(this.buffer.x,this.cols-1),oe=this._renderService.dimensions.css.cell.height,ve=R.getWidth($),_e=this._renderService.dimensions.css.cell.width*ve,Ae=this.buffer.y*this._renderService.dimensions.css.cell.height,je=$*this._renderService.dimensions.css.cell.width;this.textarea.style.left=je+"px",this.textarea.style.top=Ae+"px",this.textarea.style.width=_e+"px",this.textarea.style.height=oe+"px",this.textarea.style.lineHeight=oe+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,S.addDisposableDomListener)(this.element,"copy",(R=>{this.hasSelection()&&(0,d.copyHandler)(R,this._selectionService)})));const I=R=>(0,d.handlePasteEvent)(R,this.textarea,this.coreService,this.optionsService);this.register((0,S.addDisposableDomListener)(this.textarea,"paste",I)),this.register((0,S.addDisposableDomListener)(this.element,"paste",I)),ne.isFirefox?this.register((0,S.addDisposableDomListener)(this.element,"mousedown",(R=>{R.button===2&&(0,d.rightClickHandler)(R,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,S.addDisposableDomListener)(this.element,"contextmenu",(R=>{(0,d.rightClickHandler)(R,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ne.isLinux&&this.register((0,S.addDisposableDomListener)(this.element,"auxclick",(R=>{R.button===1&&(0,d.moveTextAreaUnderMouseCursor)(R,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,S.addDisposableDomListener)(this.textarea,"keyup",(I=>this._keyUp(I)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keydown",(I=>this._keyDown(I)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keypress",(I=>this._keyPress(I)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionupdate",(I=>this._compositionHelper.compositionupdate(I)))),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,S.addDisposableDomListener)(this.textarea,"input",(I=>this._inputEvent(I)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(I){if(!I)throw new Error("Terminal requires a parent element.");if(I.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=I.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),I.appendChild(this.element);const R=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),R.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,S.addDisposableDomListener)(this.screenElement,"mousemove",($=>this.updateCursorStyle($)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),R.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),ne.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(C.CoreBrowserService,this.textarea,I.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,S.addDisposableDomListener)(this.textarea,"focus",($=>this._handleTextAreaFocus($)))),this.register((0,S.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(z.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(($=>this._onRender.fire($)))),this.onResize(($=>this._renderService.resize($.cols,$.rows))),this._compositionView=this._document.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._mouseService=this._instantiationService.createInstance(b.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(R);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(x.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.linkifier)),this._instantiationService.setService(D.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,S.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(m.BufferDecorationRenderer,this.screenElement)),this.register((0,S.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(K.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",($=>this._handleScreenReaderModeOptionChange($)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",($=>{!this._overviewRulerRenderer&&$&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.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,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const I=this,R=this.element;function $(_e){const Ae=I._mouseService.getMouseReportCoords(_e,I.screenElement);if(!Ae)return!1;let je,Ke;switch(_e.overrideType||_e.type){case"mousemove":Ke=32,_e.buttons===void 0?(je=3,_e.button!==void 0&&(je=_e.button<3?_e.button:3)):je=1&_e.buttons?0:4&_e.buttons?1:2&_e.buttons?2:3;break;case"mouseup":Ke=0,je=_e.button<3?_e.button:3;break;case"mousedown":Ke=1,je=_e.button<3?_e.button:3;break;case"wheel":if(I._customWheelEventHandler&&I._customWheelEventHandler(_e)===!1||I.viewport.getLinesScrolled(_e)===0)return!1;Ke=_e.deltaY<0?0:1,je=4;break;default:return!1}return!(Ke===void 0||je===void 0||je>4)&&I.coreMouseService.triggerMouseEvent({col:Ae.col,row:Ae.row,x:Ae.x,y:Ae.y,button:je,action:Ke,ctrl:_e.ctrlKey,alt:_e.altKey,shift:_e.shiftKey})}const oe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:_e=>($(_e),_e.buttons||(this._document.removeEventListener("mouseup",oe.mouseup),oe.mousedrag&&this._document.removeEventListener("mousemove",oe.mousedrag)),this.cancel(_e)),wheel:_e=>($(_e),this.cancel(_e,!0)),mousedrag:_e=>{_e.buttons&&$(_e)},mousemove:_e=>{_e.buttons||$(_e)}};this.register(this.coreMouseService.onProtocolChange((_e=>{_e?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(_e)),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&_e?oe.mousemove||(R.addEventListener("mousemove",ve.mousemove),oe.mousemove=ve.mousemove):(R.removeEventListener("mousemove",oe.mousemove),oe.mousemove=null),16&_e?oe.wheel||(R.addEventListener("wheel",ve.wheel,{passive:!1}),oe.wheel=ve.wheel):(R.removeEventListener("wheel",oe.wheel),oe.wheel=null),2&_e?oe.mouseup||(oe.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",oe.mouseup),oe.mouseup=null),4&_e?oe.mousedrag||(oe.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",oe.mousedrag),oe.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,S.addDisposableDomListener)(R,"mousedown",(_e=>{if(_e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(_e))return $(_e),oe.mouseup&&this._document.addEventListener("mouseup",oe.mouseup),oe.mousedrag&&this._document.addEventListener("mousemove",oe.mousedrag),this.cancel(_e)}))),this.register((0,S.addDisposableDomListener)(R,"wheel",(_e=>{if(!oe.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(_e)===!1)return!1;if(!this.buffer.hasScrollback){const Ae=this.viewport.getLinesScrolled(_e);if(Ae===0)return;const je=W.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(_e.deltaY<0?"A":"B");let Ke="";for(let tt=0;tt<Math.abs(Ae);tt++)Ke+=je;return this.coreService.triggerDataEvent(Ke,!0),this.cancel(_e,!0)}return this.viewport.handleWheel(_e)?this.cancel(_e):void 0}}),{passive:!1})),this.register((0,S.addDisposableDomListener)(R,"touchstart",(_e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(_e),this.cancel(_e)}),{passive:!0})),this.register((0,S.addDisposableDomListener)(R,"touchmove",(_e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(_e)?void 0:this.cancel(_e)}),{passive:!1}))}refresh(I,R){this._renderService?.refreshRows(I,R)}updateCursorStyle(I){this._selectionService?.shouldColumnSelect(I)?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(I,R,$=0){$===1?(super.scrollLines(I,R,$),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(I)}paste(I){(0,d.paste)(I,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(I){this._customKeyEventHandler=I}attachCustomWheelEventHandler(I){this._customWheelEventHandler=I}registerLinkProvider(I){return this._linkProviderService.registerLinkProvider(I)}registerCharacterJoiner(I){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const R=this._characterJoinerService.register(I);return this.refresh(0,this.rows-1),R}deregisterCharacterJoiner(I){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(I)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(I){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+I)}registerDecoration(I){return this._decorationService.registerDecoration(I)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(I,R,$){this._selectionService.setSelection(I,R,$)}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(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(I,R){this._selectionService?.selectLines(I,R)}_keyDown(I){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(I)===!1)return!1;const R=this.browser.isMac&&this.options.macOptionIsMeta&&I.altKey;if(!R&&!this._compositionHelper.keydown(I))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;R||I.key!=="Dead"&&I.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const $=(0,ee.evaluateKeyboardEvent)(I,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(I),$.type===3||$.type===2){const oe=this.rows-1;return this.scrollLines($.type===2?-oe:oe),this.cancel(I,!0)}return $.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,I)||($.cancel&&this.cancel(I,!0),!$.key||!!(I.key&&!I.ctrlKey&&!I.altKey&&!I.metaKey&&I.key.length===1&&I.key.charCodeAt(0)>=65&&I.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):($.key!==W.C0.ETX&&$.key!==W.C0.CR||(this.textarea.value=""),this._onKey.fire({key:$.key,domEvent:I}),this._showCursor(),this.coreService.triggerDataEvent($.key,!0),!this.optionsService.rawOptions.screenReaderMode||I.altKey||I.ctrlKey?this.cancel(I,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(I,R){const $=I.isMac&&!this.options.macOptionIsMeta&&R.altKey&&!R.ctrlKey&&!R.metaKey||I.isWindows&&R.altKey&&R.ctrlKey&&!R.metaKey||I.isWindows&&R.getModifierState("AltGraph");return R.type==="keypress"?$:$&&(!R.keyCode||R.keyCode>47)}_keyUp(I){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(I)===!1||((function(R){return R.keyCode===16||R.keyCode===17||R.keyCode===18})(I)||this.focus(),this.updateCursorStyle(I),this._keyPressHandled=!1)}_keyPress(I){let R;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(I)===!1)return!1;if(this.cancel(I),I.charCode)R=I.charCode;else if(I.which===null||I.which===void 0)R=I.keyCode;else{if(I.which===0||I.charCode===0)return!1;R=I.which}return!(!R||(I.altKey||I.ctrlKey||I.metaKey)&&!this._isThirdLevelShift(this.browser,I)||(R=String.fromCharCode(R),this._onKey.fire({key:R,domEvent:I}),this._showCursor(),this.coreService.triggerDataEvent(R,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(I){if(I.data&&I.inputType==="insertText"&&(!I.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const R=I.data;return this.coreService.triggerDataEvent(R,!0),this.cancel(I),!0}return!1}resize(I,R){I!==this.cols||R!==this.rows?super.resize(I,R):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(I,R){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){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 I=1;I<this.rows;I++)this.buffer.lines.push(this.buffer.getBlankLine(j.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const I=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=I,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(W.C0.ESC+"[I"):this.coreService.triggerDataEvent(W.C0.ESC+"[O")}_reportWindowsOptions(I){if(this._renderService)switch(I){case L.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const R=this._renderService.dimensions.css.canvas.width.toFixed(0),$=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${W.C0.ESC}[4;${$};${R}t`);break;case L.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const oe=this._renderService.dimensions.css.cell.width.toFixed(0),ve=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${W.C0.ESC}[6;${ve};${oe}t`)}}cancel(I,R){if(this.options.cancelEvents||R)return I.preventDefault(),I.stopPropagation(),!1}}f.Terminal=ue},9924:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.TimeBasedDebouncer=void 0,f.TimeBasedDebouncer=class{constructor(h,d=1e3){this._renderCallback=h,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(h,d,S){this._rowCount=S,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=u-this._lastRefreshMs,y=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d)}}},1680:function(ie,f,h){var d=this&&this.__decorate||function(c,a,l,_){var C,b=arguments.length,E=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,a,l,_);else for(var v=c.length-1;v>=0;v--)(C=c[v])&&(E=(b<3?C(E):b>3?C(a,l,E):C(a,l))||E);return b>3&&E&&Object.defineProperty(a,l,E),E},S=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(f,"__esModule",{value:!0}),f.Viewport=void 0;const u=h(3656),p=h(4725),y=h(8460),x=h(844),m=h(2585);let o=f.Viewport=class extends x.Disposable{constructor(c,a,l,_,C,b,E,v){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=l,this._optionsService=_,this._charSizeService=C,this._renderService=b,this._coreBrowserService=E,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(v.colors),this.register(v.onChangeColors((D=>this._handleThemeChange(D)))),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._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.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 l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&l<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){let l,_="";const C=[],b=a??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let v=c;v<b;v++){const D=E.get(v);if(!D)continue;const z=E.get(v+1)?.isWrapped;if(_+=D.translateToString(!z),!z||v===E.length-1){const N=document.createElement("div");N.textContent=_,C.push(N),_.length>0&&(l=N),_=""}}return{bufferElements:C,cursorElement:l}}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 l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&a.altKey||l==="ctrl"&&a.ctrlKey||l==="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))}};f.Viewport=o=d([S(2,m.IBufferService),S(3,m.IOptionsService),S(4,p.ICharSizeService),S(5,p.IRenderService),S(6,p.ICoreBrowserService),S(7,p.IThemeService)],o)},3107:function(ie,f,h){var d=this&&this.__decorate||function(m,o,c,a){var l,_=arguments.length,C=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(m,o,c,a);else for(var b=m.length-1;b>=0;b--)(l=m[b])&&(C=(_<3?l(C):_>3?l(o,c,C):l(o,c))||C);return _>3&&C&&Object.defineProperty(o,c,C),C},S=this&&this.__param||function(m,o){return function(c,a){o(c,a,m)}};Object.defineProperty(f,"__esModule",{value:!0}),f.BufferDecorationRenderer=void 0;const u=h(4725),p=h(844),y=h(2585);let x=f.BufferDecorationRenderer=class extends p.Disposable{constructor(m,o,c,a,l){super(),this._screenElement=m,this._bufferService=o,this._coreBrowserService=c,this._decorationService=a,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((_=>this._removeDecoration(_)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const m of this._decorationService.decorations)this._renderDecoration(m);this._dimensionsChanged=!1}_renderDecoration(m){this._refreshStyle(m),this._dimensionsChanged&&this._refreshXPosition(m)}_createElement(m){const o=this._coreBrowserService.mainDocument.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",m?.options?.layer==="top"),o.style.width=`${Math.round((m.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(m.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(m.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 c=m.options.x??0;return c&&c>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(m,o),o}_refreshStyle(m){const o=m.marker.line-this._bufferService.buffers.active.ydisp;if(o<0||o>=this._bufferService.rows)m.element&&(m.element.style.display="none",m.onRenderEmitter.fire(m.element));else{let c=this._decorationElements.get(m);c||(c=this._createElement(m),m.element=c,this._decorationElements.set(m,c),this._container.appendChild(c),m.onDispose((()=>{this._decorationElements.delete(m),c.remove()}))),c.style.top=o*this._renderService.dimensions.css.cell.height+"px",c.style.display=this._altBufferIsActive?"none":"block",m.onRenderEmitter.fire(c)}}_refreshXPosition(m,o=m.element){if(!o)return;const c=m.options.x??0;(m.options.anchor||"left")==="right"?o.style.right=c?c*this._renderService.dimensions.css.cell.width+"px":"":o.style.left=c?c*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(m){this._decorationElements.get(m)?.remove(),this._decorationElements.delete(m),m.dispose()}};f.BufferDecorationRenderer=x=d([S(1,y.IBufferService),S(2,u.ICoreBrowserService),S(3,y.IDecorationService),S(4,u.IRenderService)],x)},5871:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ColorZoneStore=void 0,f.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(h){if(h.options.overviewRulerOptions){for(const d of this._zones)if(d.color===h.options.overviewRulerOptions.color&&d.position===h.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,h.marker.line))return;if(this._lineAdjacentToZone(d,h.marker.line,h.options.overviewRulerOptions.position))return void this._addLineToZone(d,h.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=h.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=h.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=h.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=h.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:h.options.overviewRulerOptions.color,position:h.options.overviewRulerOptions.position,startBufferLine:h.marker.line,endBufferLine:h.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(h){this._linePadding=h}_lineIntersectsZone(h,d){return d>=h.startBufferLine&&d<=h.endBufferLine}_lineAdjacentToZone(h,d,S){return d>=h.startBufferLine-this._linePadding[S||"full"]&&d<=h.endBufferLine+this._linePadding[S||"full"]}_addLineToZone(h,d){h.startBufferLine=Math.min(h.startBufferLine,d),h.endBufferLine=Math.max(h.endBufferLine,d)}}},5744:function(ie,f,h){var d=this&&this.__decorate||function(l,_,C,b){var E,v=arguments.length,D=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,C):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(l,_,C,b);else for(var z=l.length-1;z>=0;z--)(E=l[z])&&(D=(v<3?E(D):v>3?E(_,C,D):E(_,C))||D);return v>3&&D&&Object.defineProperty(_,C,D),D},S=this&&this.__param||function(l,_){return function(C,b){_(C,b,l)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OverviewRulerRenderer=void 0;const u=h(5871),p=h(4725),y=h(844),x=h(2585),m={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0};let a=f.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,_,C,b,E,v,D){super(),this._viewportElement=l,this._screenElement=_,this._bufferService=C,this._decorationService=b,this._renderService=E,this._optionsService=v,this._coreBrowserService=D,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const z=this._canvas.getContext("2d");if(!z)throw new Error("Ctx cannot be null");this._ctx=z,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{this._canvas?.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const l=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=l,o.center=_,o.right=l,this._refreshDrawHeightConstants(),c.full=0,c.left=0,c.center=o.left,c.right=o.left+o.center}_refreshDrawHeightConstants(){m.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);m.left=_,m.center=_,m.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*m.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*m.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*m.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*m.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const _ of this._decorationService.decorations)this._colorZoneStore.addDecoration(_);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const _ of l)_.position!=="full"&&this._renderColorZone(_);for(const _ of l)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(c[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-m[l.position||"full"]/2),o[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+m[l.position||"full"]))}_queueRefresh(l,_){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};f.OverviewRulerRenderer=a=d([S(2,x.IBufferService),S(3,x.IDecorationService),S(4,p.IRenderService),S(5,x.IOptionsService),S(6,p.ICoreBrowserService)],a)},2950:function(ie,f,h){var d=this&&this.__decorate||function(m,o,c,a){var l,_=arguments.length,C=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(m,o,c,a);else for(var b=m.length-1;b>=0;b--)(l=m[b])&&(C=(_<3?l(C):_>3?l(o,c,C):l(o,c))||C);return _>3&&C&&Object.defineProperty(o,c,C),C},S=this&&this.__param||function(m,o){return function(c,a){o(c,a,m)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CompositionHelper=void 0;const u=h(4725),p=h(2585),y=h(2584);let x=f.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(m,o,c,a,l,_){this._textarea=m,this._compositionView=o,this._bufferService=c,this._optionsService=a,this._coreService=l,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(m){this._compositionView.textContent=m.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(m){if(this._isComposing||this._isSendingComposition){if(m.keyCode===229||m.keyCode===16||m.keyCode===17||m.keyCode===18)return!1;this._finalizeComposition(!1)}return m.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(m){if(this._compositionView.classList.remove("active"),this._isComposing=!1,m){const o={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,o.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(o.start,o.end):this._textarea.value.substring(o.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const o=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(o,!0)}}_handleAnyTextareaChanges(){const m=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const o=this._textarea.value,c=o.replace(m,"");this._dataAlreadySent=c,o.length>m.length?this._coreService.triggerDataEvent(c,!0):o.length<m.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):o.length===m.length&&o!==m&&this._coreService.triggerDataEvent(o,!0)}}),0)}updateCompositionElements(m){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const o=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,l=o*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"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=l+"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"}m||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};f.CompositionHelper=x=d([S(2,p.IBufferService),S(3,p.IOptionsService),S(4,p.ICoreService),S(5,u.IRenderService)],x)},9806:(ie,f)=>{function h(d,S,u){const p=u.getBoundingClientRect(),y=d.getComputedStyle(u),x=parseInt(y.getPropertyValue("padding-left")),m=parseInt(y.getPropertyValue("padding-top"));return[S.clientX-p.left-x,S.clientY-p.top-m]}Object.defineProperty(f,"__esModule",{value:!0}),f.getCoords=f.getCoordsRelativeToElement=void 0,f.getCoordsRelativeToElement=h,f.getCoords=function(d,S,u,p,y,x,m,o,c){if(!x)return;const a=h(d,S,u);return a?(a[0]=Math.ceil((a[0]+(c?m/2:0))/m),a[1]=Math.ceil(a[1]/o),a[0]=Math.min(Math.max(a[0],1),p+(c?1:0)),a[1]=Math.min(Math.max(a[1],1),y),a):void 0}},9504:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.moveToCellSequence=void 0;const d=h(2584);function S(o,c,a,l){const _=o-u(o,a),C=c-u(c,a),b=Math.abs(_-C)-(function(E,v,D){let z=0;const N=E-u(E,D),q=v-u(v,D);for(let B=0;B<Math.abs(N-q);B++){const F=p(E,v)==="A"?-1:1;D.buffer.lines.get(N+F*B)?.isWrapped&&z++}return z})(o,c,a);return m(b,x(p(o,c),l))}function u(o,c){let a=0,l=c.buffer.lines.get(o),_=l?.isWrapped;for(;_&&o>=0&&o<c.rows;)a++,l=c.buffer.lines.get(--o),_=l?.isWrapped;return a}function p(o,c){return o>c?"A":"B"}function y(o,c,a,l,_,C){let b=o,E=c,v="";for(;b!==a||E!==l;)b+=_?1:-1,_&&b>C.cols-1?(v+=C.buffer.translateBufferLineToString(E,!1,o,b),b=0,o=0,E++):!_&&b<0&&(v+=C.buffer.translateBufferLineToString(E,!1,0,o+1),b=C.cols-1,o=b,E--);return v+C.buffer.translateBufferLineToString(E,!1,o,b)}function x(o,c){const a=c?"O":"[";return d.C0.ESC+a+o}function m(o,c){o=Math.floor(o);let a="";for(let l=0;l<o;l++)a+=c;return a}f.moveToCellSequence=function(o,c,a,l){const _=a.buffer.x,C=a.buffer.y;if(!a.buffer.hasScrollback)return(function(v,D,z,N,q,B){return S(D,N,q,B).length===0?"":m(y(v,D,v,D-u(D,q),!1,q).length,x("D",B))})(_,C,0,c,a,l)+S(C,c,a,l)+(function(v,D,z,N,q,B){let F;F=S(D,N,q,B).length>0?N-u(N,q):D;const ne=N,j=(function(W,ee,A,O,w,L){let K;return K=S(A,O,w,L).length>0?O-u(O,w):ee,W<A&&K<=O||W>=A&&K<O?"C":"D"})(v,D,z,N,q,B);return m(y(v,F,z,ne,j==="C",q).length,x(j,B))})(_,C,o,c,a,l);let b;if(C===c)return b=_>o?"D":"C",m(Math.abs(_-o),x(b,l));b=C>c?"D":"C";const E=Math.abs(C-c);return m((function(v,D){return D.cols-v})(C>c?o:_,a)+(E-1)*a.cols+1+((C>c?_:o)-1),x(b,l))}},1296:function(ie,f,h){var d=this&&this.__decorate||function(B,F,ne,j){var W,ee=arguments.length,A=ee<3?F:j===null?j=Object.getOwnPropertyDescriptor(F,ne):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(B,F,ne,j);else for(var O=B.length-1;O>=0;O--)(W=B[O])&&(A=(ee<3?W(A):ee>3?W(F,ne,A):W(F,ne))||A);return ee>3&&A&&Object.defineProperty(F,ne,A),A},S=this&&this.__param||function(B,F){return function(ne,j){F(ne,j,B)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DomRenderer=void 0;const u=h(3787),p=h(2550),y=h(2223),x=h(6171),m=h(6052),o=h(4725),c=h(8055),a=h(8460),l=h(844),_=h(2585),C="xterm-dom-renderer-owner-",b="xterm-rows",E="xterm-fg-",v="xterm-bg-",D="xterm-focus",z="xterm-selection";let N=1,q=f.DomRenderer=class extends l.Disposable{constructor(B,F,ne,j,W,ee,A,O,w,L,K,Q,ue){super(),this._terminal=B,this._document=F,this._element=ne,this._screenElement=j,this._viewportElement=W,this._helperContainer=ee,this._linkifier2=A,this._charSizeService=w,this._optionsService=L,this._bufferService=K,this._coreBrowserService=Q,this._themeService=ue,this._terminalClass=N++,this._rowElements=[],this._selectionRenderModel=(0,m.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new a.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(b),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(z),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,x.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((fe=>this._injectCss(fe)))),this._injectCss(this._themeService.colors),this._rowFactory=O.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((fe=>this._handleLinkHover(fe)))),this.register(this._linkifier2.onHideLinkUnderline((fe=>this._handleLinkLeave(fe)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const B=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*B,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*B),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/B),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/B),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 ne of this._rowElements)ne.style.width=`${this.dimensions.css.canvas.width}px`,ne.style.height=`${this.dimensions.css.cell.height}px`,ne.style.lineHeight=`${this.dimensions.css.cell.height}px`,ne.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const F=`${this._terminalSelector} .${b} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=F,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(B){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let F=`${this._terminalSelector} .${b} { color: ${B.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;F+=`${this._terminalSelector} .${b} .xterm-dim { color: ${c.color.multiplyOpacity(B.foreground,.5).css};}`,F+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const ne=`blink_underline_${this._terminalClass}`,j=`blink_bar_${this._terminalClass}`,W=`blink_block_${this._terminalClass}`;F+=`@keyframes ${ne} { 50% { border-bottom-style: hidden; }}`,F+=`@keyframes ${j} { 50% { box-shadow: none; }}`,F+=`@keyframes ${W} { 0% { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css}; } 50% { background-color: inherit; color: ${B.cursor.css}; }}`,F+=`${this._terminalSelector} .${b}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ne} 1s step-end infinite;}${this._terminalSelector} .${b}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${j} 1s step-end infinite;}${this._terminalSelector} .${b}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css};}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${B.cursor.css} !important; color: ${B.cursorAccent.css} !important;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${B.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${B.cursor.css} inset;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${B.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,F+=`${this._terminalSelector} .${z} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${z} div { position: absolute; background-color: ${B.selectionBackgroundOpaque.css};}${this._terminalSelector} .${z} div { position: absolute; background-color: ${B.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,A]of B.ansi.entries())F+=`${this._terminalSelector} .${E}${ee} { color: ${A.css}; }${this._terminalSelector} .${E}${ee}.xterm-dim { color: ${c.color.multiplyOpacity(A,.5).css}; }${this._terminalSelector} .${v}${ee} { background-color: ${A.css}; }`;F+=`${this._terminalSelector} .${E}${y.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(B.background).css}; }${this._terminalSelector} .${E}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(B.background),.5).css}; }${this._terminalSelector} .${v}${y.INVERTED_DEFAULT_COLOR} { background-color: ${B.foreground.css}; }`,this._themeStyleElement.textContent=F}_setDefaultSpacing(){const B=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${B}px`,this._rowFactory.defaultSpacing=B}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(B,F){for(let ne=this._rowElements.length;ne<=F;ne++){const j=this._document.createElement("div");this._rowContainer.appendChild(j),this._rowElements.push(j)}for(;this._rowElements.length>F;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(B,F){this._refreshRowElements(B,F),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(B,F,ne){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(B,F,ne),this.renderRows(0,this._bufferService.rows-1),!B||!F)return;this._selectionRenderModel.update(this._terminal,B,F,ne);const j=this._selectionRenderModel.viewportStartRow,W=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,A=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||A<0)return;const O=this._document.createDocumentFragment();if(ne){const w=B[0]>F[0];O.appendChild(this._createSelectionElement(ee,w?F[0]:B[0],w?B[0]:F[0],A-ee+1))}else{const w=j===ee?B[0]:0,L=ee===W?F[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(ee,w,L));const K=A-ee-1;if(O.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,K)),ee!==A){const Q=W===A?F[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(A,0,Q))}}this._selectionContainer.appendChild(O)}_createSelectionElement(B,F,ne,j=1){const W=this._document.createElement("div"),ee=F*this.dimensions.css.cell.width;let A=this.dimensions.css.cell.width*(ne-F);return ee+A>this.dimensions.css.canvas.width&&(A=this.dimensions.css.canvas.width-ee),W.style.height=j*this.dimensions.css.cell.height+"px",W.style.top=B*this.dimensions.css.cell.height+"px",W.style.left=`${ee}px`,W.style.width=`${A}px`,W}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 B of this._rowElements)B.replaceChildren()}renderRows(B,F){const ne=this._bufferService.buffer,j=ne.ybase+ne.y,W=Math.min(ne.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,A=this._optionsService.rawOptions.cursorStyle,O=this._optionsService.rawOptions.cursorInactiveStyle;for(let w=B;w<=F;w++){const L=w+ne.ydisp,K=this._rowElements[w],Q=ne.lines.get(L);if(!K||!Q)break;K.replaceChildren(...this._rowFactory.createRow(Q,L,L===j,A,O,W,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!0)}_handleLinkLeave(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!1)}_setCellUnderline(B,F,ne,j,W,ee){ne<0&&(B=0),j<0&&(F=0);const A=this._bufferService.rows-1;ne=Math.max(Math.min(ne,A),0),j=Math.max(Math.min(j,A),0),W=Math.min(W,this._bufferService.cols);const O=this._bufferService.buffer,w=O.ybase+O.y,L=Math.min(O.x,W-1),K=this._optionsService.rawOptions.cursorBlink,Q=this._optionsService.rawOptions.cursorStyle,ue=this._optionsService.rawOptions.cursorInactiveStyle;for(let fe=ne;fe<=j;++fe){const I=fe+O.ydisp,R=this._rowElements[fe],$=O.lines.get(I);if(!R||!$)break;R.replaceChildren(...this._rowFactory.createRow($,I,I===w,Q,ue,L,K,this.dimensions.css.cell.width,this._widthCache,ee?fe===ne?B:0:-1,ee?(fe===j?F:W)-1:-1))}}};f.DomRenderer=q=d([S(7,_.IInstantiationService),S(8,o.ICharSizeService),S(9,_.IOptionsService),S(10,_.IBufferService),S(11,o.ICoreBrowserService),S(12,o.IThemeService)],q)},3787:function(ie,f,h){var d=this&&this.__decorate||function(b,E,v,D){var z,N=arguments.length,q=N<3?E:D===null?D=Object.getOwnPropertyDescriptor(E,v):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(b,E,v,D);else for(var B=b.length-1;B>=0;B--)(z=b[B])&&(q=(N<3?z(q):N>3?z(E,v,q):z(E,v))||q);return N>3&&q&&Object.defineProperty(E,v,q),q},S=this&&this.__param||function(b,E){return function(v,D){E(v,D,b)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DomRendererRowFactory=void 0;const u=h(2223),p=h(643),y=h(511),x=h(2585),m=h(8055),o=h(4725),c=h(4269),a=h(6171),l=h(3734);let _=f.DomRendererRowFactory=class{constructor(b,E,v,D,z,N,q){this._document=b,this._characterJoinerService=E,this._optionsService=v,this._coreBrowserService=D,this._coreService=z,this._decorationService=N,this._themeService=q,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,E,v){this._selectionStart=b,this._selectionEnd=E,this._columnSelectMode=v}createRow(b,E,v,D,z,N,q,B,F,ne,j){const W=[],ee=this._characterJoinerService.getJoinedCharacters(E),A=this._themeService.colors;let O,w=b.getNoBgTrimmedLength();v&&w<N+1&&(w=N+1);let L=0,K="",Q=0,ue=0,fe=0,I=!1,R=0,$=!1,oe=0;const ve=[],_e=ne!==-1&&j!==-1;for(let Ae=0;Ae<w;Ae++){b.loadCell(Ae,this._workCell);let je=this._workCell.getWidth();if(je===0)continue;let Ke=!1,tt=Ae,Ee=this._workCell;if(ee.length>0&&Ae===ee[0][0]){Ke=!0;const Ue=ee.shift();Ee=new c.JoinedCellData(this._workCell,b.translateToString(!0,Ue[0],Ue[1]),Ue[1]-Ue[0]),tt=Ue[1]-1,je=Ee.getWidth()}const ni=this._isCellInSelection(Ae,E),ai=v&&Ae===N,qi=_e&&Ae>=ne&&Ae<=j;let li=!1;this._decorationService.forEachDecorationAtCell(Ae,E,void 0,(Ue=>{li=!0}));let Si=Ee.getChars()||p.WHITESPACE_CELL_CHAR;if(Si===" "&&(Ee.isUnderline()||Ee.isOverline())&&(Si=" "),oe=je*B-F.get(Si,Ee.isBold(),Ee.isItalic()),O){if(L&&(ni&&$||!ni&&!$&&Ee.bg===Q)&&(ni&&$&&A.selectionForeground||Ee.fg===ue)&&Ee.extended.ext===fe&&qi===I&&oe===R&&!ai&&!Ke&&!li){Ee.isInvisible()?K+=p.WHITESPACE_CELL_CHAR:K+=Si,L++;continue}L&&(O.textContent=K),O=this._document.createElement("span"),L=0,K=""}else O=this._document.createElement("span");if(Q=Ee.bg,ue=Ee.fg,fe=Ee.extended.ext,I=qi,R=oe,$=ni,Ke&&N>=Ae&&N<=tt&&(N=Ae),!this._coreService.isCursorHidden&&ai&&this._coreService.isCursorInitialized){if(ve.push("xterm-cursor"),this._coreBrowserService.isFocused)q&&ve.push("xterm-cursor-blink"),ve.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(z)switch(z){case"outline":ve.push("xterm-cursor-outline");break;case"block":ve.push("xterm-cursor-block");break;case"bar":ve.push("xterm-cursor-bar");break;case"underline":ve.push("xterm-cursor-underline")}}if(Ee.isBold()&&ve.push("xterm-bold"),Ee.isItalic()&&ve.push("xterm-italic"),Ee.isDim()&&ve.push("xterm-dim"),K=Ee.isInvisible()?p.WHITESPACE_CELL_CHAR:Ee.getChars()||p.WHITESPACE_CELL_CHAR,Ee.isUnderline()&&(ve.push(`xterm-underline-${Ee.extended.underlineStyle}`),K===" "&&(K=" "),!Ee.isUnderlineColorDefault()))if(Ee.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(Ee.getUnderlineColor()).join(",")})`;else{let Ue=Ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ee.isBold()&&Ue<8&&(Ue+=8),O.style.textDecorationColor=A.ansi[Ue].css}Ee.isOverline()&&(ve.push("xterm-overline"),K===" "&&(K=" ")),Ee.isStrikethrough()&&ve.push("xterm-strikethrough"),qi&&(O.style.textDecoration="underline");let gt=Ee.getFgColor(),Je=Ee.getFgColorMode(),Tt=Ee.getBgColor(),oi=Ee.getBgColorMode();const di=!!Ee.isInverse();if(di){const Ue=gt;gt=Tt,Tt=Ue;const Wt=Je;Je=oi,oi=Wt}let Lt,yi,et,Le=!1;switch(this._decorationService.forEachDecorationAtCell(Ae,E,void 0,(Ue=>{Ue.options.layer!=="top"&&Le||(Ue.backgroundColorRGB&&(oi=50331648,Tt=Ue.backgroundColorRGB.rgba>>8&16777215,Lt=Ue.backgroundColorRGB),Ue.foregroundColorRGB&&(Je=50331648,gt=Ue.foregroundColorRGB.rgba>>8&16777215,yi=Ue.foregroundColorRGB),Le=Ue.options.layer==="top")})),!Le&&ni&&(Lt=this._coreBrowserService.isFocused?A.selectionBackgroundOpaque:A.selectionInactiveBackgroundOpaque,Tt=Lt.rgba>>8&16777215,oi=50331648,Le=!0,A.selectionForeground&&(Je=50331648,gt=A.selectionForeground.rgba>>8&16777215,yi=A.selectionForeground)),Le&&ve.push("xterm-decoration-top"),oi){case 16777216:case 33554432:et=A.ansi[Tt],ve.push(`xterm-bg-${Tt}`);break;case 50331648:et=m.channels.toColor(Tt>>16,Tt>>8&255,255&Tt),this._addStyle(O,`background-color:#${C((Tt>>>0).toString(16),"0",6)}`);break;default:di?(et=A.foreground,ve.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):et=A.background}switch(Lt||Ee.isDim()&&(Lt=m.color.multiplyOpacity(et,.5)),Je){case 16777216:case 33554432:Ee.isBold()&><8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(gt+=8),this._applyMinimumContrast(O,et,A.ansi[gt],Ee,Lt,void 0)||ve.push(`xterm-fg-${gt}`);break;case 50331648:const Ue=m.channels.toColor(gt>>16&255,gt>>8&255,255>);this._applyMinimumContrast(O,et,Ue,Ee,Lt,yi)||this._addStyle(O,`color:#${C(gt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,et,A.foreground,Ee,Lt,yi)||di&&ve.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ve.length&&(O.className=ve.join(" "),ve.length=0),ai||Ke||li?O.textContent=K:L++,oe!==this.defaultSpacing&&(O.style.letterSpacing=`${oe}px`),W.push(O),Ae=tt}return O&&L&&(O.textContent=K),W}_applyMinimumContrast(b,E,v,D,z,N){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const q=this._getContrastCache(D);let B;if(z||N||(B=q.getColor(E.rgba,v.rgba)),B===void 0){const F=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);B=m.color.ensureContrastRatio(z||E,N||v,F),q.setColor((z||E).rgba,(N||v).rgba,B??null)}return!!B&&(this._addStyle(b,`color:${B.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,E){b.setAttribute("style",`${b.getAttribute("style")||""}${E};`)}_isCellInSelection(b,E){const v=this._selectionStart,D=this._selectionEnd;return!(!v||!D)&&(this._columnSelectMode?v[0]<=D[0]?b>=v[0]&&E>=v[1]&&b<D[0]&&E<=D[1]:b<v[0]&&E>=v[1]&&b>=D[0]&&E<=D[1]:E>v[1]&&E<D[1]||v[1]===D[1]&&E===v[1]&&b>=v[0]&&b<D[0]||v[1]<D[1]&&E===D[1]&&b<D[0]||v[1]<D[1]&&E===v[1]&&b>=v[0])}};function C(b,E,v){for(;b.length<v;)b=E+b;return b}f.DomRendererRowFactory=_=d([S(1,o.ICharacterJoinerService),S(2,x.IOptionsService),S(3,o.ICoreBrowserService),S(4,x.ICoreService),S(5,x.IDecorationService),S(6,o.IThemeService)],_)},2550:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.WidthCache=void 0,f.WidthCache=class{constructor(h,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=h.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const S=h.createElement("span");S.classList.add("xterm-char-measure-element");const u=h.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const p=h.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const y=h.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[S,u,p,y],this._container.appendChild(S),this._container.appendChild(u),this._container.appendChild(p),this._container.appendChild(y),d.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(h,d,S,u){h===this._font&&d===this._fontSize&&S===this._weight&&u===this._weightBold||(this._font=h,this._fontSize=d,this._weight=S,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${S}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${S}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(h,d,S){let u=0;if(!d&&!S&&h.length===1&&(u=h.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const x=this._measure(h,0);return x>0&&(this._flat[u]=x),x}let p=h;d&&(p+="B"),S&&(p+="I");let y=this._holey.get(p);if(y===void 0){let x=0;d&&(x|=1),S&&(x|=2),y=this._measure(h,x),y>0&&this._holey.set(p,y)}return y}_measure(h,d){const S=this._measureElements[d];return S.textContent=h.repeat(32),S.offsetWidth/32}}},2223:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.TEXT_BASELINE=f.DIM_OPACITY=f.INVERTED_DEFAULT_COLOR=void 0;const d=h(6114);f.INVERTED_DEFAULT_COLOR=257,f.DIM_OPACITY=.5,f.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(ie,f)=>{function h(S){return 57508<=S&&S<=57558}function d(S){return S>=128512&&S<=128591||S>=127744&&S<=128511||S>=128640&&S<=128767||S>=9728&&S<=9983||S>=9984&&S<=10175||S>=65024&&S<=65039||S>=129280&&S<=129535||S>=127462&&S<=127487}Object.defineProperty(f,"__esModule",{value:!0}),f.computeNextVariantOffset=f.createRenderDimensions=f.treatGlyphAsBackgroundColor=f.allowRescaling=f.isEmoji=f.isRestrictedPowerlineGlyph=f.isPowerlineGlyph=f.throwIfFalsy=void 0,f.throwIfFalsy=function(S){if(!S)throw new Error("value must not be falsy");return S},f.isPowerlineGlyph=h,f.isRestrictedPowerlineGlyph=function(S){return 57520<=S&&S<=57527},f.isEmoji=d,f.allowRescaling=function(S,u,p,y){return u===1&&p>Math.ceil(1.5*y)&&S!==void 0&&S>255&&!d(S)&&!h(S)&&!(function(x){return 57344<=x&&x<=63743})(S)},f.treatGlyphAsBackgroundColor=function(S){return h(S)||(function(u){return 9472<=u&&u<=9631})(S)},f.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}}}},f.computeNextVariantOffset=function(S,u,p=0){return(S-(2*Math.round(u)-p))%(2*Math.round(u))}},6052:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(S,u,p,y=!1){if(this.selectionStart=u,this.selectionEnd=p,!u||!p||u[0]===p[0]&&u[1]===p[1])return void this.clear();const x=S.buffers.active.ydisp,m=u[1]-x,o=p[1]-x,c=Math.max(m,0),a=Math.min(o,S.rows-1);c>=S.rows||a<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=m,this.viewportEndRow=o,this.viewportCappedStartRow=c,this.viewportCappedEndRow=a,this.startCol=u[0],this.endCol=p[0])}isCellSelected(S,u,p){return!!this.hasSelection&&(p-=S.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&p>=this.viewportCappedStartRow&&u<this.endCol&&p<=this.viewportCappedEndRow:u<this.startCol&&p>=this.viewportCappedStartRow&&u>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol)}}f.createSelectionRenderModel=function(){return new h}},456:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionModel=void 0,f.SelectionModel=class{constructor(h){this._bufferService=h,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 h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?h%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)-1]:[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[Math.max(h,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const h=this.selectionStart,d=this.selectionEnd;return!(!h||!d)&&(h[1]>d[1]||h[1]===d[1]&&h[0]>d[0])}handleTrim(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(ie,f,h){var d=this&&this.__decorate||function(a,l,_,C){var b,E=arguments.length,v=E<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,l,_,C);else for(var D=a.length-1;D>=0;D--)(b=a[D])&&(v=(E<3?b(v):E>3?b(l,_,v):b(l,_))||v);return E>3&&v&&Object.defineProperty(l,_,v),v},S=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CharSizeService=void 0;const u=h(2585),p=h(8460),y=h(844);let x=f.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(a,l,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new c(this._optionsService))}catch{this._measureStrategy=this.register(new o(a,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())}};f.CharSizeService=x=d([S(2,u.IOptionsService)],x);class m extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,_){l!==void 0&&l>0&&_!==void 0&&_>0&&(this._result.width=l,this._result.height=_)}}class o extends m{constructor(l,_,C){super(),this._document=l,this._parentElement=_,this._optionsService=C,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class c extends m{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(ie,f,h){var d=this&&this.__decorate||function(c,a,l,_){var C,b=arguments.length,E=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,a,l,_);else for(var v=c.length-1;v>=0;v--)(C=c[v])&&(E=(b<3?C(E):b>3?C(a,l,E):C(a,l))||E);return b>3&&E&&Object.defineProperty(a,l,E),E},S=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CharacterJoinerService=f.JoinedCellData=void 0;const u=h(3734),p=h(643),y=h(511),x=h(2585);class m extends u.AttributeData{constructor(a,l,_){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=l,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()]}}f.JoinedCellData=m;let o=f.CharacterJoinerService=class td{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(a){const l={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(l),l.id}deregister(a){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===a)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(a);if(!l||l.length===0)return[];const _=[],C=l.translateToString(!0);let b=0,E=0,v=0,D=l.getFg(0),z=l.getBg(0);for(let N=0;N<l.getTrimmedLength();N++)if(l.loadCell(N,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==D||this._workCell.bg!==z){if(N-b>1){const q=this._getJoinedRanges(C,v,E,l,b);for(let B=0;B<q.length;B++)_.push(q[B])}b=N,v=E,D=this._workCell.fg,z=this._workCell.bg}E+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const N=this._getJoinedRanges(C,v,E,l,b);for(let q=0;q<N.length;q++)_.push(N[q])}return _}_getJoinedRanges(a,l,_,C,b){const E=a.substring(l,_);let v=[];try{v=this._characterJoiners[0].handler(E)}catch(D){console.error(D)}for(let D=1;D<this._characterJoiners.length;D++)try{const z=this._characterJoiners[D].handler(E);for(let N=0;N<z.length;N++)td._mergeRanges(v,z[N])}catch(z){console.error(z)}return this._stringRangesToCellRanges(v,C,b),v}_stringRangesToCellRanges(a,l,_){let C=0,b=!1,E=0,v=a[C];if(v){for(let D=_;D<this._bufferService.cols;D++){const z=l.getWidth(D),N=l.getString(D).length||p.WHITESPACE_CELL_CHAR.length;if(z!==0){if(!b&&v[0]<=E&&(v[0]=D,b=!0),v[1]<=E){if(v[1]=D,v=a[++C],!v)break;v[0]<=E?(v[0]=D,b=!0):b=!1}E+=N}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(a,l){let _=!1;for(let C=0;C<a.length;C++){const b=a[C];if(_){if(l[1]<=b[0])return a[C-1][1]=l[1],a;if(l[1]<=b[1])return a[C-1][1]=Math.max(l[1],b[1]),a.splice(C,1),a;a.splice(C,1),C--}else{if(l[1]<=b[0])return a.splice(C,0,l),a;if(l[1]<=b[1])return b[0]=Math.min(l[0],b[0]),a;l[0]<b[1]&&(b[0]=Math.min(l[0],b[0]),_=!0)}}return _?a[a.length-1][1]=l[1]:a.push(l),a}};f.CharacterJoinerService=o=d([S(0,x.IBufferService)],o)},5114:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CoreBrowserService=void 0;const d=h(844),S=h(8460),u=h(3656);class p extends d.Disposable{constructor(m,o,c){super(),this._textarea=m,this._window=o,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new S.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new S.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((a=>this._screenDprMonitor.setWindow(a)))),this.register((0,S.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(m){this._window!==m&&(this._window=m,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}f.CoreBrowserService=p;class y extends d.Disposable{constructor(m){super(),this._parentWindow=m,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new S.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(m){this._parentWindow=m,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.LinkProviderService=void 0;const d=h(844);class S extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const y=this.linkProviders.indexOf(p);y!==-1&&this.linkProviders.splice(y,1)}}}}f.LinkProviderService=S},8934:function(ie,f,h){var d=this&&this.__decorate||function(x,m,o,c){var a,l=arguments.length,_=l<3?m:c===null?c=Object.getOwnPropertyDescriptor(m,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(x,m,o,c);else for(var C=x.length-1;C>=0;C--)(a=x[C])&&(_=(l<3?a(_):l>3?a(m,o,_):a(m,o))||_);return l>3&&_&&Object.defineProperty(m,o,_),_},S=this&&this.__param||function(x,m){return function(o,c){m(o,c,x)}};Object.defineProperty(f,"__esModule",{value:!0}),f.MouseService=void 0;const u=h(4725),p=h(9806);let y=f.MouseService=class{constructor(x,m){this._renderService=x,this._charSizeService=m}getCoords(x,m,o,c,a){return(0,p.getCoords)(window,x,m,o,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(x,m){const o=(0,p.getCoordsRelativeToElement)(window,x,m);if(this._charSizeService.hasValidSize)return o[0]=Math.min(Math.max(o[0],0),this._renderService.dimensions.css.canvas.width-1),o[1]=Math.min(Math.max(o[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(o[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(o[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(o[0]),y:Math.floor(o[1])}}};f.MouseService=y=d([S(0,u.IRenderService),S(1,u.ICharSizeService)],y)},3230:function(ie,f,h){var d=this&&this.__decorate||function(a,l,_,C){var b,E=arguments.length,v=E<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,l,_,C);else for(var D=a.length-1;D>=0;D--)(b=a[D])&&(v=(E<3?b(v):E>3?b(l,_,v):b(l,_))||v);return E>3&&v&&Object.defineProperty(l,_,v),v},S=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(f,"__esModule",{value:!0}),f.RenderService=void 0;const u=h(6193),p=h(4725),y=h(8460),x=h(844),m=h(7226),o=h(2585);let c=f.RenderService=class extends x.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(a,l,_,C,b,E,v,D){super(),this._rowCount=a,this._charSizeService=C,this._renderer=this.register(new x.MutableDisposable),this._pausedResizeTask=new m.DebouncedIdleTask,this._observerDisposable=this.register(new x.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer(((z,N)=>this._renderRows(z,N)),v),this.register(this._renderDebouncer),this.register(v.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(_.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(b.onDecorationRegistered((()=>this._fullRefresh()))),this.register(b.onDecorationRemoved((()=>this._fullRefresh()))),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(v.window,l),this.register(v.onWindowChange((z=>this._registerIntersectionObserver(z,l))))}_registerIntersectionObserver(a,l){if("IntersectionObserver"in a){const _=new a.IntersectionObserver((C=>this._handleIntersectionChange(C[C.length-1])),{threshold:0});_.observe(l),this._observerDisposable.value=(0,x.toDisposable)((()=>_.disconnect()))}}_handleIntersectionChange(a){this._isPaused=a.isIntersecting===void 0?a.intersectionRatio===0:!a.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(a,l,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(a,l,this._rowCount))}_renderRows(a,l){this._renderer.value&&(a=Math.min(a,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(a,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:a,end:l}),this._onRender.fire({start:a,end:l}),this._isNextRenderRedrawOnly=!0)}resize(a,l){this._rowCount=l,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(a){this._renderer.value=a,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(a){return this._renderDebouncer.addRefreshCallback(a)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(a,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(a,l))):this._renderer.value.handleResize(a,l),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(a,l,_){this._selectionState.start=a,this._selectionState.end=l,this._selectionState.columnSelectMode=_,this._renderer.value?.handleSelectionChanged(a,l,_)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};f.RenderService=c=d([S(2,o.IOptionsService),S(3,p.ICharSizeService),S(4,o.IDecorationService),S(5,o.IBufferService),S(6,p.ICoreBrowserService),S(7,p.IThemeService)],c)},9312:function(ie,f,h){var d=this&&this.__decorate||function(v,D,z,N){var q,B=arguments.length,F=B<3?D:N===null?N=Object.getOwnPropertyDescriptor(D,z):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(v,D,z,N);else for(var ne=v.length-1;ne>=0;ne--)(q=v[ne])&&(F=(B<3?q(F):B>3?q(D,z,F):q(D,z))||F);return B>3&&F&&Object.defineProperty(D,z,F),F},S=this&&this.__param||function(v,D){return function(z,N){D(z,N,v)}};Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionService=void 0;const u=h(9806),p=h(9504),y=h(456),x=h(4725),m=h(8460),o=h(844),c=h(6114),a=h(4841),l=h(511),_=h(2585),C=" ",b=new RegExp(C,"g");let E=f.SelectionService=class extends o.Disposable{constructor(v,D,z,N,q,B,F,ne,j){super(),this._element=v,this._screenElement=D,this._linkifier=z,this._bufferService=N,this._coreService=q,this._mouseService=B,this._optionsService=F,this._renderService=ne,this._coreBrowserService=j,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new m.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new m.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new m.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=W=>this._handleMouseMove(W),this._mouseUpListener=W=>this._handleMouseUp(W),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((W=>this._handleTrim(W))),this.register(this._bufferService.buffers.onBufferActivate((W=>this._handleBufferActivate(W)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,o.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,D=this._model.finalSelectionEnd;return!(!v||!D||v[0]===D[0]&&v[1]===D[1])}get selectionText(){const v=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!v||!D)return"";const z=this._bufferService.buffer,N=[];if(this._activeSelectionMode===3){if(v[0]===D[0])return"";const q=v[0]<D[0]?v[0]:D[0],B=v[0]<D[0]?D[0]:v[0];for(let F=v[1];F<=D[1];F++){const ne=z.translateBufferLineToString(F,!0,q,B);N.push(ne)}}else{const q=v[1]===D[1]?D[0]:void 0;N.push(z.translateBufferLineToString(v[1],!0,v[0],q));for(let B=v[1]+1;B<=D[1]-1;B++){const F=z.lines.get(B),ne=z.translateBufferLineToString(B,!0);F?.isWrapped?N[N.length-1]+=ne:N.push(ne)}if(v[1]!==D[1]){const B=z.lines.get(D[1]),F=z.translateBufferLineToString(D[1],!0,0,D[0]);B&&B.isWrapped?N[N.length-1]+=F:N.push(F)}}return N.map((q=>q.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 D=this._getMouseBufferCoords(v),z=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;return!!(z&&N&&D)&&this._areCoordsInSelection(D,z,N)}isCellInSelection(v,D){const z=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;return!(!z||!N)&&this._areCoordsInSelection([v,D],z,N)}_areCoordsInSelection(v,D,z){return v[1]>D[1]&&v[1]<z[1]||D[1]===z[1]&&v[1]===D[1]&&v[0]>=D[0]&&v[0]<z[0]||D[1]<z[1]&&v[1]===z[1]&&v[0]<z[0]||D[1]<z[1]&&v[1]===D[1]&&v[0]>=D[0]}_selectWordAtCursor(v,D){const z=this._linkifier.currentLink?.link?.range;if(z)return this._model.selectionStart=[z.start.x-1,z.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(z,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const N=this._getMouseBufferCoords(v);return!!N&&(this._selectWordAt(N,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(v,D){this._model.clearSelection(),v=Math.max(v,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(v){this._model.handleTrim(v)&&this.refresh()}_getMouseBufferCoords(v){const D=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(v){let D=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,v,this._screenElement)[1];const z=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=z?0:(D>z&&(D-=z),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}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 D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(v){this._selectWordAtCursor(v,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(v){const D=this._getMouseBufferCoords(v);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(v){return v.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(v){if(v.stopImmediatePropagation(),!this._model.selectionStart)return;const D=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 z=this._bufferService.buffer;if(this._model.selectionEnd[1]<z.lines.length){const N=z.lines.get(this._model.selectionEnd[1]);N&&N.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}D&&D[0]===this._model.selectionEnd[0]&&D[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 D=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&v.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const z=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(z&&z[0]!==void 0&&z[1]!==void 0){const N=(0,p.moveToCellSequence)(z[0]-1,z[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(N,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const v=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,z=!(!v||!D||v[0]===D[0]&&v[1]===D[1]);z?v&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&v[0]===this._oldSelectionStart[0]&&v[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(v,D,z)):this._oldHasSelection&&this._fireOnSelectionChange(v,D,z)}_fireOnSelectionChange(v,D,z){this._oldSelectionStart=v,this._oldSelectionEnd=D,this._oldHasSelection=z,this._onSelectionChange.fire()}_handleBufferActivate(v){this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(v,D){let z=D;for(let N=0;D>=N;N++){const q=v.loadCell(N,this._workCell).getChars().length;this._workCell.getWidth()===0?z--:q>1&&D!==N&&(z+=q-1)}return z}setSelection(v,D,z){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,D],this._model.selectionStartLength=z,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(v){this._isClickInSelection(v)||(this._selectWordAtCursor(v,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(v,D,z=!0,N=!0){if(v[0]>=this._bufferService.cols)return;const q=this._bufferService.buffer,B=q.lines.get(v[1]);if(!B)return;const F=q.translateBufferLineToString(v[1],!1);let ne=this._convertViewportColToCharacterIndex(B,v[0]),j=ne;const W=v[0]-ne;let ee=0,A=0,O=0,w=0;if(F.charAt(ne)===" "){for(;ne>0&&F.charAt(ne-1)===" ";)ne--;for(;j<F.length&&F.charAt(j+1)===" ";)j++}else{let Q=v[0],ue=v[0];B.getWidth(Q)===0&&(ee++,Q--),B.getWidth(ue)===2&&(A++,ue++);const fe=B.getString(ue).length;for(fe>1&&(w+=fe-1,j+=fe-1);Q>0&&ne>0&&!this._isCharWordSeparator(B.loadCell(Q-1,this._workCell));){B.loadCell(Q-1,this._workCell);const I=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,Q--):I>1&&(O+=I-1,ne-=I-1),ne--,Q--}for(;ue<B.length&&j+1<F.length&&!this._isCharWordSeparator(B.loadCell(ue+1,this._workCell));){B.loadCell(ue+1,this._workCell);const I=this._workCell.getChars().length;this._workCell.getWidth()===2?(A++,ue++):I>1&&(w+=I-1,j+=I-1),j++,ue++}}j++;let L=ne+W-ee+O,K=Math.min(this._bufferService.cols,j-ne+ee+A-O-w);if(D||F.slice(ne,j).trim()!==""){if(z&&L===0&&B.getCodePoint(0)!==32){const Q=q.lines.get(v[1]-1);if(Q&&B.isWrapped&&Q.getCodePoint(this._bufferService.cols-1)!==32){const ue=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(ue){const fe=this._bufferService.cols-ue.start;L-=fe,K+=fe}}}if(N&&L+K===this._bufferService.cols&&B.getCodePoint(this._bufferService.cols-1)!==32){const Q=q.lines.get(v[1]+1);if(Q?.isWrapped&&Q.getCodePoint(0)!==32){const ue=this._getWordAt([0,v[1]+1],!1,!1,!0);ue&&(K+=ue.length)}}return{start:L,length:K}}}_selectWordAt(v,D){const z=this._getWordAt(v,D);if(z){for(;z.start<0;)z.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[z.start,v[1]],this._model.selectionStartLength=z.length}}_selectToWordAt(v){const D=this._getWordAt(v,!0);if(D){let z=v[1];for(;D.start<0;)D.start+=this._bufferService.cols,z--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,z++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,z]}}_isCharWordSeparator(v){return v.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(v.getChars())>=0}_selectLineAt(v){const D=this._bufferService.buffer.getWrappedRangeForLine(v),z={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(z,this._bufferService.cols)}};f.SelectionService=E=d([S(3,_.IBufferService),S(4,_.ICoreService),S(5,x.IMouseService),S(6,_.IOptionsService),S(7,x.IRenderService),S(8,x.ICoreBrowserService)],E)},4725:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ILinkProviderService=f.IThemeService=f.ICharacterJoinerService=f.ISelectionService=f.IRenderService=f.IMouseService=f.ICoreBrowserService=f.ICharSizeService=void 0;const d=h(8343);f.ICharSizeService=(0,d.createDecorator)("CharSizeService"),f.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),f.IMouseService=(0,d.createDecorator)("MouseService"),f.IRenderService=(0,d.createDecorator)("RenderService"),f.ISelectionService=(0,d.createDecorator)("SelectionService"),f.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),f.IThemeService=(0,d.createDecorator)("ThemeService"),f.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(ie,f,h){var d=this&&this.__decorate||function(E,v,D,z){var N,q=arguments.length,B=q<3?v:z===null?z=Object.getOwnPropertyDescriptor(v,D):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(E,v,D,z);else for(var F=E.length-1;F>=0;F--)(N=E[F])&&(B=(q<3?N(B):q>3?N(v,D,B):N(v,D))||B);return q>3&&B&&Object.defineProperty(v,D,B),B},S=this&&this.__param||function(E,v){return function(D,z){v(D,z,E)}};Object.defineProperty(f,"__esModule",{value:!0}),f.ThemeService=f.DEFAULT_ANSI_COLORS=void 0;const u=h(7239),p=h(8055),y=h(8460),x=h(844),m=h(2585),o=p.css.toColor("#ffffff"),c=p.css.toColor("#000000"),a=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};f.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[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 D=0;D<216;D++){const z=v[D/36%6|0],N=v[D/6%6|0],q=v[D%6];E.push({css:p.channels.toCss(z,N,q),rgba:p.channels.toRgba(z,N,q)})}for(let D=0;D<24;D++){const z=8+10*D;E.push({css:p.channels.toCss(z,z,z),rgba:p.channels.toRgba(z,z,z)})}return E})());let C=f.ThemeService=class extends x.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:o,background:c,cursor:a,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(c,_),ansi:f.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(E={}){const v=this._colors;if(v.foreground=b(E.foreground,o),v.background=b(E.background,c),v.cursor=b(E.cursor,a),v.cursorAccent=b(E.cursorAccent,l),v.selectionBackgroundTransparent=b(E.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=b(E.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=E.selectionForeground?b(E.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=f.DEFAULT_ANSI_COLORS.slice(),v.ansi[0]=b(E.black,f.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=b(E.red,f.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=b(E.green,f.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=b(E.yellow,f.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=b(E.blue,f.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=b(E.magenta,f.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=b(E.cyan,f.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=b(E.white,f.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=b(E.brightBlack,f.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=b(E.brightRed,f.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=b(E.brightGreen,f.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=b(E.brightYellow,f.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=b(E.brightBlue,f.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=b(E.brightMagenta,f.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=b(E.brightCyan,f.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=b(E.brightWhite,f.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const D=Math.min(v.ansi.length-16,E.extendedAnsi.length);for(let z=0;z<D;z++)v.ansi[z+16]=b(E.extendedAnsi[z],f.DEFAULT_ANSI_COLORS[z+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(E){this._restoreColor(E),this._onChangeColors.fire(this.colors)}_restoreColor(E){if(E!==void 0)switch(E){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[E]=this._restoreColors.ansi[E]}else for(let v=0;v<this._restoreColors.ansi.length;++v)this._colors.ansi[v]=this._restoreColors.ansi[v]}modifyColors(E){E(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(E,v){if(E!==void 0)try{return p.css.toColor(E)}catch{}return v}f.ThemeService=C=d([S(0,m.IOptionsService)],C)},6349:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CircularList=void 0;const d=h(8460),S=h(844);class u extends S.Disposable{constructor(y){super(),this._maxLength=y,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(y){if(this._maxLength===y)return;const x=new Array(y);for(let m=0;m<Math.min(y,this.length);m++)x[m]=this._array[this._getCyclicIndex(m)];this._array=x,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let x=this._length;x<y;x++)this._array[x]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,x){this._array[this._getCyclicIndex(y)]=x}push(y){this._array[this._getCyclicIndex(this._length)]=y,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(y,x,...m){if(x){for(let o=y;o<this._length-x;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+x)];this._length-=x,this.onDeleteEmitter.fire({index:y,amount:x})}for(let o=this._length-1;o>=y;o--)this._array[this._getCyclicIndex(o+m.length)]=this._array[this._getCyclicIndex(o)];for(let o=0;o<m.length;o++)this._array[this._getCyclicIndex(y+o)]=m[o];if(m.length&&this.onInsertEmitter.fire({index:y,amount:m.length}),this._length+m.length>this._maxLength){const o=this._length+m.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=m.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,x,m){if(!(x<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+m<0)throw new Error("Cannot shift elements in list beyond index 0");if(m>0){for(let c=x-1;c>=0;c--)this.set(y+c+m,this.get(y+c));const o=y+x+m-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let o=0;o<x;o++)this.set(y+o+m,this.get(y+o))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}f.CircularList=u},1439:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.clone=void 0,f.clone=function h(d,S=5){if(typeof d!="object")return d;const u=Array.isArray(d)?[]:{};for(const p in d)u[p]=S<=1?d[p]:d[p]&&h(d[p],S-1);return u}},8055:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.contrastRatio=f.toPaddedHex=f.rgba=f.rgb=f.css=f.color=f.channels=f.NULL_COLOR=void 0;let h=0,d=0,S=0,u=0;var p,y,x,m,o;function c(l){const _=l.toString(16);return _.length<2?"0"+_:_}function a(l,_){return l<_?(_+.05)/(l+.05):(l+.05)/(_+.05)}f.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(_,C,b,E){return E!==void 0?`#${c(_)}${c(C)}${c(b)}${c(E)}`:`#${c(_)}${c(C)}${c(b)}`},l.toRgba=function(_,C,b,E=255){return(_<<24|C<<16|b<<8|E)>>>0},l.toColor=function(_,C,b,E){return{css:l.toCss(_,C,b,E),rgba:l.toRgba(_,C,b,E)}}})(p||(f.channels=p={})),(function(l){function _(C,b){return u=Math.round(255*b),[h,d,S]=o.toChannels(C.rgba),{css:p.toCss(h,d,S,u),rgba:p.toRgba(h,d,S,u)}}l.blend=function(C,b){if(u=(255&b.rgba)/255,u===1)return{css:b.css,rgba:b.rgba};const E=b.rgba>>24&255,v=b.rgba>>16&255,D=b.rgba>>8&255,z=C.rgba>>24&255,N=C.rgba>>16&255,q=C.rgba>>8&255;return h=z+Math.round((E-z)*u),d=N+Math.round((v-N)*u),S=q+Math.round((D-q)*u),{css:p.toCss(h,d,S),rgba:p.toRgba(h,d,S)}},l.isOpaque=function(C){return(255&C.rgba)==255},l.ensureContrastRatio=function(C,b,E){const v=o.ensureContrastRatio(C.rgba,b.rgba,E);if(v)return p.toColor(v>>24&255,v>>16&255,v>>8&255)},l.opaque=function(C){const b=(255|C.rgba)>>>0;return[h,d,S]=o.toChannels(b),{css:p.toCss(h,d,S),rgba:b}},l.opacity=_,l.multiplyOpacity=function(C,b){return u=255&C.rgba,_(C,u*b/255)},l.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(y||(f.color=y={})),(function(l){let _,C;try{const b=document.createElement("canvas");b.width=1,b.height=1;const E=b.getContext("2d",{willReadFrequently:!0});E&&(_=E,_.globalCompositeOperation="copy",C=_.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(b){if(b.match(/#[\da-f]{3,8}/i))switch(b.length){case 4:return h=parseInt(b.slice(1,2).repeat(2),16),d=parseInt(b.slice(2,3).repeat(2),16),S=parseInt(b.slice(3,4).repeat(2),16),p.toColor(h,d,S);case 5:return h=parseInt(b.slice(1,2).repeat(2),16),d=parseInt(b.slice(2,3).repeat(2),16),S=parseInt(b.slice(3,4).repeat(2),16),u=parseInt(b.slice(4,5).repeat(2),16),p.toColor(h,d,S,u);case 7:return{css:b,rgba:(parseInt(b.slice(1),16)<<8|255)>>>0};case 9:return{css:b,rgba:parseInt(b.slice(1),16)>>>0}}const E=b.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return h=parseInt(E[1]),d=parseInt(E[2]),S=parseInt(E[3]),u=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),p.toColor(h,d,S,u);if(!_||!C)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=C,_.fillStyle=b,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[h,d,S,u]=_.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(h,d,S,u),css:b}}})(x||(f.css=x={})),(function(l){function _(C,b,E){const v=C/255,D=b/255,z=E/255;return .2126*(v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))}l.relativeLuminance=function(C){return _(C>>16&255,C>>8&255,255&C)},l.relativeLuminance2=_})(m||(f.rgb=m={})),(function(l){function _(b,E,v){const D=b>>24&255,z=b>>16&255,N=b>>8&255;let q=E>>24&255,B=E>>16&255,F=E>>8&255,ne=a(m.relativeLuminance2(q,B,F),m.relativeLuminance2(D,z,N));for(;ne<v&&(q>0||B>0||F>0);)q-=Math.max(0,Math.ceil(.1*q)),B-=Math.max(0,Math.ceil(.1*B)),F-=Math.max(0,Math.ceil(.1*F)),ne=a(m.relativeLuminance2(q,B,F),m.relativeLuminance2(D,z,N));return(q<<24|B<<16|F<<8|255)>>>0}function C(b,E,v){const D=b>>24&255,z=b>>16&255,N=b>>8&255;let q=E>>24&255,B=E>>16&255,F=E>>8&255,ne=a(m.relativeLuminance2(q,B,F),m.relativeLuminance2(D,z,N));for(;ne<v&&(q<255||B<255||F<255);)q=Math.min(255,q+Math.ceil(.1*(255-q))),B=Math.min(255,B+Math.ceil(.1*(255-B))),F=Math.min(255,F+Math.ceil(.1*(255-F))),ne=a(m.relativeLuminance2(q,B,F),m.relativeLuminance2(D,z,N));return(q<<24|B<<16|F<<8|255)>>>0}l.blend=function(b,E){if(u=(255&E)/255,u===1)return E;const v=E>>24&255,D=E>>16&255,z=E>>8&255,N=b>>24&255,q=b>>16&255,B=b>>8&255;return h=N+Math.round((v-N)*u),d=q+Math.round((D-q)*u),S=B+Math.round((z-B)*u),p.toRgba(h,d,S)},l.ensureContrastRatio=function(b,E,v){const D=m.relativeLuminance(b>>8),z=m.relativeLuminance(E>>8);if(a(D,z)<v){if(z<D){const B=_(b,E,v),F=a(D,m.relativeLuminance(B>>8));if(F<v){const ne=C(b,E,v);return F>a(D,m.relativeLuminance(ne>>8))?B:ne}return B}const N=C(b,E,v),q=a(D,m.relativeLuminance(N>>8));if(q<v){const B=_(b,E,v);return q>a(D,m.relativeLuminance(B>>8))?N:B}return N}},l.reduceLuminance=_,l.increaseLuminance=C,l.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]}})(o||(f.rgba=o={})),f.toPaddedHex=c,f.contrastRatio=a},8969:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CoreTerminal=void 0;const d=h(844),S=h(2585),u=h(4348),p=h(7866),y=h(744),x=h(7302),m=h(6975),o=h(8460),c=h(1753),a=h(1480),l=h(7994),_=h(9282),C=h(5435),b=h(5981),E=h(2660);let v=!1;class D extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new o.EventEmitter),this._onScroll.event((N=>{this._onScrollApi?.fire(N.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(N){for(const q in N)this.optionsService.options[q]=N[q]}constructor(N){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new o.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new o.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new o.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new o.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new x.OptionsService(N)),this._instantiationService.setService(S.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(S.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(S.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(m.CoreService)),this._instantiationService.setService(S.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(S.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(S.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(S.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(E.OscLinkService),this._instantiationService.setService(S.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new C.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,o.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,o.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,o.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,o.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((q=>{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((q=>{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(((q,B)=>this._inputHandler.parse(q,B)))),this.register((0,o.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(N,q){this._writeBuffer.write(N,q)}writeSync(N,q){this._logService.logLevel<=S.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(N,q)}input(N,q=!0){this.coreService.triggerDataEvent(N,q)}resize(N,q){isNaN(N)||isNaN(q)||(N=Math.max(N,y.MINIMUM_COLS),q=Math.max(q,y.MINIMUM_ROWS),this._bufferService.resize(N,q))}scroll(N,q=!1){this._bufferService.scroll(N,q)}scrollLines(N,q,B){this._bufferService.scrollLines(N,q,B)}scrollPages(N){this.scrollLines(N*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(N){const q=N-this._bufferService.buffer.ydisp;q!==0&&this.scrollLines(q)}registerEscHandler(N,q){return this._inputHandler.registerEscHandler(N,q)}registerDcsHandler(N,q){return this._inputHandler.registerDcsHandler(N,q)}registerCsiHandler(N,q){return this._inputHandler.registerCsiHandler(N,q)}registerOscHandler(N,q){return this._inputHandler.registerOscHandler(N,q)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let N=!1;const q=this.optionsService.rawOptions.windowsPty;q&&q.buildNumber!==void 0&&q.buildNumber!==void 0?N=q.backend==="conpty"&&q.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(N=!0),N?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const N=[];N.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),N.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const q of N)q.dispose()}))}}}f.CoreTerminal=D},8460:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.runAndSubscribe=f.forwardEvent=f.EventEmitter=void 0,f.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const S=[];for(let u=0;u<this._listeners.length;u++)S.push(this._listeners[u]);for(let u=0;u<S.length;u++)S[u].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},f.forwardEvent=function(h,d){return h((S=>d.fire(S)))},f.runAndSubscribe=function(h,d){return d(void 0),h((S=>d(S)))}},5435:function(ie,f,h){var d=this&&this.__decorate||function(ee,A,O,w){var L,K=arguments.length,Q=K<3?A:w===null?w=Object.getOwnPropertyDescriptor(A,O):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(ee,A,O,w);else for(var ue=ee.length-1;ue>=0;ue--)(L=ee[ue])&&(Q=(K<3?L(Q):K>3?L(A,O,Q):L(A,O))||Q);return K>3&&Q&&Object.defineProperty(A,O,Q),Q},S=this&&this.__param||function(ee,A){return function(O,w){A(O,w,ee)}};Object.defineProperty(f,"__esModule",{value:!0}),f.InputHandler=f.WindowsOptionsReportType=void 0;const u=h(2584),p=h(7116),y=h(2015),x=h(844),m=h(482),o=h(8437),c=h(8460),a=h(643),l=h(511),_=h(3734),C=h(2585),b=h(1480),E=h(6242),v=h(6351),D=h(5941),z={"(":0,")":1,"*":2,"+":3,"-":1,".":2},N=131072;function q(ee,A){if(ee>24)return A.setWinLines||!1;switch(ee){case 1:return!!A.restoreWin;case 2:return!!A.minimizeWin;case 3:return!!A.setWinPosition;case 4:return!!A.setWinSizePixels;case 5:return!!A.raiseWin;case 6:return!!A.lowerWin;case 7:return!!A.refreshWin;case 8:return!!A.setWinSizeChars;case 9:return!!A.maximizeWin;case 10:return!!A.fullscreenWin;case 11:return!!A.getWinState;case 13:return!!A.getWinPosition;case 14:return!!A.getWinSizePixels;case 15:return!!A.getScreenSizePixels;case 16:return!!A.getCellSizePixels;case 18:return!!A.getWinSizeChars;case 19:return!!A.getScreenSizeChars;case 20:return!!A.getIconTitle;case 21:return!!A.getWinTitle;case 22:return!!A.pushTitle;case 23:return!!A.popTitle;case 24:return!!A.setWinLines}return!1}var B;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(B||(f.WindowsOptionsReportType=B={}));let F=0;class ne extends x.Disposable{getAttrData(){return this._curAttrData}constructor(A,O,w,L,K,Q,ue,fe,I=new y.EscapeSequenceParser){super(),this._bufferService=A,this._charsetService=O,this._coreService=w,this._logService=L,this._optionsService=K,this._oscLinkService=Q,this._coreMouseService=ue,this._unicodeService=fe,this._parser=I,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new m.StringToUtf32,this._utf8Decoder=new m.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new j(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._parser.setCsiHandlerFallback(((R,$)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(R),params:$.toArray()})})),this._parser.setEscHandlerFallback((R=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(R)})})),this._parser.setExecuteHandlerFallback((R=>{this._logService.debug("Unknown EXECUTE code: ",{code:R})})),this._parser.setOscHandlerFallback(((R,$,oe)=>{this._logService.debug("Unknown OSC code: ",{identifier:R,action:$,data:oe})})),this._parser.setDcsHandlerFallback(((R,$,oe)=>{$==="HOOK"&&(oe=oe.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(R),action:$,payload:oe})})),this._parser.setPrintHandler(((R,$,oe)=>this.print(R,$,oe))),this._parser.registerCsiHandler({final:"@"},(R=>this.insertChars(R))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(R=>this.scrollLeft(R))),this._parser.registerCsiHandler({final:"A"},(R=>this.cursorUp(R))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(R=>this.scrollRight(R))),this._parser.registerCsiHandler({final:"B"},(R=>this.cursorDown(R))),this._parser.registerCsiHandler({final:"C"},(R=>this.cursorForward(R))),this._parser.registerCsiHandler({final:"D"},(R=>this.cursorBackward(R))),this._parser.registerCsiHandler({final:"E"},(R=>this.cursorNextLine(R))),this._parser.registerCsiHandler({final:"F"},(R=>this.cursorPrecedingLine(R))),this._parser.registerCsiHandler({final:"G"},(R=>this.cursorCharAbsolute(R))),this._parser.registerCsiHandler({final:"H"},(R=>this.cursorPosition(R))),this._parser.registerCsiHandler({final:"I"},(R=>this.cursorForwardTab(R))),this._parser.registerCsiHandler({final:"J"},(R=>this.eraseInDisplay(R,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(R=>this.eraseInDisplay(R,!0))),this._parser.registerCsiHandler({final:"K"},(R=>this.eraseInLine(R,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(R=>this.eraseInLine(R,!0))),this._parser.registerCsiHandler({final:"L"},(R=>this.insertLines(R))),this._parser.registerCsiHandler({final:"M"},(R=>this.deleteLines(R))),this._parser.registerCsiHandler({final:"P"},(R=>this.deleteChars(R))),this._parser.registerCsiHandler({final:"S"},(R=>this.scrollUp(R))),this._parser.registerCsiHandler({final:"T"},(R=>this.scrollDown(R))),this._parser.registerCsiHandler({final:"X"},(R=>this.eraseChars(R))),this._parser.registerCsiHandler({final:"Z"},(R=>this.cursorBackwardTab(R))),this._parser.registerCsiHandler({final:"`"},(R=>this.charPosAbsolute(R))),this._parser.registerCsiHandler({final:"a"},(R=>this.hPositionRelative(R))),this._parser.registerCsiHandler({final:"b"},(R=>this.repeatPrecedingCharacter(R))),this._parser.registerCsiHandler({final:"c"},(R=>this.sendDeviceAttributesPrimary(R))),this._parser.registerCsiHandler({prefix:">",final:"c"},(R=>this.sendDeviceAttributesSecondary(R))),this._parser.registerCsiHandler({final:"d"},(R=>this.linePosAbsolute(R))),this._parser.registerCsiHandler({final:"e"},(R=>this.vPositionRelative(R))),this._parser.registerCsiHandler({final:"f"},(R=>this.hVPosition(R))),this._parser.registerCsiHandler({final:"g"},(R=>this.tabClear(R))),this._parser.registerCsiHandler({final:"h"},(R=>this.setMode(R))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(R=>this.setModePrivate(R))),this._parser.registerCsiHandler({final:"l"},(R=>this.resetMode(R))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(R=>this.resetModePrivate(R))),this._parser.registerCsiHandler({final:"m"},(R=>this.charAttributes(R))),this._parser.registerCsiHandler({final:"n"},(R=>this.deviceStatus(R))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(R=>this.deviceStatusPrivate(R))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(R=>this.softReset(R))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(R=>this.setCursorStyle(R))),this._parser.registerCsiHandler({final:"r"},(R=>this.setScrollRegion(R))),this._parser.registerCsiHandler({final:"s"},(R=>this.saveCursor(R))),this._parser.registerCsiHandler({final:"t"},(R=>this.windowOptions(R))),this._parser.registerCsiHandler({final:"u"},(R=>this.restoreCursor(R))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(R=>this.insertColumns(R))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(R=>this.deleteColumns(R))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(R=>this.selectProtected(R))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(R=>this.requestMode(R,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(R=>this.requestMode(R,!1))),this._parser.setExecuteHandler(u.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(u.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(u.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(u.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(u.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(u.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(u.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(u.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(u.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new E.OscHandler((R=>(this.setTitle(R),this.setIconName(R),!0)))),this._parser.registerOscHandler(1,new E.OscHandler((R=>this.setIconName(R)))),this._parser.registerOscHandler(2,new E.OscHandler((R=>this.setTitle(R)))),this._parser.registerOscHandler(4,new E.OscHandler((R=>this.setOrReportIndexedColor(R)))),this._parser.registerOscHandler(8,new E.OscHandler((R=>this.setHyperlink(R)))),this._parser.registerOscHandler(10,new E.OscHandler((R=>this.setOrReportFgColor(R)))),this._parser.registerOscHandler(11,new E.OscHandler((R=>this.setOrReportBgColor(R)))),this._parser.registerOscHandler(12,new E.OscHandler((R=>this.setOrReportCursorColor(R)))),this._parser.registerOscHandler(104,new E.OscHandler((R=>this.restoreIndexedColor(R)))),this._parser.registerOscHandler(110,new E.OscHandler((R=>this.restoreFgColor(R)))),this._parser.registerOscHandler(111,new E.OscHandler((R=>this.restoreBgColor(R)))),this._parser.registerOscHandler(112,new E.OscHandler((R=>this.restoreCursorColor(R)))),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 R in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:R},(()=>this.selectCharset("("+R))),this._parser.registerEscHandler({intermediates:")",final:R},(()=>this.selectCharset(")"+R))),this._parser.registerEscHandler({intermediates:"*",final:R},(()=>this.selectCharset("*"+R))),this._parser.registerEscHandler({intermediates:"+",final:R},(()=>this.selectCharset("+"+R))),this._parser.registerEscHandler({intermediates:"-",final:R},(()=>this.selectCharset("-"+R))),this._parser.registerEscHandler({intermediates:".",final:R},(()=>this.selectCharset("."+R))),this._parser.registerEscHandler({intermediates:"/",final:R},(()=>this.selectCharset("/"+R)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((R=>(this._logService.error("Parsing error: ",R),R))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new v.DcsHandler(((R,$)=>this.requestStatusString(R,$))))}_preserveStack(A,O,w,L){this._parseStack.paused=!0,this._parseStack.cursorStartX=A,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=w,this._parseStack.position=L}_logSlowResolvingAsync(A){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([A,new Promise(((O,w)=>setTimeout((()=>w("#SLOW_TIMEOUT")),5e3)))]).catch((O=>{if(O!=="#SLOW_TIMEOUT")throw O;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(A,O){let w,L=this._activeBuffer.x,K=this._activeBuffer.y,Q=0;const ue=this._parseStack.paused;if(ue){if(w=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(w),w;L=this._parseStack.cursorStartX,K=this._parseStack.cursorStartY,this._parseStack.paused=!1,A.length>N&&(Q=this._parseStack.position+N)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof A=="string"?` "${A}"`:` "${Array.prototype.map.call(A,(R=>String.fromCharCode(R))).join("")}"`),typeof A=="string"?A.split("").map((R=>R.charCodeAt(0))):A),this._parseBuffer.length<A.length&&this._parseBuffer.length<N&&(this._parseBuffer=new Uint32Array(Math.min(A.length,N))),ue||this._dirtyRowTracker.clearRange(),A.length>N)for(let R=Q;R<A.length;R+=N){const $=R+N<A.length?R+N:A.length,oe=typeof A=="string"?this._stringDecoder.decode(A.substring(R,$),this._parseBuffer):this._utf8Decoder.decode(A.subarray(R,$),this._parseBuffer);if(w=this._parser.parse(this._parseBuffer,oe))return this._preserveStack(L,K,oe,R),this._logSlowResolvingAsync(w),w}else if(!ue){const R=typeof A=="string"?this._stringDecoder.decode(A,this._parseBuffer):this._utf8Decoder.decode(A,this._parseBuffer);if(w=this._parser.parse(this._parseBuffer,R))return this._preserveStack(L,K,R,0),this._logSlowResolvingAsync(w),w}this._activeBuffer.x===L&&this._activeBuffer.y===K||this._onCursorMove.fire();const fe=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),I=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);I<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(I,this._bufferService.rows-1),Math.min(fe,this._bufferService.rows-1))}print(A,O,w){let L,K;const Q=this._charsetService.charset,ue=this._optionsService.rawOptions.screenReaderMode,fe=this._bufferService.cols,I=this._coreService.decPrivateModes.wraparound,R=this._coreService.modes.insertMode,$=this._curAttrData;let oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&w-O>0&&oe.getWidth(this._activeBuffer.x-1)===2&&oe.setCellFromCodepoint(this._activeBuffer.x-1,0,1,$);let ve=this._parser.precedingJoinState;for(let _e=O;_e<w;++_e){if(L=A[_e],L<127&&Q){const tt=Q[String.fromCharCode(L)];tt&&(L=tt.charCodeAt(0))}const Ae=this._unicodeService.charProperties(L,ve);K=b.UnicodeService.extractWidth(Ae);const je=b.UnicodeService.extractShouldJoin(Ae),Ke=je?b.UnicodeService.extractWidth(ve):0;if(ve=Ae,ue&&this._onA11yChar.fire((0,m.stringFromCodePoint)(L)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+K-Ke>fe){if(I){const tt=oe;let Ee=this._activeBuffer.x-Ke;for(this._activeBuffer.x=Ke,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),oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ke>0&&oe instanceof o.BufferLine&&oe.copyCellsFrom(tt,Ee,0,Ke,!1);Ee<fe;)tt.setCellFromCodepoint(Ee++,0,1,$)}else if(this._activeBuffer.x=fe-1,K===2)continue}if(je&&this._activeBuffer.x){const tt=oe.getWidth(this._activeBuffer.x-1)?1:2;oe.addCodepointToCell(this._activeBuffer.x-tt,L,K);for(let Ee=K-Ke;--Ee>=0;)oe.setCellFromCodepoint(this._activeBuffer.x++,0,0,$)}else if(R&&(oe.insertCells(this._activeBuffer.x,K-Ke,this._activeBuffer.getNullCell($)),oe.getWidth(fe-1)===2&&oe.setCellFromCodepoint(fe-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,$)),oe.setCellFromCodepoint(this._activeBuffer.x++,L,K,$),K>0)for(;--K;)oe.setCellFromCodepoint(this._activeBuffer.x++,0,0,$)}this._parser.precedingJoinState=ve,this._activeBuffer.x<fe&&w-O>0&&oe.getWidth(this._activeBuffer.x)===0&&!oe.hasContent(this._activeBuffer.x)&&oe.setCellFromCodepoint(this._activeBuffer.x,0,1,$),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(A,O){return A.final!=="t"||A.prefix||A.intermediates?this._parser.registerCsiHandler(A,O):this._parser.registerCsiHandler(A,(w=>!q(w.params[0],this._optionsService.rawOptions.windowOptions)||O(w)))}registerDcsHandler(A,O){return this._parser.registerDcsHandler(A,new v.DcsHandler(O))}registerEscHandler(A,O){return this._parser.registerEscHandler(A,O)}registerOscHandler(A,O){return this._parser.registerOscHandler(A,new E.OscHandler(O))}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(){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&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);A.hasWidth(this._activeBuffer.x)&&!A.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const A=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-A),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(A=this._bufferService.cols-1){this._activeBuffer.x=Math.min(A,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(A,O){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=A,this._activeBuffer.y=this._activeBuffer.scrollTop+O):(this._activeBuffer.x=A,this._activeBuffer.y=O),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(A,O){this._restrictCursor(),this._setCursor(this._activeBuffer.x+A,this._activeBuffer.y+O)}cursorUp(A){const O=this._activeBuffer.y-this._activeBuffer.scrollTop;return O>=0?this._moveCursor(0,-Math.min(O,A.params[0]||1)):this._moveCursor(0,-(A.params[0]||1)),!0}cursorDown(A){const O=this._activeBuffer.scrollBottom-this._activeBuffer.y;return O>=0?this._moveCursor(0,Math.min(O,A.params[0]||1)):this._moveCursor(0,A.params[0]||1),!0}cursorForward(A){return this._moveCursor(A.params[0]||1,0),!0}cursorBackward(A){return this._moveCursor(-(A.params[0]||1),0),!0}cursorNextLine(A){return this.cursorDown(A),this._activeBuffer.x=0,!0}cursorPrecedingLine(A){return this.cursorUp(A),this._activeBuffer.x=0,!0}cursorCharAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(A){return this._setCursor(A.length>=2?(A.params[1]||1)-1:0,(A.params[0]||1)-1),!0}charPosAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(A){return this._moveCursor(A.params[0]||1,0),!0}linePosAbsolute(A){return this._setCursor(this._activeBuffer.x,(A.params[0]||1)-1),!0}vPositionRelative(A){return this._moveCursor(0,A.params[0]||1),!0}hVPosition(A){return this.cursorPosition(A),!0}tabClear(A){const O=A.params[0];return O===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:O===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=A.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=A.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(A){const O=A.params[0];return O===1&&(this._curAttrData.bg|=536870912),O!==2&&O!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(A,O,w,L=!1,K=!1){const Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);Q.replaceCells(O,w,this._activeBuffer.getNullCell(this._eraseAttrData()),K),L&&(Q.isWrapped=!1)}_resetBufferLine(A,O=!1){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);w&&(w.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),O),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+A),w.isWrapped=!1)}eraseInDisplay(A,O=!1){let w;switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:for(w=this._activeBuffer.y,this._dirtyRowTracker.markDirty(w),this._eraseInBufferLine(w++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);w<this._bufferService.rows;w++)this._resetBufferLine(w,O);this._dirtyRowTracker.markDirty(w);break;case 1:for(w=this._activeBuffer.y,this._dirtyRowTracker.markDirty(w),this._eraseInBufferLine(w,0,this._activeBuffer.x+1,!0,O),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(w+1).isWrapped=!1);w--;)this._resetBufferLine(w,O);this._dirtyRowTracker.markDirty(0);break;case 2:for(w=this._bufferService.rows,this._dirtyRowTracker.markDirty(w-1);w--;)this._resetBufferLine(w,O);this._dirtyRowTracker.markDirty(0);break;case 3:const L=this._activeBuffer.lines.length-this._bufferService.rows;L>0&&(this._activeBuffer.lines.trimStart(L),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-L,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-L,0),this._onScroll.fire(0))}return!0}eraseInLine(A,O=!1){switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,O);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,O)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(A){this._restrictCursor();let O=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=this._activeBuffer.ybase+this._activeBuffer.y,L=this._bufferService.rows-1-this._activeBuffer.scrollBottom,K=this._bufferService.rows-1+this._activeBuffer.ybase-L+1;for(;O--;)this._activeBuffer.lines.splice(K-1,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}deleteLines(A){this._restrictCursor();let O=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=this._activeBuffer.ybase+this._activeBuffer.y;let L;for(L=this._bufferService.rows-1-this._activeBuffer.scrollBottom,L=this._bufferService.rows-1+this._activeBuffer.ybase-L;O--;)this._activeBuffer.lines.splice(w,1),this._activeBuffer.lines.splice(L,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(A){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.insertCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(A){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.deleteCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(A){let O=A.params[0]||1;for(;O--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(A){let O=A.params[0]||1;for(;O--;)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(o.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=A.params[0]||1;for(let w=this._activeBuffer.scrollTop;w<=this._activeBuffer.scrollBottom;++w){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+w);L.deleteCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=A.params[0]||1;for(let w=this._activeBuffer.scrollTop;w<=this._activeBuffer.scrollBottom;++w){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+w);L.insertCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=A.params[0]||1;for(let w=this._activeBuffer.scrollTop;w<=this._activeBuffer.scrollBottom;++w){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+w);L.insertCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=A.params[0]||1;for(let w=this._activeBuffer.scrollTop;w<=this._activeBuffer.scrollBottom;++w){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+w);L.deleteCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(A){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(A.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(A){const O=this._parser.precedingJoinState;if(!O)return!0;const w=A.params[0]||1,L=b.UnicodeService.extractWidth(O),K=this._activeBuffer.x-L,Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(K),ue=new Uint32Array(Q.length*w);let fe=0;for(let R=0;R<Q.length;){const $=Q.codePointAt(R)||0;ue[fe++]=$,R+=$>65535?2:1}let I=fe;for(let R=1;R<w;++R)ue.copyWithin(I,0,fe),I+=fe;return this.print(ue,0,I),!0}sendDeviceAttributesPrimary(A){return A.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(A){return A.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(A.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(A){return(this._optionsService.rawOptions.termName+"").indexOf(A)===0}setMode(A){for(let O=0;O<A.length;O++)switch(A.params[O]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(A){for(let O=0;O<A.length;O++)switch(A.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(A){for(let O=0;O<A.length;O++)switch(A.params[O]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(A){for(let O=0;O<A.length;O++)switch(A.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),A.params[O]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(A,O){const w=this._coreService.decPrivateModes,{activeProtocol:L,activeEncoding:K}=this._coreMouseService,Q=this._coreService,{buffers:ue,cols:fe}=this._bufferService,{active:I,alt:R}=ue,$=this._optionsService.rawOptions,oe=je=>je?1:2,ve=A.params[0];return _e=ve,Ae=O?ve===2?4:ve===4?oe(Q.modes.insertMode):ve===12?3:ve===20?oe($.convertEol):0:ve===1?oe(w.applicationCursorKeys):ve===3?$.windowOptions.setWinLines?fe===80?2:fe===132?1:0:0:ve===6?oe(w.origin):ve===7?oe(w.wraparound):ve===8?3:ve===9?oe(L==="X10"):ve===12?oe($.cursorBlink):ve===25?oe(!Q.isCursorHidden):ve===45?oe(w.reverseWraparound):ve===66?oe(w.applicationKeypad):ve===67?4:ve===1e3?oe(L==="VT200"):ve===1002?oe(L==="DRAG"):ve===1003?oe(L==="ANY"):ve===1004?oe(w.sendFocus):ve===1005?4:ve===1006?oe(K==="SGR"):ve===1015?4:ve===1016?oe(K==="SGR_PIXELS"):ve===1048?1:ve===47||ve===1047||ve===1049?oe(I===R):ve===2004?oe(w.bracketedPasteMode):0,Q.triggerDataEvent(`${u.C0.ESC}[${O?"":"?"}${_e};${Ae}$y`),!0;var _e,Ae}_updateAttrColor(A,O,w,L,K){return O===2?(A|=50331648,A&=-16777216,A|=_.AttributeData.fromColorRGB([w,L,K])):O===5&&(A&=-50331904,A|=33554432|255&w),A}_extractColor(A,O,w){const L=[0,0,-1,0,0,0];let K=0,Q=0;do{if(L[Q+K]=A.params[O+Q],A.hasSubParams(O+Q)){const ue=A.getSubParams(O+Q);let fe=0;do L[1]===5&&(K=1),L[Q+fe+1+K]=ue[fe];while(++fe<ue.length&&fe+Q+1+K<L.length);break}if(L[1]===5&&Q+K>=2||L[1]===2&&Q+K>=5)break;L[1]&&(K=1)}while(++Q+O<A.length&&Q+K<L.length);for(let ue=2;ue<L.length;++ue)L[ue]===-1&&(L[ue]=0);switch(L[0]){case 38:w.fg=this._updateAttrColor(w.fg,L[1],L[3],L[4],L[5]);break;case 48:w.bg=this._updateAttrColor(w.bg,L[1],L[3],L[4],L[5]);break;case 58:w.extended=w.extended.clone(),w.extended.underlineColor=this._updateAttrColor(w.extended.underlineColor,L[1],L[3],L[4],L[5])}return Q}_processUnderline(A,O){O.extended=O.extended.clone(),(!~A||A>5)&&(A=1),O.extended.underlineStyle=A,O.fg|=268435456,A===0&&(O.fg&=-268435457),O.updateExtended()}_processSGR0(A){A.fg=o.DEFAULT_ATTR_DATA.fg,A.bg=o.DEFAULT_ATTR_DATA.bg,A.extended=A.extended.clone(),A.extended.underlineStyle=0,A.extended.underlineColor&=-67108864,A.updateExtended()}charAttributes(A){if(A.length===1&&A.params[0]===0)return this._processSGR0(this._curAttrData),!0;const O=A.length;let w;const L=this._curAttrData;for(let K=0;K<O;K++)w=A.params[K],w>=30&&w<=37?(L.fg&=-50331904,L.fg|=16777216|w-30):w>=40&&w<=47?(L.bg&=-50331904,L.bg|=16777216|w-40):w>=90&&w<=97?(L.fg&=-50331904,L.fg|=16777224|w-90):w>=100&&w<=107?(L.bg&=-50331904,L.bg|=16777224|w-100):w===0?this._processSGR0(L):w===1?L.fg|=134217728:w===3?L.bg|=67108864:w===4?(L.fg|=268435456,this._processUnderline(A.hasSubParams(K)?A.getSubParams(K)[0]:1,L)):w===5?L.fg|=536870912:w===7?L.fg|=67108864:w===8?L.fg|=1073741824:w===9?L.fg|=2147483648:w===2?L.bg|=134217728:w===21?this._processUnderline(2,L):w===22?(L.fg&=-134217729,L.bg&=-134217729):w===23?L.bg&=-67108865:w===24?(L.fg&=-268435457,this._processUnderline(0,L)):w===25?L.fg&=-536870913:w===27?L.fg&=-67108865:w===28?L.fg&=-1073741825:w===29?L.fg&=2147483647:w===39?(L.fg&=-67108864,L.fg|=16777215&o.DEFAULT_ATTR_DATA.fg):w===49?(L.bg&=-67108864,L.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):w===38||w===48||w===58?K+=this._extractColor(A,K,L):w===53?L.bg|=1073741824:w===55?L.bg&=-1073741825:w===59?(L.extended=L.extended.clone(),L.extended.underlineColor=-1,L.updateExtended()):w===100?(L.fg&=-67108864,L.fg|=16777215&o.DEFAULT_ATTR_DATA.fg,L.bg&=-67108864,L.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",w);return!0}deviceStatus(A){switch(A.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const O=this._activeBuffer.y+1,w=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${O};${w}R`)}return!0}deviceStatusPrivate(A){if(A.params[0]===6){const O=this._activeBuffer.y+1,w=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${O};${w}R`)}return!0}softReset(A){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(A){const O=A.params[0]||1;switch(O){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 w=O%2==1;return this._optionsService.options.cursorBlink=w,!0}setScrollRegion(A){const O=A.params[0]||1;let w;return(A.length<2||(w=A.params[1])>this._bufferService.rows||w===0)&&(w=this._bufferService.rows),w>O&&(this._activeBuffer.scrollTop=O-1,this._activeBuffer.scrollBottom=w-1,this._setCursor(0,0)),!0}windowOptions(A){if(!q(A.params[0],this._optionsService.rawOptions.windowOptions))return!0;const O=A.length>1?A.params[1]:0;switch(A.params[0]){case 14:O!==2&&this._onRequestWindowsOptionsReport.fire(B.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(B.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:O!==0&&O!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),O!==0&&O!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:O!==0&&O!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),O!==0&&O!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(A){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(A){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(A){return this._windowTitle=A,this._onTitleChange.fire(A),!0}setIconName(A){return this._iconName=A,!0}setOrReportIndexedColor(A){const O=[],w=A.split(";");for(;w.length>1;){const L=w.shift(),K=w.shift();if(/^\d+$/.exec(L)){const Q=parseInt(L);if(W(Q))if(K==="?")O.push({type:0,index:Q});else{const ue=(0,D.parseColor)(K);ue&&O.push({type:1,index:Q,color:ue})}}}return O.length&&this._onColor.fire(O),!0}setHyperlink(A){const O=A.split(";");return!(O.length<2)&&(O[1]?this._createHyperlink(O[0],O[1]):!O[0]&&this._finishHyperlink())}_createHyperlink(A,O){this._getCurrentLinkId()&&this._finishHyperlink();const w=A.split(":");let L;const K=w.findIndex((Q=>Q.startsWith("id=")));return K!==-1&&(L=w[K].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:L,uri:O}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(A,O){const w=A.split(";");for(let L=0;L<w.length&&!(O>=this._specialColors.length);++L,++O)if(w[L]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{const K=(0,D.parseColor)(w[L]);K&&this._onColor.fire([{type:1,index:this._specialColors[O],color:K}])}return!0}setOrReportFgColor(A){return this._setOrReportSpecialColor(A,0)}setOrReportBgColor(A){return this._setOrReportSpecialColor(A,1)}setOrReportCursorColor(A){return this._setOrReportSpecialColor(A,2)}restoreIndexedColor(A){if(!A)return this._onColor.fire([{type:2}]),!0;const O=[],w=A.split(";");for(let L=0;L<w.length;++L)if(/^\d+$/.exec(w[L])){const K=parseInt(w[L]);W(K)&&O.push({type:2,index:K})}return O.length&&this._onColor.fire(O),!0}restoreFgColor(A){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(A){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(A){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(A){return A.length!==2?(this.selectDefaultCharset(),!0):(A[0]==="/"||this._charsetService.setgCharset(z[A[0]],p.CHARSETS[A[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const A=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,A,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(A){return this._charsetService.setgLevel(A),!0}screenAlignmentPattern(){const A=new l.CellData;A.content=4194373,A.fg=this._curAttrData.fg,A.bg=this._curAttrData.bg,this._setCursor(0,0);for(let O=0;O<this._bufferService.rows;++O){const w=this._activeBuffer.ybase+this._activeBuffer.y+O,L=this._activeBuffer.lines.get(w);L&&(L.fill(A),L.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(A,O){const w=this._bufferService.buffer,L=this._optionsService.rawOptions;return(K=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${K}${u.C0.ESC}\\`),!0))(A==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:A==='"p'?'P1$r61;1"p':A==="r"?`P1$r${w.scrollTop+1};${w.scrollBottom+1}r`:A==="m"?"P1$r0m":A===" q"?`P1$r${{block:2,underline:4,bar:6}[L.cursorStyle]-(L.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(A,O){this._dirtyRowTracker.markRangeDirty(A,O)}}f.InputHandler=ne;let j=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){ee<this.start?this.start=ee:ee>this.end&&(this.end=ee)}markRangeDirty(ee,A){ee>A&&(F=ee,ee=A,A=F),ee<this.start&&(this.start=ee),A>this.end&&(this.end=A)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function W(ee){return 0<=ee&&ee<256}j=d([S(0,C.IBufferService)],j)},844:(ie,f)=>{function h(d){for(const S of d)S.dispose();d.length=0}Object.defineProperty(f,"__esModule",{value:!0}),f.getDisposeArrayDisposable=f.disposeArray=f.toDisposable=f.MutableDisposable=f.Disposable=void 0,f.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 S=this._disposables.indexOf(d);S!==-1&&this._disposables.splice(S,1)}},f.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){this._isDisposed||d===this._value||(this._value?.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},f.toDisposable=function(d){return{dispose:d}},f.disposeArray=h,f.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},1505:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.FourKeyMap=f.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(S,u,p){this._data[S]||(this._data[S]={}),this._data[S][u]=p}get(S,u){return this._data[S]?this._data[S][u]:void 0}clear(){this._data={}}}f.TwoKeyMap=h,f.FourKeyMap=class{constructor(){this._data=new h}set(d,S,u,p,y){this._data.get(d,S)||this._data.set(d,S,new h),this._data.get(d,S).set(u,p,y)}get(d,S,u,p){return this._data.get(d,S)?.get(u,p)}clear(){this._data.clear()}}},6114:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.isChromeOS=f.isLinux=f.isWindows=f.isIphone=f.isIpad=f.isMac=f.getSafariVersion=f.isSafari=f.isLegacyEdge=f.isFirefox=f.isNode=void 0,f.isNode=typeof process<"u"&&"title"in process;const h=f.isNode?"node":navigator.userAgent,d=f.isNode?"node":navigator.platform;f.isFirefox=h.includes("Firefox"),f.isLegacyEdge=h.includes("Edge"),f.isSafari=/^((?!chrome|android).)*safari/i.test(h),f.getSafariVersion=function(){if(!f.isSafari)return 0;const S=h.match(/Version\/(\d+)/);return S===null||S.length<2?0:parseInt(S[1])},f.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),f.isIpad=d==="iPad",f.isIphone=d==="iPhone",f.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),f.isLinux=d.indexOf("Linux")>=0,f.isChromeOS=/\bCrOS\b/.test(h)},6106:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.SortedList=void 0;let h=0;f.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(h=this._search(this._getKey(d)),this._array.splice(h,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const S=this._getKey(d);if(S===void 0||(h=this._search(S),h===-1)||this._getKey(this._array[h])!==S)return!1;do if(this._array[h]===d)return this._array.splice(h,1),!0;while(++h<this._array.length&&this._getKey(this._array[h])===S);return!1}*getKeyIterator(d){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do yield this._array[h];while(++h<this._array.length&&this._getKey(this._array[h])===d)}forEachByKey(d,S){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do S(this._array[h]);while(++h<this._array.length&&this._getKey(this._array[h])===d)}values(){return[...this._array].values()}_search(d){let S=0,u=this._array.length-1;for(;u>=S;){let p=S+u>>1;const y=this._getKey(this._array[p]);if(y>d)u=p-1;else{if(!(y<d)){for(;p>0&&this._getKey(this._array[p-1])===d;)p--;return p}S=p+1}}return S}}},7226:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DebouncedIdleTask=f.IdleTaskQueue=f.PriorityTaskQueue=void 0;const d=h(6114);class S{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(y){this._idleCallback=void 0;let x=0,m=0,o=y.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(x=Date.now(),this._tasks[this._i]()||this._i++,x=Math.max(1,Date.now()-x),m=Math.max(x,m),c=y.timeRemaining(),1.5*m>c)return o-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-x))}ms`),void this._start();o=c}this.clear()}}class u extends S{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const x=Date.now()+y;return{timeRemaining:()=>Math.max(0,x-Date.now())}}}f.PriorityTaskQueue=u,f.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends S{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:u,f.DebouncedIdleTask=class{constructor(){this._queue=new f.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.updateWindowsModeWrappedState=void 0;const d=h(643);f.updateWindowsModeWrappedState=function(S){const u=S.buffer.lines.get(S.buffer.ybase+S.buffer.y-1),p=u?.get(S.cols-1),y=S.buffer.lines.get(S.buffer.ybase+S.buffer.y);y&&p&&(y.isWrapped=p[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&p[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ExtendedAttrs=f.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new h;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}f.AttributeData=h;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,p=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=p}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}f.ExtendedAttrs=d},9092:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Buffer=f.MAX_BUFFER_SIZE=void 0;const d=h(6349),S=h(7226),u=h(3734),p=h(8437),y=h(4634),x=h(511),m=h(643),o=h(4863),c=h(7116);f.MAX_BUFFER_SIZE=4294967295,f.Buffer=class{constructor(a,l,_){this._hasScrollback=a,this._optionsService=l,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,m.NULL_CELL_CHAR,m.NULL_CELL_WIDTH,m.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,m.WHITESPACE_CELL_CHAR,m.WHITESPACE_CELL_WIDTH,m.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new S.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new 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 u.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 u.ExtendedAttrs),this._whitespaceCell}getBlankLine(a,l){return new p.BufferLine(this._bufferService.cols,this.getNullCell(a),l)}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 l=a+this._optionsService.rawOptions.scrollback;return l>f.MAX_BUFFER_SIZE?f.MAX_BUFFER_SIZE:l}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=p.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)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,l){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let C=0;const b=this._getCorrectBufferLength(l);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++)C+=+this.lines.get(v).resize(a,_);let E=0;if(this._rows<l)for(let v=this._rows;v<l;v++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(a,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(a,_)));else for(let v=this._rows;v>l;v--)this.lines.length>l+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,l-1),E&&(this.y+=E),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(a,l),this._cols>a))for(let E=0;E<this.lines.length;E++)C+=+this.lines.get(E).resize(a,_);this._cols=a,this._rows=l,this._memoryCleanupQueue.clear(),C>.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 l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>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,l){this._cols!==a&&(a>this._cols?this._reflowLarger(a,l):this._reflowSmaller(a,l))}_reflowLarger(a,l){const _=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const C=(0,y.reflowLargerCreateNewLayout)(this.lines,_);(0,y.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(a,l,C.countRemoved)}}_reflowLargerAdjustViewport(a,l,_){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let b=_;for(;b-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new p.BufferLine(a,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(a,l){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),C=[];let b=0;for(let E=this.lines.length-1;E>=0;E--){let v=this.lines.get(E);if(!v||!v.isWrapped&&v.getTrimmedLength()<=a)continue;const D=[v];for(;v.isWrapped&&E>0;)v=this.lines.get(--E),D.unshift(v);const z=this.ybase+this.y;if(z>=E&&z<E+D.length)continue;const N=D[D.length-1].getTrimmedLength(),q=(0,y.reflowSmallerGetNewLineLengths)(D,this._cols,a),B=q.length-D.length;let F;F=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+B):Math.max(0,this.lines.length-this.lines.maxLength+B);const ne=[];for(let w=0;w<B;w++){const L=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);ne.push(L)}ne.length>0&&(C.push({start:E+D.length+b,newLines:ne}),b+=ne.length),D.push(...ne);let j=q.length-1,W=q[j];W===0&&(j--,W=q[j]);let ee=D.length-B-1,A=N;for(;ee>=0;){const w=Math.min(A,W);if(D[j]===void 0)break;if(D[j].copyCellsFrom(D[ee],A-w,W-w,w,!0),W-=w,W===0&&(j--,W=q[j]),A-=w,A===0){ee--;const L=Math.max(ee,0);A=(0,y.getWrappedLineTrimmedLength)(D,L,this._cols)}}for(let w=0;w<D.length;w++)q[w]<a&&D[w].setCell(q[w],_);let O=B-F;for(;O-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+b)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+B,this.ybase+l-1)}if(C.length>0){const E=[],v=[];for(let j=0;j<this.lines.length;j++)v.push(this.lines.get(j));const D=this.lines.length;let z=D-1,N=0,q=C[N];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let B=0;for(let j=Math.min(this.lines.maxLength-1,D+b-1);j>=0;j--)if(q&&q.start>z+B){for(let W=q.newLines.length-1;W>=0;W--)this.lines.set(j--,q.newLines[W]);j++,E.push({index:z+1,amount:q.newLines.length}),B+=q.newLines.length,q=C[++N]}else this.lines.set(j,v[z--]);let F=0;for(let j=E.length-1;j>=0;j--)E[j].index+=F,this.lines.onInsertEmitter.fire(E[j]),F+=E[j].amount;const ne=Math.max(0,D+b-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(a,l,_=0,C){const b=this.lines.get(a);return b?b.translateToString(l,_,C):""}getWrappedRangeForLine(a){let l=a,_=a;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:l,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 l=0;l<this.markers.length;l++)this.markers[l].line===a&&(this.markers[l].dispose(),this.markers.splice(l--,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 l=new o.Marker(a);return this.markers.push(l),l.register(this.lines.onTrim((_=>{l.line-=_,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((_=>{l.line>=_.index&&(l.line+=_.amount)}))),l.register(this.lines.onDelete((_=>{l.line>=_.index&&l.line<_.index+_.amount&&l.dispose(),l.line>_.index&&(l.line-=_.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferLine=f.DEFAULT_ATTR_DATA=void 0;const d=h(3734),S=h(511),u=h(643),p=h(482);f.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let y=0;class x{constructor(o,c,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);const l=c||S.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let _=0;_<o;++_)this.setCell(_,l);this.length=o}get(o){const c=this._data[3*o+0],a=2097151&c;return[this._data[3*o+1],2097152&c?this._combined[o]:a?(0,p.stringFromCodePoint)(a):"",c>>22,2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):a]}set(o,c){this._data[3*o+1]=c[u.CHAR_DATA_ATTR_INDEX],c[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=c[1],this._data[3*o+0]=2097152|o|c[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=c[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(o){return this._data[3*o+0]>>22}hasWidth(o){return 12582912&this._data[3*o+0]}getFg(o){return this._data[3*o+1]}getBg(o){return this._data[3*o+2]}hasContent(o){return 4194303&this._data[3*o+0]}getCodePoint(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):2097151&c}isCombined(o){return 2097152&this._data[3*o+0]}getString(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o]:2097151&c?(0,p.stringFromCodePoint)(2097151&c):""}isProtected(o){return 536870912&this._data[3*o+2]}loadCell(o,c){return y=3*o,c.content=this._data[y+0],c.fg=this._data[y+1],c.bg=this._data[y+2],2097152&c.content&&(c.combinedData=this._combined[o]),268435456&c.bg&&(c.extended=this._extendedAttrs[o]),c}setCell(o,c){2097152&c.content&&(this._combined[o]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[o]=c.extended),this._data[3*o+0]=c.content,this._data[3*o+1]=c.fg,this._data[3*o+2]=c.bg}setCellFromCodepoint(o,c,a,l){268435456&l.bg&&(this._extendedAttrs[o]=l.extended),this._data[3*o+0]=c|a<<22,this._data[3*o+1]=l.fg,this._data[3*o+2]=l.bg}addCodepointToCell(o,c,a){let l=this._data[3*o+0];2097152&l?this._combined[o]+=(0,p.stringFromCodePoint)(c):2097151&l?(this._combined[o]=(0,p.stringFromCodePoint)(2097151&l)+(0,p.stringFromCodePoint)(c),l&=-2097152,l|=2097152):l=c|4194304,a&&(l&=-12582913,l|=a<<22),this._data[3*o+0]=l}insertCells(o,c,a){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length-o){const l=new S.CellData;for(let _=this.length-o-c-1;_>=0;--_)this.setCell(o+c+_,this.loadCell(o+_,l));for(let _=0;_<c;++_)this.setCell(o+_,a)}else for(let l=o;l<this.length;++l)this.setCell(l,a);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,a)}deleteCells(o,c,a){if(o%=this.length,c<this.length-o){const l=new S.CellData;for(let _=0;_<this.length-o-c;++_)this.setCell(o+_,this.loadCell(o+c+_,l));for(let _=this.length-c;_<this.length;++_)this.setCell(_,a)}else for(let l=o;l<this.length;++l)this.setCell(l,a);o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodepoint(o,0,1,a)}replaceCells(o,c,a,l=!1){if(l)for(o&&this.getWidth(o-1)===2&&!this.isProtected(o-1)&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,a);o<c&&o<this.length;)this.isProtected(o)||this.setCell(o,a),o++;else for(o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,a);o<c&&o<this.length;)this.setCell(o++,a)}resize(o,c){if(o===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*o;if(o>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const l=new Uint32Array(a);l.set(this._data),this._data=l}for(let l=this.length;l<o;++l)this.setCell(l,c)}else{this._data=this._data.subarray(0,a);const l=Object.keys(this._combined);for(let C=0;C<l.length;C++){const b=parseInt(l[C],10);b>=o&&delete this._combined[b]}const _=Object.keys(this._extendedAttrs);for(let C=0;C<_.length;C++){const b=parseInt(_[C],10);b>=o&&delete this._extendedAttrs[b]}}return this.length=o,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const o=new Uint32Array(this._data.length);return o.set(this._data),this._data=o,1}return 0}fill(o,c=!1){if(c)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,o);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,o)}}copyFrom(o){this.length!==o.length?this._data=new Uint32Array(o._data):this._data.set(o._data),this.length=o.length,this._combined={};for(const c in o._combined)this._combined[c]=o._combined[c];this._extendedAttrs={};for(const c in o._extendedAttrs)this._extendedAttrs[c]=o._extendedAttrs[c];this.isWrapped=o.isWrapped}clone(){const o=new x(0);o._data=new Uint32Array(this._data),o.length=this.length;for(const c in this._combined)o._combined[c]=this._combined[c];for(const c in this._extendedAttrs)o._extendedAttrs[c]=this._extendedAttrs[c];return o.isWrapped=this.isWrapped,o}getTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0])return o+(this._data[3*o+0]>>22);return 0}getNoBgTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0]||50331648&this._data[3*o+2])return o+(this._data[3*o+0]>>22);return 0}copyCellsFrom(o,c,a,l,_){const C=o._data;if(_)for(let E=l-1;E>=0;E--){for(let v=0;v<3;v++)this._data[3*(a+E)+v]=C[3*(c+E)+v];268435456&C[3*(c+E)+2]&&(this._extendedAttrs[a+E]=o._extendedAttrs[c+E])}else for(let E=0;E<l;E++){for(let v=0;v<3;v++)this._data[3*(a+E)+v]=C[3*(c+E)+v];268435456&C[3*(c+E)+2]&&(this._extendedAttrs[a+E]=o._extendedAttrs[c+E])}const b=Object.keys(o._combined);for(let E=0;E<b.length;E++){const v=parseInt(b[E],10);v>=c&&(this._combined[v-c+a]=o._combined[v])}}translateToString(o,c,a,l){c=c??0,a=a??this.length,o&&(a=Math.min(a,this.getTrimmedLength())),l&&(l.length=0);let _="";for(;c<a;){const C=this._data[3*c+0],b=2097151&C,E=2097152&C?this._combined[c]:b?(0,p.stringFromCodePoint)(b):u.WHITESPACE_CELL_CHAR;if(_+=E,l)for(let v=0;v<E.length;++v)l.push(c);c+=C>>22||1}return l&&l.push(c),_}}f.BufferLine=x},4841:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.getRangeLength=void 0,f.getRangeLength=function(h,d){if(h.start.y>h.end.y)throw new Error(`Buffer range end (${h.end.x}, ${h.end.y}) cannot be before start (${h.start.x}, ${h.start.y})`);return d*(h.end.y-h.start.y)+(h.end.x-h.start.x+1)}},4634:(ie,f)=>{function h(d,S,u){if(S===d.length-1)return d[S].getTrimmedLength();const p=!d[S].hasContent(u-1)&&d[S].getWidth(u-1)===1,y=d[S+1].getWidth(0)===2;return p&&y?u-1:u}Object.defineProperty(f,"__esModule",{value:!0}),f.getWrappedLineTrimmedLength=f.reflowSmallerGetNewLineLengths=f.reflowLargerApplyNewLayout=f.reflowLargerCreateNewLayout=f.reflowLargerGetLinesToRemove=void 0,f.reflowLargerGetLinesToRemove=function(d,S,u,p,y){const x=[];for(let m=0;m<d.length-1;m++){let o=m,c=d.get(++o);if(!c.isWrapped)continue;const a=[d.get(m)];for(;o<d.length&&c.isWrapped;)a.push(c),c=d.get(++o);if(p>=m&&p<o){m+=a.length-1;continue}let l=0,_=h(a,l,S),C=1,b=0;for(;C<a.length;){const v=h(a,C,S),D=v-b,z=u-_,N=Math.min(D,z);a[l].copyCellsFrom(a[C],b,_,N,!1),_+=N,_===u&&(l++,_=0),b+=N,b===v&&(C++,b=0),_===0&&l!==0&&a[l-1].getWidth(u-1)===2&&(a[l].copyCellsFrom(a[l-1],u-1,_++,1,!1),a[l-1].setCell(u-1,y))}a[l].replaceCells(_,u,y);let E=0;for(let v=a.length-1;v>0&&(v>l||a[v].getTrimmedLength()===0);v--)E++;E>0&&(x.push(m+a.length-E),x.push(E)),m+=a.length-1}return x},f.reflowLargerCreateNewLayout=function(d,S){const u=[];let p=0,y=S[p],x=0;for(let m=0;m<d.length;m++)if(y===m){const o=S[++p];d.onDeleteEmitter.fire({index:m-x,amount:o}),m+=o-1,x+=o,y=S[++p]}else u.push(m);return{layout:u,countRemoved:x}},f.reflowLargerApplyNewLayout=function(d,S){const u=[];for(let p=0;p<S.length;p++)u.push(d.get(S[p]));for(let p=0;p<u.length;p++)d.set(p,u[p]);d.length=S.length},f.reflowSmallerGetNewLineLengths=function(d,S,u){const p=[],y=d.map(((c,a)=>h(d,a,S))).reduce(((c,a)=>c+a));let x=0,m=0,o=0;for(;o<y;){if(y-o<u){p.push(y-o);break}x+=u;const c=h(d,m,S);x>c&&(x-=c,m++);const a=d[m].getWidth(x-1)===2;a&&x--;const l=a?u-1:u;p.push(l),o+=l}return p},f.getWrappedLineTrimmedLength=h},5295:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferSet=void 0;const d=h(8460),S=h(844),u=h(9092);class p extends S.Disposable{constructor(x,m){super(),this._optionsService=x,this._bufferService=m,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 u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(x){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(x),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(x,m){this._normal.resize(x,m),this._alt.resize(x,m),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}f.BufferSet=p},511:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CellData=void 0;const d=h(482),S=h(643),u=h(3734);class p extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const m=new p;return m.setFromCharData(x),m}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(x){this.fg=x[S.CHAR_DATA_ATTR_INDEX],this.bg=0;let m=!1;if(x[S.CHAR_DATA_CHAR_INDEX].length>2)m=!0;else if(x[S.CHAR_DATA_CHAR_INDEX].length===2){const o=x[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=o&&o<=56319){const c=x[S.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(o-55296)+c-56320+65536|x[S.CHAR_DATA_WIDTH_INDEX]<<22:m=!0}else m=!0}else this.content=x[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[S.CHAR_DATA_WIDTH_INDEX]<<22;m&&(this.combinedData=x[S.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[S.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}f.CellData=p},643:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.WHITESPACE_CELL_CODE=f.WHITESPACE_CELL_WIDTH=f.WHITESPACE_CELL_CHAR=f.NULL_CELL_CODE=f.NULL_CELL_WIDTH=f.NULL_CELL_CHAR=f.CHAR_DATA_CODE_INDEX=f.CHAR_DATA_WIDTH_INDEX=f.CHAR_DATA_CHAR_INDEX=f.CHAR_DATA_ATTR_INDEX=f.DEFAULT_EXT=f.DEFAULT_ATTR=f.DEFAULT_COLOR=void 0,f.DEFAULT_COLOR=0,f.DEFAULT_ATTR=256|f.DEFAULT_COLOR<<9,f.DEFAULT_EXT=0,f.CHAR_DATA_ATTR_INDEX=0,f.CHAR_DATA_CHAR_INDEX=1,f.CHAR_DATA_WIDTH_INDEX=2,f.CHAR_DATA_CODE_INDEX=3,f.NULL_CELL_CHAR="",f.NULL_CELL_WIDTH=1,f.NULL_CELL_CODE=0,f.WHITESPACE_CELL_CHAR=" ",f.WHITESPACE_CELL_WIDTH=1,f.WHITESPACE_CELL_CODE=32},4863:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Marker=void 0;const d=h(8460),S=h(844);class u{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=u._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,S.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}f.Marker=u,u._nextId=1},7116:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DEFAULT_CHARSET=f.CHARSETS=void 0,f.CHARSETS={},f.DEFAULT_CHARSET=f.CHARSETS.B,f.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:"≥","{":"π","|":"≠","}":"£","~":"·"},f.CHARSETS.A={"#":"£"},f.CHARSETS.B=void 0,f.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},f.CHARSETS.C=f.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},f.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},f.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},f.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},f.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},f.CHARSETS.E=f.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},f.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},f.CHARSETS.H=f.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},f.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(ie,f)=>{var h,d,S;Object.defineProperty(f,"__esModule",{value:!0}),f.C1_ESCAPED=f.C1=f.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
|
|
16
|
+
`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""})(h||(f.C0=h={})),(function(u){u.PAD="",u.HOP="",u.BPH="",u.NBH="",u.IND="",u.NEL="
",u.SSA="",u.ESA="",u.HTS="",u.HTJ="",u.VTS="",u.PLD="",u.PLU="",u.RI="",u.SS2="",u.SS3="",u.DCS="",u.PU1="",u.PU2="",u.STS="",u.CCH="",u.MW="",u.SPA="",u.EPA="",u.SOS="",u.SGCI="",u.SCI="",u.CSI="",u.ST="",u.OSC="",u.PM="",u.APC=""})(d||(f.C1=d={})),(function(u){u.ST=`${h.ESC}\\`})(S||(f.C1_ESCAPED=S={}))},7399:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.evaluateKeyboardEvent=void 0;const d=h(2584),S={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};f.evaluateKeyboardEvent=function(u,p,y,x){const m={type:0,cancel:!1,key:void 0},o=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?m.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?m.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?m.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(m.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:m.key=u.ctrlKey?"\b":d.C0.DEL,u.altKey&&(m.key=d.C0.ESC+m.key);break;case 9:if(u.shiftKey){m.key=d.C0.ESC+"[Z";break}m.key=d.C0.HT,m.cancel=!0;break;case 13:m.key=u.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,m.cancel=!0;break;case 27:m.key=d.C0.ESC,u.altKey&&(m.key=d.C0.ESC+d.C0.ESC),m.cancel=!0;break;case 37:if(u.metaKey)break;o?(m.key=d.C0.ESC+"[1;"+(o+1)+"D",m.key===d.C0.ESC+"[1;3D"&&(m.key=d.C0.ESC+(y?"b":"[1;5D"))):m.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(u.metaKey)break;o?(m.key=d.C0.ESC+"[1;"+(o+1)+"C",m.key===d.C0.ESC+"[1;3C"&&(m.key=d.C0.ESC+(y?"f":"[1;5C"))):m.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(u.metaKey)break;o?(m.key=d.C0.ESC+"[1;"+(o+1)+"A",y||m.key!==d.C0.ESC+"[1;3A"||(m.key=d.C0.ESC+"[1;5A")):m.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(u.metaKey)break;o?(m.key=d.C0.ESC+"[1;"+(o+1)+"B",y||m.key!==d.C0.ESC+"[1;3B"||(m.key=d.C0.ESC+"[1;5B")):m.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(m.key=d.C0.ESC+"[2~");break;case 46:m.key=o?d.C0.ESC+"[3;"+(o+1)+"~":d.C0.ESC+"[3~";break;case 36:m.key=o?d.C0.ESC+"[1;"+(o+1)+"H":p?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:m.key=o?d.C0.ESC+"[1;"+(o+1)+"F":p?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:u.shiftKey?m.type=2:u.ctrlKey?m.key=d.C0.ESC+"[5;"+(o+1)+"~":m.key=d.C0.ESC+"[5~";break;case 34:u.shiftKey?m.type=3:u.ctrlKey?m.key=d.C0.ESC+"[6;"+(o+1)+"~":m.key=d.C0.ESC+"[6~";break;case 112:m.key=o?d.C0.ESC+"[1;"+(o+1)+"P":d.C0.ESC+"OP";break;case 113:m.key=o?d.C0.ESC+"[1;"+(o+1)+"Q":d.C0.ESC+"OQ";break;case 114:m.key=o?d.C0.ESC+"[1;"+(o+1)+"R":d.C0.ESC+"OR";break;case 115:m.key=o?d.C0.ESC+"[1;"+(o+1)+"S":d.C0.ESC+"OS";break;case 116:m.key=o?d.C0.ESC+"[15;"+(o+1)+"~":d.C0.ESC+"[15~";break;case 117:m.key=o?d.C0.ESC+"[17;"+(o+1)+"~":d.C0.ESC+"[17~";break;case 118:m.key=o?d.C0.ESC+"[18;"+(o+1)+"~":d.C0.ESC+"[18~";break;case 119:m.key=o?d.C0.ESC+"[19;"+(o+1)+"~":d.C0.ESC+"[19~";break;case 120:m.key=o?d.C0.ESC+"[20;"+(o+1)+"~":d.C0.ESC+"[20~";break;case 121:m.key=o?d.C0.ESC+"[21;"+(o+1)+"~":d.C0.ESC+"[21~";break;case 122:m.key=o?d.C0.ESC+"[23;"+(o+1)+"~":d.C0.ESC+"[23~";break;case 123:m.key=o?d.C0.ESC+"[24;"+(o+1)+"~":d.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(y&&!x||!u.altKey||u.metaKey)!y||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?m.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(m.key=d.C0.US),u.key==="@"&&(m.key=d.C0.NUL)):u.keyCode===65&&(m.type=1);else{const c=S[u.keyCode],a=c?.[u.shiftKey?1:0];if(a)m.key=d.C0.ESC+a;else if(u.keyCode>=65&&u.keyCode<=90){const l=u.ctrlKey?u.keyCode-64:u.keyCode+32;let _=String.fromCharCode(l);u.shiftKey&&(_=_.toUpperCase()),m.key=d.C0.ESC+_}else if(u.keyCode===32)m.key=d.C0.ESC+(u.ctrlKey?d.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let l=u.code.slice(3,4);u.shiftKey||(l=l.toLowerCase()),m.key=d.C0.ESC+l,m.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?m.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?m.key=d.C0.NUL:u.keyCode>=51&&u.keyCode<=55?m.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?m.key=d.C0.DEL:u.keyCode===219?m.key=d.C0.ESC:u.keyCode===220?m.key=d.C0.FS:u.keyCode===221&&(m.key=d.C0.GS)}return m}},482:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Utf8ToUtf32=f.StringToUtf32=f.utf32ToString=f.stringFromCodePoint=void 0,f.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},f.utf32ToString=function(h,d=0,S=h.length){let u="";for(let p=d;p<S;++p){let y=h[p];y>65535?(y-=65536,u+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):u+=String.fromCharCode(y)}return u},f.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const S=h.length;if(!S)return 0;let u=0,p=0;if(this._interim){const y=h.charCodeAt(p++);56320<=y&&y<=57343?d[u++]=1024*(this._interim-55296)+y-56320+65536:(d[u++]=this._interim,d[u++]=y),this._interim=0}for(let y=p;y<S;++y){const x=h.charCodeAt(y);if(55296<=x&&x<=56319){if(++y>=S)return this._interim=x,u;const m=h.charCodeAt(y);56320<=m&&m<=57343?d[u++]=1024*(x-55296)+m-56320+65536:(d[u++]=x,d[u++]=m)}else x!==65279&&(d[u++]=x)}return u}},f.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const S=h.length;if(!S)return 0;let u,p,y,x,m=0,o=0,c=0;if(this.interim[0]){let _=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let b,E=0;for(;(b=63&this.interim[++E])&&E<4;)C<<=6,C|=b;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=v-E;for(;c<D;){if(c>=S)return 0;if(b=h[c++],(192&b)!=128){c--,_=!0;break}this.interim[E++]=b,C<<=6,C|=63&b}_||(v===2?C<128?c--:d[m++]=C:v===3?C<2048||C>=55296&&C<=57343||C===65279||(d[m++]=C):C<65536||C>1114111||(d[m++]=C)),this.interim.fill(0)}const a=S-4;let l=c;for(;l<S;){for(;!(!(l<a)||128&(u=h[l])||128&(p=h[l+1])||128&(y=h[l+2])||128&(x=h[l+3]));)d[m++]=u,d[m++]=p,d[m++]=y,d[m++]=x,l+=4;if(u=h[l++],u<128)d[m++]=u;else if((224&u)==192){if(l>=S)return this.interim[0]=u,m;if(p=h[l++],(192&p)!=128){l--;continue}if(o=(31&u)<<6|63&p,o<128){l--;continue}d[m++]=o}else if((240&u)==224){if(l>=S)return this.interim[0]=u,m;if(p=h[l++],(192&p)!=128){l--;continue}if(l>=S)return this.interim[0]=u,this.interim[1]=p,m;if(y=h[l++],(192&y)!=128){l--;continue}if(o=(15&u)<<12|(63&p)<<6|63&y,o<2048||o>=55296&&o<=57343||o===65279)continue;d[m++]=o}else if((248&u)==240){if(l>=S)return this.interim[0]=u,m;if(p=h[l++],(192&p)!=128){l--;continue}if(l>=S)return this.interim[0]=u,this.interim[1]=p,m;if(y=h[l++],(192&y)!=128){l--;continue}if(l>=S)return this.interim[0]=u,this.interim[1]=p,this.interim[2]=y,m;if(x=h[l++],(192&x)!=128){l--;continue}if(o=(7&u)<<18|(63&p)<<12|(63&y)<<6|63&x,o<65536||o>1114111)continue;d[m++]=o}}return m}}},225:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeV6=void 0;const d=h(1480),S=[[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]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;f.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let y=0;y<S.length;++y)p.fill(0,S[y][0],S[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?p[y]:(function(x,m){let o,c=0,a=m.length-1;if(x<m[0][0]||x>m[a][1])return!1;for(;a>=c;)if(o=c+a>>1,x>m[o][1])c=o+1;else{if(!(x<m[o][0]))return!0;a=o-1}return!1})(y,u)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,x){let m=this.wcwidth(y),o=m===0&&x!==0;if(o){const c=d.UnicodeService.extractWidth(x);c===0?o=!1:c>m&&(m=c)}return d.UnicodeService.createPropertyValue(0,m,o)}}},5981:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.WriteBuffer=void 0;const d=h(8460),S=h(844);class u extends S.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,x){if(x!==void 0&&this._syncCalls>x)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let m;for(this._isSyncWriting=!0;m=this._writeBuffer.shift();){this._action(m);const o=this._callbacks.shift();o&&o()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,x){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(x),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(x)}_innerWrite(y=0,x=!0){const m=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const o=this._writeBuffer[this._bufferOffset],c=this._action(o,x);if(c){const l=_=>Date.now()-m>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(m,_);return void c.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(l)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=o.length,Date.now()-m>=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()}}f.WriteBuffer=u},5941:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.toRgbString=f.parseColor=void 0;const h=/^([\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 S(u,p){const y=u.toString(16),x=y.length<2?"0"+y:y;switch(p){case 4:return y[0];case 8:return x;case 12:return(x+x).slice(0,3);default:return x+x}}f.parseColor=function(u){if(!u)return;let p=u.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const y=h.exec(p);if(y){const x=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/x*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/x*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/x*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),d.exec(p)&&[3,6,9,12].includes(p.length))){const y=p.length/3,x=[0,0,0];for(let m=0;m<3;++m){const o=parseInt(p.slice(y*m,y*m+y),16);x[m]=y===1?o<<4:y===2?o:y===3?o>>4:o>>8}return x}},f.toRgbString=function(u,p=16){const[y,x,m]=u;return`rgb:${S(y,p)}/${S(x,p)}/${S(m,p)}`}},5770:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.PAYLOAD_LIMIT=void 0,f.PAYLOAD_LIMIT=1e7},6351:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DcsHandler=f.DcsParser=void 0;const d=h(482),S=h(8742),u=h(5770),p=[];f.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(x,m){this._handlers[x]===void 0&&(this._handlers[x]=[]);const o=this._handlers[x];return o.push(m),{dispose:()=>{const c=o.indexOf(m);c!==-1&&o.splice(c,1)}}}clearHandler(x){this._handlers[x]&&delete this._handlers[x]}setHandlerFallback(x){this._handlerFb=x}reset(){if(this._active.length)for(let x=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;x>=0;--x)this._active[x].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(x,m){if(this.reset(),this._ident=x,this._active=this._handlers[x]||p,this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].hook(m);else this._handlerFb(this._ident,"HOOK",m)}put(x,m,o){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(x,m,o);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(x,m,o))}unhook(x,m=!0){if(this._active.length){let o=!1,c=this._active.length-1,a=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,o=m,a=this._stack.fallThrough,this._stack.paused=!1),!a&&o===!1){for(;c>=0&&(o=this._active[c].unhook(x),o!==!0);c--)if(o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,o;c--}for(;c>=0;c--)if(o=this._active[c].unhook(!1),o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,o}else this._handlerFb(this._ident,"UNHOOK",x);this._active=p,this._ident=0}};const y=new S.Params;y.addParam(0),f.DcsHandler=class{constructor(x){this._handler=x,this._data="",this._params=y,this._hitLimit=!1}hook(x){this._params=x.length>1||x.params[0]?x.clone():y,this._data="",this._hitLimit=!1}put(x,m,o){this._hitLimit||(this._data+=(0,d.utf32ToString)(x,m,o),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(x){let m=!1;if(this._hitLimit)m=!1;else if(x&&(m=this._handler(this._data,this._params),m instanceof Promise))return m.then((o=>(this._params=y,this._data="",this._hitLimit=!1,o)));return this._params=y,this._data="",this._hitLimit=!1,m}}},2015:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.EscapeSequenceParser=f.VT500_TRANSITION_TABLE=f.TransitionTable=void 0;const d=h(844),S=h(8742),u=h(6242),p=h(6351);class y{constructor(c){this.table=new Uint8Array(c)}setDefault(c,a){this.table.fill(c<<4|a)}add(c,a,l,_){this.table[a<<8|c]=l<<4|_}addMany(c,a,l,_){for(let C=0;C<c.length;C++)this.table[a<<8|c[C]]=l<<4|_}}f.TransitionTable=y;const x=160;f.VT500_TRANSITION_TABLE=(function(){const o=new y(4095),c=Array.apply(null,Array(256)).map(((E,v)=>v)),a=(E,v)=>c.slice(E,v),l=a(32,127),_=a(0,24);_.push(25),_.push.apply(_,a(28,32));const C=a(0,14);let b;for(b in o.setDefault(1,0),o.addMany(l,0,2,0),C)o.addMany([24,26,153,154],b,3,0),o.addMany(a(128,144),b,3,0),o.addMany(a(144,152),b,3,0),o.add(156,b,0,0),o.add(27,b,11,1),o.add(157,b,4,8),o.addMany([152,158,159],b,0,7),o.add(155,b,11,3),o.add(144,b,11,9);return o.addMany(_,0,3,0),o.addMany(_,1,3,1),o.add(127,1,0,1),o.addMany(_,8,0,8),o.addMany(_,3,3,3),o.add(127,3,0,3),o.addMany(_,4,3,4),o.add(127,4,0,4),o.addMany(_,6,3,6),o.addMany(_,5,3,5),o.add(127,5,0,5),o.addMany(_,2,3,2),o.add(127,2,0,2),o.add(93,1,4,8),o.addMany(l,8,5,8),o.add(127,8,5,8),o.addMany([156,27,24,26,7],8,6,0),o.addMany(a(28,32),8,0,8),o.addMany([88,94,95],1,0,7),o.addMany(l,7,0,7),o.addMany(_,7,0,7),o.add(156,7,0,0),o.add(127,7,0,7),o.add(91,1,11,3),o.addMany(a(64,127),3,7,0),o.addMany(a(48,60),3,8,4),o.addMany([60,61,62,63],3,9,4),o.addMany(a(48,60),4,8,4),o.addMany(a(64,127),4,7,0),o.addMany([60,61,62,63],4,0,6),o.addMany(a(32,64),6,0,6),o.add(127,6,0,6),o.addMany(a(64,127),6,0,0),o.addMany(a(32,48),3,9,5),o.addMany(a(32,48),5,9,5),o.addMany(a(48,64),5,0,6),o.addMany(a(64,127),5,7,0),o.addMany(a(32,48),4,9,5),o.addMany(a(32,48),1,9,2),o.addMany(a(32,48),2,9,2),o.addMany(a(48,127),2,10,0),o.addMany(a(48,80),1,10,0),o.addMany(a(81,88),1,10,0),o.addMany([89,90,92],1,10,0),o.addMany(a(96,127),1,10,0),o.add(80,1,11,9),o.addMany(_,9,0,9),o.add(127,9,0,9),o.addMany(a(28,32),9,0,9),o.addMany(a(32,48),9,9,12),o.addMany(a(48,60),9,8,10),o.addMany([60,61,62,63],9,9,10),o.addMany(_,11,0,11),o.addMany(a(32,128),11,0,11),o.addMany(a(28,32),11,0,11),o.addMany(_,10,0,10),o.add(127,10,0,10),o.addMany(a(28,32),10,0,10),o.addMany(a(48,60),10,8,10),o.addMany([60,61,62,63],10,0,11),o.addMany(a(32,48),10,9,12),o.addMany(_,12,0,12),o.add(127,12,0,12),o.addMany(a(28,32),12,0,12),o.addMany(a(32,48),12,9,12),o.addMany(a(48,64),12,0,11),o.addMany(a(64,127),12,12,13),o.addMany(a(64,127),10,12,13),o.addMany(a(64,127),9,12,13),o.addMany(_,13,13,13),o.addMany(l,13,13,13),o.add(127,13,0,13),o.addMany([27,156,24,26],13,14,0),o.add(x,0,2,0),o.add(x,8,5,8),o.add(x,6,0,6),o.add(x,11,0,11),o.add(x,13,13,13),o})();class m extends d.Disposable{constructor(c=f.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new S.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(a,l,_)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,l)=>{},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 u.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,a=[64,126]){let l=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=c.prefix.charCodeAt(0),l&&60>l||l>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 C=0;C<c.intermediates.length;++C){const b=c.intermediates.charCodeAt(C);if(32>b||b>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=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 l<<=8,l|=_,l}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 l=this._identifier(c,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const _=this._escHandlers[l];return _.push(a),{dispose:()=>{const C=_.indexOf(a);C!==-1&&_.splice(C,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 l=this._identifier(c);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const _=this._csiHandlers[l];return _.push(a),{dispose:()=>{const C=_.indexOf(a);C!==-1&&_.splice(C,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.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(c,a,l,_,C){this._parseStack.state=c,this._parseStack.handlers=a,this._parseStack.handlerPos=l,this._parseStack.transition=_,this._parseStack.chunkPos=C}parse(c,a,l){let _,C=0,b=0,E=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,E=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const v=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&D>-1){for(;D>=0&&(_=v[D](this._params),_!==!0);D--)if(_ instanceof Promise)return this._parseStack.handlerPos=D,_}this._parseStack.handlers=[];break;case 4:if(l===!1&&D>-1){for(;D>=0&&(_=v[D](),_!==!0);D--)if(_ instanceof Promise)return this._parseStack.handlerPos=D,_}this._parseStack.handlers=[];break;case 6:if(C=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(C!==24&&C!==26,l),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=c[this._parseStack.chunkPos],_=this._oscParser.end(C!==24&&C!==26,l),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,E=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let v=E;v<a;++v){switch(C=c[v],b=this._transitions.table[this.currentState<<8|(C<160?C:x)],b>>4){case 2:for(let B=v+1;;++B){if(B>=a||(C=c[B])<32||C>126&&C<x){this._printHandler(c,v,B),v=B-1;break}if(++B>=a||(C=c[B])<32||C>126&&C<x){this._printHandler(c,v,B),v=B-1;break}if(++B>=a||(C=c[B])<32||C>126&&C<x){this._printHandler(c,v,B),v=B-1;break}if(++B>=a||(C=c[B])<32||C>126&&C<x){this._printHandler(c,v,B),v=B-1;break}}break;case 3:this._executeHandlers[C]?this._executeHandlers[C]():this._executeHandlerFb(C),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const D=this._csiHandlers[this._collect<<8|C];let z=D?D.length-1:-1;for(;z>=0&&(_=D[z](this._params),_!==!0);z--)if(_ instanceof Promise)return this._preserveStack(3,D,z,b,v),_;z<0&&this._csiHandlerFb(this._collect<<8|C,this._params),this.precedingJoinState=0;break;case 8:do switch(C){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(C-48)}while(++v<a&&(C=c[v])>47&&C<60);v--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const N=this._escHandlers[this._collect<<8|C];let q=N?N.length-1:-1;for(;q>=0&&(_=N[q](),_!==!0);q--)if(_ instanceof Promise)return this._preserveStack(4,N,q,b,v),_;q<0&&this._escHandlerFb(this._collect<<8|C),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|C,this._params);break;case 13:for(let B=v+1;;++B)if(B>=a||(C=c[B])===24||C===26||C===27||C>127&&C<x){this._dcsParser.put(c,v,B),v=B-1;break}break;case 14:if(_=this._dcsParser.unhook(C!==24&&C!==26),_)return this._preserveStack(6,[],0,b,v),_;C===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let B=v+1;;B++)if(B>=a||(C=c[B])<32||C>127&&C<x){this._oscParser.put(c,v,B),v=B-1;break}break;case 6:if(_=this._oscParser.end(C!==24&&C!==26),_)return this._preserveStack(5,[],0,b,v),_;C===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&b}}}f.EscapeSequenceParser=m},6242:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.OscHandler=f.OscParser=void 0;const d=h(5770),S=h(482),u=[];f.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,y){this._handlers[p]===void 0&&(this._handlers[p]=[]);const x=this._handlers[p];return x.push(y),{dispose:()=>{const m=x.indexOf(y);m!==-1&&x.splice(m,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=u}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=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,y,x){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(p,y,x);else this._handlerFb(this._id,"PUT",(0,S.utf32ToString)(p,y,x))}start(){this.reset(),this._state=1}put(p,y,x){if(this._state!==3){if(this._state===1)for(;y<x;){const m=p[y++];if(m===59){this._state=2,this._start();break}if(m<48||57<m)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+m-48}this._state===2&&x-y>0&&this._put(p,y,x)}}end(p,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let x=!1,m=this._active.length-1,o=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,x=y,o=this._stack.fallThrough,this._stack.paused=!1),!o&&x===!1){for(;m>=0&&(x=this._active[m].end(p),x!==!0);m--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,x;m--}for(;m>=0;m--)if(x=this._active[m].end(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,x}else this._handlerFb(this._id,"END",p);this._active=u,this._id=-1,this._state=0}}},f.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,y,x){this._hitLimit||(this._data+=(0,S.utf32ToString)(p,y,x),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let y=!1;if(this._hitLimit)y=!1;else if(p&&(y=this._handler(this._data),y instanceof Promise))return y.then((x=>(this._data="",this._hitLimit=!1,x)));return this._data="",this._hitLimit=!1,y}}},8742:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Params=void 0;const h=2147483647;class d{static fromArray(u){const p=new d;if(!u.length)return p;for(let y=Array.isArray(u[0])?1:0;y<u.length;++y){const x=u[y];if(Array.isArray(x))for(let m=0;m<x.length;++m)p.addSubParam(x[m]);else p.addParam(x)}return p}constructor(u=32,p=32){if(this.maxLength=u,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new d(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let p=0;p<this.length;++p){u.push(this.params[p]);const y=this._subParamsIdx[p]>>8,x=255&this._subParamsIdx[p];x-y>0&&u.push(Array.prototype.slice.call(this._subParams,y,x))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>h?h:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>h?h:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const p=this._subParamsIdx[u]>>8,y=255&this._subParamsIdx[u];return y-p>0?this._subParams.subarray(p,y):null}getSubParamsAll(){const u={};for(let p=0;p<this.length;++p){const y=this._subParamsIdx[p]>>8,x=255&this._subParamsIdx[p];x-y>0&&(u[p]=this._subParams.slice(y,x))}return u}addDigit(u){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,x=y[p-1];y[p-1]=~x?Math.min(10*x+u,h):u}}f.Params=d},5741:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.AddonManager=void 0,f.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()}loadAddon(h,d){const S={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(S),d.dispose=()=>this._wrappedAddonDispose(S),d.activate(h)}_wrappedAddonDispose(h){if(h.isDisposed)return;let d=-1;for(let S=0;S<this._addons.length;S++)if(this._addons[S]===h){d=S;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(d,1)}}},8771:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferApiView=void 0;const d=h(3785),S=h(511);f.BufferApiView=class{constructor(u,p){this._buffer=u,this.type=p}init(u){return this._buffer=u,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(u){const p=this._buffer.lines.get(u);if(p)return new d.BufferLineApiView(p)}getNullCell(){return new S.CellData}}},3785:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferLineApiView=void 0;const d=h(511);f.BufferLineApiView=class{constructor(S){this._line=S}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(S,u){if(!(S<0||S>=this._line.length))return u?(this._line.loadCell(S,u),u):this._line.loadCell(S,new d.CellData)}translateToString(S,u,p){return this._line.translateToString(S,u,p)}}},8285:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferNamespaceApi=void 0;const d=h(8771),S=h(8460),u=h(844);class p extends u.Disposable{constructor(x){super(),this._core=x,this._onBufferChange=this.register(new S.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)}}f.BufferNamespaceApi=p},7975:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ParserApi=void 0,f.ParserApi=class{constructor(h){this._core=h}registerCsiHandler(h,d){return this._core.registerCsiHandler(h,(S=>d(S.toArray())))}addCsiHandler(h,d){return this.registerCsiHandler(h,d)}registerDcsHandler(h,d){return this._core.registerDcsHandler(h,((S,u)=>d(S,u.toArray())))}addDcsHandler(h,d){return this.registerDcsHandler(h,d)}registerEscHandler(h,d){return this._core.registerEscHandler(h,d)}addEscHandler(h,d){return this.registerEscHandler(h,d)}registerOscHandler(h,d){return this._core.registerOscHandler(h,d)}addOscHandler(h,d){return this.registerOscHandler(h,d)}}},7090:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeApi=void 0,f.UnicodeApi=class{constructor(h){this._core=h}register(h){this._core.unicodeService.register(h)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(h){this._core.unicodeService.activeVersion=h}}},744:function(ie,f,h){var d=this&&this.__decorate||function(o,c,a,l){var _,C=arguments.length,b=C<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,c,a,l);else for(var E=o.length-1;E>=0;E--)(_=o[E])&&(b=(C<3?_(b):C>3?_(c,a,b):_(c,a))||b);return C>3&&b&&Object.defineProperty(c,a,b),b},S=this&&this.__param||function(o,c){return function(a,l){c(a,l,o)}};Object.defineProperty(f,"__esModule",{value:!0}),f.BufferService=f.MINIMUM_ROWS=f.MINIMUM_COLS=void 0;const u=h(8460),p=h(844),y=h(5295),x=h(2585);f.MINIMUM_COLS=2,f.MINIMUM_ROWS=1;let m=f.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(o){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(o.rawOptions.cols||0,f.MINIMUM_COLS),this.rows=Math.max(o.rawOptions.rows||0,f.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(o,this))}resize(o,c){this.cols=o,this.rows=c,this.buffers.resize(o,c),this._onResize.fire({cols:o,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(o,c=!1){const a=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===o.fg&&l.getBg(0)===o.bg||(l=a.getBlankLine(o,c),this._cachedBlankLine=l),l.isWrapped=c;const _=a.ybase+a.scrollTop,C=a.ybase+a.scrollBottom;if(a.scrollTop===0){const b=a.lines.isFull;C===a.lines.length-1?b?a.lines.recycle().copyFrom(l):a.lines.push(l.clone()):a.lines.splice(C+1,0,l.clone()),b?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const b=C-_+1;a.lines.shiftElements(_+1,b-1,-1),a.lines.set(C,l.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(o,c,a){const l=this.buffer;if(o<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else o+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const _=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+o,l.ybase),0),_!==l.ydisp&&(c||this._onScroll.fire(l.ydisp))}};f.BufferService=m=d([S(0,x.IOptionsService)],m)},7994:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CharsetService=void 0,f.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(h){this.glevel=h,this.charset=this._charsets[h]}setgCharset(h,d){this._charsets[h]=d,this.glevel===h&&(this.charset=d)}}},1753:function(ie,f,h){var d=this&&this.__decorate||function(l,_,C,b){var E,v=arguments.length,D=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,C):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(l,_,C,b);else for(var z=l.length-1;z>=0;z--)(E=l[z])&&(D=(v<3?E(D):v>3?E(_,C,D):E(_,C))||D);return v>3&&D&&Object.defineProperty(_,C,D),D},S=this&&this.__param||function(l,_){return function(C,b){_(C,b,l)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CoreMouseService=void 0;const u=h(2585),p=h(8460),y=h(844),x={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function m(l,_){let C=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(C|=64,C|=l.action):(C|=3&l.button,4&l.button&&(C|=64),8&l.button&&(C|=128),l.action===32?C|=32:l.action!==0||_||(C|=3)),C}const o=String.fromCharCode,c={DEFAULT:l=>{const _=[m(l,!1)+32,l.col+32,l.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${o(_[0])}${o(_[1])}${o(_[2])}`},SGR:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${m(l,!0)};${l.col};${l.row}${_}`},SGR_PIXELS:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${m(l,!0)};${l.x};${l.y}${_}`}};let a=f.CoreMouseService=class extends y.Disposable{constructor(l,_){super(),this._bufferService=l,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 C of Object.keys(x))this.addProtocol(C,x[C]);for(const C of Object.keys(c))this.addEncoding(C,c[C]);this.reset()}addProtocol(l,_){this._protocols[l]=_}addEncoding(l,_){this._encodings[l]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const _=this._encodings[this._activeEncoding](l);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,_,C){if(C){if(l.x!==_.x||l.y!==_.y)return!1}else if(l.col!==_.col||l.row!==_.row)return!1;return l.button===_.button&&l.action===_.action&&l.ctrl===_.ctrl&&l.alt===_.alt&&l.shift===_.shift}};f.CoreMouseService=a=d([S(0,u.IBufferService),S(1,u.ICoreService)],a)},6975:function(ie,f,h){var d=this&&this.__decorate||function(a,l,_,C){var b,E=arguments.length,v=E<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,l,_,C);else for(var D=a.length-1;D>=0;D--)(b=a[D])&&(v=(E<3?b(v):E>3?b(l,_,v):b(l,_))||v);return E>3&&v&&Object.defineProperty(l,_,v),v},S=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CoreService=void 0;const u=h(1439),p=h(8460),y=h(844),x=h(2585),m=Object.freeze({insertMode:!1}),o=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=f.CoreService=class extends y.Disposable{constructor(a,l,_){super(),this._bufferService=a,this._logService=l,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,u.clone)(m),this.decPrivateModes=(0,u.clone)(o)}reset(){this.modes=(0,u.clone)(m),this.decPrivateModes=(0,u.clone)(o)}triggerDataEvent(a,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((C=>C.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(a))}};f.CoreService=c=d([S(0,x.IBufferService),S(1,x.ILogService),S(2,x.IOptionsService)],c)},9074:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DecorationService=void 0;const d=h(8055),S=h(8460),u=h(844),p=h(6106);let y=0,x=0;class m extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((a=>a?.marker.line)),this._onDecorationRegistered=this.register(new S.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new S.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const l=new o(a);if(l){const _=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),_.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,l,_){let C=0,b=0;for(const E of this._decorations.getKeyIterator(l))C=E.options.x??0,b=C+(E.options.width??1),a>=C&&a<b&&(!_||(E.options.layer??"bottom")===_)&&(yield E)}forEachDecorationAtCell(a,l,_,C){this._decorations.forEachByKey(l,(b=>{y=b.options.x??0,x=y+(b.options.width??1),a>=y&&a<x&&(!_||(b.options.layer??"bottom")===_)&&C(b)}))}}f.DecorationService=m;class o extends u.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 S.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new S.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=a.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.InstantiationService=f.ServiceCollection=void 0;const d=h(2585),S=h(8343);class u{constructor(...y){this._entries=new Map;for(const[x,m]of y)this.set(x,m)}set(y,x){const m=this._entries.get(y);return this._entries.set(y,x),m}forEach(y){for(const[x,m]of this._entries.entries())y(x,m)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}f.ServiceCollection=u,f.InstantiationService=class{constructor(){this._services=new u,this._services.set(d.IInstantiationService,this)}setService(p,y){this._services.set(p,y)}getService(p){return this._services.get(p)}createInstance(p,...y){const x=(0,S.getServiceDependencies)(p).sort(((c,a)=>c.index-a.index)),m=[];for(const c of x){const a=this._services.get(c.id);if(!a)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${c.id}.`);m.push(a)}const o=x.length>0?x[0].index:y.length;if(y.length!==o)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${o+1} conflicts with ${y.length} static arguments`);return new p(...y,...m)}}},7866:function(ie,f,h){var d=this&&this.__decorate||function(o,c,a,l){var _,C=arguments.length,b=C<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,c,a,l);else for(var E=o.length-1;E>=0;E--)(_=o[E])&&(b=(C<3?_(b):C>3?_(c,a,b):_(c,a))||b);return C>3&&b&&Object.defineProperty(c,a,b),b},S=this&&this.__param||function(o,c){return function(a,l){c(a,l,o)}};Object.defineProperty(f,"__esModule",{value:!0}),f.traceCall=f.setTraceLogger=f.LogService=void 0;const u=h(844),p=h(2585),y={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let x,m=f.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(o){super(),this._optionsService=o,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),x=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(o){for(let c=0;c<o.length;c++)typeof o[c]=="function"&&(o[c]=o[c]())}_log(o,c,a){this._evalLazyOptionalParams(a),o.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...a)}trace(o,...c){this._logLevel<=p.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,o,c)}debug(o,...c){this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,o,c)}info(o,...c){this._logLevel<=p.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,o,c)}warn(o,...c){this._logLevel<=p.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,o,c)}error(o,...c){this._logLevel<=p.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,o,c)}};f.LogService=m=d([S(0,p.IOptionsService)],m),f.setTraceLogger=function(o){x=o},f.traceCall=function(o,c,a){if(typeof a.value!="function")throw new Error("not supported");const l=a.value;a.value=function(..._){if(x.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,_);x.trace(`GlyphRenderer#${l.name}(${_.map((b=>JSON.stringify(b))).join(", ")})`);const C=l.apply(this,_);return x.trace(`GlyphRenderer#${l.name} return`,C),C}}},7302:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.OptionsService=f.DEFAULT_OPTIONS=void 0;const d=h(8460),S=h(844),u=h(6114);f.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends S.Disposable{constructor(m){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const o={...f.DEFAULT_OPTIONS};for(const c in m)if(c in o)try{const a=m[c];o[c]=this._sanitizeAndValidateOption(c,a)}catch(a){console.error(a)}this.rawOptions=o,this.options={...o},this._setupOptions(),this.register((0,S.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(m,o){return this.onOptionChange((c=>{c===m&&o(this.rawOptions[m])}))}onMultipleOptionChange(m,o){return this.onOptionChange((c=>{m.indexOf(c)!==-1&&o()}))}_setupOptions(){const m=c=>{if(!(c in f.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},o=(c,a)=>{if(!(c in f.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:m.bind(this,c),set:o.bind(this,c)};Object.defineProperty(this.options,c,a)}}_sanitizeAndValidateOption(m,o){switch(m){case"cursorStyle":if(o||(o=f.DEFAULT_OPTIONS[m]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(o))throw new Error(`"${o}" is not a valid value for ${m}`);break;case"wordSeparator":o||(o=f.DEFAULT_OPTIONS[m]);break;case"fontWeight":case"fontWeightBold":if(typeof o=="number"&&1<=o&&o<=1e3)break;o=p.includes(o)?o:f.DEFAULT_OPTIONS[m];break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(`${m} cannot be less than 1, value: ${o}`);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(`${m} cannot be less than 0, value: ${o}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(`${m} cannot be less than or equal to 0, value: ${o}`);break;case"rows":case"cols":if(!o&&o!==0)throw new Error(`${m} must be numeric, value: ${o}`);break;case"windowsPty":o=o??{}}return o}}f.OptionsService=y},2660:function(ie,f,h){var d=this&&this.__decorate||function(y,x,m,o){var c,a=arguments.length,l=a<3?x:o===null?o=Object.getOwnPropertyDescriptor(x,m):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(y,x,m,o);else for(var _=y.length-1;_>=0;_--)(c=y[_])&&(l=(a<3?c(l):a>3?c(x,m,l):c(x,m))||l);return a>3&&l&&Object.defineProperty(x,m,l),l},S=this&&this.__param||function(y,x){return function(m,o){x(m,o,y)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OscLinkService=void 0;const u=h(2585);let p=f.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const x=this._bufferService.buffer;if(y.id===void 0){const _=x.addMarker(x.ybase+x.y),C={data:y,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(C,_))),this._dataByLinkId.set(C.id,C),C.id}const m=y,o=this._getEntryIdKey(m),c=this._entriesWithId.get(o);if(c)return this.addLineToLink(c.id,x.ybase+x.y),c.id;const a=x.addMarker(x.ybase+x.y),l={id:this._nextId++,key:this._getEntryIdKey(m),data:m,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(l,a))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(y,x){const m=this._dataByLinkId.get(y);if(m&&m.lines.every((o=>o.line!==x))){const o=this._bufferService.buffer.addMarker(x);m.lines.push(o),o.onDispose((()=>this._removeMarkerFromLink(m,o)))}}getLinkData(y){return this._dataByLinkId.get(y)?.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,x){const m=y.lines.indexOf(x);m!==-1&&(y.lines.splice(m,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};f.OscLinkService=p=d([S(0,u.IBufferService)],p)},8343:(ie,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.createDecorator=f.getServiceDependencies=f.serviceRegistry=void 0;const h="di$target",d="di$dependencies";f.serviceRegistry=new Map,f.getServiceDependencies=function(S){return S[d]||[]},f.createDecorator=function(S){if(f.serviceRegistry.has(S))return f.serviceRegistry.get(S);const u=function(p,y,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(m,o,c){o[h]===o?o[d].push({id:m,index:c}):(o[d]=[{id:m,index:c}],o[h]=o)})(u,p,x)};return u.toString=()=>S,f.serviceRegistry.set(S,u),u}},2585:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.IDecorationService=f.IUnicodeService=f.IOscLinkService=f.IOptionsService=f.ILogService=f.LogLevelEnum=f.IInstantiationService=f.ICharsetService=f.ICoreService=f.ICoreMouseService=f.IBufferService=void 0;const d=h(8343);var S;f.IBufferService=(0,d.createDecorator)("BufferService"),f.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),f.ICoreService=(0,d.createDecorator)("CoreService"),f.ICharsetService=(0,d.createDecorator)("CharsetService"),f.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(S||(f.LogLevelEnum=S={})),f.ILogService=(0,d.createDecorator)("LogService"),f.IOptionsService=(0,d.createDecorator)("OptionsService"),f.IOscLinkService=(0,d.createDecorator)("OscLinkService"),f.IUnicodeService=(0,d.createDecorator)("UnicodeService"),f.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(ie,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeService=void 0;const d=h(8460),S=h(225);class u{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,x,m=!1){return(16777215&y)<<3|(3&x)<<1|(m?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const y=new S.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let x=0,m=0;const o=y.length;for(let c=0;c<o;++c){let a=y.charCodeAt(c);if(55296<=a&&a<=56319){if(++c>=o)return x+this.wcwidth(a);const C=y.charCodeAt(c);56320<=C&&C<=57343?a=1024*(a-55296)+C-56320+65536:x+=this.wcwidth(C)}const l=this.charProperties(a,m);let _=u.extractWidth(l);u.extractShouldJoin(l)&&(_-=u.extractWidth(m)),x+=_,m=l}return x}charProperties(y,x){return this._activeProvider.charProperties(y,x)}}f.UnicodeService=u}},G={};function de(ie){var f=G[ie];if(f!==void 0)return f.exports;var h=G[ie]={exports:{}};return le[ie].call(h.exports,h,h.exports,de),h.exports}var Se={};return(()=>{var ie=Se;Object.defineProperty(ie,"__esModule",{value:!0}),ie.Terminal=void 0;const f=de(9042),h=de(3236),d=de(844),S=de(5741),u=de(8285),p=de(7975),y=de(7090),x=["cols","rows"];class m extends d.Disposable{constructor(c){super(),this._core=this.register(new h.Terminal(c)),this._addonManager=this.register(new S.AddonManager),this._publicOptions={...this._core.options};const a=_=>this._core.options[_],l=(_,C)=>{this._checkReadonlyOptions(_),this._core.options[_]=C};for(const _ in this._core.options){const C={get:a.bind(this,_),set:l.bind(this,_)};Object.defineProperty(this._publicOptions,_,C)}}_checkReadonlyOptions(c){if(x.includes(c))throw new Error(`Option "${c}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.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()}input(c,a=!0){this._core.input(c,a)}resize(c,a){this._verifyIntegers(c,a),this._core.resize(c,a)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}attachCustomWheelEventHandler(c){this._core.attachCustomWheelEventHandler(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){return this._checkProposedApi(),this._verifyPositiveIntegers(c.x??0,c.width??0,c.height??0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,a,l){this._verifyIntegers(c,a,l),this._core.select(c,a,l)}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 f}_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")}}ie.Terminal=m})(),Se})()))})(Po)),Po.exports}var bv=yv(),Fo={exports:{}},Ff;function Cv(){return Ff||(Ff=1,(function(te,me){(function(le,G){te.exports=G()})(self,(()=>(()=>{var le={};return(()=>{var G=le;Object.defineProperty(G,"__esModule",{value:!0}),G.FitAddon=void 0,G.FitAddon=class{activate(de){this._terminal=de}dispose(){}fit(){const de=this.proposeDimensions();if(!de||!this._terminal||isNaN(de.cols)||isNaN(de.rows))return;const Se=this._terminal._core;this._terminal.rows===de.rows&&this._terminal.cols===de.cols||(Se._renderService.clear(),this._terminal.resize(de.cols,de.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const de=this._terminal._core,Se=de._renderService.dimensions;if(Se.css.cell.width===0||Se.css.cell.height===0)return;const ie=this._terminal.options.scrollback===0?0:de.viewport.scrollBarWidth,f=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(f.getPropertyValue("height")),d=Math.max(0,parseInt(f.getPropertyValue("width"))),S=window.getComputedStyle(this._terminal.element),u=h-(parseInt(S.getPropertyValue("padding-top"))+parseInt(S.getPropertyValue("padding-bottom"))),p=d-(parseInt(S.getPropertyValue("padding-right"))+parseInt(S.getPropertyValue("padding-left")))-ie;return{cols:Math.max(2,Math.floor(p/Se.css.cell.width)),rows:Math.max(1,Math.floor(u/Se.css.cell.height))}}}})(),le})()))})(Fo)),Fo.exports}var Ev=Cv();const Zf=16e3,wv=30,xv=.004,Dv=["audio/webm;codecs=opus","audio/webm","audio/mp4"];function Av(te){if(!te.length)return 0;let me=0;for(const le of te)me+=le*le;return Math.sqrt(me/te.length)}function Tv(te){return Av(te)<xv}async function Rv(te){const me=new AudioContext;try{const le=await me.decodeAudioData(await te.arrayBuffer()),G=Math.max(1,Math.ceil(le.duration*Zf)),de=new OfflineAudioContext(1,G,Zf),Se=de.createBufferSource();return Se.buffer=le,Se.connect(de.destination),Se.start(),(await de.startRendering()).getChannelData(0)}finally{me.close()}}class Mv{constructor(){this.stream=null,this.recorder=null,this.chunks=[]}async start(){this.stream=await navigator.mediaDevices.getUserMedia({audio:!0});const me=Dv.find(le=>MediaRecorder.isTypeSupported(le));this.recorder=new MediaRecorder(this.stream,me?{mimeType:me}:void 0),this.chunks=[],this.recorder.ondataavailable=le=>{le.data.size&&this.chunks.push(le.data)},this.recorder.start()}stop(){return new Promise(me=>{const le=this.recorder;if(!le||le.state==="inactive"){this.dispose(),me(null);return}le.onstop=()=>{const G=new Blob(this.chunks,{type:le.mimeType||"audio/webm"});if(this.dispose(),!G.size){me(null);return}Rv(G).then(me,()=>me(null))},le.stop()})}cancel(){const me=this.recorder;me&&me.state!=="inactive"&&(me.onstop=null,me.stop()),this.dispose()}dispose(){this.stream?.getTracks().forEach(me=>me.stop()),this.stream=null,this.recorder=null,this.chunks=[]}}function Da(te){const me=te.replace(/^.*@/,""),le=me.replace(/:\d+$/,"");return le.includes(":")?me:le}const Ra="\x1B",Qf="\x07",Lv=new RegExp(Ra+"\\][^"+Qf+Ra+"]*(?:"+Qf+"|"+Ra+"\\\\)","g"),Ov=new RegExp(Ra+"\\[[0-9;?]*[A-Za-z]","g");function Bv(te){return/[#$%>]\s*$/.test(te.replace(Lv,"").replace(Ov,""))}const kv=150,Hv=3e3,yt=()=>window.zerog;function lt({name:te,className:me=""}){const le={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:`icon-svg ${me}`.trim(),"aria-hidden":!0};switch(te){case"plus":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M12 5v14M5 12h14"})});case"panel-left":return M.jsxs("svg",{...le,children:[M.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),M.jsx("path",{d:"M9 4v16"})]});case"panel-left-open":return M.jsxs("svg",{...le,children:[M.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),M.jsx("path",{d:"M9 4v16M6 9l2 3-2 3"})]});case"grid":return M.jsxs("svg",{...le,children:[M.jsx("rect",{x:"4",y:"4",width:"7",height:"7",rx:"1"}),M.jsx("rect",{x:"13",y:"4",width:"7",height:"7",rx:"1"}),M.jsx("rect",{x:"4",y:"13",width:"7",height:"7",rx:"1"}),M.jsx("rect",{x:"13",y:"13",width:"7",height:"7",rx:"1"})]});case"sessions":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M4 7h16M4 12h16M4 17h10"})});case"ssh":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M7 17l5-5-5-5M12 17h7"})});case"history":return M.jsxs("svg",{...le,children:[M.jsx("path",{d:"M4 12a8 8 0 1 0 2.3-5.7L4 8.5M4 4v4.5h4.5"}),M.jsx("path",{d:"M12 7v5l3 2"})]});case"spark":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3z"})});case"settings":return M.jsxs("svg",{...le,children:[M.jsx("circle",{cx:"12",cy:"12",r:"3"}),M.jsx("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9c.3.6.9 1 1.6 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"})]});case"sun":return M.jsxs("svg",{...le,children:[M.jsx("circle",{cx:"12",cy:"12",r:"4"}),M.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]});case"moon":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M20.5 15.5A8.5 8.5 0 0 1 8.5 3.5 8.5 8.5 0 1 0 20.5 15.5z"})});case"stack":return M.jsx("svg",{...le,children:M.jsx("rect",{x:"5",y:"5",width:"14",height:"14",rx:"1.5"})});case"maximize":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M8 4H4v4M16 4h4v4M4 16v4h4M20 16v4h-4"})});case"restore":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M8 8h12v12H8zM4 16V4h12"})});case"chevron-left":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M15 5l-7 7 7 7"})});case"chevron-right":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M9 5l7 7-7 7"})});case"split-v":return M.jsxs("svg",{...le,children:[M.jsx("rect",{x:"4",y:"5",width:"7",height:"14",rx:"1"}),M.jsx("rect",{x:"13",y:"5",width:"7",height:"14",rx:"1"})]});case"split-h":return M.jsxs("svg",{...le,children:[M.jsx("rect",{x:"4",y:"4",width:"16",height:"7",rx:"1"}),M.jsx("rect",{x:"4",y:"13",width:"16",height:"7",rx:"1"})]});case"x":return M.jsx("svg",{...le,children:M.jsx("path",{d:"M6 6l12 12M18 6L6 18"})});case"mic":return M.jsxs("svg",{...le,children:[M.jsx("rect",{x:"9",y:"2.5",width:"6",height:"12",rx:"3"}),M.jsx("path",{d:"M5 11.5a7 7 0 0 0 14 0"}),M.jsx("path",{d:"M12 18.5V21"})]});default:return M.jsx("span",{className:"icon","aria-hidden":"true",children:"•"})}}function Aa({session:te,active:me=!1,ghosted:le=!1,onClick:G}){const de=te.kind==="ssh"?`SSH · ${te.host}`:te.backend==="powershell"?`PowerShell · ${te.cwd}`:te.backend==="wsl"?`WSL${te.wslDistribution?` · ${te.wslDistribution}`:""} · ${te.cwd}`:te.backend==="zsh"?`zsh · ${te.cwd}`:te.persistence==="screen"?`screen · ${te.cwd}`:`local · process only · ${te.cwd}`;return M.jsxs("button",{type:"button",className:`session-row ${me?"active":""} ${le?"session-ghosted":""}`,onClick:G,children:[M.jsx("span",{className:`status-dot ${te.status}`}),M.jsxs("span",{className:"session-copy",children:[M.jsx("b",{children:te.name}),M.jsx("small",{children:de})]}),M.jsx("span",{className:"session-state",children:le?"↗":te.status==="connected"?"●":"○"})]})}function Nv({sessionId:te,focused:me,onStatus:le,theme:G}){const de=be.useRef(null),Se=be.useRef(null),ie=be.useRef(le);ie.current=le;const f=be.useRef(G);return f.current=G,be.useEffect(()=>{if(!de.current)return;const h=de.current,d=new bv.Terminal({cursorBlink:!0,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontSize:13,lineHeight:1.2,letterSpacing:0,scrollback:1e4,allowProposedApi:!0,theme:Jf(f.current),convertEol:!0}),S=new Ev.FitAddon;d.loadAddon(S),d.open(h),Se.current=d;const u=yt();let p=!1,y=0;const x=()=>{if(!(p||!h.isConnected)&&!(h.clientWidth<20||h.clientHeight<20)){try{S.fit()}catch{return}u&&d.cols>0&&d.rows>0&&te&&u.resize(te,d.cols,d.rows)}},m=()=>{cancelAnimationFrame(y),y=requestAnimationFrame(()=>{x(),y=requestAnimationFrame(x)})};if(!u)return m(),d.writeln("\x1B[90mZeroG Terminal\x1B[0m"),d.writeln("\x1B[31mPreload API unavailable. Rebuild the app.\x1B[0m"),ie.current("Preload API unavailable"),()=>{p=!0,cancelAnimationFrame(y),Se.current=null,d.dispose()};const o=u.onData((_,C)=>{_===te&&d.write(C)}),c=u.onStatus((_,C)=>{_===te&&(ie.current(C),m())}),a=d.onData(_=>{te&&u.write(te,_)});d.attachCustomKeyEventHandler(_=>{if(_.type!=="keydown")return!0;const C=_.key.toLowerCase();if(!(_.ctrlKey||_.metaKey)||!_.shiftKey)return!0;if(C==="c"){const E=d.getSelection();return E&&u.copyText(E).catch(v=>{ie.current(v instanceof Error?v.message:String(v))}),!1}return C==="v"?(u.readText().then(E=>{E&&(typeof d.paste=="function"?d.paste(E):te&&u.write(te,E))}).catch(E=>{ie.current(E instanceof Error?E.message:String(E))}),!1):!0}),typeof d.onSelectionChange=="function"&&d.onSelectionChange(()=>{const _=d.getSelection();_&&u.copyText(_).catch(()=>{})});const l=new ResizeObserver(()=>m());return l.observe(h),window.addEventListener("resize",m),document.fonts?.ready?.then(()=>{p||m()}).catch(()=>{}),m(),te?u.attachSession(te).then(_=>{_.persistence==="process"?ie.current(`${_.host} · ${_.name} · process only (install screen for persistence)`):ie.current(`${_.host} · ${_.name}`),m()}).catch(_=>{ie.current(_ instanceof Error?_.message:String(_))}):(d.writeln("\x1B[90mZeroG Terminal\x1B[0m"),d.writeln("\x1B[90mSelect a session or create a local/SSH connection.\x1B[0m")),()=>{p=!0,cancelAnimationFrame(y),a.dispose(),o(),c(),l.disconnect(),window.removeEventListener("resize",m),Se.current=null,d.dispose()}},[te]),be.useEffect(()=>{const h=Se.current;h&&(h.options.theme=Jf(G))},[G]),be.useEffect(()=>{me&&Se.current?.focus()},[me]),M.jsx("div",{className:"terminal",ref:de,onMouseDownCapture:h=>h.preventDefault()})}function zv({index:te,onCreate:me}){return M.jsxs("article",{className:"pane empty-pane",children:[M.jsxs("div",{className:"pane-title",children:[M.jsxs("span",{children:["PANE ",te]}),M.jsx("span",{className:"pane-dim",children:"EMPTY"})]}),M.jsxs("div",{className:"empty-pane-body",children:[M.jsx("span",{className:"empty-glyph",children:"+"}),M.jsx("strong",{children:"Split ready"}),M.jsx("small",{children:"Open another terminal here"}),M.jsx("button",{type:"button",onClick:me,children:"Choose session"})]})]})}function $f(te,me=[]){return{id:`ws-${crypto.randomUUID()}`,name:te,sessionIds:me}}function jv(){const[te,me]=be.useState(()=>{try{return window.localStorage.getItem("zerog-theme")==="light"?"light":"dark"}catch{return"dark"}}),[le,G]=be.useState([]),[de,Se]=be.useState(()=>[$f("Workspace")]),[ie,f]=be.useState(()=>de[0]?.id??""),[h,d]=be.useState(null),[S,u]=be.useState("Ready"),[p,y]=be.useState(!1),[x,m]=be.useState(!1),[o,c]=be.useState("terminals"),[a,l]=be.useState(!1),[_,C]=be.useState(!0),[b,E]=be.useState(null),[v,D]=be.useState(null),[z,N]=be.useState(!1),[q,B]=be.useState("stack"),[F,ne]=be.useState(),[j,W]=be.useState(null),[ee,A]=be.useState("Workspace"),[O,w]=be.useState("term"),[L,K]=be.useState(""),[Q,ue]=be.useState(""),[fe,I]=be.useState(null),[R,$]=be.useState({status:"idle",sessionId:null}),oe=be.useRef(null),ve=be.useRef(null),_e=be.useRef(null),Ae=be.useRef(void 0),[je,Ke]=be.useState([]),[tt,Ee]=be.useState("bash"),[ni,ai]=be.useState(""),[qi,li]=be.useState([]),[Si,gt]=be.useState([]),[Je,Tt]=be.useState([]),[oi,di]=be.useState([]),[Lt,yi]=be.useState(!1);be.useEffect(()=>{document.documentElement.dataset.theme=te;try{window.localStorage.setItem("zerog-theme",te)}catch{}},[te]);const et=be.useMemo(()=>de.find(k=>k.id===ie)??de[0]??null,[de,ie]),Le=be.useMemo(()=>{if(!et)return le;const k=new Set(et.sessionIds),ce=le.filter(J=>k.has(J.id));if(et.id===de[0]?.id){const J=new Set(de.flatMap(xe=>xe.sessionIds)),he=le.filter(xe=>!J.has(xe.id));return[...new Map([...ce,...he].map(xe=>[xe.id,xe])).values()]}return ce},[et,le,de]),Ue=be.useCallback(async()=>{const k=yt();if(C(!0),E(null),!k){E("Preload API unavailable"),u("Preload API unavailable"),C(!1);return}try{const ce=await k.listSessions();G(ce),u(ce.length?`${ce.length} session${ce.length===1?"":"s"}`:"No sessions")}catch(ce){const J=ce instanceof Error?ce.message:String(ce);E(J),u(J)}finally{C(!1)}},[]);be.useEffect(()=>{Ue()},[Ue]),be.useEffect(()=>{const k=yt();k&&k.listBackends?.().then(Ke).catch(()=>Ke([]))},[]),be.useEffect(()=>{if(tt!=="wsl"){li([]),ai("");return}const k=yt();k&&k.listWslDistributions?.().then(li).catch(()=>li([]))},[tt]),be.useEffect(()=>{if(!a){gt([]);return}const k=yt();k&&k.listHistory?.().then(gt).catch(()=>gt([]))},[a]),be.useEffect(()=>{const k=yt(),ce=Da((h?.kind==="ssh"?h.host:"")||(F?le.find(he=>he.id===F)?.host:"")||""),J=ce?Je.filter(he=>Da(he.hostName??"")===ce||he.alias===ce):[];if(J.length===0){di([]);return}k?.discoverRemoteScreens&&(yi(!0),Promise.allSettled(J.map(he=>k.discoverRemoteScreens(he))).then(he=>{const we=[];he.forEach((xe,Me)=>{xe.status==="fulfilled"&&Array.isArray(xe.value)&&xe.value.forEach(rt=>{we.push({session:rt,connection:J[Me]})})}),di(we)}).catch(()=>di([])).finally(()=>yi(!1)))},[Je,h?.host,le,F]),be.useEffect(()=>{const k=yt();k&&k.listKnownConnections?.().then(Tt).catch(()=>Tt([]))},[]),be.useEffect(()=>{!h&&Le.length&&d(Le[0])},[h,Le]),be.useEffect(()=>{const k=ce=>{if(ce.key==="Escape"){if(R.status==="listening"){ce.preventDefault(),pr(),u("Voice cancelled");return}if(z){ce.preventDefault(),N(!1);return}if(fe){ce.preventDefault(),I(null);return}if(v){ce.preventDefault(),D(null);return}if(a){ce.preventDefault(),l(!1);return}}if(!(ce.ctrlKey||ce.metaKey)||!ce.shiftKey)return;const J=ce.key.toLowerCase();J==="o"&&(ce.preventDefault(),N(he=>!he)),J==="n"&&(ce.preventDefault(),A(Zo(de)),D("workspace")),J==="t"&&(ce.preventDefault(),w(ed(et?.name??"term",Le)),D("local")),J==="l"&&(ce.preventDefault(),W(null),B(he=>he==="stack"?"split-v":"stack")),J==="b"&&(ce.preventDefault(),m(he=>!he))};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[z,fe,v,a,R.status,de,et,Le]);const Wt=q==="stack"?1:q==="grid"?4:2,ft=Le.slice(0,4),_i=Math.max(Wt,ft.length),Ve=ft.some(k=>k.id===j)?j:null,Ma=ft.find(k=>k.id===h?.id)?.id??ft[0]?.id,La=(k,ce)=>q==="stack"?k.id===Ma:ce<Wt,Ot=async k=>{d(k),ne(k.id);const ce=ft.findIndex(J=>J.id===k.id);Ve?W(k.id):ce>=Wt&&q!=="stack"&&B("grid"),u(k.persistence==="process"?`${k.host} · ${k.name} · process only (install screen for persistence)`:`${k.host} · ${k.name}`),N(!1)},Rt=(k,ce=ie)=>{Se(J=>J.map(he=>he.id!==ce?{...he,sessionIds:he.sessionIds.filter(we=>we!==k.id)}:he.sessionIds.includes(k.id)?he:{...he,sessionIds:[...he.sessionIds,k.id]}))},Bs=async k=>{k.preventDefault();const ce=ee.trim()||Zo(de),J=$f(ce);Se(he=>[...he,J]),f(J.id),d(null),D(null),u(`Workspace “${ce}” ready`)},ks=async k=>{k.preventDefault();const ce=yt();if(ce){if(Le.length>=4){u("This workspace supports up to 4 sessions."),D(null);return}y(!0);try{const J=await ce.createLocalSession({name:O,backend:tt,wslDistribution:tt==="wsl"?ni:void 0});G(he=>[...he.filter(we=>we.id!==J.id),J]),Rt(J),ne(J.id),W(null),B(Ta(Le.length+1)),D(null),await Ot(J)}catch(J){u(J instanceof Error?J.message:String(J))}finally{y(!1)}}},bi=async k=>{k.preventDefault();const ce=yt();if(ce){if(Le.length>=4){u("This workspace supports up to 4 sessions."),D(null);return}y(!0);try{const J=await ce.createSshSession({name:L||void 0,target:Q});G(he=>[...he.filter(we=>we.id!==J.id),J]),Rt(J),ne(J.id),W(null),B(Ta(Le.length+1)),D(null),await Ot(J)}catch(J){u(J instanceof Error?J.message:String(J))}finally{y(!1)}}},fs=async(k,ce)=>{try{const J=yt();if(!J)return;u(`Attaching to ${k.name} on ${ce.alias}…`);const we=(await J.buildRemoteScreenAttach?.(ce,k.screenName??k.name))?.args,xe=Array.isArray(we)?we.indexOf("--"):-1,Me=xe>0?we[xe-1]:ce.hostName??ce.alias,rt=await J.createSshSession({target:Me,name:k.name}),Ge=k.screenName??k.name,Oe={...rt,screenName:Ge,persistence:"screen",backend:"screen"};G(Qe=>Qe.some(pt=>pt.id===Oe.id)?Qe.map(pt=>pt.id===Oe.id?Oe:pt):[...Qe,Oe]),Rt(Oe),await Ot(Oe),await J.attachSession(Oe.id);const Ut=we&&xe>0?we.slice(xe+1).join(" "):`screen -x ${Ge}`;await Ii(J,Oe.id),J.write(Oe.id,`${Ut}\r`),await Ue(),u(`Connected to ${k.name} on ${ce.alias}`)}catch(J){u(J instanceof Error?J.message:String(J))}},Ii=(k,ce)=>new Promise(J=>{let he=!1,we="",xe,Me;const rt=()=>{he||(he=!0,clearTimeout(xe),clearTimeout(Ge),Me?.(),J())},Ge=setTimeout(rt,Hv);Me=k.onData((Oe,Ut)=>{if(Oe===ce){if(we=(we+Ut).slice(-512),Bv(we)){rt();return}clearTimeout(xe),xe=setTimeout(rt,kv)}})}),un=()=>{A(Zo(de)),D("workspace")},ds=()=>{w(ed(et?.name??"term",Le)),Ee("bash"),ai(""),D("local")},mr=()=>{const k=Da((h?.kind==="ssh"?h.host:"")||(F?le.find(Me=>Me.id===F)?.host:"")||""),ce=k?oi.filter(Me=>Da(Me.connection.hostName??"")===k||Me.connection.alias===k).reduce((Me,rt)=>{const Ge=rt.connection.hostName||rt.connection.alias;return(Me[Ge]=Me[Ge]||[]).push(rt),Me},{}):{},J=le.filter(Me=>Me.persistence==="screen"&&!Le.some(rt=>rt.id===Me.id)),he=Object.keys(ce).length>0,we=J.length>0;if(!he&&!we)return M.jsxs("div",{className:"session-empty",children:[M.jsx("b",{children:"No screens"}),M.jsx("small",{children:k?"No remote screens found for this host.":"Open a remote session to discover screens, or start a local screen."})]});const xe=[];if(he)for(const[Me,rt]of Object.entries(ce)){const Ge=rt,Oe=M.jsx("div",{className:"session-group-label",children:Me},`${Me}-label`),Ut=Ge.map(({session:Qe})=>{const Pt=Ge.find(pt=>pt.session.id===Qe.id)?.connection;return M.jsx(Aa,{session:Qe,ghosted:!0,onClick:async()=>{if(!Pt)return;u(`Attaching ${Qe.name}…`);const pt=yt();if(pt)try{const nt=(await pt.buildRemoteScreenAttach?.(Pt,Qe.screenName??Qe.name))?.args,vs=Array.isArray(nt)?nt.indexOf("--"):-1,dn=vs>0?nt[vs-1]:Pt.hostName??Pt.alias,Dt={...await pt.createSshSession({target:dn,name:Qe.name}),screenName:Qe.screenName??Qe.name,persistence:"screen",backend:"screen"};G(Ns=>Ns.some(ms=>ms.id===Dt.id)?Ns.map(ms=>ms.id===Dt.id?Dt:ms):[...Ns,Dt]),Rt(Dt),await Ot(Dt),await pt.attachSession(Dt.id);const Ba=nt&&vs>0?nt.slice(vs+1).join(" "):`screen -x ${Qe.screenName??Qe.name}`;await Ii(pt,Dt.id),pt.write(Dt.id,`${Ba}\r`),await Ue(),u(`Connected to ${Qe.name}`)}catch(ci){u(ci instanceof Error?ci.message:String(ci))}}},Qe.id)});xe.push(Oe,...Ut)}return we&&!he&&(xe.push(M.jsx("div",{className:"session-group-label",children:"local"},"local-label")),J.forEach(Me=>{xe.push(M.jsx(Aa,{session:Me,ghosted:!0,onClick:()=>{Rt(Me),Ot(Me),u(`Reconnecting to ${Me.name}…`)}},Me.id))})),M.jsx(M.Fragment,{children:xe})},_s=q==="split-v"?"pane-grid split-v":q==="split-h"?"pane-grid split-h":q==="grid"?"pane-grid grid":"pane-grid",Oa=k=>{ne(k),W(ce=>ce===k?null:k)},gr=k=>{if(!Ve||Le.length<2)return;const J=(Le.findIndex(we=>we.id===Ve)+k+Le.length)%Le.length,he=Le[J];ne(he.id),d(he),W(he.id)},hn=()=>{if(!ve.current){const k=new Worker(new URL(""+new URL("voice-worker-DWb1dVxY.js",import.meta.url).href,import.meta.url),{type:"module"});k.onmessage=ce=>{const J=ce.data;if(J.type==="result"){const he=_e.current;_e.current=null,$({status:"idle",sessionId:null}),J.text&&he?(yt()?.write(he,J.text),u(`Voice: "${J.text}"`)):u("Voice: nothing transcribed")}else J.type==="error"?(_e.current=null,$({status:"idle",sessionId:null}),u(`Voice error: ${J.message}`)):J.type==="loading"&&typeof J.progress=="number"&&u(`Loading speech model… ${Math.round(J.progress)}%`)},ve.current=k}return ve.current},pr=()=>{window.clearTimeout(Ae.current),oe.current?.cancel(),oe.current=null,_e.current=null,$({status:"idle",sessionId:null})},Hs=async()=>{const k=oe.current,ce=_e.current;if(!k||!ce)return;window.clearTimeout(Ae.current),oe.current=null,$({status:"transcribing",sessionId:ce}),u("Transcribing…");const J=await k.stop();if(!J||Tv(J)){_e.current=null,$({status:"idle",sessionId:null}),u("Voice: no speech detected");return}hn().postMessage({type:"transcribe",audio:J},[J.buffer])},Sr=async k=>{if(R.status==="listening"&&R.sessionId===k.id){await Hs();return}if(R.status!=="idle")return;const ce=new Mv;try{await ce.start()}catch(J){u(`Microphone unavailable: ${J instanceof Error?J.message:String(J)}`);return}oe.current=ce,_e.current=k.id,$({status:"listening",sessionId:k.id}),ne(k.id),window.clearTimeout(Ae.current),Ae.current=window.setTimeout(()=>{Hs()},wv*1e3),u(`Listening on ${k.name}… click the mic again or press Esc to finish`)},fn=async k=>{R.sessionId===k.id&&pr();const ce=Le.filter(he=>he.id!==k.id);Se(he=>he.map(we=>({...we,sessionIds:we.sessionIds.filter(xe=>xe!==k.id)}))),h?.id===k.id&&d(ce[0]??null),F===k.id&&ne(ce[0]?.id),j===k.id&&W(null),B(Ta(ce.length));const J=yt();if(J)try{await J.closeSession(k.id)}catch(he){u(he instanceof Error?he.message:String(he));return}u(k.persistence==="screen"?`Closed ${k.name} · screen session survives`:k.kind==="ssh"?`Closed ${k.name} · SSH connection ended`:`Closed ${k.name} · process ended`),Ue()};return M.jsxs("main",{className:`app-shell ${x?"drawer-collapsed":""}`,children:[M.jsxs("header",{className:"window-bar",children:[M.jsxs("div",{className:"window-brand",children:[M.jsx("span",{className:"brand-mark",children:"ZG"}),M.jsx("span",{className:"brand-name",children:"ZeroG"})]}),M.jsx("div",{className:"workspace-tabs",children:de.map(k=>M.jsxs("button",{type:"button",className:`workspace-tab ${k.id===et?.id?"active":""}`,onClick:()=>{f(k.id);const ce=le.find(J=>k.sessionIds.includes(J.id));d(ce??null),ne(ce?.id)},children:[M.jsx("span",{className:"tab-dot"}),k.name,M.jsx("span",{className:"tab-meta",children:k.sessionIds.length||(k.id===de[0]?.id?Le.length:0)})]},k.id))}),M.jsxs("div",{className:"window-actions",children:[M.jsxs("button",{type:"button",className:"bar-button",onClick:()=>N(k=>!k),title:"Session overview (Ctrl+Shift+O)",children:[M.jsx(lt,{name:"grid"}),M.jsx("span",{children:"Overview"})]}),M.jsxs("button",{type:"button",className:"bar-button",onClick:un,title:"New workspace (Ctrl+Shift+N)",children:[M.jsx(lt,{name:"plus"}),M.jsx("span",{children:"New"})]}),M.jsxs("button",{type:"button",className:"bar-button",onClick:async()=>{const k=yt();k&&I(await k.requestAiCommand())},children:[M.jsx(lt,{name:"spark"}),M.jsx("span",{children:"Suggest"})]}),M.jsx("button",{type:"button",className:"bar-button theme-button",onClick:()=>me(k=>k==="dark"?"light":"dark"),title:`Switch to ${te==="dark"?"light":"dark"} theme`,"aria-label":`Switch to ${te==="dark"?"light":"dark"} theme`,"aria-pressed":te==="light",children:M.jsx(lt,{name:te==="dark"?"sun":"moon"})}),M.jsx("button",{type:"button",className:"avatar",title:"Settings",children:"S"})]})]}),M.jsxs("div",{className:"body-shell",children:[M.jsxs("nav",{className:"rail","aria-label":"Workspace navigation",children:[M.jsx("button",{type:"button",className:"rail-button",title:x?"Show sessions sidebar (Ctrl+Shift+B)":"Hide sessions sidebar (Ctrl+Shift+B)",onClick:()=>m(k=>!k),children:M.jsx(lt,{name:x?"panel-left-open":"panel-left"})}),M.jsx("button",{type:"button",className:`rail-button ${x?"":"active"}`,title:"Sessions",onClick:()=>m(!1),children:M.jsx(lt,{name:"sessions"})}),M.jsx("button",{type:"button",className:"rail-button",onClick:()=>N(!0),title:"Overview",children:M.jsx(lt,{name:"grid"})}),M.jsx("span",{className:"rail-spacer"}),M.jsx("button",{type:"button",className:"rail-button",onClick:()=>D("ssh"),title:"Connect SSH",children:M.jsx(lt,{name:"ssh"})}),M.jsx("button",{type:"button",className:"rail-button",title:"Settings",children:M.jsx(lt,{name:"settings"})})]}),!x&&M.jsxs("aside",{className:"session-drawer",children:[M.jsxs("div",{className:"drawer-head",children:[M.jsxs("div",{children:[M.jsx("span",{className:"eyebrow",children:"WORKSPACE"}),M.jsx("h1",{children:et?.name??"Sessions"})]}),M.jsxs("div",{className:"drawer-head-actions",children:[M.jsx("button",{type:"button",className:"square-button",onClick:()=>m(!0),title:"Hide sessions sidebar",children:M.jsx(lt,{name:"panel-left"})}),M.jsx("button",{type:"button",className:"square-button history-button",onClick:()=>l(k=>!k),title:"Session history","aria-label":"Open session history","aria-expanded":a,children:M.jsx(lt,{name:"history"})}),M.jsx("button",{type:"button",className:"square-button",onClick:ds,title:"New local terminal","aria-label":"New local terminal",children:M.jsx(lt,{name:"plus"})})]})]}),M.jsx("div",{className:"drawer-tools",role:"tablist","aria-label":"Session inventory",children:["terminals","screens","connections"].map(k=>{const ce={terminals:"Terminals",screens:"Screens",connections:"Connections"},J=k==="terminals"?Le.length:k==="screens"?le.filter(he=>(he.persistence==="screen"||he.screenName)&&!Le.some(we=>we.id===he.id)).length+oi.length:le.filter(he=>he.kind==="ssh").length;return M.jsxs("button",{type:"button",role:"tab","aria-selected":o===k,className:`drawer-tool ${o===k?"active":""}`,onClick:()=>c(k),children:[ce[k]," ",M.jsx("span",{children:J})]},k)})}),M.jsx("div",{className:"session-list",role:"tabpanel",children:_?M.jsxs("div",{className:"session-empty",children:[M.jsx("b",{children:"Loading sessions…"}),M.jsx("small",{children:"Checking available terminals and durable sessions."})]}):b?M.jsxs("div",{className:"session-empty session-error",children:[M.jsx("b",{children:"Session inventory unavailable"}),M.jsx("small",{children:b}),M.jsx("button",{type:"button",onClick:()=>{Ue()},children:"Retry"})]}):o==="terminals"?Le.length?Le.map(k=>M.jsx(Aa,{session:k,active:h?.id===k.id,onClick:()=>{Ot(k)}},k.id)):M.jsxs("div",{className:"session-empty",children:[M.jsx("b",{children:"No terminals yet"}),M.jsx("small",{children:"Add a local terminal or SSH connection to this workspace."})]}):o==="screens"?mr():o==="connections"?Je.length?Je.map(k=>M.jsxs("button",{type:"button",className:"session-row",onClick:()=>{ue(k.hostName??k.alias),D("ssh")},children:[M.jsx("span",{className:"status-dot"}),M.jsxs("span",{className:"session-copy",children:[M.jsx("b",{children:k.alias}),M.jsx("small",{children:k.hostName?`${k.user??""}${k.user?"@":""}${k.hostName}${k.port?`:${k.port}`:""}`:"Saved SSH connection"})]}),M.jsx("span",{className:"session-state",children:"→"})]},k.alias)):M.jsxs("div",{className:"session-empty",children:[M.jsx("b",{children:"No saved connections"}),M.jsx("small",{children:"Add Host entries to ~/.ssh/config to populate connections."})]}):le.filter(k=>k.kind==="ssh"&&k.scope==="remote"&&k.source==="discovered").length?le.filter(k=>k.kind==="ssh"&&k.scope==="remote"&&k.source==="discovered").map(k=>M.jsx(Aa,{session:k,ghosted:!0,onClick:async()=>{Rt(k),u(`Attaching remote screen ${k.name}…`);const ce=yt();if(ce)try{const he=(await ce.buildRemoteScreenAttach?.({alias:k.host,hostName:k.host},k.screenName??k.name))?.args?.find(xe=>xe.includes("@")||!xe.startsWith("-"))??k.host,we=await ce.createSshSession({target:he,name:k.name});G(xe=>xe.map(Me=>Me.id===k.id?we:Me)),await Ot(we)}catch(J){u(J instanceof Error?J.message:String(J))}}},k.id)):M.jsxs("div",{className:"session-empty",children:[M.jsx("b",{children:"No remote screens"}),M.jsx("small",{children:"Remote screen sessions will appear here after discovery."})]})}),M.jsxs("div",{className:"drawer-bottom",children:[M.jsxs("button",{type:"button",className:"drawer-action",onClick:ds,children:[M.jsx(lt,{name:"plus"})," Local terminal ",M.jsx("kbd",{children:"⌘⇧T"})]}),M.jsxs("button",{type:"button",className:"drawer-action",onClick:()=>D("ssh"),children:[M.jsx(lt,{name:"ssh"})," Connect SSH"]}),M.jsxs("div",{className:"drawer-status",children:[M.jsx("span",{className:"status-dot connected"}),S]})]})]}),M.jsxs("section",{className:"workspace",children:[M.jsxs("div",{className:"workspace-head",children:[M.jsxs("div",{className:"location",children:[x&&M.jsx("button",{type:"button",className:"inline-restore",onClick:()=>m(!1),title:"Show sessions sidebar",children:M.jsx(lt,{name:"panel-left-open"})}),M.jsx("span",{className:"connection-dot"}),M.jsx("span",{children:h?.host??"local"}),M.jsx("span",{className:"slash",children:"/"}),M.jsx("span",{children:h?.cwd??"~"}),M.jsx("span",{className:"slash",children:"/"}),M.jsx("span",{className:"muted-text",children:h?.name??et?.name??"no session"})]}),M.jsxs("div",{className:"layout-controls",children:[M.jsx("span",{className:"control-label",children:"LAYOUT"}),M.jsx("button",{type:"button",className:q==="stack"||Ve?"layout-button active":"layout-button",onClick:()=>{if(Ve)W(null);else if(Le.length>1){const k=F??h?.id??Le[0]?.id;k&&W(k)}else B("stack")},title:Ve?"Restore panes":Le.length>1?"Maximize focused pane":"Single pane",children:M.jsx(lt,{name:"stack"})}),M.jsx("button",{type:"button",className:q==="split-v"&&!Ve?"layout-button active":"layout-button",onClick:()=>{W(null),B("split-v")},title:"Vertical split",children:M.jsx(lt,{name:"split-v"})}),M.jsx("button",{type:"button",className:q==="split-h"&&!Ve?"layout-button active":"layout-button",onClick:()=>{W(null),B("split-h")},title:"Horizontal split",children:M.jsx(lt,{name:"split-h"})}),M.jsx("button",{type:"button",className:q==="grid"&&!Ve?"layout-button active":"layout-button",onClick:()=>{W(null),B("grid")},title:"Four-pane grid",children:M.jsx(lt,{name:"grid"})})]})]}),M.jsx("div",{className:`${_s} ${Ve?"maximized-pane-grid":""}`,children:Array.from({length:_i},(k,ce)=>{const J=ft[ce];if(!J)return M.jsx(zv,{index:ce+1,onCreate:ds},ce);const he=R.sessionId===J.id&&R.status!=="idle"?R.status:null;return M.jsxs("article",{className:`pane terminal-pane ${F===J.id?"focused":""} ${Ve===J.id?"maximized-pane":""} ${La(J,ce)?"":"overflow-pane"}`,onMouseDown:()=>ne(J.id),children:[M.jsxs("div",{className:"pane-title",children:[M.jsxs("span",{children:[M.jsx("span",{className:"pane-live"})," ",J.name]}),M.jsxs("span",{className:"pane-actions",children:[Ve&&M.jsxs(M.Fragment,{children:[M.jsx("button",{type:"button",className:"pane-nav",onClick:()=>gr(-1),title:"Previous session",children:M.jsx(lt,{name:"chevron-left"})}),M.jsx("button",{type:"button",className:"pane-nav",onClick:()=>gr(1),title:"Next session",children:M.jsx(lt,{name:"chevron-right"})})]}),p?"connecting…":he?`${he}…`:J.kind==="ssh"?"ssh":"bash",M.jsx("button",{type:"button",className:he?`pane-mic ${he}`:"pane-mic",onClick:()=>{Sr(J)},disabled:R.status!=="idle"&&!he,title:he==="listening"?"Stop and transcribe":he==="transcribing"?"Transcribing…":"Voice input","aria-label":he==="listening"?`Stop recording ${J.name}`:`Voice input for ${J.name}`,children:M.jsx(lt,{name:"mic"})}),M.jsx("button",{type:"button",className:"pane-maximize",onClick:()=>Oa(J.id),title:Ve?"Restore pane":"Maximize pane",children:M.jsx(lt,{name:Ve?"restore":"maximize"})}),M.jsx("button",{type:"button",className:"pane-close",onClick:()=>{fn(J)},title:"Close pane","aria-label":`Close ${J.name}`,children:M.jsx(lt,{name:"x"})})]})]}),M.jsx(Nv,{sessionId:J.id,focused:F===J.id,onStatus:u,theme:te})]},J.id)})}),M.jsxs("footer",{className:"status-bar",children:[M.jsx("span",{children:"ZeroG"}),M.jsx("span",{className:"status-separator"}),M.jsx("span",{children:et?.name??"Workspace"}),M.jsx("span",{className:"status-separator"}),M.jsx("span",{children:Ve?"maximized pane":q==="stack"?"1 pane":`${Wt} panes`}),M.jsx("span",{className:"status-separator"}),M.jsx("span",{children:"Esc closes overlays · ⌘⇧B sidebar"}),M.jsx("span",{className:"status-spacer"}),M.jsx("span",{children:h?`${h.kind==="ssh"?"SSH":h.persistence==="process"?"PROCESS":"SCREEN"} · ${h.persistence==="process"?"non-persistent":"persistent"}`:"no connection"})]})]})]}),z&&M.jsx("div",{className:"overview-layer",onClick:()=>N(!1),children:M.jsxs("section",{className:"overview",onClick:k=>k.stopPropagation(),children:[M.jsxs("div",{className:"overview-head",children:[M.jsxs("div",{children:[M.jsx("span",{className:"eyebrow",children:"WORKSPACE OVERVIEW"}),M.jsx("h2",{children:et?.name??"Choose a session"})]}),M.jsx("button",{type:"button",className:"close-button",onClick:()=>N(!1),children:"Esc"})]}),M.jsx("div",{className:"thumbnail-grid",children:Le.length?Le.map(k=>M.jsxs("button",{type:"button",className:`thumbnail ${h?.id===k.id?"active":""}`,onClick:()=>{Ot(k)},children:[M.jsxs("div",{className:"thumbnail-preview",children:[M.jsx("span",{className:"thumbnail-line cyan"}),M.jsx("span",{className:"thumbnail-line short"}),M.jsx("span",{className:"thumbnail-line green"}),M.jsx("span",{className:"thumbnail-cursor"})]}),M.jsxs("div",{className:"thumbnail-label",children:[M.jsx("b",{children:k.name}),M.jsxs("small",{children:[k.kind==="ssh"?k.host:"local screen"," · ",k.status]})]})]},k.id)):M.jsxs("div",{className:"overview-empty",children:[M.jsx("span",{children:"▦"}),M.jsx("b",{children:"No terminals in this workspace"}),M.jsx("small",{children:"Create a local terminal or connect over SSH."})]})}),M.jsxs("div",{className:"overview-foot",children:[M.jsx("button",{type:"button",onClick:()=>{N(!1),ds()},children:"+ Local terminal"}),M.jsx("button",{type:"button",onClick:()=>{N(!1),D("ssh")},children:"Connect SSH"}),M.jsx("button",{type:"button",onClick:()=>{N(!1),un()},children:"+ Workspace"}),M.jsx("span",{className:"overview-hint",children:"Press Esc to close"})]})]})}),a&&M.jsx("div",{className:"history-layer",role:"presentation",onClick:k=>{k.target===k.currentTarget&&l(!1)},children:M.jsxs("div",{className:"history-popover",role:"dialog","aria-label":"Session history",children:[M.jsxs("div",{className:"history-head",children:[M.jsx("b",{children:"History"}),M.jsx("button",{type:"button",onClick:()=>l(!1),"aria-label":"Close history",children:"×"})]}),Si.length?Si.slice().sort((k,ce)=>ce.timestamp.localeCompare(k.timestamp)).map(k=>M.jsxs("button",{type:"button",className:"history-item",onClick:async()=>{l(!1);const ce=!!k.session.screenName,J=k.session.kind==="ssh"&&!ce;if(ce||k.session.backend==="screen"){c("screens");const he=k.session.screenName||k.session.name,we=le.find(Ge=>Ge.kind==="ssh"&&Ge.screenName===he),xe=le.find(Ge=>Ge.screenName===he&&Ge.kind==="local");if(we){Rt(we),await Ot(we),u(`Reconnecting to ${we.name}…`);return}if(xe){Rt(xe),await Ot(xe),u(`Reconnecting to ${xe.name}…`);return}const Me=yt();if(!Me)return;const rt=Je.find(Ge=>(k.session.host||"").includes(Ge.hostName||Ge.alias)||(Ge.hostName||Ge.alias).includes(k.session.host||""));if(rt){await fs({...k.session,screenName:he,host:rt.hostName||rt.alias},rt);return}if(k.session.host){const Ge=k.session.host,Oe=await Me.createSshSession({target:Ge,name:k.session.name});G(Qe=>[...Qe,Oe]),Rt(Oe),ne(Oe.id),W(null),B(Ta(Le.length+1)),await Ot(Oe);const Ut=k.session.screenName||k.session.name;Me.write(Oe.id,`screen -x ${Ut}\r`),u(`Connected to ${Oe.name}`)}return}if(J){const he=k.session.host||k.session.sshTarget||"",we=he.replace(/[^a-zA-Z0-9_.-]+/g,"-").slice(0,40);ue(he),K(k.session.name&&k.session.name!==we?k.session.name:"");const xe=yt();if(!xe)return;const Me=Je.find(Oe=>he.includes(Oe.hostName||Oe.alias)||(Oe.hostName||Oe.alias).includes(he)),rt=k.session.name||we,Ge=await xe.createSshSession({target:he,name:rt});if(G(Oe=>[...Oe,Ge]),Rt(Ge),await Ot(Ge),u(`Connected to ${Ge.name}`),xe.discoverRemoteScreens&&Me)try{const Oe=await xe.discoverRemoteScreens(Me);if(Oe.length){const Ut=Oe.find(Qe=>Qe.status==="detached")??Oe[0];await fs(Ut,Me);return}}catch{}return}c("terminals")},children:[M.jsxs("span",{className:"history-main",children:[M.jsx("span",{className:"history-kind",children:k.event.toUpperCase()}),M.jsxs("span",{className:"history-text",children:[M.jsx("b",{children:k.session.name}),M.jsxs("small",{children:[k.session.host," · ",k.available?"available":"unavailable"]})]})]}),M.jsx("button",{type:"button",className:"history-remove","aria-label":"Remove history entry",onClick:ce=>{ce.stopPropagation(),yt()?.removeHistory(k.id).then(()=>gt(J=>J.filter(he=>he.id!==k.id))).catch(()=>{})},children:"×"})]},k.id)):M.jsx("p",{className:"history-empty",children:"No history entries yet."}),M.jsx("small",{className:"history-note",children:"Persisted session lifecycle from the main process."})]})}),v&&M.jsx("div",{className:"modal-layer",onClick:()=>D(null),children:M.jsxs("form",{className:"modal-card",onClick:k=>k.stopPropagation(),onSubmit:v==="workspace"?Bs:v==="local"?ks:bi,children:[M.jsxs("div",{className:"modal-head",children:[M.jsxs("div",{children:[M.jsx("span",{className:"eyebrow",children:v==="workspace"?"WORKSPACE":v==="local"?"LOCAL TERMINAL":"REMOTE SESSION"}),M.jsx("h2",{children:v==="workspace"?"New workspace":v==="local"?"New terminal":"Connect SSH"})]}),M.jsx("button",{type:"button",className:"close-button",onClick:()=>D(null),children:"Esc"})]}),v==="workspace"&&M.jsxs(M.Fragment,{children:[M.jsx("p",{children:"Create a separate workspace for a project or host group. Terminals stay scoped to the active workspace."}),M.jsxs("label",{children:["Workspace name",M.jsx("input",{autoFocus:!0,value:ee,onChange:k=>A(k.target.value),pattern:"[A-Za-z0-9](?:[A-Za-z0-9_.]|-| ){0,48}",required:!0})]})]}),v==="local"&&M.jsxs(M.Fragment,{children:[M.jsxs("p",{children:["Start a local session inside “",et?.name??"this workspace","”."]}),M.jsxs("label",{children:["Terminal name",M.jsx("input",{autoFocus:!0,value:O,onChange:k=>w(k.target.value),pattern:"[A-Za-z0-9](?:[A-Za-z0-9_.]|-){0,48}",required:!0})]}),M.jsxs("label",{children:["Shell backend",M.jsx("select",{value:tt,onChange:k=>{const ce=k.target.value;Ee(ce)},children:je.length?je.map(k=>M.jsx("option",{value:k.backend,children:k.label},k.backend)):M.jsx("option",{value:"bash",children:"bash"})})]}),tt==="wsl"&&M.jsxs("label",{children:["WSL distribution",M.jsx("input",{value:ni,onChange:k=>ai(k.target.value),placeholder:"Ubuntu"})]})]}),v==="ssh"&&M.jsxs(M.Fragment,{children:[M.jsxs("p",{children:["Connect a remote host into “",et?.name??"this workspace","”."]}),M.jsxs("label",{children:["SSH target",M.jsx("input",{autoFocus:!0,value:Q,onChange:k=>ue(k.target.value),placeholder:"user@server:22",required:!0})]}),M.jsxs("label",{children:["Session label ",M.jsx("span",{className:"muted-text",children:"optional"}),M.jsx("input",{value:L,onChange:k=>K(k.target.value),placeholder:"server"})]})]}),M.jsxs("div",{className:"modal-actions",children:[M.jsx("button",{type:"button",onClick:()=>D(null),children:"Cancel"}),M.jsx("button",{className:"primary-button",disabled:p,type:"submit",children:p?"Working…":v==="workspace"?"Create workspace":v==="local"?"Open terminal":"Connect"})]})]})}),fe&&M.jsx("div",{className:"modal-layer",onClick:()=>I(null),children:M.jsxs("div",{className:"modal-card approval-card",onClick:k=>k.stopPropagation(),children:[M.jsxs("div",{className:"modal-head",children:[M.jsxs("div",{children:[M.jsx("span",{className:"eyebrow warning-text",children:"APPROVAL REQUIRED"}),M.jsx("h2",{children:"Run suggestion?"})]}),M.jsx("button",{type:"button",className:"close-button",onClick:()=>I(null),children:"Esc"})]}),M.jsx("p",{children:fe.explanation}),M.jsx("code",{children:fe.command}),M.jsxs("div",{className:"modal-actions",children:[M.jsx("button",{type:"button",onClick:()=>I(null),children:"Cancel"}),M.jsx("button",{type:"button",className:"primary-button",onClick:()=>{h&&yt()?.write(h.id,`${fe.command}\r`),I(null)},children:"Approve & run"})]})]})})]})}function Jf(te){return te==="light"?{background:"#f7f9fc",foreground:"#253044",cursor:"#16803c",selectionBackground:"#cbdcf5",green:"#16803c",yellow:"#a15c00",red:"#c53030",blue:"#2459a6",cyan:"#087f8c"}:{background:"#0a0c10",foreground:"#d8dee9",cursor:"#9ece6a",selectionBackground:"#334155",green:"#9ece6a",yellow:"#e0af68",red:"#f7768e",blue:"#7aa2f7",cyan:"#7dcfff"}}function Zo(te){let me=te.length+1;const le=new Set(te.map(G=>G.name.toLowerCase()));for(;le.has(`workspace ${me}`);)me+=1;return`Workspace ${me}`}function ed(te,me){const le=te.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,24)||"term",G=new Set(me.map(Se=>Se.name.toLowerCase()));if(!G.has(le))return le;let de=2;for(;G.has(`${le}-${de}`);)de+=1;return`${le}-${de}`}function Ta(te){return te<=1?"stack":te===2?"split-v":"grid"}Sv.createRoot(document.getElementById("root")).render(M.jsx(jv,{}));
|