zerogterm 0.1.0-alpha.2 → 0.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/bin/zerogterm.cjs +0 -0
- package/dist/main/main/main.js +53 -4
- package/dist/main/main/preload.cjs +8 -0
- package/dist/main/main/session-history.js +105 -0
- package/dist/main/main/session-service.js +92 -29
- package/dist/main/main/ssh-inventory.js +116 -0
- package/dist/renderer/assets/index-5pgRaxBt.css +1 -0
- package/dist/renderer/assets/index-BWVjX0UX.js +17 -0
- package/dist/renderer/assets/ort-wasm-simd-threaded.asyncify-DMmc6YqF.wasm +0 -0
- package/dist/renderer/assets/voice-worker-Bde9NFkO.js +37 -0
- package/dist/renderer/index.html +3 -3
- package/package.json +5 -5
- package/dist/main/main/preload.js +0 -12
- package/dist/renderer/assets/index-BouOz_9d.css +0 -1
- package/dist/renderer/assets/index-wAR4K515.js +0 -17
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(function(){const ge=document.createElement("link").relList;if(ge&&ge.supports&&ge.supports("modulepreload"))return;for(const fe of document.querySelectorAll('link[rel="modulepreload"]'))G(fe);new MutationObserver(fe=>{for(const Se of fe)if(Se.type==="childList")for(const ee of Se.addedNodes)ee.tagName==="LINK"&&ee.rel==="modulepreload"&&G(ee)}).observe(document,{childList:!0,subtree:!0});function oe(fe){const Se={};return fe.integrity&&(Se.integrity=fe.integrity),fe.referrerPolicy&&(Se.referrerPolicy=fe.referrerPolicy),fe.crossOrigin==="use-credentials"?Se.credentials="include":fe.crossOrigin==="anonymous"?Se.credentials="omit":Se.credentials="same-origin",Se}function G(fe){if(fe.ep)return;fe.ep=!0;const Se=oe(fe);fetch(fe.href,Se)}})();var Uo={exports:{}},nn={};var Nf;function av(){if(Nf)return nn;Nf=1;var ie=Symbol.for("react.transitional.element"),ge=Symbol.for("react.fragment");function oe(G,fe,Se){var ee=null;if(Se!==void 0&&(ee=""+Se),fe.key!==void 0&&(ee=""+fe.key),"key"in fe){Se={};for(var f in fe)f!=="key"&&(Se[f]=fe[f])}else Se=fe;return fe=Se.ref,{$$typeof:ie,type:G,key:ee,ref:fe!==void 0?fe:null,props:Se}}return nn.Fragment=ge,nn.jsx=oe,nn.jsxs=oe,nn}var zf;function lv(){return zf||(zf=1,Uo.exports=av()),Uo.exports}var M=lv(),qo={exports:{}},Ae={};var jf;function ov(){if(jf)return Ae;jf=1;var ie=Symbol.for("react.transitional.element"),ge=Symbol.for("react.portal"),oe=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),fe=Symbol.for("react.profiler"),Se=Symbol.for("react.consumer"),ee=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 b(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 y(){}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:ie,type:w,key:L,ref:Q!==void 0?Q:null,props:K}}function z(w,L){return D(w.type,L,w.props)}function H(w){return typeof w=="object"&&w!==null&&w.$$typeof===ie}function q(w){var L={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(K){return L[K]})}var B=/\/+/g;function P(w,L){return typeof w=="object"&&w!==null&&w.key!=null?q(""+w.key):L.toString(36)}function re(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(y,y):(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,ce){var ue=typeof w;(ue==="undefined"||ue==="boolean")&&(w=null);var I=!1;if(w===null)I=!0;else switch(ue){case"bigint":case"string":case"number":I=!0;break;case"object":switch(w.$$typeof){case ie:case ge:I=!0;break;case S:return I=w._init,j(I(w._payload),L,K,Q,ce)}}if(I)return ce=ce(w),I=Q===""?"."+P(w,0):Q,C(ce)?(K="",I!=null&&(K=I.replace(B,"$&/")+"/"),j(ce,L,K,"",function(le){return le})):ce!=null&&(H(ce)&&(ce=z(ce,K+(ce.key==null||w&&w.key===ce.key?"":(""+ce.key).replace(B,"$&/")+"/")+I)),L.push(ce)),1;I=0;var R=Q===""?".":Q+":";if(C(w))for(var $=0;$<w.length;$++)Q=w[$],ue=R+P(Q,$),I+=j(Q,L,K,ue,ce);else if($=b(w),typeof $=="function")for(w=$.call(w),$=0;!(Q=w.next()).done;)Q=Q.value,ue=R+P(Q,$++),I+=j(Q,L,K,ue,ce);else if(ue==="object"){if(typeof w.then=="function")return j(re(w),L,K,Q,ce);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=[],ce=0;return j(w,Q,"","",function(ue){return L.call(K,ue,ce++)}),Q}function J(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(!H(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return Ae.Activity=u,Ae.Children=O,Ae.Component=c,Ae.Fragment=oe,Ae.Profiler=fe,Ae.PureComponent=l,Ae.StrictMode=G,Ae.Suspense=h,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(w){return E.H.useMemoCache(w)}},Ae.cache=function(w){return function(){return w.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.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),ce=w.key;if(L!=null)for(ue in L.key!==void 0&&(ce=""+L.key),L)!v.call(L,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&L.ref===void 0||(Q[ue]=L[ue]);var ue=arguments.length-2;if(ue===1)Q.children=K;else if(1<ue){for(var I=Array(ue),R=0;R<ue;R++)I[R]=arguments[R+2];Q.children=I}return D(w.type,ce,Q)},Ae.createContext=function(w){return w={$$typeof:ee,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:Se,_context:w},w},Ae.createElement=function(w,L,K){var Q,ce={},ue=null;if(L!=null)for(Q in L.key!==void 0&&(ue=""+L.key),L)v.call(L,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ce[Q]=L[Q]);var I=arguments.length-2;if(I===1)ce.children=K;else if(1<I){for(var R=Array(I),$=0;$<I;$++)R[$]=arguments[$+2];ce.children=R}if(w&&w.defaultProps)for(Q in I=w.defaultProps,I)ce[Q]===void 0&&(ce[Q]=I[Q]);return D(w,ue,ce)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(w){return{$$typeof:f,render:w}},Ae.isValidElement=H,Ae.lazy=function(w){return{$$typeof:S,_payload:{_status:-1,_result:w},_init:J}},Ae.memo=function(w,L){return{$$typeof:d,type:w,compare:L===void 0?null:L}},Ae.startTransition=function(w){var L=E.T,K={};E.T=K;try{var Q=w(),ce=E.S;ce!==null&&ce(K,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(y,A)}catch(ue){A(ue)}finally{L!==null&&K.types!==null&&(L.types=K.types),E.T=L}},Ae.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},Ae.use=function(w){return E.H.use(w)},Ae.useActionState=function(w,L,K){return E.H.useActionState(w,L,K)},Ae.useCallback=function(w,L){return E.H.useCallback(w,L)},Ae.useContext=function(w){return E.H.useContext(w)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(w,L){return E.H.useDeferredValue(w,L)},Ae.useEffect=function(w,L){return E.H.useEffect(w,L)},Ae.useEffectEvent=function(w){return E.H.useEffectEvent(w)},Ae.useId=function(){return E.H.useId()},Ae.useImperativeHandle=function(w,L,K){return E.H.useImperativeHandle(w,L,K)},Ae.useInsertionEffect=function(w,L){return E.H.useInsertionEffect(w,L)},Ae.useLayoutEffect=function(w,L){return E.H.useLayoutEffect(w,L)},Ae.useMemo=function(w,L){return E.H.useMemo(w,L)},Ae.useOptimistic=function(w,L){return E.H.useOptimistic(w,L)},Ae.useReducer=function(w,L,K){return E.H.useReducer(w,L,K)},Ae.useRef=function(w){return E.H.useRef(w)},Ae.useState=function(w){return E.H.useState(w)},Ae.useSyncExternalStore=function(w,L,K){return E.H.useSyncExternalStore(w,L,K)},Ae.useTransition=function(){return E.H.useTransition()},Ae.version="19.2.8",Ae}var Uf;function Fo(){return Uf||(Uf=1,qo.exports=ov()),qo.exports}var Ce=Fo(),Io={exports:{}},an={},Go={exports:{}},Yo={};var qf;function cv(){return qf||(qf=1,(function(ie){function ge(j,W){var J=j.length;j.push(W);e:for(;0<J;){var A=J-1>>>1,O=j[A];if(0<fe(O,W))j[A]=W,j[J]=O,J=A;else break e}}function oe(j){return j.length===0?null:j[0]}function G(j){if(j.length===0)return null;var W=j[0],J=j.pop();if(J!==W){j[0]=J;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,ce=j[Q];if(0>fe(K,J))Q<O&&0>fe(ce,K)?(j[A]=ce,j[Q]=J,A=Q):(j[A]=K,j[L]=J,A=L);else if(Q<O&&0>fe(ce,J))j[A]=ce,j[Q]=J,A=Q;else break e}}return W}function fe(j,W){var J=j.sortIndex-W.sortIndex;return J!==0?J:j.id-W.id}if(ie.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var Se=performance;ie.unstable_now=function(){return Se.now()}}else{var ee=Date,f=ee.now();ie.unstable_now=function(){return ee.now()-f}}var h=[],d=[],S=1,u=null,p=3,b=!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=oe(d);W!==null;){if(W.callback===null)G(d);else if(W.startTime<=j)G(d),W.sortIndex=W.expirationTime,ge(h,W);else break;W=oe(d)}}function C(j){if(m=!1,_(j),!x)if(oe(h)!==null)x=!0,y||(y=!0,q());else{var W=oe(d);W!==null&&re(C,W.startTime-j)}}var y=!1,E=-1,v=5,D=-1;function z(){return o?!0:!(ie.unstable_now()-D<v)}function H(){if(o=!1,y){var j=ie.unstable_now();D=j;var W=!0;try{e:{x=!1,m&&(m=!1,a(E),E=-1),b=!0;var J=p;try{t:{for(_(j),u=oe(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=ie.unstable_now(),typeof O=="function"){u.callback=O,_(j),W=!0;break t}u===oe(h)&&G(h),_(j)}else G(h);u=oe(h)}if(u!==null)W=!0;else{var w=oe(d);w!==null&&re(C,w.startTime-j),W=!1}}break e}finally{u=null,p=J,b=!1}W=void 0}}finally{W?q():y=!1}}}var q;if(typeof l=="function")q=function(){l(H)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,P=B.port2;B.port1.onmessage=H,q=function(){P.postMessage(null)}}else q=function(){c(H,0)};function re(j,W){E=c(function(){j(ie.unstable_now())},W)}ie.unstable_IdlePriority=5,ie.unstable_ImmediatePriority=1,ie.unstable_LowPriority=4,ie.unstable_NormalPriority=3,ie.unstable_Profiling=null,ie.unstable_UserBlockingPriority=2,ie.unstable_cancelCallback=function(j){j.callback=null},ie.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},ie.unstable_getCurrentPriorityLevel=function(){return p},ie.unstable_next=function(j){switch(p){case 1:case 2:case 3:var W=3;break;default:W=p}var J=p;p=W;try{return j()}finally{p=J}},ie.unstable_requestPaint=function(){o=!0},ie.unstable_runWithPriority=function(j,W){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var J=p;p=j;try{return W()}finally{p=J}},ie.unstable_scheduleCallback=function(j,W,J){var A=ie.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?A+J:A):J=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=J+O,j={id:S++,callback:W,priorityLevel:j,startTime:J,expirationTime:O,sortIndex:-1},J>A?(j.sortIndex=J,ge(d,j),oe(h)===null&&j===oe(d)&&(m?(a(E),E=-1):m=!0,re(C,J-A))):(j.sortIndex=O,ge(h,j),x||b||(x=!0,y||(y=!0,q()))),j},ie.unstable_shouldYield=z,ie.unstable_wrapCallback=function(j){var W=p;return function(){var J=p;p=W;try{return j.apply(this,arguments)}finally{p=J}}}})(Yo)),Yo}var If;function uv(){return If||(If=1,Go.exports=cv()),Go.exports}var Ko={exports:{}},Dt={};var Gf;function hv(){if(Gf)return Dt;Gf=1;var ie=Fo();function ge(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 oe(){}var G={d:{f:oe,r:function(){throw Error(ge(522))},D:oe,C:oe,L:oe,m:oe,X:oe,S:oe,M:oe},p:0,findDOMNode:null},fe=Symbol.for("react.portal");function Se(h,d,S){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fe,key:u==null?null:""+u,children:h,containerInfo:d,implementation:S}}var ee=ie.__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 Dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Dt.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(ge(299));return Se(h,d,null,S)},Dt.flushSync=function(h){var d=ee.T,S=G.p;try{if(ee.T=null,G.p=2,h)return h()}finally{ee.T=d,G.p=S,G.d.f()}},Dt.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))},Dt.prefetchDNS=function(h){typeof h=="string"&&G.d.D(h)},Dt.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,b=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:b}):S==="script"&&G.d.X(h,{crossOrigin:u,integrity:p,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Dt.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)},Dt.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})}},Dt.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)},Dt.requestFormReset=function(h){G.d.r(h)},Dt.unstable_batchedUpdates=function(h,d){return h(d)},Dt.useFormState=function(h,d,S){return ee.H.useFormState(h,d,S)},Dt.useFormStatus=function(){return ee.H.useHostTransitionStatus()},Dt.version="19.2.8",Dt}var Yf;function fv(){if(Yf)return Ko.exports;Yf=1;function ie(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ie)}catch(ge){console.error(ge)}}return ie(),Ko.exports=hv(),Ko.exports}var Kf;function dv(){if(Kf)return an;Kf=1;var ie=uv(),ge=Fo(),oe=fv();function G(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function fe(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 ee(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function 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"),b=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"),y=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"),H=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=H&&e[H]||e["@@iterator"],typeof e=="function"?e:null)}var B=Symbol.for("react.client.reference");function P(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 y: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:P(e.type)||"Memo";case v:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var re=Array.isArray,j=ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=oe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={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),ce=w(null),ue=w(null),I=w(null);function R(e,t){switch(K(ue,t),K(ce,e),K(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?nf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=nf(t),e=af(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(ce),L(ue)}function le(e){e.memoizedState!==null&&K(I,e);var t=Q.current,i=af(t,e.type);t!==i&&(K(ce,e),K(Q,i))}function ve(e){ce.current===e&&(L(Q),L(ce)),I.current===e&&(L(I),en._currentValue=J)}var de,Te;function ze(e){if(de===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||"",Te=-1<i.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+de+e+Te}var Ve=!1;function et(e,t){if(!e||Ve)return"";Ve=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(Z){var F=Z}Reflect.construct(e,[],ne)}else{try{ne.call()}catch(Z){F=Z}e.call(ne.prototype)}}else{try{throw Error()}catch(Z){F=Z}(ne=e())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(Z){if(Z&&F&&typeof Z.stack=="string")return[Z.stack,F.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 k=g.split(`
|
|
4
|
+
`),X=T.split(`
|
|
5
|
+
`);for(r=s=0;s<k.length&&!k[s].includes("DetermineComponentFrameRoot");)s++;for(;r<X.length&&!X[r].includes("DetermineComponentFrameRoot");)r++;if(s===k.length||r===X.length)for(s=k.length-1,r=X.length-1;1<=s&&0<=r&&k[s]!==X[r];)r--;for(;1<=s&&0<=r;s--,r--)if(k[s]!==X[r]){if(s!==1||r!==1)do if(s--,r--,0>r||k[s]!==X[r]){var te=`
|
|
6
|
+
`+k[s].replace(" at new "," at ");return e.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",e.displayName)),te}while(1<=s&&0<=r);break}}}finally{Ve=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ze(i):""}function xe(e,t){switch(e.tag){case 26:case 27:case 5:return ze(e.type);case 16:return ze("Lazy");case 13:return e.child!==t&&t!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return et(e.type,!1);case 11:return et(e.type.render,!1);case 1:return et(e.type,!0);case 31:return ze("Activity");default:return""}}function si(e){try{var t="",i=null;do t+=xe(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
|
+
Error generating stack: `+s.message+`
|
|
8
|
+
`+s.stack}}var ri=Object.prototype.hasOwnProperty,Yi=ie.unstable_scheduleCallback,ni=ie.unstable_cancelCallback,gi=ie.unstable_shouldYield,mt=ie.unstable_requestPaint,$e=ie.unstable_now,At=ie.unstable_getCurrentPriorityLevel,ai=ie.unstable_ImmediatePriority,hi=ie.unstable_UserBlockingPriority,Ot=ie.unstable_NormalPriority,pi=ie.unstable_LowPriority,Je=ie.unstable_IdlePriority,Le=ie.log,Ie=ie.unstable_setDisableYieldValue,ht=null,rt=null;function fi(e){if(typeof Le=="function"&&Ie(e),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(ht,e)}catch{}}var Tt=Math.clz32?Math.clz32:on,Ra=Math.log,ln=Math.LN2;function on(e){return e>>>=0,e===0?32:31-(Ra(e)/ln|0)|0}var Si=256,yi=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 Ci(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 Ki(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ma(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cn(){var e=ks;return ks<<=1,(ks&62914560)===0&&(ks=4194304),e}function Hs(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function vs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function un(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,k=e.expirationTimes,X=e.hiddenUpdates;for(i=g&~i;0<i;){var te=31-Tt(i),ne=1<<te;T[te]=0,k[te]=-1;var F=X[te];if(F!==null)for(X[te]=null,te=0;te<F.length;te++){var Z=F[te];Z!==null&&(Z.lane&=-536870913)}i&=~ne}s!==0&&vr(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(g&~t))}function vr(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Tt(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-Tt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function fn(e,t){var i=t&-t;return i=(i&42)!==0?1:N(i),(i&(e.suspendedLanes|t))!==0?0:i}function N(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 he(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ae(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Rf(e.type))}function _e(e,t){var i=W.p;try{return W.p=e,t()}finally{W.p=i}}var De=Math.random().toString(36).slice(2),ye="__reactFiber$"+De,we="__reactProps$"+De,tt="__reactContainer$"+De,Ye="__reactEvents$"+De,Ke="__reactListeners$"+De,Ei="__reactHandles$"+De,gt="__reactResources$"+De,Xt="__reactMarker$"+De;function bt(e){delete e[ye],delete e[we],delete e[Ye],delete e[Ke],delete e[Ei]}function li(e){var t=e[ye];if(t)return t;for(var i=e.parentNode;i;){if(t=i[tt]||i[ye]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=df(e);e!==null;){if(i=e[ye])return i;e=df(e)}return t}e=i,i=e.parentNode}return null}function Rt(e){if(e=e[ye]||e[tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ms(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(G(33))}function gs(e){var t=e[gt];return t||(t=e[gt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function je(e){e[Xt]=!0}var dn=new Set,Vi={};function Mt(e,t){wi(e,t),wi(e+"Capture",t)}function wi(e,t){for(Vi[e]=t,e=0;e<t.length;e++)dn.add(t[e])}var Po=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]*$"),_n={},mr={};function $f(e){return ri.call(mr,e)?!0:ri.call(_n,e)?!1:Po.test(e)?mr[e]=!0:(_n[e]=!0,!1)}function vn(e,t,i){if($f(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 mn(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 xi(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 Wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Jf(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,n=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(g){i=""+g,n.call(this,g)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function La(e){if(!e._valueTracker){var t=Zo(e)?"checked":"value";e._valueTracker=Jf(e,t,""+e[t])}}function Qo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Zo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function gn(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 ed=/[\n"\\]/g;function Ft(e){return e.replace(ed,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Oa(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=""+Wt(t)):e.value!==""+Wt(t)&&(e.value=""+Wt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Ba(e,g,Wt(t)):i!=null?Ba(e,g,Wt(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=""+Wt(T):e.removeAttribute("name")}function $o(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)){La(e);return}i=i!=null?""+Wt(i):"",t=t!=null?""+Wt(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),La(e)}function Ba(e,t,i){t==="number"&&gn(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ns(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=""+Wt(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 Jo(e,t,i){if(t!=null&&(t=""+Wt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Wt(i):""}function ec(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(G(92));if(re(s)){if(1<s.length)throw Error(G(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Wt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),La(e)}function zs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var td=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 tc(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||td.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function ic(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&&tc(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&tc(e,n,t[n])}function ka(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 id=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"]]),sd=/^[\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 pn(e){return sd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Di(){}var Ha=null;function Na(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var js=null,Us=null;function sc(e){var t=Rt(e);if(t&&(e=t.stateNode)){var i=e[we]||null;e:switch(e=t.stateNode,t.type){case"input":if(Oa(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="'+Ft(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[we]||null;if(!r)throw Error(G(90));Oa(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&&Qo(s)}break e;case"textarea":Jo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ns(e,!!i.multiple,t,!1)}}}var za=!1;function rc(e,t,i){if(za)return e(t,i);za=!0;try{var s=e(t);return s}finally{if(za=!1,(js!==null||Us!==null)&&(na(),js&&(t=js,e=Us,Us=js=null,sc(t),e)))for(t=0;t<e.length;t++)sc(e[t])}}function gr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[we]||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 Ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja=!1;if(Ai)try{var pr={};Object.defineProperty(pr,"passive",{get:function(){ja=!0}}),window.addEventListener("test",pr,pr),window.removeEventListener("test",pr,pr)}catch{ja=!1}var Xi=null,Ua=null,Sn=null;function nc(){if(Sn)return Sn;var e,t=Ua,i=t.length,s,r="value"in Xi?Xi.value:Xi.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var g=i-e;for(s=1;s<=g&&t[i-s]===r[n-s];s++);return Sn=r.slice(e,1<s?1-s:void 0)}function yn(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 bn(){return!0}function ac(){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)?bn:ac,this.isPropagationStopped=ac,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=bn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=bn)},persist:function(){},isPersistent:bn}),t}var ps={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cn=Bt(ps),Sr=u({},ps,{view:0,detail:0}),rd=Bt(Sr),qa,Ia,yr,En=u({},Sr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ya,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!==yr&&(yr&&e.type==="mousemove"?(qa=e.screenX-yr.screenX,Ia=e.screenY-yr.screenY):Ia=qa=0,yr=e),qa)},movementY:function(e){return"movementY"in e?e.movementY:Ia}}),lc=Bt(En),nd=u({},En,{dataTransfer:0}),ad=Bt(nd),ld=u({},Sr,{relatedTarget:0}),Ga=Bt(ld),od=u({},ps,{animationName:0,elapsedTime:0,pseudoElement:0}),cd=Bt(od),ud=u({},ps,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hd=Bt(ud),fd=u({},ps,{data:0}),oc=Bt(fd),dd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_d={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"},vd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function md(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vd[e])?!!t[e]:!1}function Ya(){return md}var gd=u({},Sr,{key:function(e){if(e.key){var t=dd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_d[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ya,charCode:function(e){return e.type==="keypress"?yn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pd=Bt(gd),Sd=u({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cc=Bt(Sd),yd=u({},Sr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ya}),bd=Bt(yd),Cd=u({},ps,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ed=Bt(Cd),wd=u({},En,{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}),xd=Bt(wd),Dd=u({},ps,{newState:0,oldState:0}),Ad=Bt(Dd),Td=[9,13,27,32],Ka=Ai&&"CompositionEvent"in window,br=null;Ai&&"documentMode"in document&&(br=document.documentMode);var Rd=Ai&&"TextEvent"in window&&!br,uc=Ai&&(!Ka||br&&8<br&&11>=br),hc=" ",fc=!1;function dc(e,t){switch(e){case"keyup":return Td.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _c(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qs=!1;function Md(e,t){switch(e){case"compositionend":return _c(t);case"keypress":return t.which!==32?null:(fc=!0,hc);case"textInput":return e=t.data,e===hc&&fc?null:e;default:return null}}function Ld(e,t){if(qs)return e==="compositionend"||!Ka&&dc(e,t)?(e=nc(),Sn=Ua=Xi=null,qs=!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 uc&&t.locale!=="ko"?null:t.data;default:return null}}var Od={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 vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Od[e.type]:t==="textarea"}function mc(e,t,i,s){js?Us?Us.push(s):Us=[s]:js=s,t=fa(t,"onChange"),0<t.length&&(i=new Cn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Cr=null,Er=null;function Bd(e){$h(e,0)}function wn(e){var t=ms(e);if(Qo(t))return e}function gc(e,t){if(e==="change")return t}var pc=!1;if(Ai){var Va;if(Ai){var Xa="oninput"in document;if(!Xa){var Sc=document.createElement("div");Sc.setAttribute("oninput","return;"),Xa=typeof Sc.oninput=="function"}Va=Xa}else Va=!1;pc=Va&&(!document.documentMode||9<document.documentMode)}function yc(){Cr&&(Cr.detachEvent("onpropertychange",bc),Er=Cr=null)}function bc(e){if(e.propertyName==="value"&&wn(Er)){var t=[];mc(t,Er,e,Na(e)),rc(Bd,t)}}function kd(e,t,i){e==="focusin"?(yc(),Cr=t,Er=i,Cr.attachEvent("onpropertychange",bc)):e==="focusout"&&yc()}function Hd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wn(Er)}function Nd(e,t){if(e==="click")return wn(t)}function zd(e,t){if(e==="input"||e==="change")return wn(t)}function jd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ut=typeof Object.is=="function"?Object.is:jd;function wr(e,t){if(Ut(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(!ri.call(t,r)||!Ut(e[r],t[r]))return!1}return!0}function Cc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ec(e,t){var i=Cc(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=Cc(i)}}function wc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=gn(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=gn(e.document)}return t}function Wa(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 Ud=Ai&&"documentMode"in document&&11>=document.documentMode,Is=null,Fa=null,xr=null,Pa=!1;function Dc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Pa||Is==null||Is!==gn(s)||(s=Is,"selectionStart"in s&&Wa(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}),xr&&wr(xr,s)||(xr=s,s=fa(Fa,"onSelect"),0<s.length&&(t=new Cn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Is)))}function Ss(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Gs={animationend:Ss("Animation","AnimationEnd"),animationiteration:Ss("Animation","AnimationIteration"),animationstart:Ss("Animation","AnimationStart"),transitionrun:Ss("Transition","TransitionRun"),transitionstart:Ss("Transition","TransitionStart"),transitioncancel:Ss("Transition","TransitionCancel"),transitionend:Ss("Transition","TransitionEnd")},Za={},Ac={};Ai&&(Ac=document.createElement("div").style,"AnimationEvent"in window||(delete Gs.animationend.animation,delete Gs.animationiteration.animation,delete Gs.animationstart.animation),"TransitionEvent"in window||delete Gs.transitionend.transition);function ys(e){if(Za[e])return Za[e];if(!Gs[e])return e;var t=Gs[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ac)return Za[e]=t[i];return e}var Tc=ys("animationend"),Rc=ys("animationiteration"),Mc=ys("animationstart"),qd=ys("transitionrun"),Id=ys("transitionstart"),Gd=ys("transitioncancel"),Lc=ys("transitionend"),Oc=new Map,Qa="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(" ");Qa.push("scrollEnd");function oi(e,t){Oc.set(e,t),Mt(t,[e])}var xn=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)},Pt=[],Ys=0,$a=0;function Dn(){for(var e=Ys,t=$a=Ys=0;t<e;){var i=Pt[t];Pt[t++]=null;var s=Pt[t];Pt[t++]=null;var r=Pt[t];Pt[t++]=null;var n=Pt[t];if(Pt[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&&Bc(i,r,n)}}function An(e,t,i,s){Pt[Ys++]=e,Pt[Ys++]=t,Pt[Ys++]=i,Pt[Ys++]=s,$a|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Ja(e,t,i,s){return An(e,t,i,s),Tn(e)}function bs(e,t){return An(e,null,null,t),Tn(e)}function Bc(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-Tt(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function Tn(e){if(50<Wr)throw Wr=0,oo=null,Error(G(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ks={};function Yd(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,t,i,s){return new Yd(e,t,i,s)}function el(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ti(e,t){var i=e.alternate;return i===null?(i=qt(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 kc(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 Rn(e,t,i,s,r,n){var g=0;if(s=e,typeof e=="function")el(e)&&(g=1);else if(typeof e=="string")g=F_(e,i,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case D:return e=qt(31,i,t,r),e.elementType=D,e.lanes=n,e;case m:return Cs(i.children,r,n,t);case o:g=8,r|=24;break;case c:return e=qt(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case C:return e=qt(13,i,t,r),e.elementType=C,e.lanes=n,e;case y:return e=qt(19,i,t,r),e.elementType=y,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=qt(g,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function Cs(e,t,i,s){return e=qt(7,e,s,t),e.lanes=i,e}function tl(e,t,i){return e=qt(6,e,null,t),e.lanes=i,e}function Hc(e){var t=qt(18,null,null,0);return t.stateNode=e,t}function il(e,t,i){return t=qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Nc=new WeakMap;function Zt(e,t){if(typeof e=="object"&&e!==null){var i=Nc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:si(t)},Nc.set(e,t),t)}return{value:e,source:t,stack:si(t)}}var Vs=[],Xs=0,Mn=null,Dr=0,Qt=[],$t=0,Wi=null,di=1,_i="";function Ri(e,t){Vs[Xs++]=Dr,Vs[Xs++]=Mn,Mn=e,Dr=t}function zc(e,t,i){Qt[$t++]=di,Qt[$t++]=_i,Qt[$t++]=Wi,Wi=e;var s=di;e=_i;var r=32-Tt(s)-1;s&=~(1<<r),i+=1;var n=32-Tt(t)+r;if(30<n){var g=r-r%5;n=(s&(1<<g)-1).toString(32),s>>=g,r-=g,di=1<<32-Tt(t)+r|i<<r|s,_i=n+e}else di=1<<n|i<<r|s,_i=e}function sl(e){e.return!==null&&(Ri(e,1),zc(e,1,0))}function rl(e){for(;e===Mn;)Mn=Vs[--Xs],Vs[Xs]=null,Dr=Vs[--Xs],Vs[Xs]=null;for(;e===Wi;)Wi=Qt[--$t],Qt[$t]=null,_i=Qt[--$t],Qt[$t]=null,di=Qt[--$t],Qt[$t]=null}function jc(e,t){Qt[$t++]=di,Qt[$t++]=_i,Qt[$t++]=Wi,di=t.id,_i=t.overflow,Wi=e}var Ct=null,it=null,Ne=!1,Fi=null,Jt=!1,nl=Error(G(519));function Pi(e){var t=Error(G(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ar(Zt(t,e)),nl}function Uc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[ye]=e,t[we]=s,i){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(i=0;i<Pr.length;i++)Be(Pr[i],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),$o(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),ec(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||sf(t.textContent,i)?(s.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),s.onScroll!=null&&Be("scroll",t),s.onScrollEnd!=null&&Be("scrollend",t),s.onClick!=null&&(t.onclick=Di),t=!0):t=!1,t||Pi(e,!0)}function qc(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:Ct=Ct.return}}function Ws(e){if(e!==Ct)return!1;if(!Ne)return qc(e),Ne=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||wo(e.type,e.memoizedProps)),i=!i),i&&it&&Pi(e),qc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));it=ff(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));it=ff(e)}else t===27?(t=it,cs(e.type)?(e=Ro,Ro=null,it=e):it=t):it=Ct?ti(e.stateNode.nextSibling):null;return!0}function Es(){it=Ct=null,Ne=!1}function al(){var e=Fi;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),Fi=null),e}function Ar(e){Fi===null?Fi=[e]:Fi.push(e)}var ll=w(null),ws=null,Mi=null;function Zi(e,t,i){K(ll,t._currentValue),t._currentValue=i}function Li(e){e._currentValue=ll.current,L(ll)}function ol(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 cl(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 k=0;k<t.length;k++)if(T.context===t[k]){n.lanes|=i,T=n.alternate,T!==null&&(T.lanes|=i),ol(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),ol(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;Ut(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(en):e=[en])}r=r.return}e!==null&&cl(t,e,i,s),t.flags|=262144}function Ln(e){for(e=e.firstContext;e!==null;){if(!Ut(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xs(e){ws=e,Mi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return Ic(ws,e)}function On(e,t){return ws===null&&xs(e),Ic(e,t)}function Ic(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Mi===null){if(e===null)throw Error(G(308));Mi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Mi=Mi.next=t;return i}var Kd=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Vd=ie.unstable_scheduleCallback,Xd=ie.unstable_NormalPriority,ft={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ul(){return{controller:new Kd,data:new Map,refCount:0}}function Tr(e){e.refCount--,e.refCount===0&&Vd(Xd,function(){e.controller.abort()})}var Rr=null,hl=0,Ps=0,Zs=null;function Wd(e,t){if(Rr===null){var i=Rr=[];hl=0,Ps=vo(),Zs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return hl++,t.then(Gc,Gc),t}function Gc(){if(--hl===0&&Rr!==null){Zs!==null&&(Zs.status="fulfilled");var e=Rr;Rr=null,Ps=0,Zs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Fd(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 Yc=j.S;j.S=function(e,t){Dh=$e(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Wd(e,t),Yc!==null&&Yc(e,t)};var Ds=w(null);function fl(){var e=Ds.current;return e!==null?e:Qe.pooledCache}function Bn(e,t){t===null?K(Ds,Ds.current):K(Ds,t.pool)}function Kc(){var e=fl();return e===null?null:{parent:ft._currentValue,pool:e}}var Qs=Error(G(460)),dl=Error(G(474)),kn=Error(G(542)),Hn={then:function(){}};function Vc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Di,Di),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Fc(e),e;default:if(typeof t.status=="string")t.then(Di,Di);else{if(e=Qe,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,Fc(e),e}throw Ts=t,Qs}}function As(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ts=i,Qs):i}}var Ts=null;function Wc(){if(Ts===null)throw Error(G(459));var e=Ts;return Ts=null,e}function Fc(e){if(e===Qs||e===kn)throw Error(G(483))}var $s=null,Mr=0;function Nn(e){var t=Mr;return Mr+=1,$s===null&&($s=[]),Xc($s,e,t)}function Lr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function zn(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 Pc(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=Ti(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,se){return U===null||U.tag!==6?(U=tl(V,Y.mode,se),U.return=Y,U):(U=r(U,V),U.return=Y,U)}function k(Y,U,V,se){var be=V.type;return be===m?te(Y,U,V.props.children,se,V.key):U!==null&&(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===v&&As(be)===U.type)?(U=r(U,V.props),Lr(U,V),U.return=Y,U):(U=Rn(V.type,V.key,V.props,null,Y.mode,se),Lr(U,V),U.return=Y,U)}function X(Y,U,V,se){return U===null||U.tag!==4||U.stateNode.containerInfo!==V.containerInfo||U.stateNode.implementation!==V.implementation?(U=il(V,Y.mode,se),U.return=Y,U):(U=r(U,V.children||[]),U.return=Y,U)}function te(Y,U,V,se,be){return U===null||U.tag!==7?(U=Cs(V,Y.mode,se,be),U.return=Y,U):(U=r(U,V),U.return=Y,U)}function ne(Y,U,V){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=tl(""+U,Y.mode,V),U.return=Y,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case b:return V=Rn(U.type,U.key,U.props,null,Y.mode,V),Lr(V,U),V.return=Y,V;case x:return U=il(U,Y.mode,V),U.return=Y,U;case v:return U=As(U),ne(Y,U,V)}if(re(U)||q(U))return U=Cs(U,Y.mode,V,null),U.return=Y,U;if(typeof U.then=="function")return ne(Y,Nn(U),V);if(U.$$typeof===l)return ne(Y,On(Y,U),V);zn(Y,U)}return null}function F(Y,U,V,se){var be=U!==null?U.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return be!==null?null:T(Y,U,""+V,se);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case b:return V.key===be?k(Y,U,V,se):null;case x:return V.key===be?X(Y,U,V,se):null;case v:return V=As(V),F(Y,U,V,se)}if(re(V)||q(V))return be!==null?null:te(Y,U,V,se,null);if(typeof V.then=="function")return F(Y,U,Nn(V),se);if(V.$$typeof===l)return F(Y,U,On(Y,V),se);zn(Y,V)}return null}function Z(Y,U,V,se,be){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Y=Y.get(V)||null,T(U,Y,""+se,be);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case b:return Y=Y.get(se.key===null?V:se.key)||null,k(U,Y,se,be);case x:return Y=Y.get(se.key===null?V:se.key)||null,X(U,Y,se,be);case v:return se=As(se),Z(Y,U,V,se,be)}if(re(se)||q(se))return Y=Y.get(V)||null,te(U,Y,se,be,null);if(typeof se.then=="function")return Z(Y,U,V,Nn(se),be);if(se.$$typeof===l)return Z(Y,U,V,On(U,se),be);zn(U,se)}return null}function me(Y,U,V,se){for(var be=null,Ue=null,pe=U,Me=U=0,He=null;pe!==null&&Me<V.length;Me++){pe.index>Me?(He=pe,pe=null):He=pe.sibling;var qe=F(Y,pe,V[Me],se);if(qe===null){pe===null&&(pe=He);break}e&&pe&&qe.alternate===null&&t(Y,pe),U=n(qe,U,Me),Ue===null?be=qe:Ue.sibling=qe,Ue=qe,pe=He}if(Me===V.length)return i(Y,pe),Ne&&Ri(Y,Me),be;if(pe===null){for(;Me<V.length;Me++)pe=ne(Y,V[Me],se),pe!==null&&(U=n(pe,U,Me),Ue===null?be=pe:Ue.sibling=pe,Ue=pe);return Ne&&Ri(Y,Me),be}for(pe=s(pe);Me<V.length;Me++)He=Z(pe,Y,Me,V[Me],se),He!==null&&(e&&He.alternate!==null&&pe.delete(He.key===null?Me:He.key),U=n(He,U,Me),Ue===null?be=He:Ue.sibling=He,Ue=He);return e&&pe.forEach(function(_s){return t(Y,_s)}),Ne&&Ri(Y,Me),be}function Ee(Y,U,V,se){if(V==null)throw Error(G(151));for(var be=null,Ue=null,pe=U,Me=U=0,He=null,qe=V.next();pe!==null&&!qe.done;Me++,qe=V.next()){pe.index>Me?(He=pe,pe=null):He=pe.sibling;var _s=F(Y,pe,qe.value,se);if(_s===null){pe===null&&(pe=He);break}e&&pe&&_s.alternate===null&&t(Y,pe),U=n(_s,U,Me),Ue===null?be=_s:Ue.sibling=_s,Ue=_s,pe=He}if(qe.done)return i(Y,pe),Ne&&Ri(Y,Me),be;if(pe===null){for(;!qe.done;Me++,qe=V.next())qe=ne(Y,qe.value,se),qe!==null&&(U=n(qe,U,Me),Ue===null?be=qe:Ue.sibling=qe,Ue=qe);return Ne&&Ri(Y,Me),be}for(pe=s(pe);!qe.done;Me++,qe=V.next())qe=Z(pe,Y,Me,qe.value,se),qe!==null&&(e&&qe.alternate!==null&&pe.delete(qe.key===null?Me:qe.key),U=n(qe,U,Me),Ue===null?be=qe:Ue.sibling=qe,Ue=qe);return e&&pe.forEach(function(nv){return t(Y,nv)}),Ne&&Ri(Y,Me),be}function Ze(Y,U,V,se){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 b:e:{for(var be=V.key;U!==null;){if(U.key===be){if(be=V.type,be===m){if(U.tag===7){i(Y,U.sibling),se=r(U,V.props.children),se.return=Y,Y=se;break e}}else if(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===v&&As(be)===U.type){i(Y,U.sibling),se=r(U,V.props),Lr(se,V),se.return=Y,Y=se;break e}i(Y,U);break}else t(Y,U);U=U.sibling}V.type===m?(se=Cs(V.props.children,Y.mode,se,V.key),se.return=Y,Y=se):(se=Rn(V.type,V.key,V.props,null,Y.mode,se),Lr(se,V),se.return=Y,Y=se)}return g(Y);case x:e:{for(be=V.key;U!==null;){if(U.key===be)if(U.tag===4&&U.stateNode.containerInfo===V.containerInfo&&U.stateNode.implementation===V.implementation){i(Y,U.sibling),se=r(U,V.children||[]),se.return=Y,Y=se;break e}else{i(Y,U);break}else t(Y,U);U=U.sibling}se=il(V,Y.mode,se),se.return=Y,Y=se}return g(Y);case v:return V=As(V),Ze(Y,U,V,se)}if(re(V))return me(Y,U,V,se);if(q(V)){if(be=q(V),typeof be!="function")throw Error(G(150));return V=be.call(V),Ee(Y,U,V,se)}if(typeof V.then=="function")return Ze(Y,U,Nn(V),se);if(V.$$typeof===l)return Ze(Y,U,On(Y,V),se);zn(Y,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,U!==null&&U.tag===6?(i(Y,U.sibling),se=r(U,V),se.return=Y,Y=se):(i(Y,U),se=tl(V,Y.mode,se),se.return=Y,Y=se),g(Y)):i(Y,U)}return function(Y,U,V,se){try{Mr=0;var be=Ze(Y,U,V,se);return $s=null,be}catch(pe){if(pe===Qs||pe===kn)throw pe;var Ue=qt(29,pe,null,Y.mode);return Ue.lanes=se,Ue.return=Y,Ue}}}var Rs=Pc(!0),Zc=Pc(!1),Qi=!1;function _l(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vl(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 $i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ji(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ge&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Tn(e),Bc(e,null,i),t}return An(e,s,t,i),Tn(e)}function Or(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 ml(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 gl=!1;function Br(){if(gl){var e=Zs;if(e!==null)throw e}}function kr(e,t,i,s){gl=!1;var r=e.updateQueue;Qi=!1;var n=r.firstBaseUpdate,g=r.lastBaseUpdate,T=r.shared.pending;if(T!==null){r.shared.pending=null;var k=T,X=k.next;k.next=null,g===null?n=X:g.next=X,g=k;var te=e.alternate;te!==null&&(te=te.updateQueue,T=te.lastBaseUpdate,T!==g&&(T===null?te.firstBaseUpdate=X:T.next=X,te.lastBaseUpdate=k))}if(n!==null){var ne=r.baseState;g=0,te=X=k=null,T=n;do{var F=T.lane&-536870913,Z=F!==T.lane;if(Z?(ke&F)===F:(s&F)===F){F!==0&&F===Ps&&(gl=!0),te!==null&&(te=te.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var me=e,Ee=T;F=t;var Ze=i;switch(Ee.tag){case 1:if(me=Ee.payload,typeof me=="function"){ne=me.call(Ze,ne,F);break e}ne=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Ee.payload,F=typeof me=="function"?me.call(Ze,ne,F):me,F==null)break e;ne=u({},ne,F);break e;case 2:Qi=!0}}F=T.callback,F!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=r.callbacks,Z===null?r.callbacks=[F]:Z.push(F))}else Z={lane:F,tag:T.tag,payload:T.payload,callback:T.callback,next:null},te===null?(X=te=Z,k=ne):te=te.next=Z,g|=F;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);te===null&&(k=ne),r.baseState=k,r.firstBaseUpdate=X,r.lastBaseUpdate=te,n===null&&(r.shared.lanes=0),rs|=g,e.lanes=g,e.memoizedState=ne}}function Qc(e,t){if(typeof e!="function")throw Error(G(191,e));e.call(t)}function $c(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Qc(i[e],t)}var Js=w(null),jn=w(0);function Jc(e,t){e=qi,K(jn,e),K(Js,t),qi=e|t.baseLanes}function pl(){K(jn,qi),K(Js,Js.current)}function Sl(){qi=jn.current,L(Js),L(jn)}var It=w(null),ei=null;function es(e){var t=e.alternate;K(ct,ct.current&1),K(It,e),ei===null&&(t===null||Js.current!==null||t.memoizedState!==null)&&(ei=e)}function yl(e){K(ct,ct.current),K(It,e),ei===null&&(ei=e)}function eu(e){e.tag===22?(K(ct,ct.current),K(It,e),ei===null&&(ei=e)):ts()}function ts(){K(ct,ct.current),K(It,It.current)}function Gt(e){L(It),ei===e&&(ei=null),L(ct)}var ct=w(0);function Un(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Ao(i)||To(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 Oi=0,Re=null,Fe=null,dt=null,qn=!1,er=!1,Ms=!1,In=0,Hr=0,tr=null,Pd=0;function lt(){throw Error(G(321))}function bl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ut(e[i],t[i]))return!1;return!0}function Cl(e,t,i,s,r,n){return Oi=n,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?zu:zl,Ms=!1,n=i(s,r),Ms=!1,er&&(n=iu(t,i,s,r)),tu(e),n}function tu(e){j.H=jr;var t=Fe!==null&&Fe.next!==null;if(Oi=0,dt=Fe=Re=null,qn=!1,Hr=0,tr=null,t)throw Error(G(300));e===null||_t||(e=e.dependencies,e!==null&&Ln(e)&&(_t=!0))}function iu(e,t,i,s){Re=e;var r=0;do{if(er&&(tr=null),Hr=0,er=!1,25<=r)throw Error(G(301));if(r+=1,dt=Fe=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=ju,n=t(i,s)}while(er);return n}function Zd(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?Nr(t):t,e=e.useState()[0],(Fe!==null?Fe.memoizedState:null)!==e&&(Re.flags|=1024),t}function El(){var e=In!==0;return In=0,e}function wl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function xl(e){if(qn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qn=!1}Oi=0,dt=Fe=Re=null,er=!1,Hr=In=0,tr=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Re.memoizedState=dt=e:dt=dt.next=e,dt}function ut(){if(Fe===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=dt===null?Re.memoizedState:dt.next;if(t!==null)dt=t,Fe=e;else{if(e===null)throw Re.alternate===null?Error(G(467)):Error(G(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},dt===null?Re.memoizedState=dt=e:dt=dt.next=e}return dt}function Gn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Nr(e){var t=Hr;return Hr+=1,tr===null&&(tr=[]),e=Xc(tr,e,t),t=Re,(dt===null?t.memoizedState:dt.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?zu:zl),e}function Yn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Nr(e);if(e.$$typeof===l)return Et(e)}throw Error(G(438,String(e)))}function Dl(e){var t=null,i=Re.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Re.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=Gn(),Re.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 Bi(e,t){return typeof t=="function"?t(e):t}function Kn(e){var t=ut();return Al(t,Fe,e)}function Al(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,k=null,X=t,te=!1;do{var ne=X.lane&-536870913;if(ne!==X.lane?(ke&ne)===ne:(Oi&ne)===ne){var F=X.revertLane;if(F===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ne===Ps&&(te=!0);else if((Oi&F)===F){X=X.next,F===Ps&&(te=!0);continue}else ne={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},k===null?(T=k=ne,g=n):k=k.next=ne,Re.lanes|=F,rs|=F;ne=X.action,Ms&&i(n,ne),n=X.hasEagerState?X.eagerState:i(n,ne)}else F={lane:ne,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},k===null?(T=k=F,g=n):k=k.next=F,Re.lanes|=ne,rs|=ne;X=X.next}while(X!==null&&X!==t);if(k===null?g=n:k.next=T,!Ut(n,e.memoizedState)&&(_t=!0,te&&(i=Zs,i!==null)))throw i;e.memoizedState=n,e.baseState=g,e.baseQueue=k,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Tl(e){var t=ut(),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);Ut(n,t.memoizedState)||(_t=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function su(e,t,i){var s=Re,r=ut(),n=Ne;if(n){if(i===void 0)throw Error(G(407));i=i()}else i=t();var g=!Ut((Fe||r).memoizedState,i);if(g&&(r.memoizedState=i,_t=!0),r=r.queue,Ll(au.bind(null,s,r,e),[e]),r.getSnapshot!==t||g||dt!==null&&dt.memoizedState.tag&1){if(s.flags|=2048,ir(9,{destroy:void 0},nu.bind(null,s,r,i,t),null),Qe===null)throw Error(G(349));n||(Oi&127)!==0||ru(s,t,i)}return i}function ru(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Re.updateQueue,t===null?(t=Gn(),Re.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function nu(e,t,i,s){t.value=i,t.getSnapshot=s,lu(t)&&ou(e)}function au(e,t,i){return i(function(){lu(t)&&ou(e)})}function lu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ut(e,i)}catch{return!0}}function ou(e){var t=bs(e,2);t!==null&&jt(t,e,2)}function Rl(e){var t=Lt();if(typeof e=="function"){var i=e;if(e=i(),Ms){fi(!0);try{i()}finally{fi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:e},t}function cu(e,t,i,s){return e.baseState=i,Al(e,Fe,typeof s=="function"?s:Bi)}function Qd(e,t,i,s,r){if(Wn(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,uu(t,n)):(n.next=i.next,t.pending=i.next=n)}}function uu(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),k=j.S;k!==null&&k(g,T),hu(e,t,T)}catch(X){Ml(e,t,X)}finally{n!==null&&g.types!==null&&(n.types=g.types),j.T=n}}else try{n=i(r,s),hu(e,t,n)}catch(X){Ml(e,t,X)}}function hu(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){fu(e,t,s)},function(s){return Ml(e,t,s)}):fu(e,t,i)}function fu(e,t,i){t.status="fulfilled",t.value=i,du(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,uu(e,i)))}function Ml(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,du(t),t=t.next;while(t!==s)}e.action=null}function du(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _u(e,t){return t}function vu(e,t){if(Ne){var i=Qe.formState;if(i!==null){e:{var s=Re;if(Ne){if(it){t:{for(var r=it,n=Jt;r.nodeType!==8;){if(!n){r=null;break t}if(r=ti(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){it=ti(r.nextSibling),s=r.data==="F!";break e}}Pi(s)}s=!1}s&&(t=i[0])}}return i=Lt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_u,lastRenderedState:t},i.queue=s,i=ku.bind(null,Re,s),s.dispatch=i,s=Rl(!1),n=Nl.bind(null,Re,!1,s.queue),s=Lt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=Qd.bind(null,Re,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function mu(e){var t=ut();return gu(t,Fe,e)}function gu(e,t,i){if(t=Al(e,t,_u)[0],e=Kn(Bi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Nr(t)}catch(g){throw g===Qs?kn:g}else s=t;t=ut();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Re.flags|=2048,ir(9,{destroy:void 0},$d.bind(null,r,i),null)),[s,n,e]}function $d(e,t){e.action=t}function pu(e){var t=ut(),i=Fe;if(i!==null)return gu(t,i,e);ut(),t=t.memoizedState,i=ut();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function ir(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Re.updateQueue,t===null&&(t=Gn(),Re.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 Su(){return ut().memoizedState}function Vn(e,t,i,s){var r=Lt();Re.flags|=e,r.memoizedState=ir(1|t,{destroy:void 0},i,s===void 0?null:s)}function Xn(e,t,i,s){var r=ut();s=s===void 0?null:s;var n=r.memoizedState.inst;Fe!==null&&s!==null&&bl(s,Fe.memoizedState.deps)?r.memoizedState=ir(t,n,i,s):(Re.flags|=e,r.memoizedState=ir(1|t,n,i,s))}function yu(e,t){Vn(8390656,8,e,t)}function Ll(e,t){Xn(2048,8,e,t)}function Jd(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=Gn(),Re.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function bu(e){var t=ut().memoizedState;return Jd({ref:t,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(G(440));return t.impl.apply(void 0,arguments)}}function Cu(e,t){return Xn(4,2,e,t)}function Eu(e,t){return Xn(4,4,e,t)}function wu(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 xu(e,t,i){i=i!=null?i.concat([e]):null,Xn(4,4,wu.bind(null,t,e),i)}function Ol(){}function Du(e,t){var i=ut();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&bl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Au(e,t){var i=ut();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&bl(t,s[1]))return s[0];if(s=e(),Ms){fi(!0);try{e()}finally{fi(!1)}}return i.memoizedState=[s,t],s}function Bl(e,t,i){return i===void 0||(Oi&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Th(),Re.lanes|=e,rs|=e,i)}function Tu(e,t,i,s){return Ut(i,t)?i:Js.current!==null?(e=Bl(e,i,s),Ut(e,t)||(_t=!0),e):(Oi&42)===0||(Oi&1073741824)!==0&&(ke&261930)===0?(_t=!0,e.memoizedState=i):(e=Th(),Re.lanes|=e,rs|=e,t)}function Ru(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,Nl(e,!1,t,i);try{var k=r(),X=j.S;if(X!==null&&X(T,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var te=Fd(k,s);zr(e,t,te,Vt(e))}else zr(e,t,s,Vt(e))}catch(ne){zr(e,t,{then:function(){},status:"rejected",reason:ne},Vt())}finally{W.p=n,g!==null&&T.types!==null&&(g.types=T.types),j.T=g}}function e_(){}function kl(e,t,i,s){if(e.tag!==5)throw Error(G(476));var r=Mu(e).queue;Ru(e,r,t,J,i===null?e_:function(){return Lu(e),i(s)})}function Mu(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Lu(e){var t=Mu(e);t.next===null&&(t=e.alternate.memoizedState),zr(e,t.next.queue,{},Vt())}function Hl(){return Et(en)}function Ou(){return ut().memoizedState}function Bu(){return ut().memoizedState}function t_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Vt();e=$i(i);var s=Ji(t,e,i);s!==null&&(jt(s,t,i),Or(s,t,i)),t={cache:ul()},e.payload=t;return}t=t.return}}function i_(e,t,i){var s=Vt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Wn(e)?Hu(t,i):(i=Ja(e,t,i,s),i!==null&&(jt(i,e,s),Nu(i,t,s)))}function ku(e,t,i){var s=Vt();zr(e,t,i,s)}function zr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Wn(e))Hu(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,Ut(T,g))return An(e,t,r,0),Qe===null&&Dn(),!1}catch{}if(i=Ja(e,t,r,s),i!==null)return jt(i,e,s),Nu(i,t,s),!0}return!1}function Nl(e,t,i,s){if(s={lane:2,revertLane:vo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Wn(e)){if(t)throw Error(G(479))}else t=Ja(e,i,s,2),t!==null&&jt(t,e,2)}function Wn(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function Hu(e,t){er=qn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Nu(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,hn(e,i)}}var jr={readContext:Et,use:Yn,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};jr.useEffectEvent=lt;var zu={readContext:Et,use:Yn,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:yu,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Vn(4194308,4,wu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Vn(4194308,4,e,t)},useInsertionEffect:function(e,t){Vn(4,2,e,t)},useMemo:function(e,t){var i=Lt();t=t===void 0?null:t;var s=e();if(Ms){fi(!0);try{e()}finally{fi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Lt();if(i!==void 0){var r=i(t);if(Ms){fi(!0);try{i(t)}finally{fi(!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=i_.bind(null,Re,e),[s.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Rl(e);var t=e.queue,i=ku.bind(null,Re,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Ol,useDeferredValue:function(e,t){var i=Lt();return Bl(i,e,t)},useTransition:function(){var e=Rl(!1);return e=Ru.bind(null,Re,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Re,r=Lt();if(Ne){if(i===void 0)throw Error(G(407));i=i()}else{if(i=t(),Qe===null)throw Error(G(349));(ke&127)!==0||ru(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,yu(au.bind(null,s,n,e),[e]),s.flags|=2048,ir(9,{destroy:void 0},nu.bind(null,s,n,i,t),null),i},useId:function(){var e=Lt(),t=Qe.identifierPrefix;if(Ne){var i=_i,s=di;i=(s&~(1<<32-Tt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=In++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Pd++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Hl,useFormState:vu,useActionState:vu,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Nl.bind(null,Re,!0,i),i.dispatch=t,[e,t]},useMemoCache:Dl,useCacheRefresh:function(){return Lt().memoizedState=t_.bind(null,Re)},useEffectEvent:function(e){var t=Lt(),i={impl:e};return t.memoizedState=i,function(){if((Ge&2)!==0)throw Error(G(440));return i.impl.apply(void 0,arguments)}}},zl={readContext:Et,use:Yn,useCallback:Du,useContext:Et,useEffect:Ll,useImperativeHandle:xu,useInsertionEffect:Cu,useLayoutEffect:Eu,useMemo:Au,useReducer:Kn,useRef:Su,useState:function(){return Kn(Bi)},useDebugValue:Ol,useDeferredValue:function(e,t){var i=ut();return Tu(i,Fe.memoizedState,e,t)},useTransition:function(){var e=Kn(Bi)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:Nr(e),t]},useSyncExternalStore:su,useId:Ou,useHostTransitionStatus:Hl,useFormState:mu,useActionState:mu,useOptimistic:function(e,t){var i=ut();return cu(i,Fe,e,t)},useMemoCache:Dl,useCacheRefresh:Bu};zl.useEffectEvent=bu;var ju={readContext:Et,use:Yn,useCallback:Du,useContext:Et,useEffect:Ll,useImperativeHandle:xu,useInsertionEffect:Cu,useLayoutEffect:Eu,useMemo:Au,useReducer:Tl,useRef:Su,useState:function(){return Tl(Bi)},useDebugValue:Ol,useDeferredValue:function(e,t){var i=ut();return Fe===null?Bl(i,e,t):Tu(i,Fe.memoizedState,e,t)},useTransition:function(){var e=Tl(Bi)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:Nr(e),t]},useSyncExternalStore:su,useId:Ou,useHostTransitionStatus:Hl,useFormState:pu,useActionState:pu,useOptimistic:function(e,t){var i=ut();return Fe!==null?cu(i,Fe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Dl,useCacheRefresh:Bu};ju.useEffectEvent=bu;function jl(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 Ul={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Vt(),r=$i(s);r.payload=t,i!=null&&(r.callback=i),t=Ji(e,r,s),t!==null&&(jt(t,e,s),Or(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Vt(),r=$i(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Ji(e,r,s),t!==null&&(jt(t,e,s),Or(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Vt(),s=$i(i);s.tag=2,t!=null&&(s.callback=t),t=Ji(e,s,i),t!==null&&(jt(t,e,i),Or(t,e,i))}};function Uu(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?!wr(i,s)||!wr(r,n):!0}function qu(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&&Ul.enqueueReplaceState(t,t.state,null)}function Ls(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 Iu(e){xn(e)}function Gu(e){console.error(e)}function Yu(e){xn(e)}function Fn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Ku(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 ql(e,t,i){return i=$i(i),i.tag=3,i.payload={element:null},i.callback=function(){Fn(e,t)},i}function Vu(e){return e=$i(e),e.tag=3,e}function Xu(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(){Ku(t,i,s)}}var g=i.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Ku(t,i,s),typeof r!="function"&&(ns===null?ns=new Set([this]):ns.add(this));var T=s.stack;this.componentDidCatch(s.value,{componentStack:T!==null?T:""})})}function s_(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=It.current,i!==null){switch(i.tag){case 31:case 13:return ei===null?aa():i.alternate===null&&ot===0&&(ot=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===Hn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),ho(e,s,r)),!1;case 22:return i.flags|=65536,s===Hn?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)),ho(e,s,r)),!1}throw Error(G(435,i.tag))}return ho(e,s,r),aa(),!1}if(Ne)return t=It.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==nl&&(e=Error(G(422),{cause:s}),Ar(Zt(e,i)))):(s!==nl&&(t=Error(G(423),{cause:s}),Ar(Zt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Zt(s,i),r=ql(e.stateNode,s,r),ml(e,r),ot!==4&&(ot=2)),!1;var n=Error(G(520),{cause:s});if(n=Zt(n,i),Xr===null?Xr=[n]:Xr.push(n),ot!==4&&(ot=2),t===null)return!0;s=Zt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=ql(i.stateNode,s,e),ml(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"&&(ns===null||!ns.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Vu(r),Xu(r,e,i,s),ml(i,r),!1}i=i.return}while(i!==null);return!1}var Il=Error(G(461)),_t=!1;function wt(e,t,i,s){t.child=e===null?Zc(t,null,i,s):Rs(t,e.child,i,s)}function Wu(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 xs(t),s=Cl(e,t,i,g,n,r),T=El(),e!==null&&!_t?(wl(e,t,r),ki(e,t,r)):(Ne&&T&&sl(t),t.flags|=1,wt(e,t,s,r),t.child)}function Fu(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!el(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Pu(e,t,n,s,r)):(e=Rn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Pl(e,r)){var g=n.memoizedProps;if(i=i.compare,i=i!==null?i:wr,i(g,s)&&e.ref===t.ref)return ki(e,t,r)}return t.flags|=1,e=Ti(n,s),e.ref=t.ref,e.return=t,t.child=e}function Pu(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(wr(n,s)&&e.ref===t.ref)if(_t=!1,t.pendingProps=s=n,Pl(e,r))(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,ki(e,t,r)}return Gl(e,t,i,s,r)}function Zu(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 Qu(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Bn(t,n!==null?n.cachePool:null),n!==null?Jc(t,n):pl(),eu(t);else return s=t.lanes=536870912,Qu(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(Bn(t,n.cachePool),Jc(t,n),ts(),t.memoizedState=null):(e!==null&&Bn(t,null),pl(),ts());return wt(e,t,r,i),t.child}function Ur(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Qu(e,t,i,s,r){var n=fl();return n=n===null?null:{parent:ft._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&Bn(t,null),pl(),eu(t),e!==null&&Fs(e,t,s,!0),t.childLanes=r,null}function Pn(e,t){return t=Qn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function $u(e,t,i){return Rs(t,e.child,null,i),e=Pn(t,t.pendingProps),e.flags|=2,Gt(t),t.memoizedState=null,e}function r_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(s.mode==="hidden")return e=Pn(t,s),t.lanes=536870912,Ur(null,e);if(yl(t),(e=it)?(e=hf(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wi!==null?{id:di,overflow:_i}:null,retryLane:536870912,hydrationErrors:null},i=Hc(e),i.return=t,t.child=i,Ct=t,it=null)):e=null,e===null)throw Pi(t);return t.lanes=536870912,null}return Pn(t,s)}var n=e.memoizedState;if(n!==null){var g=n.dehydrated;if(yl(t),r)if(t.flags&256)t.flags&=-257,t=$u(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(G(558));else if(_t||Fs(e,t,i,!1),r=(i&e.childLanes)!==0,_t||r){if(s=Qe,s!==null&&(g=fn(s,i),g!==0&&g!==n.retryLane))throw n.retryLane=g,bs(e,g),jt(s,e,g),Il;aa(),t=$u(e,t,i)}else e=n.treeContext,it=ti(g.nextSibling),Ct=t,Ne=!0,Fi=null,Jt=!1,e!==null&&jc(t,e),t=Pn(t,s),t.flags|=4096;return t}return e=Ti(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Zn(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 Gl(e,t,i,s,r){return xs(t),i=Cl(e,t,i,s,void 0,r),s=El(),e!==null&&!_t?(wl(e,t,r),ki(e,t,r)):(Ne&&s&&sl(t),t.flags|=1,wt(e,t,i,r),t.child)}function Ju(e,t,i,s,r,n){return xs(t),t.updateQueue=null,i=iu(t,s,i,r),tu(e),s=El(),e!==null&&!_t?(wl(e,t,n),ki(e,t,n)):(Ne&&s&&sl(t),t.flags|=1,wt(e,t,i,n),t.child)}function eh(e,t,i,s,r){if(xs(t),t.stateNode===null){var n=Ks,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=Ul,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},_l(t),g=i.contextType,n.context=typeof g=="object"&&g!==null?Et(g):Ks,n.state=t.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(jl(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&&Ul.enqueueReplaceState(n,n.state,null),kr(t,s,n,r),Br(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var T=t.memoizedProps,k=Ls(i,T);n.props=k;var X=n.context,te=i.contextType;g=Ks,typeof te=="object"&&te!==null&&(g=Et(te));var ne=i.getDerivedStateFromProps;te=typeof ne=="function"||typeof n.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,te||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(T||X!==g)&&qu(t,n,s,g),Qi=!1;var F=t.memoizedState;n.state=F,kr(t,s,n,r),Br(),X=t.memoizedState,T||F!==X||Qi?(typeof ne=="function"&&(jl(t,i,ne,s),X=t.memoizedState),(k=Qi||Uu(t,i,k,s,F,X,g))?(te||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=k):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,vl(e,t),g=t.memoizedProps,te=Ls(i,g),n.props=te,ne=t.pendingProps,F=n.context,X=i.contextType,k=Ks,typeof X=="object"&&X!==null&&(k=Et(X)),T=i.getDerivedStateFromProps,(X=typeof T=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(g!==ne||F!==k)&&qu(t,n,s,k),Qi=!1,F=t.memoizedState,n.state=F,kr(t,s,n,r),Br();var Z=t.memoizedState;g!==ne||F!==Z||Qi||e!==null&&e.dependencies!==null&&Ln(e.dependencies)?(typeof T=="function"&&(jl(t,i,T,s),Z=t.memoizedState),(te=Qi||Uu(t,i,te,s,F,Z,k)||e!==null&&e.dependencies!==null&&Ln(e.dependencies))?(X||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,Z,k),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,Z,k)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||g===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=Z),n.props=s,n.state=Z,n.context=k,s=te):(typeof n.componentDidUpdate!="function"||g===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,Zn(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=Rs(t,e.child,null,r),t.child=Rs(t,null,i,r)):wt(e,t,i,r),t.memoizedState=n.state,e=t.child):e=ki(e,t,r),e}function th(e,t,i,s){return Es(),t.flags|=256,wt(e,t,i,s),t.child}var Yl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kl(e){return{baseLanes:e,cachePool:Kc()}}function Vl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Kt),e}function ih(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:(ct.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(r?es(t):ts(),(e=it)?(e=hf(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wi!==null?{id:di,overflow:_i}:null,retryLane:536870912,hydrationErrors:null},i=Hc(e),i.return=t,t.child=i,Ct=t,it=null)):e=null,e===null)throw Pi(t);return To(e)?t.lanes=32:t.lanes=536870912,null}var T=s.children;return s=s.fallback,r?(ts(),r=t.mode,T=Qn({mode:"hidden",children:T},r),s=Cs(s,r,i,null),T.return=t,s.return=t,T.sibling=s,t.child=T,s=t.child,s.memoizedState=Kl(i),s.childLanes=Vl(e,g,i),t.memoizedState=Yl,Ur(null,s)):(es(t),Xl(t,T))}var k=e.memoizedState;if(k!==null&&(T=k.dehydrated,T!==null)){if(n)t.flags&256?(es(t),t.flags&=-257,t=Wl(e,t,i)):t.memoizedState!==null?(ts(),t.child=e.child,t.flags|=128,t=null):(ts(),T=s.fallback,r=t.mode,s=Qn({mode:"visible",children:s.children},r),T=Cs(T,r,i,null),T.flags|=2,s.return=t,T.return=t,s.sibling=T,t.child=s,Rs(t,e.child,null,i),s=t.child,s.memoizedState=Kl(i),s.childLanes=Vl(e,g,i),t.memoizedState=Yl,t=Ur(null,s));else if(es(t),To(T)){if(g=T.nextSibling&&T.nextSibling.dataset,g)var X=g.dgst;g=X,s=Error(G(419)),s.stack="",s.digest=g,Ar({value:s,source:null,stack:null}),t=Wl(e,t,i)}else if(_t||Fs(e,t,i,!1),g=(i&e.childLanes)!==0,_t||g){if(g=Qe,g!==null&&(s=fn(g,i),s!==0&&s!==k.retryLane))throw k.retryLane=s,bs(e,s),jt(g,e,s),Il;Ao(T)||aa(),t=Wl(e,t,i)}else Ao(T)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,it=ti(T.nextSibling),Ct=t,Ne=!0,Fi=null,Jt=!1,e!==null&&jc(t,e),t=Xl(t,s.children),t.flags|=4096);return t}return r?(ts(),T=s.fallback,r=t.mode,k=e.child,X=k.sibling,s=Ti(k,{mode:"hidden",children:s.children}),s.subtreeFlags=k.subtreeFlags&65011712,X!==null?T=Ti(X,T):(T=Cs(T,r,i,null),T.flags|=2),T.return=t,s.return=t,s.sibling=T,t.child=s,Ur(null,s),s=t.child,T=e.child.memoizedState,T===null?T=Kl(i):(r=T.cachePool,r!==null?(k=ft._currentValue,r=r.parent!==k?{parent:k,pool:k}:r):r=Kc(),T={baseLanes:T.baseLanes|i,cachePool:r}),s.memoizedState=T,s.childLanes=Vl(e,g,i),t.memoizedState=Yl,Ur(e.child,s)):(es(t),i=e.child,e=i.sibling,i=Ti(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 Xl(e,t){return t=Qn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Qn(e,t){return e=qt(22,e,null,t),e.lanes=0,e}function Wl(e,t,i){return Rs(t,e.child,null,i),e=Xl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sh(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),ol(e.return,t,i)}function Fl(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 rh(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var g=ct.current,T=(g&2)!==0;if(T?(g=g&1|2,t.flags|=128):g&=1,K(ct,g),wt(e,t,s,i),s=Ne?Dr:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sh(e,i,t);else if(e.tag===19)sh(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&&Un(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),Fl(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&&Un(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}Fl(t,!0,i,null,n,s);break;case"together":Fl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function ki(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),rs|=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=Ti(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Ti(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Pl(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ln(e)))}function n_(e,t,i){switch(t.tag){case 3:R(t,t.stateNode.containerInfo),Zi(t,ft,e.memoizedState.cache),Es();break;case 27:case 5:le(t);break;case 4:R(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,yl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(es(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ih(e,t,i):(es(t),e=ki(e,t,i),e!==null?e.sibling:null);es(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 rh(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),K(ct,ct.current),s)break;return null;case 22:return t.lanes=0,Zu(e,t,i,t.pendingProps);case 24:Zi(t,ft,e.memoizedState.cache)}return ki(e,t,i)}function nh(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)_t=!0;else{if(!Pl(e,i)&&(t.flags&128)===0)return _t=!1,n_(e,t,i);_t=(e.flags&131072)!==0}else _t=!1,Ne&&(t.flags&1048576)!==0&&zc(t,Dr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=As(t.elementType),t.type=e,typeof e=="function")el(e)?(s=Ls(e,s),t.tag=1,t=eh(null,t,e,s,i)):(t.tag=0,t=Gl(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=Wu(null,t,e,s,i);break e}else if(r===E){t.tag=14,t=Fu(null,t,e,s,i);break e}}throw t=P(e)||e,Error(G(306,t,""))}}return t;case 0:return Gl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Ls(s,t.pendingProps),eh(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,vl(e,t),kr(t,s,null,i);var g=t.memoizedState;if(s=g.cache,Zi(t,ft,s),s!==n.cache&&cl(t,[ft],i,!0),Br(),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=th(e,t,s,i);break e}else if(s!==r){r=Zt(Error(G(424)),t),Ar(r),t=th(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=ti(e.firstChild),Ct=t,Ne=!0,Fi=null,Jt=!0,i=Zc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Es(),s===r){t=ki(e,t,i);break e}wt(e,t,s,i)}t=t.child}return t;case 26:return Zn(e,t),e===null?(i=gf(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ne||(i=t.type,e=t.pendingProps,s=da(ue.current).createElement(i),s[ye]=t,s[we]=e,xt(s,i,e),je(s),t.stateNode=s):t.memoizedState=gf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&Ne&&(s=t.stateNode=_f(t.type,t.pendingProps,ue.current),Ct=t,Jt=!0,r=it,cs(t.type)?(Ro=r,it=ti(s.firstChild)):it=r),wt(e,t,t.pendingProps.children,i),Zn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((r=s=it)&&(s=H_(s,t.type,t.pendingProps,Jt),s!==null?(t.stateNode=s,Ct=t,it=ti(s.firstChild),Jt=!1,r=!0):r=!1),r||Pi(t)),le(t),r=t.type,n=t.pendingProps,g=e!==null?e.memoizedProps:null,s=n.children,wo(r,n)?s=null:g!==null&&wo(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=Cl(e,t,Zd,null,null,i),en._currentValue=r),Zn(e,t),wt(e,t,s,i),t.child;case 6:return e===null&&Ne&&((e=i=it)&&(i=N_(i,t.pendingProps,Jt),i!==null?(t.stateNode=i,Ct=t,it=null,e=!0):e=!1),e||Pi(t)),null;case 13:return ih(e,t,i);case 4:return R(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Rs(t,null,s,i):wt(e,t,s,i),t.child;case 11:return Wu(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,Zi(t,t.type,s.value),wt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,xs(t),r=Et(r),s=s(r),t.flags|=1,wt(e,t,s,i),t.child;case 14:return Fu(e,t,t.type,t.pendingProps,i);case 15:return Pu(e,t,t.type,t.pendingProps,i);case 19:return rh(e,t,i);case 31:return r_(e,t,i);case 22:return Zu(e,t,i,t.pendingProps);case 24:return xs(t),s=Et(ft),e===null?(r=fl(),r===null&&(r=Qe,n=ul(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},_l(t),Zi(t,ft,r)):((e.lanes&i)!==0&&(vl(e,t),kr(t,null,null,i),Br()),r=e.memoizedState,n=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Zi(t,ft,s)):(s=n.cache,Zi(t,ft,s),s!==r.cache&&cl(t,[ft],i,!0))),wt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(G(156,t.tag))}function Hi(e){e.flags|=4}function Zl(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(Oh())e.flags|=8192;else throw Ts=Hn,dl}else e.flags&=-16777217}function ah(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cf(t))if(Oh())e.flags|=8192;else throw Ts=Hn,dl}function $n(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?cn():536870912,e.lanes|=t,ar|=t)}function qr(e,t){if(!Ne)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 a_(e,t,i){var s=t.pendingProps;switch(rl(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),Li(ft),$(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ws(t)?Hi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,al())),st(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(Hi(t),n!==null?(st(t),ah(t,n)):(st(t),Zl(t,r,null,s,i))):n?n!==e.memoizedState?(Hi(t),st(t),ah(t,n)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Hi(t),st(t),Zl(t,r,e,s,i)),null;case 27:if(ve(t),i=ue.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Hi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return st(t),null}e=Q.current,Ws(t)?Uc(t):(e=_f(r,s,i),t.stateNode=e,Hi(t))}return st(t),null;case 5:if(ve(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Hi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return st(t),null}if(n=Q.current,Ws(t))Uc(t);else{var g=da(ue.current);switch(n){case 1:n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=g.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?g.createElement("select",{is:s.is}):g.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?g.createElement(r,{is:s.is}):g.createElement(r)}}n[ye]=t,n[we]=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&&Hi(t)}}return st(t),Zl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Hi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(G(166));if(e=ue.current,Ws(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[ye]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||sf(e.nodeValue,i)),e||Pi(t,!0)}else e=da(e).createTextNode(s),e[ye]=t,t.stateNode=e}return st(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ws(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[ye]=t}else Es(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else i=al(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Gt(t),t):(Gt(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=Ws(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[ye]=t}else Es(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),r=!1}else r=al(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Gt(t),t):(Gt(t),null)}return Gt(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),$n(t,t.updateQueue),st(t),null);case 4:return $(),e===null&&So(t.stateNode.containerInfo),st(t),null;case 10:return Li(t.type),st(t),null;case 19:if(L(ct),s=t.memoizedState,s===null)return st(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)qr(s,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=Un(e),n!==null){for(t.flags|=128,qr(s,!1),e=n.updateQueue,t.updateQueue=e,$n(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)kc(i,e),i=i.sibling;return K(ct,ct.current&1|2),Ne&&Ri(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&$e()>sa&&(t.flags|=128,r=!0,qr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Un(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,$n(t,e),qr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Ne)return st(t),null}else 2*$e()-s.renderingStartTime>sa&&i!==536870912&&(t.flags|=128,r=!0,qr(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=$e(),e.sibling=null,i=ct.current,K(ct,r?i&1|2:i&1),Ne&&Ri(t,s.treeForkCount),e):(st(t),null);case 22:case 23:return Gt(t),Sl(),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&&$n(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(Ds),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Li(ft),st(t),null;case 25:return null;case 30:return null}throw Error(G(156,t.tag))}function l_(e,t){switch(rl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Li(ft),$(),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(Gt(t),t.alternate===null)throw Error(G(340));Es()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Gt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));Es()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(ct),null;case 4:return $(),null;case 10:return Li(t.type),null;case 22:case 23:return Gt(t),Sl(),e!==null&&L(Ds),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Li(ft),null;case 25:return null;default:return null}}function lh(e,t){switch(rl(t),t.tag){case 3:Li(ft),$();break;case 26:case 27:case 5:ve(t);break;case 4:$();break;case 31:t.memoizedState!==null&&Gt(t);break;case 13:Gt(t);break;case 19:L(ct);break;case 10:Li(t.type);break;case 22:case 23:Gt(t),Sl(),e!==null&&L(Ds);break;case 24:Li(ft)}}function Ir(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 is(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 k=i,X=T;try{X()}catch(te){We(r,k,te)}}}s=s.next}while(s!==n)}}catch(te){We(t,t.return,te)}}function oh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{$c(t,i)}catch(s){We(e,e.return,s)}}}function ch(e,t,i){i.props=Ls(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){We(e,t,s)}}function Gr(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 vi(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 uh(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 Ql(e,t,i){try{var s=e.stateNode;R_(s,e.type,i,t),s[we]=t}catch(r){We(e,e.return,r)}}function hh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cs(e.type)||e.tag===4}function $l(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hh(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&&cs(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 Jl(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=Di));else if(s!==4&&(s===27&&cs(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Jl(e,t,i),e=e.sibling;e!==null;)Jl(e,t,i),e=e.sibling}function Jn(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&&cs(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Jn(e,t,i),e=e.sibling;e!==null;)Jn(e,t,i),e=e.sibling}function fh(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[ye]=e,t[we]=i}catch(n){We(e,e.return,n)}}var Ni=!1,vt=!1,eo=!1,dh=typeof WeakSet=="function"?WeakSet:Set,yt=null;function o_(e,t){if(e=e.containerInfo,Co=ya,e=xc(e),Wa(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,k=-1,X=0,te=0,ne=e,F=null;t:for(;;){for(var Z;ne!==i||r!==0&&ne.nodeType!==3||(T=g+r),ne!==n||s!==0&&ne.nodeType!==3||(k=g+s),ne.nodeType===3&&(g+=ne.nodeValue.length),(Z=ne.firstChild)!==null;)F=ne,ne=Z;for(;;){if(ne===e)break t;if(F===i&&++X===r&&(T=g),F===n&&++te===s&&(k=g),(Z=ne.nextSibling)!==null)break;ne=F,F=ne.parentNode}ne=Z}i=T===-1||k===-1?null:{start:T,end:k}}else i=null}i=i||{start:0,end:0}}else i=null;for(Eo={focusedElem:e,selectionRange:i},ya=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,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 me=Ls(i.type,r);e=s.getSnapshotBeforeUpdate(me,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){We(i,i.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Do(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Do(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,yt=e;break}yt=t.return}}function _h(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:ji(e,i),s&4&&Ir(5,i);break;case 1:if(ji(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(g){We(i,i.return,g)}else{var r=Ls(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){We(i,i.return,g)}}s&64&&oh(i),s&512&&Gr(i,i.return);break;case 3:if(ji(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{$c(e,t)}catch(g){We(i,i.return,g)}}break;case 27:t===null&&s&4&&fh(i);case 26:case 5:ji(e,i),t===null&&s&4&&uh(i),s&512&&Gr(i,i.return);break;case 12:ji(e,i);break;case 31:ji(e,i),s&4&&gh(e,i);break;case 13:ji(e,i),s&4&&ph(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=g_.bind(null,i),z_(e,i))));break;case 22:if(s=i.memoizedState!==null||Ni,!s){t=t!==null&&t.memoizedState!==null||vt,r=Ni;var n=vt;Ni=s,(vt=t)&&!n?Ui(e,i,(i.subtreeFlags&8772)!==0):ji(e,i),Ni=r,vt=n}break;case 30:break;default:ji(e,i)}}function vh(e){var t=e.alternate;t!==null&&(e.alternate=null,vh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(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 nt=null,kt=!1;function zi(e,t,i){for(i=i.child;i!==null;)mh(e,t,i),i=i.sibling}function mh(e,t,i){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(ht,i)}catch{}switch(i.tag){case 26:vt||vi(i,t),zi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:vt||vi(i,t);var s=nt,r=kt;cs(i.type)&&(nt=i.stateNode,kt=!1),zi(e,t,i),Qr(i.stateNode),nt=s,kt=r;break;case 5:vt||vi(i,t);case 6:if(s=nt,r=kt,nt=null,zi(e,t,i),nt=s,kt=r,nt!==null)if(kt)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(i.stateNode)}catch(n){We(i,t,n)}else try{nt.removeChild(i.stateNode)}catch(n){We(i,t,n)}break;case 18:nt!==null&&(kt?(e=nt,cf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),_r(e)):cf(nt,i.stateNode));break;case 4:s=nt,r=kt,nt=i.stateNode.containerInfo,kt=!0,zi(e,t,i),nt=s,kt=r;break;case 0:case 11:case 14:case 15:is(2,i,t),vt||is(4,i,t),zi(e,t,i);break;case 1:vt||(vi(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&ch(i,t,s)),zi(e,t,i);break;case 21:zi(e,t,i);break;case 22:vt=(s=vt)||i.memoizedState!==null,zi(e,t,i),vt=s;break;default:zi(e,t,i)}}function gh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{_r(e)}catch(i){We(t,t.return,i)}}}function ph(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{_r(e)}catch(i){We(t,t.return,i)}}function c_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new dh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new dh),t;default:throw Error(G(435,e.tag))}}function ea(e,t){var i=c_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=p_.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(cs(T.type)){nt=T.stateNode,kt=!1;break e}break;case 5:nt=T.stateNode,kt=!1;break e;case 3:case 4:nt=T.stateNode.containerInfo,kt=!0;break e}T=T.return}if(nt===null)throw Error(G(160));mh(n,g,r),nt=null,kt=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sh(t,e),t=t.sibling}var ci=null;function Sh(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&&(is(3,e,e.return),Ir(3,e),is(5,e,e.return));break;case 1:Ht(t,e),Nt(e),s&512&&(vt||i===null||vi(i,i.return)),s&64&&Ni&&(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=ci;if(Ht(t,e),Nt(e),s&512&&(vt||i===null||vi(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[Xt]||n[ye]||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[ye]=e,je(n),s=n;break e;case"link":var g=yf("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=yf("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[ye]=e,je(n),s=n}e.stateNode=s}else bf(r,e.type,e.stateNode);else e.stateNode=Sf(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?bf(r,e.type,e.stateNode):Sf(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ql(e,e.memoizedProps,i.memoizedProps)}break;case 27:Ht(t,e),Nt(e),s&512&&(vt||i===null||vi(i,i.return)),i!==null&&s&4&&Ql(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Ht(t,e),Nt(e),s&512&&(vt||i===null||vi(i,i.return)),e.flags&32){r=e.stateNode;try{zs(r,"")}catch(me){We(e,e.return,me)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Ql(e,r,i!==null?i.memoizedProps:r)),s&1024&&(eo=!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(me){We(e,e.return,me)}}break;case 3:if(ma=null,r=ci,ci=_a(t.containerInfo),Ht(t,e),ci=r,Nt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{_r(t.containerInfo)}catch(me){We(e,e.return,me)}eo&&(eo=!1,yh(e));break;case 4:s=ci,ci=_a(e.stateNode.containerInfo),Ht(t,e),Nt(e),ci=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,ea(e,s)));break;case 13:Ht(t,e),Nt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ia=$e()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ea(e,s)));break;case 22:r=e.memoizedState!==null;var k=i!==null&&i.memoizedState!==null,X=Ni,te=vt;if(Ni=X||r,vt=te||k,Ht(t,e),vt=te,Ni=X,Nt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||k||Ni||vt||Os(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){k=i=t;try{if(n=k.stateNode,r)g=n.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{T=k.stateNode;var ne=k.memoizedProps.style,F=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;T.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(me){We(k,k.return,me)}}}else if(t.tag===6){if(i===null){k=t;try{k.stateNode.nodeValue=r?"":k.memoizedProps}catch(me){We(k,k.return,me)}}}else if(t.tag===18){if(i===null){k=t;try{var Z=k.stateNode;r?uf(Z,!0):uf(k.stateNode,!1)}catch(me){We(k,k.return,me)}}}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,ea(e,i))));break;case 19:Ht(t,e),Nt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ea(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(hh(s)){i=s;break}s=s.return}if(i==null)throw Error(G(160));switch(i.tag){case 27:var r=i.stateNode,n=$l(e);Jn(e,n,r);break;case 5:var g=i.stateNode;i.flags&32&&(zs(g,""),i.flags&=-33);var T=$l(e);Jn(e,T,g);break;case 3:case 4:var k=i.stateNode.containerInfo,X=$l(e);Jl(e,X,k);break;default:throw Error(G(161))}}catch(te){We(e,e.return,te)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ji(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_h(e,t.alternate,t),t=t.sibling}function Os(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:is(4,t,t.return),Os(t);break;case 1:vi(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&ch(t,t.return,i),Os(t);break;case 27:Qr(t.stateNode);case 26:case 5:vi(t,t.return),Os(t);break;case 22:t.memoizedState===null&&Os(t);break;case 30:Os(t);break;default:Os(t)}e=e.sibling}}function Ui(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:Ui(r,n,i),Ir(4,n);break;case 1:if(Ui(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 k=r.shared.hiddenCallbacks;if(k!==null)for(r.shared.hiddenCallbacks=null,r=0;r<k.length;r++)Qc(k[r],T)}catch(X){We(s,s.return,X)}}i&&g&64&&oh(n),Gr(n,n.return);break;case 27:fh(n);case 26:case 5:Ui(r,n,i),i&&s===null&&g&4&&uh(n),Gr(n,n.return);break;case 12:Ui(r,n,i);break;case 31:Ui(r,n,i),i&&g&4&&gh(r,n);break;case 13:Ui(r,n,i),i&&g&4&&ph(r,n);break;case 22:n.memoizedState===null&&Ui(r,n,i),Gr(n,n.return);break;case 30:break;default:Ui(r,n,i)}t=t.sibling}}function to(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&&Tr(i))}function io(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Tr(e))}function ui(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bh(e,t,i,s),t=t.sibling}function bh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:ui(e,t,i,s),r&2048&&Ir(9,t);break;case 1:ui(e,t,i,s);break;case 3:ui(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&&Tr(e)));break;case 12:if(r&2048){ui(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(k){We(t,t.return,k)}}else ui(e,t,i,s);break;case 31:ui(e,t,i,s);break;case 13:ui(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,g=t.alternate,t.memoizedState!==null?n._visibility&2?ui(e,t,i,s):Yr(e,t):n._visibility&2?ui(e,t,i,s):(n._visibility|=2,sr(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&to(g,t);break;case 24:ui(e,t,i,s),r&2048&&io(t.alternate,t);break;default:ui(e,t,i,s)}}function sr(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,k=s,X=g.flags;switch(g.tag){case 0:case 11:case 15:sr(n,g,T,k,r),Ir(8,g);break;case 23:break;case 22:var te=g.stateNode;g.memoizedState!==null?te._visibility&2?sr(n,g,T,k,r):Yr(n,g):(te._visibility|=2,sr(n,g,T,k,r)),r&&X&2048&&to(g.alternate,g);break;case 24:sr(n,g,T,k,r),r&&X&2048&&io(g.alternate,g);break;default:sr(n,g,T,k,r)}t=t.sibling}}function Yr(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:Yr(i,s),r&2048&&to(s.alternate,s);break;case 24:Yr(i,s),r&2048&&io(s.alternate,s);break;default:Yr(i,s)}t=t.sibling}}var Kr=8192;function rr(e,t,i){if(e.subtreeFlags&Kr)for(e=e.child;e!==null;)Ch(e,t,i),e=e.sibling}function Ch(e,t,i){switch(e.tag){case 26:rr(e,t,i),e.flags&Kr&&e.memoizedState!==null&&P_(i,ci,e.memoizedState,e.memoizedProps);break;case 5:rr(e,t,i);break;case 3:case 4:var s=ci;ci=_a(e.stateNode.containerInfo),rr(e,t,i),ci=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Kr,Kr=16777216,rr(e,t,i),Kr=s):rr(e,t,i));break;default:rr(e,t,i)}}function Eh(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 Vr(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];yt=s,xh(s,e)}Eh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wh(e),e=e.sibling}function wh(e){switch(e.tag){case 0:case 11:case 15:Vr(e),e.flags&2048&&is(9,e,e.return);break;case 3:Vr(e);break;case 12:Vr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ta(e)):Vr(e);break;default:Vr(e)}}function ta(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];yt=s,xh(s,e)}Eh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:is(8,t,t.return),ta(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,ta(t));break;default:ta(t)}e=e.sibling}}function xh(e,t){for(;yt!==null;){var i=yt;switch(i.tag){case 0:case 11:case 15:is(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:Tr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,yt=s;else e:for(i=e;yt!==null;){s=yt;var r=s.sibling,n=s.return;if(vh(s),s===i){yt=null;break e}if(r!==null){r.return=n,yt=r;break e}yt=n}}}var u_={getCacheForType:function(e){var t=Et(ft),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Et(ft).controller.signal}},h_=typeof WeakMap=="function"?WeakMap:Map,Ge=0,Qe=null,Oe=null,ke=0,Xe=0,Yt=null,ss=!1,nr=!1,so=!1,qi=0,ot=0,rs=0,Bs=0,ro=0,Kt=0,ar=0,Xr=null,zt=null,no=!1,ia=0,Dh=0,sa=1/0,ra=null,ns=null,pt=0,as=null,lr=null,Ii=0,ao=0,lo=null,Ah=null,Wr=0,oo=null;function Vt(){return(Ge&2)!==0&&ke!==0?ke&-ke:j.T!==null?vo():ae()}function Th(){if(Kt===0)if((ke&536870912)===0||Ne){var e=yi;yi<<=1,(yi&3932160)===0&&(yi=262144),Kt=e}else Kt=536870912;return e=It.current,e!==null&&(e.flags|=32),Kt}function jt(e,t,i){(e===Qe&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(or(e,0),ls(e,ke,Kt,!1)),vs(e,i),((Ge&2)===0||e!==Qe)&&(e===Qe&&((Ge&2)===0&&(Bs|=i),ot===4&&ls(e,ke,Kt,!1)),mi(e))}function Rh(e,t,i){if((Ge&6)!==0)throw Error(G(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ki(e,t),r=s?__(e,t):uo(e,t,!0),n=s;do{if(r===0){nr&&!s&&ls(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!f_(i)){r=uo(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=Xr;var k=T.current.memoizedState.isDehydrated;if(k&&(or(T,g).flags|=256),g=uo(T,g,!1),g!==2){if(so&&!k){T.errorRecoveryDisabledLanes|=n,Bs|=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){or(e,0),ls(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:ls(s,t,Kt,!ss);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(G(329))}if((t&62914560)===t&&(r=ia+300-$e(),10<r)){if(ls(s,t,Kt,!ss),Ci(s,0,!0)!==0)break e;Ii=t,s.timeoutHandle=lf(Mh.bind(null,s,i,zt,ra,no,t,Kt,Bs,ar,ss,n,"Throttled",-0,0),r);break e}Mh(s,i,zt,ra,no,t,Kt,Bs,ar,ss,n,null,-0,0)}}break}while(!0);mi(e)}function Mh(e,t,i,s,r,n,g,T,k,X,te,ne,F,Z){if(e.timeoutHandle=-1,ne=t.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Di},Ch(t,n,ne);var me=(n&62914560)===n?ia-$e():(n&4194048)===n?Dh-$e():0;if(me=Z_(ne,me),me!==null){Ii=n,e.cancelPendingCommit=me(jh.bind(null,e,t,n,i,s,r,g,T,k,te,ne,null,F,Z)),ls(e,n,g,!X);return}}jh(e,t,n,i,s,r,g,T,k)}function f_(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(!Ut(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 ls(e,t,i,s){t&=~ro,t&=~Bs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-Tt(r),g=1<<n;s[n]=-1,r&=~g}i!==0&&vr(e,i,t)}function na(){return(Ge&6)===0?(Fr(0),!1):!0}function co(){if(Oe!==null){if(Xe===0)var e=Oe.return;else e=Oe,Mi=ws=null,xl(e),$s=null,Mr=0,e=Oe;for(;e!==null;)lh(e.alternate,e),e=e.return;Oe=null}}function or(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,O_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ii=0,co(),Qe=e,Oe=i=Ti(e.current,null),ke=t,Xe=0,Yt=null,ss=!1,nr=Ki(e,t),so=!1,ar=Kt=ro=Bs=rs=ot=0,zt=Xr=null,no=!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-Tt(s),n=1<<r;t|=e[r],s&=~n}return qi=t,Dn(),i}function Lh(e,t){Re=null,j.H=jr,t===Qs||t===kn?(t=Wc(),Xe=3):t===dl?(t=Wc(),Xe=4):Xe=t===Il?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Yt=t,Oe===null&&(ot=1,Fn(e,Zt(t,e.current)))}function Oh(){var e=It.current;return e===null?!0:(ke&4194048)===ke?ei===null:(ke&62914560)===ke||(ke&536870912)!==0?e===ei:!1}function Bh(){var e=j.H;return j.H=jr,e===null?jr:e}function kh(){var e=j.A;return j.A=u_,e}function aa(){ot=4,ss||(ke&4194048)!==ke&&It.current!==null||(nr=!0),(rs&134217727)===0&&(Bs&134217727)===0||Qe===null||ls(Qe,ke,Kt,!1)}function uo(e,t,i){var s=Ge;Ge|=2;var r=Bh(),n=kh();(Qe!==e||ke!==t)&&(ra=null,or(e,t)),t=!1;var g=ot;e:do try{if(Xe!==0&&Oe!==null){var T=Oe,k=Yt;switch(Xe){case 8:co(),g=6;break e;case 3:case 2:case 9:case 6:It.current===null&&(t=!0);var X=Xe;if(Xe=0,Yt=null,cr(e,T,k,X),i&&nr){g=0;break e}break;default:X=Xe,Xe=0,Yt=null,cr(e,T,k,X)}}d_(),g=ot;break}catch(te){Lh(e,te)}while(!0);return t&&e.shellSuspendCounter++,Mi=ws=null,Ge=s,j.H=r,j.A=n,Oe===null&&(Qe=null,ke=0,Dn()),g}function d_(){for(;Oe!==null;)Hh(Oe)}function __(e,t){var i=Ge;Ge|=2;var s=Bh(),r=kh();Qe!==e||ke!==t?(ra=null,sa=$e()+500,or(e,t)):nr=Ki(e,t);e:do try{if(Xe!==0&&Oe!==null){t=Oe;var n=Yt;t:switch(Xe){case 1:Xe=0,Yt=null,cr(e,t,n,1);break;case 2:case 9:if(Vc(n)){Xe=0,Yt=null,Nh(t);break}t=function(){Xe!==2&&Xe!==9||Qe!==e||(Xe=7),mi(e)},n.then(t,t);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Vc(n)?(Xe=0,Yt=null,Nh(t)):(Xe=0,Yt=null,cr(e,t,n,7));break;case 5:var g=null;switch(Oe.tag){case 26:g=Oe.memoizedState;case 5:case 27:var T=Oe;if(g?Cf(g):T.stateNode.complete){Xe=0,Yt=null;var k=T.sibling;if(k!==null)Oe=k;else{var X=T.return;X!==null?(Oe=X,la(X)):Oe=null}break t}}Xe=0,Yt=null,cr(e,t,n,5);break;case 6:Xe=0,Yt=null,cr(e,t,n,6);break;case 8:co(),ot=6;break e;default:throw Error(G(462))}}v_();break}catch(te){Lh(e,te)}while(!0);return Mi=ws=null,j.H=s,j.A=r,Ge=i,Oe!==null?0:(Qe=null,ke=0,Dn(),ot)}function v_(){for(;Oe!==null&&!gi();)Hh(Oe)}function Hh(e){var t=nh(e.alternate,e,qi);e.memoizedProps=e.pendingProps,t===null?la(e):Oe=t}function Nh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Ju(i,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Ju(i,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:xl(t);default:lh(i,t),t=Oe=kc(t,qi),t=nh(i,t,qi)}e.memoizedProps=e.pendingProps,t===null?la(e):Oe=t}function cr(e,t,i,s){Mi=ws=null,xl(t),$s=null,Mr=0;var r=t.return;try{if(s_(e,r,t,i,ke)){ot=1,Fn(e,Zt(i,e.current)),Oe=null;return}}catch(n){if(r!==null)throw Oe=r,n;ot=1,Fn(e,Zt(i,e.current)),Oe=null;return}t.flags&32768?(Ne||s===1?e=!0:nr||(ke&536870912)!==0?e=!1:(ss=e=!0,(s===2||s===9||s===3||s===6)&&(s=It.current,s!==null&&s.tag===13&&(s.flags|=16384))),zh(t,e)):la(t)}function la(e){var t=e;do{if((t.flags&32768)!==0){zh(t,ss);return}e=t.return;var i=a_(t.alternate,t,qi);if(i!==null){Oe=i;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);ot===0&&(ot=5)}function zh(e,t){do{var i=l_(e.alternate,e);if(i!==null){i.flags&=32767,Oe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=i}while(e!==null);ot=6,Oe=null}function jh(e,t,i,s,r,n,g,T,k){e.cancelPendingCommit=null;do oa();while(pt!==0);if((Ge&6)!==0)throw Error(G(327));if(t!==null){if(t===e.current)throw Error(G(177));if(n=t.lanes|t.childLanes,n|=$a,un(e,i,n,g,T,k),e===Qe&&(Oe=Qe=null,ke=0),lr=t,as=e,Ii=i,ao=n,lo=r,Ah=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,S_(Ot,function(){return Yh(),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=Ge,Ge|=4;try{o_(e,t,i)}finally{Ge=g,W.p=r,j.T=s}}pt=1,Uh(),qh(),Ih()}}function Uh(){if(pt===1){pt=0;var e=as,t=lr,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=Ge;Ge|=4;try{Sh(t,e);var n=Eo,g=xc(e.containerInfo),T=n.focusedElem,k=n.selectionRange;if(g!==T&&T&&T.ownerDocument&&wc(T.ownerDocument.documentElement,T)){if(k!==null&&Wa(T)){var X=k.start,te=k.end;if(te===void 0&&(te=X),"selectionStart"in T)T.selectionStart=X,T.selectionEnd=Math.min(te,T.value.length);else{var ne=T.ownerDocument||document,F=ne&&ne.defaultView||window;if(F.getSelection){var Z=F.getSelection(),me=T.textContent.length,Ee=Math.min(k.start,me),Ze=k.end===void 0?Ee:Math.min(k.end,me);!Z.extend&&Ee>Ze&&(g=Ze,Ze=Ee,Ee=g);var Y=Ec(T,Ee),U=Ec(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=ne.createRange();V.setStart(Y.node,Y.offset),Z.removeAllRanges(),Ee>Ze?(Z.addRange(V),Z.extend(U.node,U.offset)):(V.setEnd(U.node,U.offset),Z.addRange(V))}}}}for(ne=[],Z=T;Z=Z.parentNode;)Z.nodeType===1&&ne.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<ne.length;T++){var se=ne[T];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}ya=!!Co,Eo=Co=null}finally{Ge=r,W.p=s,j.T=i}}e.current=t,pt=2}}function qh(){if(pt===2){pt=0;var e=as,t=lr,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=Ge;Ge|=4;try{_h(e,t.alternate,t)}finally{Ge=r,W.p=s,j.T=i}}pt=3}}function Ih(){if(pt===4||pt===3){pt=0,mt();var e=as,t=lr,i=Ii,s=Ah;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?pt=5:(pt=0,lr=as=null,Gh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ns=null),he(i),t=t.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(ht,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}}(Ii&3)!==0&&oa(),mi(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===oo?Wr++:(Wr=0,oo=e):Wr=0,Fr(0)}}function Gh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Tr(t)))}function oa(){return Uh(),qh(),Ih(),Yh()}function Yh(){if(pt!==5)return!1;var e=as,t=ao;ao=0;var i=he(Ii),s=j.T,r=W.p;try{W.p=32>i?32:i,j.T=null,i=lo,lo=null;var n=as,g=Ii;if(pt=0,lr=as=null,Ii=0,(Ge&6)!==0)throw Error(G(331));var T=Ge;if(Ge|=4,wh(n.current),bh(n,n.current,g,i),Ge=T,Fr(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(ht,n)}catch{}return!0}finally{W.p=r,j.T=s,Gh(e,t)}}function Kh(e,t,i){t=Zt(i,t),t=ql(e.stateNode,t,2),e=Ji(e,t,2),e!==null&&(vs(e,2),mi(e))}function We(e,t,i){if(e.tag===3)Kh(e,e,i);else for(;t!==null;){if(t.tag===3){Kh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ns===null||!ns.has(s))){e=Zt(i,e),i=Vu(2),s=Ji(t,i,2),s!==null&&(Xu(i,s,t,e),vs(s,2),mi(s));break}}t=t.return}}function ho(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new h_;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)||(so=!0,r.add(i),e=m_.bind(null,e,t,i),t.then(e,e))}function m_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Qe===e&&(ke&i)===i&&(ot===4||ot===3&&(ke&62914560)===ke&&300>$e()-ia?(Ge&2)===0&&or(e,0):ro|=i,ar===ke&&(ar=0)),mi(e)}function Vh(e,t){t===0&&(t=cn()),e=bs(e,t),e!==null&&(vs(e,t),mi(e))}function g_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Vh(e,i)}function p_(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),Vh(e,i)}function S_(e,t){return Yi(e,t)}var ca=null,ur=null,fo=!1,ua=!1,_o=!1,os=0;function mi(e){e!==ur&&e.next===null&&(ur===null?ca=ur=e:ur=ur.next=e),ua=!0,fo||(fo=!0,b_())}function Fr(e,t){if(!_o&&ua){_o=!0;do for(var i=!1,s=ca;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-Tt(42|e)+1)-1,n&=r&~(g&~T),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Ph(s,n))}else n=ke,n=Ci(s,s===Qe?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||Ki(s,n)||(i=!0,Ph(s,n));s=s.next}while(i);_o=!1}}function y_(){Xh()}function Xh(){ua=fo=!1;var e=0;os!==0&&L_()&&(e=os);for(var t=$e(),i=null,s=ca;s!==null;){var r=s.next,n=Wh(s,t);n===0?(s.next=null,i===null?ca=r:i.next=r,r===null&&(ur=i)):(i=s,(e!==0||(n&3)!==0)&&(ua=!0)),s=r}pt!==0&&pt!==5||Fr(e),os!==0&&(os=0)}function Wh(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var g=31-Tt(n),T=1<<g,k=r[g];k===-1?((T&i)===0||(T&s)!==0)&&(r[g]=Ma(T,t)):k<=t&&(e.expiredLanes|=T),n&=~T}if(t=Qe,i=ke,i=Ci(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&&ni(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ki(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&ni(s),he(i)){case 2:case 8:i=hi;break;case 32:i=Ot;break;case 268435456:i=Je;break;default:i=Ot}return s=Fh.bind(null,e),i=Yi(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&ni(s),e.callbackPriority=2,e.callbackNode=null,2}function Fh(e,t){if(pt!==0&&pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(oa()&&e.callbackNode!==i)return null;var s=ke;return s=Ci(e,e===Qe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Rh(e,s,t),Wh(e,$e()),e.callbackNode!=null&&e.callbackNode===i?Fh.bind(null,e):null)}function Ph(e,t){if(oa())return null;Rh(e,t,!0)}function b_(){B_(function(){(Ge&6)!==0?Yi(ai,y_):Xh()})}function vo(){if(os===0){var e=Ps;e===0&&(e=Si,Si<<=1,(Si&261888)===0&&(Si=256)),os=e}return os}function Zh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pn(""+e)}function Qh(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 C_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Zh((r[we]||null).action),g=s.submitter;g&&(t=(t=g[we]||null)?Zh(t.formAction):g.getAttribute("formAction"),t!==null&&(n=t,g=null));var T=new Cn("action","action",null,s,r);e.push({event:T,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(os!==0){var k=g?Qh(r,g):new FormData(r);kl(i,{pending:!0,data:k,method:r.method,action:n},null,k)}}else typeof n=="function"&&(T.preventDefault(),k=g?Qh(r,g):new FormData(r),kl(i,{pending:!0,data:k,method:r.method,action:n},n,k))},currentTarget:r}]})}}for(var mo=0;mo<Qa.length;mo++){var go=Qa[mo],E_=go.toLowerCase(),w_=go[0].toUpperCase()+go.slice(1);oi(E_,"on"+w_)}oi(Tc,"onAnimationEnd"),oi(Rc,"onAnimationIteration"),oi(Mc,"onAnimationStart"),oi("dblclick","onDoubleClick"),oi("focusin","onFocus"),oi("focusout","onBlur"),oi(qd,"onTransitionRun"),oi(Id,"onTransitionStart"),oi(Gd,"onTransitionCancel"),oi(Lc,"onTransitionEnd"),wi("onMouseEnter",["mouseout","mouseover"]),wi("onMouseLeave",["mouseout","mouseover"]),wi("onPointerEnter",["pointerout","pointerover"]),wi("onPointerLeave",["pointerout","pointerover"]),Mt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Mt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Mt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Mt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Mt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Mt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pr="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(" "),x_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pr));function $h(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],k=T.instance,X=T.currentTarget;if(T=T.listener,k!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=X;try{n(r)}catch(te){xn(te)}r.currentTarget=null,n=k}else for(g=0;g<s.length;g++){if(T=s[g],k=T.instance,X=T.currentTarget,T=T.listener,k!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=X;try{n(r)}catch(te){xn(te)}r.currentTarget=null,n=k}}}}function Be(e,t){var i=t[Ye];i===void 0&&(i=t[Ye]=new Set);var s=e+"__bubble";i.has(s)||(Jh(t,e,2,!1),i.add(s))}function po(e,t,i){var s=0;t&&(s|=4),Jh(i,e,s,t)}var ha="_reactListening"+Math.random().toString(36).slice(2);function So(e){if(!e[ha]){e[ha]=!0,dn.forEach(function(i){i!=="selectionchange"&&(x_.has(i)||po(i,!1,e),po(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ha]||(t[ha]=!0,po("selectionchange",!1,t))}}function Jh(e,t,i,s){switch(Rf(t)){case 2:var r=J_;break;case 8:r=ev;break;default:r=ko}i=r.bind(null,t,i,e),r=void 0,!ja||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 yo(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 k=g.tag;if((k===3||k===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;T!==null;){if(g=li(T),g===null)return;if(k=g.tag,k===5||k===6||k===26||k===27){s=n=g;continue e}T=T.parentNode}}s=s.return}rc(function(){var X=n,te=Na(i),ne=[];e:{var F=Oc.get(e);if(F!==void 0){var Z=Cn,me=e;switch(e){case"keypress":if(yn(i)===0)break e;case"keydown":case"keyup":Z=pd;break;case"focusin":me="focus",Z=Ga;break;case"focusout":me="blur",Z=Ga;break;case"beforeblur":case"afterblur":Z=Ga;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=lc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=ad;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=bd;break;case Tc:case Rc:case Mc:Z=cd;break;case Lc:Z=Ed;break;case"scroll":case"scrollend":Z=rd;break;case"wheel":Z=xd;break;case"copy":case"cut":case"paste":Z=hd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=cc;break;case"toggle":case"beforetoggle":Z=Ad}var Ee=(t&4)!==0,Ze=!Ee&&(e==="scroll"||e==="scrollend"),Y=Ee?F!==null?F+"Capture":null:F;Ee=[];for(var U=X,V;U!==null;){var se=U;if(V=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||V===null||Y===null||(se=gr(U,Y),se!=null&&Ee.push(Zr(U,se,V))),Ze)break;U=U.return}0<Ee.length&&(F=new Z(F,me,null,i,te),ne.push({event:F,listeners:Ee}))}}if((t&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",F&&i!==Ha&&(me=i.relatedTarget||i.fromElement)&&(li(me)||me[tt]))break e;if((Z||F)&&(F=te.window===te?te:(F=te.ownerDocument)?F.defaultView||F.parentWindow:window,Z?(me=i.relatedTarget||i.toElement,Z=X,me=me?li(me):null,me!==null&&(Ze=Se(me),Ee=me.tag,me!==Ze||Ee!==5&&Ee!==27&&Ee!==6)&&(me=null)):(Z=null,me=X),Z!==me)){if(Ee=lc,se="onMouseLeave",Y="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=cc,se="onPointerLeave",Y="onPointerEnter",U="pointer"),Ze=Z==null?F:ms(Z),V=me==null?F:ms(me),F=new Ee(se,U+"leave",Z,i,te),F.target=Ze,F.relatedTarget=V,se=null,li(te)===X&&(Ee=new Ee(Y,U+"enter",me,i,te),Ee.target=V,Ee.relatedTarget=Ze,se=Ee),Ze=se,Z&&me)t:{for(Ee=D_,Y=Z,U=me,V=0,se=Y;se;se=Ee(se))V++;se=0;for(var be=U;be;be=Ee(be))se++;for(;0<V-se;)Y=Ee(Y),V--;for(;0<se-V;)U=Ee(U),se--;for(;V--;){if(Y===U||U!==null&&Y===U.alternate){Ee=Y;break t}Y=Ee(Y),U=Ee(U)}Ee=null}else Ee=null;Z!==null&&ef(ne,F,Z,Ee,!1),me!==null&&Ze!==null&&ef(ne,Ze,me,Ee,!0)}}e:{if(F=X?ms(X):window,Z=F.nodeName&&F.nodeName.toLowerCase(),Z==="select"||Z==="input"&&F.type==="file")var Ue=gc;else if(vc(F))if(pc)Ue=zd;else{Ue=Hd;var pe=kd}else Z=F.nodeName,!Z||Z.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?X&&ka(X.elementType)&&(Ue=gc):Ue=Nd;if(Ue&&(Ue=Ue(e,X))){mc(ne,Ue,i,te);break e}pe&&pe(e,F,X),e==="focusout"&&X&&F.type==="number"&&X.memoizedProps.value!=null&&Ba(F,"number",F.value)}switch(pe=X?ms(X):window,e){case"focusin":(vc(pe)||pe.contentEditable==="true")&&(Is=pe,Fa=X,xr=null);break;case"focusout":xr=Fa=Is=null;break;case"mousedown":Pa=!0;break;case"contextmenu":case"mouseup":case"dragend":Pa=!1,Dc(ne,i,te);break;case"selectionchange":if(Ud)break;case"keydown":case"keyup":Dc(ne,i,te)}var Me;if(Ka)e:{switch(e){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else qs?dc(e,i)&&(He="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(He="onCompositionStart");He&&(uc&&i.locale!=="ko"&&(qs||He!=="onCompositionStart"?He==="onCompositionEnd"&&qs&&(Me=nc()):(Xi=te,Ua="value"in Xi?Xi.value:Xi.textContent,qs=!0)),pe=fa(X,He),0<pe.length&&(He=new oc(He,e,null,i,te),ne.push({event:He,listeners:pe}),Me?He.data=Me:(Me=_c(i),Me!==null&&(He.data=Me)))),(Me=Rd?Md(e,i):Ld(e,i))&&(He=fa(X,"onBeforeInput"),0<He.length&&(pe=new oc("onBeforeInput","beforeinput",null,i,te),ne.push({event:pe,listeners:He}),pe.data=Me)),C_(ne,e,X,i,te)}$h(ne,t)})}function Zr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function fa(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=gr(e,i),r!=null&&s.unshift(Zr(e,r,n)),r=gr(e,t),r!=null&&s.push(Zr(e,r,n))),e.tag===3)return s;e=e.return}return[]}function D_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ef(e,t,i,s,r){for(var n=t._reactName,g=[];i!==null&&i!==s;){var T=i,k=T.alternate,X=T.stateNode;if(T=T.tag,k!==null&&k===s)break;T!==5&&T!==26&&T!==27||X===null||(k=X,r?(X=gr(i,n),X!=null&&g.unshift(Zr(i,X,k))):r||(X=gr(i,n),X!=null&&g.push(Zr(i,X,k)))),i=i.return}g.length!==0&&e.push({event:t,listeners:g})}var A_=/\r\n?/g,T_=/\u0000|\uFFFD/g;function tf(e){return(typeof e=="string"?e:""+e).replace(A_,`
|
|
9
|
+
`).replace(T_,"")}function sf(e,t){return t=tf(t),tf(e)===t}function Pe(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||zs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&zs(e,""+s);break;case"className":mn(e,"class",s);break;case"tabIndex":mn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":mn(e,i,s);break;case"style":ic(e,s,n);break;case"data":if(t!=="object"){mn(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=pn(""+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"&&Pe(e,t,"name",r.name,r,null),Pe(e,t,"formEncType",r.formEncType,r,null),Pe(e,t,"formMethod",r.formMethod,r,null),Pe(e,t,"formTarget",r.formTarget,r,null)):(Pe(e,t,"encType",r.encType,r,null),Pe(e,t,"method",r.method,r,null),Pe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=pn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Di);break;case"onScroll":s!=null&&Be("scroll",e);break;case"onScrollEnd":s!=null&&Be("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=pn(""+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":Be("beforetoggle",e),Be("toggle",e),vn(e,"popover",s);break;case"xlinkActuate":xi(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":xi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":xi(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":xi(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":xi(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":xi(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":xi(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":xi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":xi(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":vn(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=id.get(i)||i,vn(e,i,s))}}function bo(e,t,i,s,r,n){switch(i){case"style":ic(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"?zs(e,s):(typeof s=="number"||typeof s=="bigint")&&zs(e,""+s);break;case"onScroll":s!=null&&Be("scroll",e);break;case"onScrollEnd":s!=null&&Be("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Di);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vi.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[we]||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,""):vn(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":Be("error",e),Be("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:Pe(e,t,n,g,i,null)}}r&&Pe(e,t,"srcSet",i.srcSet,i,null),s&&Pe(e,t,"src",i.src,i,null);return;case"input":Be("invalid",e);var T=n=g=r=null,k=null,X=null;for(s in i)if(i.hasOwnProperty(s)){var te=i[s];if(te!=null)switch(s){case"name":r=te;break;case"type":g=te;break;case"checked":k=te;break;case"defaultChecked":X=te;break;case"value":n=te;break;case"defaultValue":T=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(G(137,t));break;default:Pe(e,t,s,te,i,null)}}$o(e,n,T,k,X,g,r,!1);return;case"select":Be("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:Pe(e,t,r,T,i,null)}t=n,i=g,e.multiple=!!s,t!=null?Ns(e,!!s,t,!1):i!=null&&Ns(e,!!s,i,!0);return;case"textarea":Be("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:Pe(e,t,g,T,i,null)}ec(e,s,r,n);return;case"option":for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null)&&(k==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Pe(e,t,k,s,i,null));return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(s=0;s<Pr.length;s++)Be(Pr[s],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("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:Pe(e,t,X,s,i,null)}return;default:if(ka(t)){for(te in i)i.hasOwnProperty(te)&&(s=i[te],s!==void 0&&bo(e,t,te,s,i,void 0));return}}for(T in i)i.hasOwnProperty(T)&&(s=i[T],s!=null&&Pe(e,t,T,s,i,null))}function R_(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,k=null,X=null,te=null;for(Z in i){var ne=i[Z];if(i.hasOwnProperty(Z)&&ne!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":k=ne;default:s.hasOwnProperty(Z)||Pe(e,t,Z,null,s,ne)}}for(var F in s){var Z=s[F];if(ne=i[F],s.hasOwnProperty(F)&&(Z!=null||ne!=null))switch(F){case"type":n=Z;break;case"name":r=Z;break;case"checked":X=Z;break;case"defaultChecked":te=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!==ne&&Pe(e,t,F,Z,s,ne)}}Oa(e,g,T,k,X,te,n,r);return;case"select":Z=g=T=F=null;for(n in i)if(k=i[n],i.hasOwnProperty(n)&&k!=null)switch(n){case"value":break;case"multiple":Z=k;default:s.hasOwnProperty(n)||Pe(e,t,n,null,s,k)}for(r in s)if(n=s[r],k=i[r],s.hasOwnProperty(r)&&(n!=null||k!=null))switch(r){case"value":F=n;break;case"defaultValue":T=n;break;case"multiple":g=n;default:n!==k&&Pe(e,t,r,n,s,k)}t=T,i=g,s=Z,F!=null?Ns(e,!!i,F,!1):!!s!=!!i&&(t!=null?Ns(e,!!i,t,!0):Ns(e,!!i,i?[]:"",!1));return;case"textarea":Z=F=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:Pe(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":F=r;break;case"defaultValue":Z=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(G(91));break;default:r!==n&&Pe(e,t,g,r,s,n)}Jo(e,F,Z);return;case"option":for(var me in i)F=i[me],i.hasOwnProperty(me)&&F!=null&&!s.hasOwnProperty(me)&&(me==="selected"?e.selected=!1:Pe(e,t,me,null,s,F));for(k in s)F=s[k],Z=i[k],s.hasOwnProperty(k)&&F!==Z&&(F!=null||Z!=null)&&(k==="selected"?e.selected=F&&typeof F!="function"&&typeof F!="symbol":Pe(e,t,k,F,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 Ee in i)F=i[Ee],i.hasOwnProperty(Ee)&&F!=null&&!s.hasOwnProperty(Ee)&&Pe(e,t,Ee,null,s,F);for(X in s)if(F=s[X],Z=i[X],s.hasOwnProperty(X)&&F!==Z&&(F!=null||Z!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(G(137,t));break;default:Pe(e,t,X,F,s,Z)}return;default:if(ka(t)){for(var Ze in i)F=i[Ze],i.hasOwnProperty(Ze)&&F!==void 0&&!s.hasOwnProperty(Ze)&&bo(e,t,Ze,void 0,s,F);for(te in s)F=s[te],Z=i[te],!s.hasOwnProperty(te)||F===Z||F===void 0&&Z===void 0||bo(e,t,te,F,s,Z);return}}for(var Y in i)F=i[Y],i.hasOwnProperty(Y)&&F!=null&&!s.hasOwnProperty(Y)&&Pe(e,t,Y,null,s,F);for(ne in s)F=s[ne],Z=i[ne],!s.hasOwnProperty(ne)||F===Z||F==null&&Z==null||Pe(e,t,ne,F,s,Z)}function rf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function M_(){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&&rf(g)){for(g=0,T=r.responseEnd,s+=1;s<i.length;s++){var k=i[s],X=k.startTime;if(X>T)break;var te=k.transferSize,ne=k.initiatorType;te&&rf(ne)&&(k=k.responseEnd,g+=te*(k<T?1:(T-X)/(k-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 Co=null,Eo=null;function da(e){return e.nodeType===9?e:e.ownerDocument}function nf(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 af(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 wo(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 xo=null;function L_(){var e=window.event;return e&&e.type==="popstate"?e===xo?!1:(xo=e,!0):(xo=null,!1)}var lf=typeof setTimeout=="function"?setTimeout:void 0,O_=typeof clearTimeout=="function"?clearTimeout:void 0,of=typeof Promise=="function"?Promise:void 0,B_=typeof queueMicrotask=="function"?queueMicrotask:typeof of<"u"?function(e){return of.resolve(null).then(e).catch(k_)}:lf;function k_(e){setTimeout(function(){throw e})}function cs(e){return e==="head"}function cf(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),_r(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Qr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Qr(i);for(var n=i.firstChild;n;){var g=n.nextSibling,T=n.nodeName;n[Xt]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=g}}else i==="body"&&Qr(e.ownerDocument.body);i=r}while(i);_r(t)}function uf(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 Do(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":Do(i),bt(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function H_(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[Xt])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=ti(e.nextSibling),e===null)break}return null}function N_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=ti(e.nextSibling),e===null))return null;return e}function hf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ti(e.nextSibling),e===null))return null;return e}function Ao(e){return e.data==="$?"||e.data==="$~"}function To(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function z_(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function ti(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 Ro=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return ti(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function df(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 _f(e,t,i){switch(t=da(i),e){case"html":if(e=t.documentElement,!e)throw Error(G(452));return e;case"head":if(e=t.head,!e)throw Error(G(453));return e;case"body":if(e=t.body,!e)throw Error(G(454));return e;default:throw Error(G(451))}}function Qr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var ii=new Map,vf=new Set;function _a(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Gi=W.d;W.d={f:j_,r:U_,D:q_,C:I_,L:G_,m:Y_,X:V_,S:K_,M:X_};function j_(){var e=Gi.f(),t=na();return e||t}function U_(e){var t=Rt(e);t!==null&&t.tag===5&&t.type==="form"?Lu(t):Gi.r(e)}var hr=typeof document>"u"?null:document;function mf(e,t,i){var s=hr;if(s&&typeof t=="string"&&t){var r=Ft(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),vf.has(r)||(vf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),xt(t,"link",e),je(t),s.head.appendChild(t)))}}function q_(e){Gi.D(e),mf("dns-prefetch",e,null)}function I_(e,t){Gi.C(e,t),mf("preconnect",e,t)}function G_(e,t,i){Gi.L(e,t,i);var s=hr;if(s&&e&&t){var r='link[rel="preload"][as="'+Ft(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ft(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ft(i.imageSizes)+'"]')):r+='[href="'+Ft(e)+'"]';var n=r;switch(t){case"style":n=fr(e);break;case"script":n=dr(e)}ii.has(n)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),ii.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector($r(n))||t==="script"&&s.querySelector(Jr(n))||(t=s.createElement("link"),xt(t,"link",e),je(t),s.head.appendChild(t)))}}function Y_(e,t){Gi.m(e,t);var i=hr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ft(s)+'"][href="'+Ft(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=dr(e)}if(!ii.has(n)&&(e=u({rel:"modulepreload",href:e},t),ii.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Jr(n)))return}s=i.createElement("link"),xt(s,"link",e),je(s),i.head.appendChild(s)}}}function K_(e,t,i){Gi.S(e,t,i);var s=hr;if(s&&e){var r=gs(s).hoistableStyles,n=fr(e);t=t||"default";var g=r.get(n);if(!g){var T={loading:0,preload:null};if(g=s.querySelector($r(n)))T.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=ii.get(n))&&Mo(e,i);var k=g=s.createElement("link");je(k),xt(k,"link",e),k._p=new Promise(function(X,te){k.onload=X,k.onerror=te}),k.addEventListener("load",function(){T.loading|=1}),k.addEventListener("error",function(){T.loading|=2}),T.loading|=4,va(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:T},r.set(n,g)}}}function V_(e,t){Gi.X(e,t);var i=hr;if(i&&e){var s=gs(i).hoistableScripts,r=dr(e),n=s.get(r);n||(n=i.querySelector(Jr(r)),n||(e=u({src:e,async:!0},t),(t=ii.get(r))&&Lo(e,t),n=i.createElement("script"),je(n),xt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function X_(e,t){Gi.M(e,t);var i=hr;if(i&&e){var s=gs(i).hoistableScripts,r=dr(e),n=s.get(r);n||(n=i.querySelector(Jr(r)),n||(e=u({src:e,async:!0,type:"module"},t),(t=ii.get(r))&&Lo(e,t),n=i.createElement("script"),je(n),xt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function gf(e,t,i,s){var r=(r=ue.current)?_a(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=fr(i.href),i=gs(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=fr(i.href);var n=gs(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($r(e)))&&!n._p&&(g.instance=n,g.state.loading=5),ii.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},ii.set(e,i),n||W_(r,e,i,g.state))),t&&s===null)throw Error(G(528,""));return g}if(t&&s!==null)throw Error(G(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=dr(i),i=gs(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 fr(e){return'href="'+Ft(e)+'"'}function $r(e){return'link[rel="stylesheet"]['+e+"]"}function pf(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function W_(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),xt(t,"link",i),je(t),e.head.appendChild(t))}function dr(e){return'[src="'+Ft(e)+'"]'}function Jr(e){return"script[async]"+e}function Sf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ft(i.href)+'"]');if(s)return t.instance=s,je(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"),je(s),xt(s,"style",r),va(s,i.precedence,e),t.instance=s;case"stylesheet":r=fr(i.href);var n=e.querySelector($r(r));if(n)return t.state.loading|=4,t.instance=n,je(n),n;s=pf(i),(r=ii.get(r))&&Mo(s,r),n=(e.ownerDocument||e).createElement("link"),je(n);var g=n;return g._p=new Promise(function(T,k){g.onload=T,g.onerror=k}),xt(n,"link",s),t.state.loading|=4,va(n,i.precedence,e),t.instance=n;case"script":return n=dr(i.src),(r=e.querySelector(Jr(n)))?(t.instance=r,je(r),r):(s=i,(r=ii.get(n))&&(s=u({},i),Lo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),je(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,va(s,i.precedence,e));return t.instance}function va(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 Mo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ma=null;function yf(e,t,i){if(ma===null){var s=new Map,r=ma=new Map;r.set(i,s)}else r=ma,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[Xt]||n[ye]||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 bf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function F_(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 Cf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function P_(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=fr(s.href),n=t.querySelector($r(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ga.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,je(n);return}n=t.ownerDocument||t,s=pf(s),(r=ii.get(r))&&Mo(s,r),n=n.createElement("link"),je(n);var g=n;g._p=new Promise(function(T,k){g.onload=T,g.onerror=k}),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=ga.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Oo=0;function Z_(e,t){return e.stylesheets&&e.count===0&&Sa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Sa(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&Oo===0&&(Oo=62500*M_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Sa(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>Oo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function ga(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pa=null;function Sa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pa=new Map,t.forEach(Q_,e),pa=null,ga.call(e))}function Q_(e,t){if(!(t.state.loading&4)){var i=pa.get(e);if(i)var s=i.get(null);else{i=new Map,pa.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=ga.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 en={$$typeof:l,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function $_(e,t,i,s,r,n,g,T,k){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Hs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hs(0),this.hiddenUpdates=Hs(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function Ef(e,t,i,s,r,n,g,T,k,X,te,ne){return e=new $_(e,t,i,g,k,X,te,ne,T),t=1,n===!0&&(t|=24),n=qt(3,null,null,t),e.current=n,n.stateNode=e,t=ul(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},_l(n),e}function wf(e){return e?(e=Ks,e):Ks}function xf(e,t,i,s,r,n){r=wf(r),s.context===null?s.context=r:s.pendingContext=r,s=$i(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=Ji(e,s,t),i!==null&&(jt(i,e,t),Or(i,e,t))}function Df(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Bo(e,t){Df(e,t),(e=e.alternate)&&Df(e,t)}function Af(e){if(e.tag===13||e.tag===31){var t=bs(e,67108864);t!==null&&jt(t,e,67108864),Bo(e,67108864)}}function Tf(e){if(e.tag===13||e.tag===31){var t=Vt();t=N(t);var i=bs(e,t);i!==null&&jt(i,e,t),Bo(e,t)}}var ya=!0;function J_(e,t,i,s){var r=j.T;j.T=null;var n=W.p;try{W.p=2,ko(e,t,i,s)}finally{W.p=n,j.T=r}}function ev(e,t,i,s){var r=j.T;j.T=null;var n=W.p;try{W.p=8,ko(e,t,i,s)}finally{W.p=n,j.T=r}}function ko(e,t,i,s){if(ya){var r=Ho(s);if(r===null)yo(e,t,s,ba,i),Mf(e,s);else if(iv(r,e,t,i,s))s.stopPropagation();else if(Mf(e,s),t&4&&-1<tv.indexOf(e)){for(;r!==null;){var n=Rt(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 k=1<<31-Tt(g);T.entanglements[1]|=k,g&=~k}mi(n),(Ge&6)===0&&(sa=$e()+500,Fr(0))}}break;case 31:case 13:T=bs(n,2),T!==null&&jt(T,n,2),na(),Bo(n,2)}if(n=Ho(s),n===null&&yo(e,t,s,ba,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else yo(e,t,s,null,i)}}function Ho(e){return e=Na(e),No(e)}var ba=null;function No(e){if(ba=null,e=li(e),e!==null){var t=Se(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=ee(t),e!==null)return e;e=null}else if(i===31){if(e=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 ba=e,null}function Rf(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(At()){case ai:return 2;case hi:return 8;case Ot:case pi:return 32;case Je:return 268435456;default:return 32}default:return 32}}var zo=!1,us=null,hs=null,fs=null,tn=new Map,sn=new Map,ds=[],tv="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 Mf(e,t){switch(e){case"focusin":case"focusout":us=null;break;case"dragenter":case"dragleave":hs=null;break;case"mouseover":case"mouseout":fs=null;break;case"pointerover":case"pointerout":tn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sn.delete(t.pointerId)}}function rn(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=Rt(t),t!==null&&Af(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function iv(e,t,i,s,r){switch(t){case"focusin":return us=rn(us,e,t,i,s,r),!0;case"dragenter":return hs=rn(hs,e,t,i,s,r),!0;case"mouseover":return fs=rn(fs,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return tn.set(n,rn(tn.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,sn.set(n,rn(sn.get(n)||null,e,t,i,s,r)),!0}return!1}function Lf(e){var t=li(e.target);if(t!==null){var i=Se(t);if(i!==null){if(t=i.tag,t===13){if(t=ee(i),t!==null){e.blockedOn=t,_e(e.priority,function(){Tf(i)});return}}else if(t===31){if(t=f(i),t!==null){e.blockedOn=t,_e(e.priority,function(){Tf(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 Ca(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Ho(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Ha=s,i.target.dispatchEvent(s),Ha=null}else return t=Rt(i),t!==null&&Af(t),e.blockedOn=i,!1;t.shift()}return!0}function Of(e,t,i){Ca(e)&&i.delete(t)}function sv(){zo=!1,us!==null&&Ca(us)&&(us=null),hs!==null&&Ca(hs)&&(hs=null),fs!==null&&Ca(fs)&&(fs=null),tn.forEach(Of),sn.forEach(Of)}function Ea(e,t){e.blockedOn===t&&(e.blockedOn=null,zo||(zo=!0,ie.unstable_scheduleCallback(ie.unstable_NormalPriority,sv)))}var wa=null;function Bf(e){wa!==e&&(wa=e,ie.unstable_scheduleCallback(ie.unstable_NormalPriority,function(){wa===e&&(wa=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(No(s||i)===null)continue;break}var n=Rt(i);n!==null&&(e.splice(t,3),t-=3,kl(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function _r(e){function t(k){return Ea(k,e)}us!==null&&Ea(us,e),hs!==null&&Ea(hs,e),fs!==null&&Ea(fs,e),tn.forEach(t),sn.forEach(t);for(var i=0;i<ds.length;i++){var s=ds[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ds.length&&(i=ds[0],i.blockedOn===null);)Lf(i),i.blockedOn===null&&ds.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[we]||null;if(typeof n=="function")g||Bf(i);else if(g){var T=null;if(n&&n.hasAttribute("formAction")){if(r=n,g=n[we]||null)T=g.formAction;else if(No(r)!==null)continue}else T=g.action;typeof T=="function"?i[s+1]=T:(i.splice(s,3),s-=3),Bf(i)}}}function kf(){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 jo(e){this._internalRoot=e}xa.prototype.render=jo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var i=t.current,s=Vt();xf(i,s,e,t,null,null)},xa.prototype.unmount=jo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xf(e.current,2,null,e,null,null),na(),t[tt]=null}};function xa(e){this._internalRoot=e}xa.prototype.unstable_scheduleHydration=function(e){if(e){var t=ae();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ds.length&&t!==0&&t<ds[i].priority;i++);ds.splice(i,0,e),i===0&&Lf(e)}};var Hf=ge.version;if(Hf!=="19.2.8")throw Error(G(527,Hf,"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 rv={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Da=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Da.isDisabled&&Da.supportsFiber)try{ht=Da.inject(rv),rt=Da}catch{}}return an.createRoot=function(e,t){if(!fe(e))throw Error(G(299));var i=!1,s="",r=Iu,n=Gu,g=Yu;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=Ef(e,1,!1,null,null,i,s,null,r,n,g,kf),e[tt]=t.current,So(e),new jo(t)},an.hydrateRoot=function(e,t,i){if(!fe(e))throw Error(G(299));var s=!1,r="",n=Iu,g=Gu,T=Yu,k=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(n=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError),i.formState!==void 0&&(k=i.formState)),t=Ef(e,1,!0,t,i??null,s,r,k,n,g,T,kf),t.context=wf(null),i=t.current,s=Vt(),s=N(s),r=$i(s),r.callback=null,Ji(i,r,s),i=s,t.current.lanes=i,vs(t,i),mi(t),e[tt]=t.current,So(e),new xa(t)},an.version="19.2.8",an}var Vf;function _v(){if(Vf)return Io.exports;Vf=1;function ie(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ie)}catch(ge){console.error(ge)}}return ie(),Io.exports=dv(),Io.exports}var vv=_v(),Vo={exports:{}},Xf;function mv(){return Xf||(Xf=1,(function(ie,ge){(function(oe,G){ie.exports=G()})(globalThis,(()=>(()=>{var oe={4567:function(ee,f,h){var d=this&&this.__decorate||function(a,l,_,C){var y,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--)(y=a[D])&&(v=(E<3?y(v):E>3?y(l,_,v):y(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),b=h(844),x=h(4725),m=h(2585),o=h(3656);let c=f.AccessibilityManager=class extends b.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 y=0;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);if(this._topBoundaryFocusListener=y=>this._handleBoundaryFocus(y,0),this._bottomBoundaryFocusListener=y=>this._handleBoundaryFocus(y,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((y=>this._handleResize(y.rows)))),this.register(this._terminal.onRender((y=>this._refreshRows(y.start,y.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((y=>this._handleChar(y)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
10
|
+
`)))),this.register(this._terminal.onA11yTab((y=>this._handleTab(y)))),this.register(this._terminal.onKey((y=>this._handleKey(y.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,b.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 y=a;y<=l;y++){const E=_.lines.get(_.ydisp+y),v=[],D=E?.translateToString(!0,void 0,void 0,v)||"",z=(_.ydisp+y+1).toString(),H=this._rowElements[y];H&&(D.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=D,this._rowColumns.set(H,v)),H.setAttribute("aria-posinset",z),H.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 y,E;if(l===0?(y=_,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(y=this._rowElements.shift(),E=_,this._rowContainer.removeChild(y)),y.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 y=({node:D,offset:z})=>{const H=D instanceof Text?D.parentNode:D;let q=parseInt(H?.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const B=this._rowColumns.get(H);if(!B)return console.warn("columns is null. Race condition?"),null;let P=z<B.length?B[z]:B.slice(-1)[0]+1;return P>=this._terminal.cols&&(++q,P=0),{row:q,column:P}},E=y(l),v=y(_);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:(ee,f)=>{function h(p){return p.replace(/\r?\n/g,"\r")}function d(p,b){return b?"\x1B[200~"+p+"\x1B[201~":p}function S(p,b,x,m){p=d(p=h(p),x.decPrivateModes.bracketedPasteMode&&m.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(p,!0),b.value=""}function u(p,b,x){const m=x.getBoundingClientRect(),o=p.clientX-m.left-10,c=p.clientY-m.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${o}px`,b.style.top=`${c}px`,b.style.zIndex="1000",b.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,b){p.clipboardData&&p.clipboardData.setData("text/plain",b.selectionText),p.preventDefault()},f.handlePasteEvent=function(p,b,x,m){p.stopPropagation(),p.clipboardData&&S(p.clipboardData.getData("text/plain"),b,x,m)},f.paste=S,f.moveTextAreaUnderMouseCursor=u,f.rightClickHandler=function(p,b,x,m,o){u(p,b,x),o&&m.rightClickSelect(p),b.value=m.selectionText,b.select()}},7239:(ee,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:(ee,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(ee,f,h){var d=this&&this.__decorate||function(c,a,l,_){var C,y=arguments.length,E=y<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=(y<3?C(E):y>3?C(a,l,E):C(a,l))||E);return y>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),b=h(844),x=h(2585),m=h(4725);let o=f.Linkifier=class extends b.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,b.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,b.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,(y=>{if(this._isMouseOut)return;const E=y?.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 y=0;y<C.length;y++){const E=C[y],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(y--,1);break}l.add(z)}}}}_checkLinkProviderResult(c,a,l){if(!this._activeProviderReplies)return l;const _=this._activeProviderReplies.get(c);let C=!1;for(let y=0;y<c;y++)this._activeProviderReplies.has(y)&&!this._activeProviderReplies.get(y)||(C=!0);if(!C&&_){const y=_.find((E=>this._linkAtPosition(E.link,a)));y&&(l=!0,this._handleNewLink(y))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let y=0;y<this._activeProviderReplies.size;y++){const E=this._activeProviderReplies.get(y)?.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,b.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 y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._askForLink(y,!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:(ee,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(ee,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 y=m.length-1;y>=0;y--)(l=m[y])&&(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 b=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 y=-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,y=_.extended.urlId;continue}v=_.extended.urlId!==y}else E!==-1&&(v=!0);if(v||E!==-1&&D===C-1){const z=this._oscLinkService.getLinkData(y)?.uri;if(z){const H={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:H,activate:(B,P)=>l?l.activate(B,P,H):x(0,P),hover:(B,P)=>l?.hover?.(B,P,H),leave:(B,P)=>l?.leave?.(B,P,H)})}v=!1,_.hasExtendedAttrs()&&_.extended.urlId?(E=D,y=_.extended.urlId):(E=-1,y=-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=b=d([S(0,p.IBufferService),S(1,p.IOptionsService),S(2,p.IOscLinkService)],b)},6193:(ee,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:(ee,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),b=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),y=h(8934),E=h(3230),v=h(9312),D=h(4725),z=h(6731),H=h(8055),q=h(8969),B=h(8460),P=h(844),re=h(6114),j=h(8437),W=h(2584),J=h(7399),A=h(5941),O=h(9074),w=h(2585),L=h(5435),K=h(4567),Q=h(779);class ce 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=re,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new P.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(b.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,P.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(I){if(this._themeService)for(const R of I){let $,le="";switch(R.index){case 256:$="foreground",le="10";break;case 257:$="background",le="11";break;case 258:$="cursor",le="12";break;default:$="ansi",le="4;"+R.index}switch(R.type){case 0:const ve=H.color.toColorRGB($==="ansi"?this._themeService.colors.ansi[R.index]:this._themeService.colors[$]);this.coreService.triggerDataEvent(`${W.C0.ESC}]${le};${(0,A.toRgbString)(ve)}${W.C1_ESCAPED.ST}`);break;case 1:if($==="ansi")this._themeService.modifyColors((de=>de.ansi[R.index]=H.channels.toColor(...R.color)));else{const de=$;this._themeService.modifyColors((Te=>Te[de]=H.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),le=this._renderService.dimensions.css.cell.height,ve=R.getWidth($),de=this._renderService.dimensions.css.cell.width*ve,Te=this.buffer.y*this._renderService.dimensions.css.cell.height,ze=$*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ze+"px",this.textarea.style.top=Te+"px",this.textarea.style.width=de+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"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)),re.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)}))),re.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),re.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(y.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 $(de){const Te=I._mouseService.getMouseReportCoords(de,I.screenElement);if(!Te)return!1;let ze,Ve;switch(de.overrideType||de.type){case"mousemove":Ve=32,de.buttons===void 0?(ze=3,de.button!==void 0&&(ze=de.button<3?de.button:3)):ze=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":Ve=0,ze=de.button<3?de.button:3;break;case"mousedown":Ve=1,ze=de.button<3?de.button:3;break;case"wheel":if(I._customWheelEventHandler&&I._customWheelEventHandler(de)===!1||I.viewport.getLinesScrolled(de)===0)return!1;Ve=de.deltaY<0?0:1,ze=4;break;default:return!1}return!(Ve===void 0||ze===void 0||ze>4)&&I.coreMouseService.triggerMouseEvent({col:Te.col,row:Te.row,x:Te.x,y:Te.y,button:ze,action:Ve,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:de=>($(de),de.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(de)),wheel:de=>($(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&$(de)},mousemove:de=>{de.buttons||$(de)}};this.register(this.coreMouseService.onProtocolChange((de=>{de?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(de)),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&de?le.mousemove||(R.addEventListener("mousemove",ve.mousemove),le.mousemove=ve.mousemove):(R.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&de?le.wheel||(R.addEventListener("wheel",ve.wheel,{passive:!1}),le.wheel=ve.wheel):(R.removeEventListener("wheel",le.wheel),le.wheel=null),2&de?le.mouseup||(le.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&de?le.mousedrag||(le.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,S.addDisposableDomListener)(R,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return $(de),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(de)}))),this.register((0,S.addDisposableDomListener)(R,"wheel",(de=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const Te=this.viewport.getLinesScrolled(de);if(Te===0)return;const ze=W.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let Ve="";for(let et=0;et<Math.abs(Te);et++)Ve+=ze;return this.coreService.triggerDataEvent(Ve,!0),this.cancel(de,!0)}return this.viewport.handleWheel(de)?this.cancel(de):void 0}}),{passive:!1})),this.register((0,S.addDisposableDomListener)(R,"touchstart",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,S.addDisposableDomListener)(R,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{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,J.evaluateKeyboardEvent)(I,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(I),$.type===3||$.type===2){const le=this.rows-1;return this.scrollLines($.type===2?-le:le),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 le=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};${le}t`)}}cancel(I,R){if(this.options.cancelEvents||R)return I.preventDefault(),I.stopPropagation(),!1}}f.Terminal=ce},9924:(ee,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,b=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),b)}}_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(ee,f,h){var d=this&&this.__decorate||function(c,a,l,_){var C,y=arguments.length,E=y<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=(y<3?C(E):y>3?C(a,l,E):C(a,l))||E);return y>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),b=h(8460),x=h(844),m=h(2585);let o=f.Viewport=class extends x.Disposable{constructor(c,a,l,_,C,y,E,v){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=l,this._optionsService=_,this._charSizeService=C,this._renderService=y,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 b.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=[],y=a??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let v=c;v<y;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 H=document.createElement("div");H.textContent=_,C.push(H),_.length>0&&(l=H),_=""}}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(ee,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 y=m.length-1;y>=0;y--)(l=m[y])&&(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),b=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,b.IBufferService),S(2,u.ICoreBrowserService),S(3,b.IDecorationService),S(4,u.IRenderService)],x)},5871:(ee,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(ee,f,h){var d=this&&this.__decorate||function(l,_,C,y){var E,v=arguments.length,D=v<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,C):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(l,_,C,y);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,y){_(C,y,l)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OverviewRulerRenderer=void 0;const u=h(5871),p=h(4725),b=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 b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,_,C,y,E,v,D){super(),this._viewportElement=l,this._screenElement=_,this._bufferService=C,this._decorationService=y,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,b.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(ee,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 y=m.length-1;y>=0;y--)(l=m[y])&&(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),b=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(`${b.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:(ee,f)=>{function h(d,S,u){const p=u.getBoundingClientRect(),b=d.getComputedStyle(u),x=parseInt(b.getPropertyValue("padding-left")),m=parseInt(b.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,b,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),b),a):void 0}},9504:(ee,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),y=Math.abs(_-C)-(function(E,v,D){let z=0;const H=E-u(E,D),q=v-u(v,D);for(let B=0;B<Math.abs(H-q);B++){const P=p(E,v)==="A"?-1:1;D.buffer.lines.get(H+P*B)?.isWrapped&&z++}return z})(o,c,a);return m(y,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 b(o,c,a,l,_,C){let y=o,E=c,v="";for(;y!==a||E!==l;)y+=_?1:-1,_&&y>C.cols-1?(v+=C.buffer.translateBufferLineToString(E,!1,o,y),y=0,o=0,E++):!_&&y<0&&(v+=C.buffer.translateBufferLineToString(E,!1,0,o+1),y=C.cols-1,o=y,E--);return v+C.buffer.translateBufferLineToString(E,!1,o,y)}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,H,q,B){return S(D,H,q,B).length===0?"":m(b(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,H,q,B){let P;P=S(D,H,q,B).length>0?H-u(H,q):D;const re=H,j=(function(W,J,A,O,w,L){let K;return K=S(A,O,w,L).length>0?O-u(O,w):J,W<A&&K<=O||W>=A&&K<O?"C":"D"})(v,D,z,H,q,B);return m(b(v,P,z,re,j==="C",q).length,x(j,B))})(_,C,o,c,a,l);let y;if(C===c)return y=_>o?"D":"C",m(Math.abs(_-o),x(y,l));y=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(y,l))}},1296:function(ee,f,h){var d=this&&this.__decorate||function(B,P,re,j){var W,J=arguments.length,A=J<3?P:j===null?j=Object.getOwnPropertyDescriptor(P,re):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(B,P,re,j);else for(var O=B.length-1;O>=0;O--)(W=B[O])&&(A=(J<3?W(A):J>3?W(P,re,A):W(P,re))||A);return J>3&&A&&Object.defineProperty(P,re,A),A},S=this&&this.__param||function(B,P){return function(re,j){P(re,j,B)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DomRenderer=void 0;const u=h(3787),p=h(2550),b=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-",y="xterm-rows",E="xterm-fg-",v="xterm-bg-",D="xterm-focus",z="xterm-selection";let H=1,q=f.DomRenderer=class extends l.Disposable{constructor(B,P,re,j,W,J,A,O,w,L,K,Q,ce){super(),this._terminal=B,this._document=P,this._element=re,this._screenElement=j,this._viewportElement=W,this._helperContainer=J,this._linkifier2=A,this._charSizeService=w,this._optionsService=L,this._bufferService=K,this._coreBrowserService=Q,this._themeService=ce,this._terminalClass=H++,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(y),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((ue=>this._injectCss(ue)))),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((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),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 re of this._rowElements)re.style.width=`${this.dimensions.css.canvas.width}px`,re.style.height=`${this.dimensions.css.cell.height}px`,re.style.lineHeight=`${this.dimensions.css.cell.height}px`,re.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const P=`${this._terminalSelector} .${y} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=P,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 P=`${this._terminalSelector} .${y} { color: ${B.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;P+=`${this._terminalSelector} .${y} .xterm-dim { color: ${c.color.multiplyOpacity(B.foreground,.5).css};}`,P+=`${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 re=`blink_underline_${this._terminalClass}`,j=`blink_bar_${this._terminalClass}`,W=`blink_block_${this._terminalClass}`;P+=`@keyframes ${re} { 50% { border-bottom-style: hidden; }}`,P+=`@keyframes ${j} { 50% { box-shadow: none; }}`,P+=`@keyframes ${W} { 0% { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css}; } 50% { background-color: inherit; color: ${B.cursor.css}; }}`,P+=`${this._terminalSelector} .${y}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${re} 1s step-end infinite;}${this._terminalSelector} .${y}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${j} 1s step-end infinite;}${this._terminalSelector} .${y}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css};}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${B.cursor.css} !important; color: ${B.cursorAccent.css} !important;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${B.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${B.cursor.css} inset;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${B.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,P+=`${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[J,A]of B.ansi.entries())P+=`${this._terminalSelector} .${E}${J} { color: ${A.css}; }${this._terminalSelector} .${E}${J}.xterm-dim { color: ${c.color.multiplyOpacity(A,.5).css}; }${this._terminalSelector} .${v}${J} { background-color: ${A.css}; }`;P+=`${this._terminalSelector} .${E}${b.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(B.background).css}; }${this._terminalSelector} .${E}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(B.background),.5).css}; }${this._terminalSelector} .${v}${b.INVERTED_DEFAULT_COLOR} { background-color: ${B.foreground.css}; }`,this._themeStyleElement.textContent=P}_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,P){for(let re=this._rowElements.length;re<=P;re++){const j=this._document.createElement("div");this._rowContainer.appendChild(j),this._rowElements.push(j)}for(;this._rowElements.length>P;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(B,P){this._refreshRowElements(B,P),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,P,re){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(B,P,re),this.renderRows(0,this._bufferService.rows-1),!B||!P)return;this._selectionRenderModel.update(this._terminal,B,P,re);const j=this._selectionRenderModel.viewportStartRow,W=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,A=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||A<0)return;const O=this._document.createDocumentFragment();if(re){const w=B[0]>P[0];O.appendChild(this._createSelectionElement(J,w?P[0]:B[0],w?B[0]:P[0],A-J+1))}else{const w=j===J?B[0]:0,L=J===W?P[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(J,w,L));const K=A-J-1;if(O.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,K)),J!==A){const Q=W===A?P[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(A,0,Q))}}this._selectionContainer.appendChild(O)}_createSelectionElement(B,P,re,j=1){const W=this._document.createElement("div"),J=P*this.dimensions.css.cell.width;let A=this.dimensions.css.cell.width*(re-P);return J+A>this.dimensions.css.canvas.width&&(A=this.dimensions.css.canvas.width-J),W.style.height=j*this.dimensions.css.cell.height+"px",W.style.top=B*this.dimensions.css.cell.height+"px",W.style.left=`${J}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,P){const re=this._bufferService.buffer,j=re.ybase+re.y,W=Math.min(re.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,A=this._optionsService.rawOptions.cursorStyle,O=this._optionsService.rawOptions.cursorInactiveStyle;for(let w=B;w<=P;w++){const L=w+re.ydisp,K=this._rowElements[w],Q=re.lines.get(L);if(!K||!Q)break;K.replaceChildren(...this._rowFactory.createRow(Q,L,L===j,A,O,W,J,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,P,re,j,W,J){re<0&&(B=0),j<0&&(P=0);const A=this._bufferService.rows-1;re=Math.max(Math.min(re,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,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=re;ue<=j;++ue){const I=ue+O.ydisp,R=this._rowElements[ue],$=O.lines.get(I);if(!R||!$)break;R.replaceChildren(...this._rowFactory.createRow($,I,I===w,Q,ce,L,K,this.dimensions.css.cell.width,this._widthCache,J?ue===re?B:0:-1,J?(ue===j?P: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(ee,f,h){var d=this&&this.__decorate||function(y,E,v,D){var z,H=arguments.length,q=H<3?E:D===null?D=Object.getOwnPropertyDescriptor(E,v):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(y,E,v,D);else for(var B=y.length-1;B>=0;B--)(z=y[B])&&(q=(H<3?z(q):H>3?z(E,v,q):z(E,v))||q);return H>3&&q&&Object.defineProperty(E,v,q),q},S=this&&this.__param||function(y,E){return function(v,D){E(v,D,y)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DomRendererRowFactory=void 0;const u=h(2223),p=h(643),b=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(y,E,v,D,z,H,q){this._document=y,this._characterJoinerService=E,this._optionsService=v,this._coreBrowserService=D,this._coreService=z,this._decorationService=H,this._themeService=q,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(y,E,v){this._selectionStart=y,this._selectionEnd=E,this._columnSelectMode=v}createRow(y,E,v,D,z,H,q,B,P,re,j){const W=[],J=this._characterJoinerService.getJoinedCharacters(E),A=this._themeService.colors;let O,w=y.getNoBgTrimmedLength();v&&w<H+1&&(w=H+1);let L=0,K="",Q=0,ce=0,ue=0,I=!1,R=0,$=!1,le=0;const ve=[],de=re!==-1&&j!==-1;for(let Te=0;Te<w;Te++){y.loadCell(Te,this._workCell);let ze=this._workCell.getWidth();if(ze===0)continue;let Ve=!1,et=Te,xe=this._workCell;if(J.length>0&&Te===J[0][0]){Ve=!0;const Ie=J.shift();xe=new c.JoinedCellData(this._workCell,y.translateToString(!0,Ie[0],Ie[1]),Ie[1]-Ie[0]),et=Ie[1]-1,ze=xe.getWidth()}const si=this._isCellInSelection(Te,E),ri=v&&Te===H,Yi=de&&Te>=re&&Te<=j;let ni=!1;this._decorationService.forEachDecorationAtCell(Te,E,void 0,(Ie=>{ni=!0}));let gi=xe.getChars()||p.WHITESPACE_CELL_CHAR;if(gi===" "&&(xe.isUnderline()||xe.isOverline())&&(gi=" "),le=ze*B-P.get(gi,xe.isBold(),xe.isItalic()),O){if(L&&(si&&$||!si&&!$&&xe.bg===Q)&&(si&&$&&A.selectionForeground||xe.fg===ce)&&xe.extended.ext===ue&&Yi===I&&le===R&&!ri&&!Ve&&!ni){xe.isInvisible()?K+=p.WHITESPACE_CELL_CHAR:K+=gi,L++;continue}L&&(O.textContent=K),O=this._document.createElement("span"),L=0,K=""}else O=this._document.createElement("span");if(Q=xe.bg,ce=xe.fg,ue=xe.extended.ext,I=Yi,R=le,$=si,Ve&&H>=Te&&H<=et&&(H=Te),!this._coreService.isCursorHidden&&ri&&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(xe.isBold()&&ve.push("xterm-bold"),xe.isItalic()&&ve.push("xterm-italic"),xe.isDim()&&ve.push("xterm-dim"),K=xe.isInvisible()?p.WHITESPACE_CELL_CHAR:xe.getChars()||p.WHITESPACE_CELL_CHAR,xe.isUnderline()&&(ve.push(`xterm-underline-${xe.extended.underlineStyle}`),K===" "&&(K=" "),!xe.isUnderlineColorDefault()))if(xe.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(xe.getUnderlineColor()).join(",")})`;else{let Ie=xe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&xe.isBold()&&Ie<8&&(Ie+=8),O.style.textDecorationColor=A.ansi[Ie].css}xe.isOverline()&&(ve.push("xterm-overline"),K===" "&&(K=" ")),xe.isStrikethrough()&&ve.push("xterm-strikethrough"),Yi&&(O.style.textDecoration="underline");let mt=xe.getFgColor(),$e=xe.getFgColorMode(),At=xe.getBgColor(),ai=xe.getBgColorMode();const hi=!!xe.isInverse();if(hi){const Ie=mt;mt=At,At=Ie;const ht=$e;$e=ai,ai=ht}let Ot,pi,Je,Le=!1;switch(this._decorationService.forEachDecorationAtCell(Te,E,void 0,(Ie=>{Ie.options.layer!=="top"&&Le||(Ie.backgroundColorRGB&&(ai=50331648,At=Ie.backgroundColorRGB.rgba>>8&16777215,Ot=Ie.backgroundColorRGB),Ie.foregroundColorRGB&&($e=50331648,mt=Ie.foregroundColorRGB.rgba>>8&16777215,pi=Ie.foregroundColorRGB),Le=Ie.options.layer==="top")})),!Le&&si&&(Ot=this._coreBrowserService.isFocused?A.selectionBackgroundOpaque:A.selectionInactiveBackgroundOpaque,At=Ot.rgba>>8&16777215,ai=50331648,Le=!0,A.selectionForeground&&($e=50331648,mt=A.selectionForeground.rgba>>8&16777215,pi=A.selectionForeground)),Le&&ve.push("xterm-decoration-top"),ai){case 16777216:case 33554432:Je=A.ansi[At],ve.push(`xterm-bg-${At}`);break;case 50331648:Je=m.channels.toColor(At>>16,At>>8&255,255&At),this._addStyle(O,`background-color:#${C((At>>>0).toString(16),"0",6)}`);break;default:hi?(Je=A.foreground,ve.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):Je=A.background}switch(Ot||xe.isDim()&&(Ot=m.color.multiplyOpacity(Je,.5)),$e){case 16777216:case 33554432:xe.isBold()&&mt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(mt+=8),this._applyMinimumContrast(O,Je,A.ansi[mt],xe,Ot,void 0)||ve.push(`xterm-fg-${mt}`);break;case 50331648:const Ie=m.channels.toColor(mt>>16&255,mt>>8&255,255&mt);this._applyMinimumContrast(O,Je,Ie,xe,Ot,pi)||this._addStyle(O,`color:#${C(mt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,Je,A.foreground,xe,Ot,pi)||hi&&ve.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ve.length&&(O.className=ve.join(" "),ve.length=0),ri||Ve||ni?O.textContent=K:L++,le!==this.defaultSpacing&&(O.style.letterSpacing=`${le}px`),W.push(O),Te=et}return O&&L&&(O.textContent=K),W}_applyMinimumContrast(y,E,v,D,z,H){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const q=this._getContrastCache(D);let B;if(z||H||(B=q.getColor(E.rgba,v.rgba)),B===void 0){const P=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);B=m.color.ensureContrastRatio(z||E,H||v,P),q.setColor((z||E).rgba,(H||v).rgba,B??null)}return!!B&&(this._addStyle(y,`color:${B.css}`),!0)}_getContrastCache(y){return y.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(y,E){y.setAttribute("style",`${y.getAttribute("style")||""}${E};`)}_isCellInSelection(y,E){const v=this._selectionStart,D=this._selectionEnd;return!(!v||!D)&&(this._columnSelectMode?v[0]<=D[0]?y>=v[0]&&E>=v[1]&&y<D[0]&&E<=D[1]:y<v[0]&&E>=v[1]&&y>=D[0]&&E<=D[1]:E>v[1]&&E<D[1]||v[1]===D[1]&&E===v[1]&&y>=v[0]&&y<D[0]||v[1]<D[1]&&E===D[1]&&y<D[0]||v[1]<D[1]&&E===v[1]&&y>=v[0])}};function C(y,E,v){for(;y.length<v;)y=E+y;return y}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:(ee,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 b=h.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontWeight="bold",b.style.fontStyle="italic",this._measureElements=[S,u,p,b],this._container.appendChild(S),this._container.appendChild(u),this._container.appendChild(p),this._container.appendChild(b),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 b=this._holey.get(p);if(b===void 0){let x=0;d&&(x|=1),S&&(x|=2),b=this._measure(h,x),b>0&&this._holey.set(p,b)}return b}_measure(h,d){const S=this._measureElements[d];return S.textContent=h.repeat(32),S.offsetWidth/32}}},2223:(ee,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:(ee,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,b){return u===1&&p>Math.ceil(1.5*b)&&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:(ee,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,b=!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=b,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:(ee,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(ee,f,h){var d=this&&this.__decorate||function(a,l,_,C){var y,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--)(y=a[D])&&(v=(E<3?y(v):E>3?y(l,_,v):y(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),b=h(844);let x=f.CharSizeService=class extends b.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 b.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(ee,f,h){var d=this&&this.__decorate||function(c,a,l,_){var C,y=arguments.length,E=y<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=(y<3?C(E):y>3?C(a,l,E):C(a,l))||E);return y>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),b=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 Qf{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.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 y=0,E=0,v=0,D=l.getFg(0),z=l.getBg(0);for(let H=0;H<l.getTrimmedLength();H++)if(l.loadCell(H,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==D||this._workCell.bg!==z){if(H-y>1){const q=this._getJoinedRanges(C,v,E,l,y);for(let B=0;B<q.length;B++)_.push(q[B])}y=H,v=E,D=this._workCell.fg,z=this._workCell.bg}E+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-y>1){const H=this._getJoinedRanges(C,v,E,l,y);for(let q=0;q<H.length;q++)_.push(H[q])}return _}_getJoinedRanges(a,l,_,C,y){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 H=0;H<z.length;H++)Qf._mergeRanges(v,z[H])}catch(z){console.error(z)}return this._stringRangesToCellRanges(v,C,y),v}_stringRangesToCellRanges(a,l,_){let C=0,y=!1,E=0,v=a[C];if(v){for(let D=_;D<this._bufferService.cols;D++){const z=l.getWidth(D),H=l.getString(D).length||p.WHITESPACE_CELL_CHAR.length;if(z!==0){if(!y&&v[0]<=E&&(v[0]=D,y=!0),v[1]<=E){if(v[1]=D,v=a[++C],!v)break;v[0]<=E?(v[0]=D,y=!0):y=!1}E+=H}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(a,l){let _=!1;for(let C=0;C<a.length;C++){const y=a[C];if(_){if(l[1]<=y[0])return a[C-1][1]=l[1],a;if(l[1]<=y[1])return a[C-1][1]=Math.max(l[1],y[1]),a.splice(C,1),a;a.splice(C,1),C--}else{if(l[1]<=y[0])return a.splice(C,0,l),a;if(l[1]<=y[1])return y[0]=Math.min(l[0],y[0]),a;l[0]<y[1]&&(y[0]=Math.min(l[0],y[0]),_=!0)}}return _?a[a.length-1][1]=l[1]:a.push(l),a}};f.CharacterJoinerService=o=d([S(0,x.IBufferService)],o)},5114:(ee,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 b(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 b 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:(ee,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 b=this.linkProviders.indexOf(p);b!==-1&&this.linkProviders.splice(b,1)}}}}f.LinkProviderService=S},8934:function(ee,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 b=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=b=d([S(0,u.IRenderService),S(1,u.ICharSizeService)],b)},3230:function(ee,f,h){var d=this&&this.__decorate||function(a,l,_,C){var y,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--)(y=a[D])&&(v=(E<3?y(v):E>3?y(l,_,v):y(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),b=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,y,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 b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer(((z,H)=>this._renderRows(z,H)),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(y.onDecorationRegistered((()=>this._fullRefresh()))),this.register(y.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(ee,f,h){var d=this&&this.__decorate||function(v,D,z,H){var q,B=arguments.length,P=B<3?D:H===null?H=Object.getOwnPropertyDescriptor(D,z):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(v,D,z,H);else for(var re=v.length-1;re>=0;re--)(q=v[re])&&(P=(B<3?q(P):B>3?q(D,z,P):q(D,z))||P);return B>3&&P&&Object.defineProperty(D,z,P),P},S=this&&this.__param||function(v,D){return function(z,H){D(z,H,v)}};Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionService=void 0;const u=h(9806),p=h(9504),b=h(456),x=h(4725),m=h(8460),o=h(844),c=h(6114),a=h(4841),l=h(511),_=h(2585),C=" ",y=new RegExp(C,"g");let E=f.SelectionService=class extends o.Disposable{constructor(v,D,z,H,q,B,P,re,j){super(),this._element=v,this._screenElement=D,this._linkifier=z,this._bufferService=H,this._coreService=q,this._mouseService=B,this._optionsService=P,this._renderService=re,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 b.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,H=[];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 P=v[1];P<=D[1];P++){const re=z.translateBufferLineToString(P,!0,q,B);H.push(re)}}else{const q=v[1]===D[1]?D[0]:void 0;H.push(z.translateBufferLineToString(v[1],!0,v[0],q));for(let B=v[1]+1;B<=D[1]-1;B++){const P=z.lines.get(B),re=z.translateBufferLineToString(B,!0);P?.isWrapped?H[H.length-1]+=re:H.push(re)}if(v[1]!==D[1]){const B=z.lines.get(D[1]),P=z.translateBufferLineToString(D[1],!0,0,D[0]);B&&B.isWrapped?H[H.length-1]+=P:H.push(P)}}return H.map((q=>q.replace(y," "))).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,H=this._model.finalSelectionEnd;return!!(z&&H&&D)&&this._areCoordsInSelection(D,z,H)}isCellInSelection(v,D){const z=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!z||!H)&&this._areCoordsInSelection([v,D],z,H)}_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 H=this._getMouseBufferCoords(v);return!!H&&(this._selectWordAt(H,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 H=z.lines.get(this._model.selectionEnd[1]);H&&H.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 H=(0,p.moveToCellSequence)(z[0]-1,z[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!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 H=0;D>=H;H++){const q=v.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?z--:q>1&&D!==H&&(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,H=!0){if(v[0]>=this._bufferService.cols)return;const q=this._bufferService.buffer,B=q.lines.get(v[1]);if(!B)return;const P=q.translateBufferLineToString(v[1],!1);let re=this._convertViewportColToCharacterIndex(B,v[0]),j=re;const W=v[0]-re;let J=0,A=0,O=0,w=0;if(P.charAt(re)===" "){for(;re>0&&P.charAt(re-1)===" ";)re--;for(;j<P.length&&P.charAt(j+1)===" ";)j++}else{let Q=v[0],ce=v[0];B.getWidth(Q)===0&&(J++,Q--),B.getWidth(ce)===2&&(A++,ce++);const ue=B.getString(ce).length;for(ue>1&&(w+=ue-1,j+=ue-1);Q>0&&re>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?(J++,Q--):I>1&&(O+=I-1,re-=I-1),re--,Q--}for(;ce<B.length&&j+1<P.length&&!this._isCharWordSeparator(B.loadCell(ce+1,this._workCell));){B.loadCell(ce+1,this._workCell);const I=this._workCell.getChars().length;this._workCell.getWidth()===2?(A++,ce++):I>1&&(w+=I-1,j+=I-1),j++,ce++}}j++;let L=re+W-J+O,K=Math.min(this._bufferService.cols,j-re+J+A-O-w);if(D||P.slice(re,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 ce=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(ce){const ue=this._bufferService.cols-ce.start;L-=ue,K+=ue}}}if(H&&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 ce=this._getWordAt([0,v[1]+1],!1,!1,!0);ce&&(K+=ce.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:(ee,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(ee,f,h){var d=this&&this.__decorate||function(E,v,D,z){var H,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 P=E.length-1;P>=0;P--)(H=E[P])&&(B=(q<3?H(B):q>3?H(v,D,B):H(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),b=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],H=v[D/6%6|0],q=v[D%6];E.push({css:p.channels.toCss(z,H,q),rgba:p.channels.toRgba(z,H,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 b.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=y(E.foreground,o),v.background=y(E.background,c),v.cursor=y(E.cursor,a),v.cursorAccent=y(E.cursorAccent,l),v.selectionBackgroundTransparent=y(E.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=y(E.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=E.selectionForeground?y(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]=y(E.black,f.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=y(E.red,f.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=y(E.green,f.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=y(E.yellow,f.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=y(E.blue,f.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=y(E.magenta,f.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=y(E.cyan,f.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=y(E.white,f.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=y(E.brightBlack,f.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=y(E.brightRed,f.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=y(E.brightGreen,f.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=y(E.brightYellow,f.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=y(E.brightBlue,f.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=y(E.brightMagenta,f.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=y(E.brightCyan,f.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=y(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]=y(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 y(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:(ee,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(b){super(),this._maxLength=b,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(b){if(this._maxLength===b)return;const x=new Array(b);for(let m=0;m<Math.min(b,this.length);m++)x[m]=this._array[this._getCyclicIndex(m)];this._array=x,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let x=this._length;x<b;x++)this._array[x]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,x){this._array[this._getCyclicIndex(b)]=x}push(b){this._array[this._getCyclicIndex(this._length)]=b,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(b,x,...m){if(x){for(let o=b;o<this._length-x;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+x)];this._length-=x,this.onDeleteEmitter.fire({index:b,amount:x})}for(let o=this._length-1;o>=b;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(b+o)]=m[o];if(m.length&&this.onInsertEmitter.fire({index:b,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(b){b>this._length&&(b=this._length),this._startIndex+=b,this._length-=b,this.onTrimEmitter.fire(b)}shiftElements(b,x,m){if(!(x<=0)){if(b<0||b>=this._length)throw new Error("start argument out of range");if(b+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(b+c+m,this.get(b+c));const o=b+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(b+o+m,this.get(b+o))}}_getCyclicIndex(b){return(this._startIndex+b)%this._maxLength}}f.CircularList=u},1439:(ee,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:(ee,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,b,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,y,E){return E!==void 0?`#${c(_)}${c(C)}${c(y)}${c(E)}`:`#${c(_)}${c(C)}${c(y)}`},l.toRgba=function(_,C,y,E=255){return(_<<24|C<<16|y<<8|E)>>>0},l.toColor=function(_,C,y,E){return{css:l.toCss(_,C,y,E),rgba:l.toRgba(_,C,y,E)}}})(p||(f.channels=p={})),(function(l){function _(C,y){return u=Math.round(255*y),[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,y){if(u=(255&y.rgba)/255,u===1)return{css:y.css,rgba:y.rgba};const E=y.rgba>>24&255,v=y.rgba>>16&255,D=y.rgba>>8&255,z=C.rgba>>24&255,H=C.rgba>>16&255,q=C.rgba>>8&255;return h=z+Math.round((E-z)*u),d=H+Math.round((v-H)*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,y,E){const v=o.ensureContrastRatio(C.rgba,y.rgba,E);if(v)return p.toColor(v>>24&255,v>>16&255,v>>8&255)},l.opaque=function(C){const y=(255|C.rgba)>>>0;return[h,d,S]=o.toChannels(y),{css:p.toCss(h,d,S),rgba:y}},l.opacity=_,l.multiplyOpacity=function(C,y){return u=255&C.rgba,_(C,u*y/255)},l.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(b||(f.color=b={})),(function(l){let _,C;try{const y=document.createElement("canvas");y.width=1,y.height=1;const E=y.getContext("2d",{willReadFrequently:!0});E&&(_=E,_.globalCompositeOperation="copy",C=_.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return h=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),S=parseInt(y.slice(3,4).repeat(2),16),p.toColor(h,d,S);case 5:return h=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),S=parseInt(y.slice(3,4).repeat(2),16),u=parseInt(y.slice(4,5).repeat(2),16),p.toColor(h,d,S,u);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}const E=y.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=y,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:y}}})(x||(f.css=x={})),(function(l){function _(C,y,E){const v=C/255,D=y/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 _(y,E,v){const D=y>>24&255,z=y>>16&255,H=y>>8&255;let q=E>>24&255,B=E>>16&255,P=E>>8&255,re=a(m.relativeLuminance2(q,B,P),m.relativeLuminance2(D,z,H));for(;re<v&&(q>0||B>0||P>0);)q-=Math.max(0,Math.ceil(.1*q)),B-=Math.max(0,Math.ceil(.1*B)),P-=Math.max(0,Math.ceil(.1*P)),re=a(m.relativeLuminance2(q,B,P),m.relativeLuminance2(D,z,H));return(q<<24|B<<16|P<<8|255)>>>0}function C(y,E,v){const D=y>>24&255,z=y>>16&255,H=y>>8&255;let q=E>>24&255,B=E>>16&255,P=E>>8&255,re=a(m.relativeLuminance2(q,B,P),m.relativeLuminance2(D,z,H));for(;re<v&&(q<255||B<255||P<255);)q=Math.min(255,q+Math.ceil(.1*(255-q))),B=Math.min(255,B+Math.ceil(.1*(255-B))),P=Math.min(255,P+Math.ceil(.1*(255-P))),re=a(m.relativeLuminance2(q,B,P),m.relativeLuminance2(D,z,H));return(q<<24|B<<16|P<<8|255)>>>0}l.blend=function(y,E){if(u=(255&E)/255,u===1)return E;const v=E>>24&255,D=E>>16&255,z=E>>8&255,H=y>>24&255,q=y>>16&255,B=y>>8&255;return h=H+Math.round((v-H)*u),d=q+Math.round((D-q)*u),S=B+Math.round((z-B)*u),p.toRgba(h,d,S)},l.ensureContrastRatio=function(y,E,v){const D=m.relativeLuminance(y>>8),z=m.relativeLuminance(E>>8);if(a(D,z)<v){if(z<D){const B=_(y,E,v),P=a(D,m.relativeLuminance(B>>8));if(P<v){const re=C(y,E,v);return P>a(D,m.relativeLuminance(re>>8))?B:re}return B}const H=C(y,E,v),q=a(D,m.relativeLuminance(H>>8));if(q<v){const B=_(y,E,v);return q>a(D,m.relativeLuminance(B>>8))?H:B}return H}},l.reduceLuminance=_,l.increaseLuminance=C,l.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]}})(o||(f.rgba=o={})),f.toPaddedHex=c,f.contrastRatio=a},8969:(ee,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),b=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),y=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((H=>{this._onScrollApi?.fire(H.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(H){for(const q in H)this.optionsService.options[q]=H[q]}constructor(H){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(H)),this._instantiationService.setService(S.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(b.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 y.WriteBuffer(((q,B)=>this._inputHandler.parse(q,B)))),this.register((0,o.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,q){this._writeBuffer.write(H,q)}writeSync(H,q){this._logService.logLevel<=S.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(H,q)}input(H,q=!0){this.coreService.triggerDataEvent(H,q)}resize(H,q){isNaN(H)||isNaN(q)||(H=Math.max(H,b.MINIMUM_COLS),q=Math.max(q,b.MINIMUM_ROWS),this._bufferService.resize(H,q))}scroll(H,q=!1){this._bufferService.scroll(H,q)}scrollLines(H,q,B){this._bufferService.scrollLines(H,q,B)}scrollPages(H){this.scrollLines(H*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(H){const q=H-this._bufferService.buffer.ydisp;q!==0&&this.scrollLines(q)}registerEscHandler(H,q){return this._inputHandler.registerEscHandler(H,q)}registerDcsHandler(H,q){return this._inputHandler.registerDcsHandler(H,q)}registerCsiHandler(H,q){return this._inputHandler.registerCsiHandler(H,q)}registerOscHandler(H,q){return this._inputHandler.registerOscHandler(H,q)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const q=this.optionsService.rawOptions.windowsPty;q&&q.buildNumber!==void 0&&q.buildNumber!==void 0?H=q.backend==="conpty"&&q.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(H=!0),H?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const H=[];H.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const q of H)q.dispose()}))}}}f.CoreTerminal=D},8460:(ee,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(ee,f,h){var d=this&&this.__decorate||function(J,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(J,A,O,w);else for(var ce=J.length-1;ce>=0;ce--)(L=J[ce])&&(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(J,A){return function(O,w){A(O,w,J)}};Object.defineProperty(f,"__esModule",{value:!0}),f.InputHandler=f.WindowsOptionsReportType=void 0;const u=h(2584),p=h(7116),b=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),y=h(1480),E=h(6242),v=h(6351),D=h(5941),z={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function q(J,A){if(J>24)return A.setWinLines||!1;switch(J){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(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(B||(f.WindowsOptionsReportType=B={}));let P=0;class re extends x.Disposable{getAttrData(){return this._curAttrData}constructor(A,O,w,L,K,Q,ce,ue,I=new b.EscapeSequenceParser){super(),this._bufferService=A,this._charsetService=O,this._coreService=w,this._logService=L,this._optionsService=K,this._oscLinkService=Q,this._coreMouseService=ce,this._unicodeService=ue,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,$,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:R,action:$,data:le})})),this._parser.setDcsHandlerFallback(((R,$,le)=>{$==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(R),action:$,payload:le})})),this._parser.setPrintHandler(((R,$,le)=>this.print(R,$,le))),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 ce=this._parseStack.paused;if(ce){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>H&&(Q=this._parseStack.position+H)}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<H&&(this._parseBuffer=new Uint32Array(Math.min(A.length,H))),ce||this._dirtyRowTracker.clearRange(),A.length>H)for(let R=Q;R<A.length;R+=H){const $=R+H<A.length?R+H:A.length,le=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,le))return this._preserveStack(L,K,le,R),this._logSlowResolvingAsync(w),w}else if(!ce){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 ue=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(ue,this._bufferService.rows-1))}print(A,O,w){let L,K;const Q=this._charsetService.charset,ce=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,I=this._coreService.decPrivateModes.wraparound,R=this._coreService.modes.insertMode,$=this._curAttrData;let le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&w-O>0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,$);let ve=this._parser.precedingJoinState;for(let de=O;de<w;++de){if(L=A[de],L<127&&Q){const et=Q[String.fromCharCode(L)];et&&(L=et.charCodeAt(0))}const Te=this._unicodeService.charProperties(L,ve);K=y.UnicodeService.extractWidth(Te);const ze=y.UnicodeService.extractShouldJoin(Te),Ve=ze?y.UnicodeService.extractWidth(ve):0;if(ve=Te,ce&&this._onA11yChar.fire((0,m.stringFromCodePoint)(L)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+K-Ve>ue){if(I){const et=le;let xe=this._activeBuffer.x-Ve;for(this._activeBuffer.x=Ve,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),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ve>0&&le instanceof o.BufferLine&&le.copyCellsFrom(et,xe,0,Ve,!1);xe<ue;)et.setCellFromCodepoint(xe++,0,1,$)}else if(this._activeBuffer.x=ue-1,K===2)continue}if(ze&&this._activeBuffer.x){const et=le.getWidth(this._activeBuffer.x-1)?1:2;le.addCodepointToCell(this._activeBuffer.x-et,L,K);for(let xe=K-Ve;--xe>=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,$)}else if(R&&(le.insertCells(this._activeBuffer.x,K-Ve,this._activeBuffer.getNullCell($)),le.getWidth(ue-1)===2&&le.setCellFromCodepoint(ue-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,$)),le.setCellFromCodepoint(this._activeBuffer.x++,L,K,$),K>0)for(;--K;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,$)}this._parser.precedingJoinState=ve,this._activeBuffer.x<ue&&w-O>0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.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=y.UnicodeService.extractWidth(O),K=this._activeBuffer.x-L,Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(K),ce=new Uint32Array(Q.length*w);let ue=0;for(let R=0;R<Q.length;){const $=Q.codePointAt(R)||0;ce[ue++]=$,R+=$>65535?2:1}let I=ue;for(let R=1;R<w;++R)ce.copyWithin(I,0,ue),I+=ue;return this.print(ce,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:ce,cols:ue}=this._bufferService,{active:I,alt:R}=ce,$=this._optionsService.rawOptions,le=ze=>ze?1:2,ve=A.params[0];return de=ve,Te=O?ve===2?4:ve===4?le(Q.modes.insertMode):ve===12?3:ve===20?le($.convertEol):0:ve===1?le(w.applicationCursorKeys):ve===3?$.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:ve===6?le(w.origin):ve===7?le(w.wraparound):ve===8?3:ve===9?le(L==="X10"):ve===12?le($.cursorBlink):ve===25?le(!Q.isCursorHidden):ve===45?le(w.reverseWraparound):ve===66?le(w.applicationKeypad):ve===67?4:ve===1e3?le(L==="VT200"):ve===1002?le(L==="DRAG"):ve===1003?le(L==="ANY"):ve===1004?le(w.sendFocus):ve===1005?4:ve===1006?le(K==="SGR"):ve===1015?4:ve===1016?le(K==="SGR_PIXELS"):ve===1048?1:ve===47||ve===1047||ve===1049?le(I===R):ve===2004?le(w.bracketedPasteMode):0,Q.triggerDataEvent(`${u.C0.ESC}[${O?"":"?"}${de};${Te}$y`),!0;var de,Te}_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 ce=A.getSubParams(O+Q);let ue=0;do L[1]===5&&(K=1),L[Q+ue+1+K]=ce[ue];while(++ue<ce.length&&ue+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 ce=2;ce<L.length;++ce)L[ce]===-1&&(L[ce]=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 ce=(0,D.parseColor)(K);ce&&O.push({type:1,index:Q,color:ce})}}}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=re;let j=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){J<this.start?this.start=J:J>this.end&&(this.end=J)}markRangeDirty(J,A){J>A&&(P=J,J=A,A=P),J<this.start&&(this.start=J),A>this.end&&(this.end=A)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function W(J){return 0<=J&&J<256}j=d([S(0,C.IBufferService)],j)},844:(ee,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:(ee,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,b){this._data.get(d,S)||this._data.set(d,S,new h),this._data.get(d,S).set(u,p,b)}get(d,S,u,p){return this._data.get(d,S)?.get(u,p)}clear(){this._data.clear()}}},6114:(ee,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:(ee,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 b=this._getKey(this._array[p]);if(b>d)u=p-1;else{if(!(b<d)){for(;p>0&&this._getKey(this._array[p-1])===d;)p--;return p}S=p+1}}return S}}},7226:(ee,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(b){this._tasks.push(b),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(b){this._idleCallback=void 0;let x=0,m=0,o=b.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=b.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(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const x=Date.now()+b;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:(ee,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),b=S.buffer.lines.get(S.buffer.ybase+S.buffer.y);b&&p&&(b.isWrapped=p[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&p[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(ee,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:(ee,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),b=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 y=this._getCorrectBufferLength(l);if(y>this.lines.maxLength&&(this.lines.maxLength=y),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(y<this.lines.maxLength){const v=this.lines.length-y;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=y}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,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const C=(0,b.reflowLargerCreateNewLayout)(this.lines,_);(0,b.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(a,l,C.countRemoved)}}_reflowLargerAdjustViewport(a,l,_){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let y=_;for(;y-- >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 y=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 H=D[D.length-1].getTrimmedLength(),q=(0,b.reflowSmallerGetNewLineLengths)(D,this._cols,a),B=q.length-D.length;let P;P=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 re=[];for(let w=0;w<B;w++){const L=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);re.push(L)}re.length>0&&(C.push({start:E+D.length+y,newLines:re}),y+=re.length),D.push(...re);let j=q.length-1,W=q[j];W===0&&(j--,W=q[j]);let J=D.length-B-1,A=H;for(;J>=0;){const w=Math.min(A,W);if(D[j]===void 0)break;if(D[j].copyCellsFrom(D[J],A-w,W-w,w,!0),W-=w,W===0&&(j--,W=q[j]),A-=w,A===0){J--;const L=Math.max(J,0);A=(0,b.getWrappedLineTrimmedLength)(D,L,this._cols)}}for(let w=0;w<D.length;w++)q[w]<a&&D[w].setCell(q[w],_);let O=B-P;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+y)-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,H=0,q=C[H];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);let B=0;for(let j=Math.min(this.lines.maxLength-1,D+y-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[++H]}else this.lines.set(j,v[z--]);let P=0;for(let j=E.length-1;j>=0;j--)E[j].index+=P,this.lines.onInsertEmitter.fire(E[j]),P+=E[j].amount;const re=Math.max(0,D+y-this.lines.maxLength);re>0&&this.lines.onTrimEmitter.fire(re)}}translateBufferLineToString(a,l,_=0,C){const y=this.lines.get(a);return y?y.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:(ee,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 b=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 b=3*o,c.content=this._data[b+0],c.fg=this._data[b+1],c.bg=this._data[b+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 y=parseInt(l[C],10);y>=o&&delete this._combined[y]}const _=Object.keys(this._extendedAttrs);for(let C=0;C<_.length;C++){const y=parseInt(_[C],10);y>=o&&delete this._extendedAttrs[y]}}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 y=Object.keys(o._combined);for(let E=0;E<y.length;E++){const v=parseInt(y[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],y=2097151&C,E=2097152&C?this._combined[c]:y?(0,p.stringFromCodePoint)(y):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:(ee,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:(ee,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,b=d[S+1].getWidth(0)===2;return p&&b?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,b){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,y=0;for(;C<a.length;){const v=h(a,C,S),D=v-y,z=u-_,H=Math.min(D,z);a[l].copyCellsFrom(a[C],y,_,H,!1),_+=H,_===u&&(l++,_=0),y+=H,y===v&&(C++,y=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,b))}a[l].replaceCells(_,u,b);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,b=S[p],x=0;for(let m=0;m<d.length;m++)if(b===m){const o=S[++p];d.onDeleteEmitter.fire({index:m-x,amount:o}),m+=o-1,x+=o,b=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=[],b=d.map(((c,a)=>h(d,a,S))).reduce(((c,a)=>c+a));let x=0,m=0,o=0;for(;o<b;){if(b-o<u){p.push(b-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:(ee,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:(ee,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:(ee,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:(ee,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(b){this.line=b,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(b){return this._disposables.push(b),b}}f.Marker=u,u._nextId=1},7116:(ee,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:(ee,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:(ee,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,b,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+(b?"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+(b?"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",b||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",b||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(b&&!x||!u.altKey||u.metaKey)!b||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:(ee,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 b=h[p];b>65535?(b-=65536,u+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):u+=String.fromCharCode(b)}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 b=h.charCodeAt(p++);56320<=b&&b<=57343?d[u++]=1024*(this._interim-55296)+b-56320+65536:(d[u++]=this._interim,d[u++]=b),this._interim=0}for(let b=p;b<S;++b){const x=h.charCodeAt(b);if(55296<=x&&x<=56319){if(++b>=S)return this._interim=x,u;const m=h.charCodeAt(b);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,b,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 y,E=0;for(;(y=63&this.interim[++E])&&E<4;)C<<=6,C|=y;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(y=h[c++],(192&y)!=128){c--,_=!0;break}this.interim[E++]=y,C<<=6,C|=63&y}_||(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&(b=h[l+2])||128&(x=h[l+3]));)d[m++]=u,d[m++]=p,d[m++]=b,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(b=h[l++],(192&b)!=128){l--;continue}if(o=(15&u)<<12|(63&p)<<6|63&b,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(b=h[l++],(192&b)!=128){l--;continue}if(l>=S)return this.interim[0]=u,this.interim[1]=p,this.interim[2]=b,m;if(x=h[l++],(192&x)!=128){l--;continue}if(o=(7&u)<<18|(63&p)<<12|(63&b)<<6|63&x,o<65536||o>1114111)continue;d[m++]=o}}return m}}},225:(ee,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 b=0;b<S.length;++b)p.fill(0,S[b][0],S[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?p[b]:(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})(b,u)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,x){let m=this.wcwidth(b),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:(ee,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(b){super(),this._action=b,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(b,x){if(x!==void 0&&this._syncCalls>x)return void(this._syncCalls=0);if(this._pendingData+=b.length,this._writeBuffer.push(b),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(b,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+=b.length,this._writeBuffer.push(b),this._callbacks.push(x),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(x)}_innerWrite(b=0,x=!0){const m=b||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:(ee,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 b=u.toString(16),x=b.length<2?"0"+b:b;switch(p){case 4:return b[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 b=h.exec(p);if(b){const x=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/x*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/x*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/x*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),d.exec(p)&&[3,6,9,12].includes(p.length))){const b=p.length/3,x=[0,0,0];for(let m=0;m<3;++m){const o=parseInt(p.slice(b*m,b*m+b),16);x[m]=b===1?o<<4:b===2?o:b===3?o>>4:o>>8}return x}},f.toRgbString=function(u,p=16){const[b,x,m]=u;return`rgb:${S(b,p)}/${S(x,p)}/${S(m,p)}`}},5770:(ee,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.PAYLOAD_LIMIT=void 0,f.PAYLOAD_LIMIT=1e7},6351:(ee,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 b=new S.Params;b.addParam(0),f.DcsHandler=class{constructor(x){this._handler=x,this._data="",this._params=b,this._hitLimit=!1}hook(x){this._params=x.length>1||x.params[0]?x.clone():b,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=b,this._data="",this._hitLimit=!1,o)));return this._params=b,this._data="",this._hitLimit=!1,m}}},2015:(ee,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 b{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=b;const x=160;f.VT500_TRANSITION_TABLE=(function(){const o=new b(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 y;for(y in o.setDefault(1,0),o.addMany(l,0,2,0),C)o.addMany([24,26,153,154],y,3,0),o.addMany(a(128,144),y,3,0),o.addMany(a(144,152),y,3,0),o.add(156,y,0,0),o.add(27,y,11,1),o.add(157,y,4,8),o.addMany([152,158,159],y,0,7),o.add(155,y,11,3),o.add(144,y,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 y=c.intermediates.charCodeAt(C);if(32>y||y>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=y}}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,y=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],y=this._transitions.table[this.currentState<<8|(C<160?C:x)],y>>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,y,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 H=this._escHandlers[this._collect<<8|C];let q=H?H.length-1:-1;for(;q>=0&&(_=H[q](),_!==!0);q--)if(_ instanceof Promise)return this._preserveStack(4,H,q,y,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,y,v),_;C===27&&(y|=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,y,v),_;C===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&y}}}f.EscapeSequenceParser=m},6242:(ee,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,b){this._handlers[p]===void 0&&(this._handlers[p]=[]);const x=this._handlers[p];return x.push(b),{dispose:()=>{const m=x.indexOf(b);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,b,x){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(p,b,x);else this._handlerFb(this._id,"PUT",(0,S.utf32ToString)(p,b,x))}start(){this.reset(),this._state=1}put(p,b,x){if(this._state!==3){if(this._state===1)for(;b<x;){const m=p[b++];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-b>0&&this._put(p,b,x)}}end(p,b=!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=b,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,b,x){this._hitLimit||(this._data+=(0,S.utf32ToString)(p,b,x),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let b=!1;if(this._hitLimit)b=!1;else if(p&&(b=this._handler(this._data),b instanceof Promise))return b.then((x=>(this._data="",this._hitLimit=!1,x)));return this._data="",this._hitLimit=!1,b}}},8742:(ee,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 b=Array.isArray(u[0])?1:0;b<u.length;++b){const x=u[b];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 b=this._subParamsIdx[p]>>8,x=255&this._subParamsIdx[p];x-b>0&&u.push(Array.prototype.slice.call(this._subParams,b,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,b=255&this._subParamsIdx[u];return b-p>0?this._subParams.subarray(p,b):null}getSubParamsAll(){const u={};for(let p=0;p<this.length;++p){const b=this._subParamsIdx[p]>>8,x=255&this._subParamsIdx[p];x-b>0&&(u[p]=this._subParams.slice(b,x))}return u}addDigit(u){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,x=b[p-1];b[p-1]=~x?Math.min(10*x+u,h):u}}f.Params=d},5741:(ee,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:(ee,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:(ee,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:(ee,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:(ee,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:(ee,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(ee,f,h){var d=this&&this.__decorate||function(o,c,a,l){var _,C=arguments.length,y=C<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,c,a,l);else for(var E=o.length-1;E>=0;E--)(_=o[E])&&(y=(C<3?_(y):C>3?_(c,a,y):_(c,a))||y);return C>3&&y&&Object.defineProperty(c,a,y),y},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),b=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 b.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 y=a.lines.isFull;C===a.lines.length-1?y?a.lines.recycle().copyFrom(l):a.lines.push(l.clone()):a.lines.splice(C+1,0,l.clone()),y?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const y=C-_+1;a.lines.shiftElements(_+1,y-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:(ee,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(ee,f,h){var d=this&&this.__decorate||function(l,_,C,y){var E,v=arguments.length,D=v<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,C):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(l,_,C,y);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,y){_(C,y,l)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CoreMouseService=void 0;const u=h(2585),p=h(8460),b=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 b.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(ee,f,h){var d=this&&this.__decorate||function(a,l,_,C){var y,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--)(y=a[D])&&(v=(E<3?y(v):E>3?y(l,_,v):y(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),b=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 b.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:(ee,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 b=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,y=0;for(const E of this._decorations.getKeyIterator(l))C=E.options.x??0,y=C+(E.options.width??1),a>=C&&a<y&&(!_||(E.options.layer??"bottom")===_)&&(yield E)}forEachDecorationAtCell(a,l,_,C){this._decorations.forEachByKey(l,(y=>{b=y.options.x??0,x=b+(y.options.width??1),a>=b&&a<x&&(!_||(y.options.layer??"bottom")===_)&&C(y)}))}}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:(ee,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.InstantiationService=f.ServiceCollection=void 0;const d=h(2585),S=h(8343);class u{constructor(...b){this._entries=new Map;for(const[x,m]of b)this.set(x,m)}set(b,x){const m=this._entries.get(b);return this._entries.set(b,x),m}forEach(b){for(const[x,m]of this._entries.entries())b(x,m)}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}f.ServiceCollection=u,f.InstantiationService=class{constructor(){this._services=new u,this._services.set(d.IInstantiationService,this)}setService(p,b){this._services.set(p,b)}getService(p){return this._services.get(p)}createInstance(p,...b){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:b.length;if(b.length!==o)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${o+1} conflicts with ${b.length} static arguments`);return new p(...b,...m)}}},7866:function(ee,f,h){var d=this&&this.__decorate||function(o,c,a,l){var _,C=arguments.length,y=C<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,c,a,l);else for(var E=o.length-1;E>=0;E--)(_=o[E])&&(y=(C<3?_(y):C>3?_(c,a,y):_(c,a))||y);return C>3&&y&&Object.defineProperty(c,a,y),y},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),b={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=b[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((y=>JSON.stringify(y))).join(", ")})`);const C=l.apply(this,_);return x.trace(`GlyphRenderer#${l.name} return`,C),C}}},7302:(ee,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 b 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=b},2660:function(ee,f,h){var d=this&&this.__decorate||function(b,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(b,x,m,o);else for(var _=b.length-1;_>=0;_--)(c=b[_])&&(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(b,x){return function(m,o){x(m,o,b)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OscLinkService=void 0;const u=h(2585);let p=f.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const x=this._bufferService.buffer;if(b.id===void 0){const _=x.addMarker(x.ybase+x.y),C={data:b,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(C,_))),this._dataByLinkId.set(C.id,C),C.id}const m=b,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(b,x){const m=this._dataByLinkId.get(b);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(b){return this._dataByLinkId.get(b)?.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,x){const m=b.lines.indexOf(x);m!==-1&&(b.lines.splice(m,1),b.lines.length===0&&(b.data.id!==void 0&&this._entriesWithId.delete(b.key),this._dataByLinkId.delete(b.id)))}};f.OscLinkService=p=d([S(0,u.IBufferService)],p)},8343:(ee,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,b,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:(ee,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:(ee,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeService=void 0;const d=h(8460),S=h(225);class u{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,x,m=!1){return(16777215&b)<<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 b=new S.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let x=0,m=0;const o=b.length;for(let c=0;c<o;++c){let a=b.charCodeAt(c);if(55296<=a&&a<=56319){if(++c>=o)return x+this.wcwidth(a);const C=b.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(b,x){return this._activeProvider.charProperties(b,x)}}f.UnicodeService=u}},G={};function fe(ee){var f=G[ee];if(f!==void 0)return f.exports;var h=G[ee]={exports:{}};return oe[ee].call(h.exports,h,h.exports,fe),h.exports}var Se={};return(()=>{var ee=Se;Object.defineProperty(ee,"__esModule",{value:!0}),ee.Terminal=void 0;const f=fe(9042),h=fe(3236),d=fe(844),S=fe(5741),u=fe(8285),p=fe(7975),b=fe(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 b.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")}}ee.Terminal=m})(),Se})()))})(Vo)),Vo.exports}var gv=mv(),Xo={exports:{}},Wf;function pv(){return Wf||(Wf=1,(function(ie,ge){(function(oe,G){ie.exports=G()})(self,(()=>(()=>{var oe={};return(()=>{var G=oe;Object.defineProperty(G,"__esModule",{value:!0}),G.FitAddon=void 0,G.FitAddon=class{activate(fe){this._terminal=fe}dispose(){}fit(){const fe=this.proposeDimensions();if(!fe||!this._terminal||isNaN(fe.cols)||isNaN(fe.rows))return;const Se=this._terminal._core;this._terminal.rows===fe.rows&&this._terminal.cols===fe.cols||(Se._renderService.clear(),this._terminal.resize(fe.cols,fe.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const fe=this._terminal._core,Se=fe._renderService.dimensions;if(Se.css.cell.width===0||Se.css.cell.height===0)return;const ee=this._terminal.options.scrollback===0?0:fe.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")))-ee;return{cols:Math.max(2,Math.floor(p/Se.css.cell.width)),rows:Math.max(1,Math.floor(u/Se.css.cell.height))}}}})(),oe})()))})(Xo)),Xo.exports}var Sv=pv();const Ff=16e3,yv=30,bv=.004,Cv=["audio/webm;codecs=opus","audio/webm","audio/mp4"];function Ev(ie){if(!ie.length)return 0;let ge=0;for(const oe of ie)ge+=oe*oe;return Math.sqrt(ge/ie.length)}function wv(ie){return Ev(ie)<bv}async function xv(ie){const ge=new AudioContext;try{const oe=await ge.decodeAudioData(await ie.arrayBuffer()),G=Math.max(1,Math.ceil(oe.duration*Ff)),fe=new OfflineAudioContext(1,G,Ff),Se=fe.createBufferSource();return Se.buffer=oe,Se.connect(fe.destination),Se.start(),(await fe.startRendering()).getChannelData(0)}finally{ge.close()}}class Dv{constructor(){this.stream=null,this.recorder=null,this.chunks=[]}async start(){this.stream=await navigator.mediaDevices.getUserMedia({audio:!0});const ge=Cv.find(oe=>MediaRecorder.isTypeSupported(oe));this.recorder=new MediaRecorder(this.stream,ge?{mimeType:ge}:void 0),this.chunks=[],this.recorder.ondataavailable=oe=>{oe.data.size&&this.chunks.push(oe.data)},this.recorder.start()}stop(){return new Promise(ge=>{const oe=this.recorder;if(!oe||oe.state==="inactive"){this.dispose(),ge(null);return}oe.onstop=()=>{const G=new Blob(this.chunks,{type:oe.mimeType||"audio/webm"});if(this.dispose(),!G.size){ge(null);return}xv(G).then(ge,()=>ge(null))},oe.stop()})}cancel(){const ge=this.recorder;ge&&ge.state!=="inactive"&&(ge.onstop=null,ge.stop()),this.dispose()}dispose(){this.stream?.getTracks().forEach(ge=>ge.stop()),this.stream=null,this.recorder=null,this.chunks=[]}}const St=()=>window.zerog;function at({name:ie,className:ge=""}){const oe={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:`icon-svg ${ge}`.trim(),"aria-hidden":!0};switch(ie){case"plus":return M.jsx("svg",{...oe,children:M.jsx("path",{d:"M12 5v14M5 12h14"})});case"panel-left":return M.jsxs("svg",{...oe,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",{...oe,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",{...oe,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",{...oe,children:M.jsx("path",{d:"M4 7h16M4 12h16M4 17h10"})});case"ssh":return M.jsx("svg",{...oe,children:M.jsx("path",{d:"M7 17l5-5-5-5M12 17h7"})});case"history":return M.jsxs("svg",{...oe,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",{...oe,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",{...oe,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",{...oe,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",{...oe,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",{...oe,children:M.jsx("rect",{x:"5",y:"5",width:"14",height:"14",rx:"1.5"})});case"maximize":return M.jsx("svg",{...oe,children:M.jsx("path",{d:"M8 4H4v4M16 4h4v4M4 16v4h4M20 16v4h-4"})});case"restore":return M.jsx("svg",{...oe,children:M.jsx("path",{d:"M8 8h12v12H8zM4 16V4h12"})});case"chevron-left":return M.jsx("svg",{...oe,children:M.jsx("path",{d:"M15 5l-7 7 7 7"})});case"chevron-right":return M.jsx("svg",{...oe,children:M.jsx("path",{d:"M9 5l7 7-7 7"})});case"split-v":return M.jsxs("svg",{...oe,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",{...oe,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",{...oe,children:M.jsx("path",{d:"M6 6l12 12M18 6L6 18"})});case"mic":return M.jsxs("svg",{...oe,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:ie,active:ge=!1,ghosted:oe=!1,onClick:G}){const fe=ie.kind==="ssh"?`SSH · ${ie.host}`:ie.backend==="powershell"?`PowerShell · ${ie.cwd}`:ie.backend==="wsl"?`WSL${ie.wslDistribution?` · ${ie.wslDistribution}`:""} · ${ie.cwd}`:ie.backend==="zsh"?`zsh · ${ie.cwd}`:ie.persistence==="screen"?`screen · ${ie.cwd}`:`local · process only · ${ie.cwd}`;return M.jsxs("button",{type:"button",className:`session-row ${ge?"active":""} ${oe?"session-ghosted":""}`,onClick:G,children:[M.jsx("span",{className:`status-dot ${ie.status}`}),M.jsxs("span",{className:"session-copy",children:[M.jsx("b",{children:ie.name}),M.jsx("small",{children:fe})]}),M.jsx("span",{className:"session-state",children:oe?"↗":ie.status==="connected"?"●":"○"})]})}function Av({sessionId:ie,focused:ge,onStatus:oe,theme:G}){const fe=Ce.useRef(null),Se=Ce.useRef(null),ee=Ce.useRef(oe);return ee.current=oe,Ce.useEffect(()=>{if(!fe.current)return;const f=fe.current,h=new gv.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:Mv(G),convertEol:!0}),d=new Sv.FitAddon;h.loadAddon(d),h.open(f),Se.current=h;const S=St();let u=!1,p=0;const b=()=>{if(!(u||!f.isConnected)&&!(f.clientWidth<20||f.clientHeight<20)){try{d.fit()}catch{return}S&&h.cols>0&&h.rows>0&&ie&&S.resize(ie,h.cols,h.rows)}},x=()=>{cancelAnimationFrame(p),p=requestAnimationFrame(()=>{b(),p=requestAnimationFrame(b)})};if(!S)return x(),h.writeln("\x1B[90mZeroG Terminal\x1B[0m"),h.writeln("\x1B[31mPreload API unavailable. Rebuild the app.\x1B[0m"),ee.current("Preload API unavailable"),()=>{u=!0,cancelAnimationFrame(p),Se.current=null,h.dispose()};const m=S.onData((l,_)=>{l===ie&&h.write(_)}),o=S.onStatus((l,_)=>{l===ie&&(ee.current(_),x())}),c=h.onData(l=>{ie&&S.write(ie,l)});h.attachCustomKeyEventHandler(l=>{if(l.type!=="keydown")return!0;const _=l.key.toLowerCase();if(!(l.ctrlKey||l.metaKey)||!l.shiftKey)return!0;if(_==="c"){const y=h.getSelection();return y&&S.copyText(y).catch(E=>{ee.current(E instanceof Error?E.message:String(E))}),!1}return _==="v"?(S.readText().then(y=>{y&&(typeof h.paste=="function"?h.paste(y):ie&&S.write(ie,y))}).catch(y=>{ee.current(y instanceof Error?y.message:String(y))}),!1):!0}),typeof h.onSelectionChange=="function"&&h.onSelectionChange(()=>{const l=h.getSelection();l&&S.copyText(l).catch(()=>{})});const a=new ResizeObserver(()=>x());return a.observe(f),window.addEventListener("resize",x),document.fonts?.ready?.then(()=>{u||x()}).catch(()=>{}),x(),ie?S.attachSession(ie).then(l=>{l.persistence==="process"?ee.current(`${l.host} · ${l.name} · process only (install screen for persistence)`):ee.current(`${l.host} · ${l.name}`),x()}).catch(l=>{ee.current(l instanceof Error?l.message:String(l))}):(h.writeln("\x1B[90mZeroG Terminal\x1B[0m"),h.writeln("\x1B[90mSelect a session or create a local/SSH connection.\x1B[0m")),()=>{u=!0,cancelAnimationFrame(p),c.dispose(),m(),o(),a.disconnect(),window.removeEventListener("resize",x),Se.current=null,h.dispose()}},[G]),Ce.useEffect(()=>{ge&&Se.current?.focus()},[ge]),M.jsx("div",{className:"terminal",ref:fe,onMouseDownCapture:f=>f.preventDefault()})}function Tv({index:ie,onCreate:ge}){return M.jsxs("article",{className:"pane empty-pane",children:[M.jsxs("div",{className:"pane-title",children:[M.jsxs("span",{children:["PANE ",ie]}),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:ge,children:"Choose session"})]})]})}function Pf(ie,ge=[]){return{id:`ws-${crypto.randomUUID()}`,name:ie,sessionIds:ge}}function Rv(){const[ie,ge]=Ce.useState(()=>{try{return window.localStorage.getItem("zerog-theme")==="light"?"light":"dark"}catch{return"dark"}}),[oe,G]=Ce.useState([]),[fe,Se]=Ce.useState(()=>[Pf("Workspace")]),[ee,f]=Ce.useState(()=>fe[0]?.id??""),[h,d]=Ce.useState(null),[S,u]=Ce.useState("Ready"),[p,b]=Ce.useState(!1),[x,m]=Ce.useState(!1),[o,c]=Ce.useState("terminals"),[a,l]=Ce.useState(!1),[_,C]=Ce.useState(!0),[y,E]=Ce.useState(null),[v,D]=Ce.useState(null),[z,H]=Ce.useState(!1),[q,B]=Ce.useState("stack"),[P,re]=Ce.useState(),[j,W]=Ce.useState(null),[J,A]=Ce.useState("Workspace"),[O,w]=Ce.useState("term"),[L,K]=Ce.useState(""),[Q,ce]=Ce.useState(""),[ue,I]=Ce.useState(null),[R,$]=Ce.useState({status:"idle",sessionId:null}),le=Ce.useRef(null),ve=Ce.useRef(null),de=Ce.useRef(null),Te=Ce.useRef(void 0),[ze,Ve]=Ce.useState([]),[et,xe]=Ce.useState("bash"),[si,ri]=Ce.useState(""),[Yi,ni]=Ce.useState([]),[gi,mt]=Ce.useState([]),[$e,At]=Ce.useState([]),[ai,hi]=Ce.useState([]),[Ot,pi]=Ce.useState(!1);Ce.useEffect(()=>{document.documentElement.dataset.theme=ie;try{window.localStorage.setItem("zerog-theme",ie)}catch{}},[ie]);const Je=Ce.useMemo(()=>fe.find(N=>N.id===ee)??fe[0]??null,[fe,ee]),Le=Ce.useMemo(()=>{if(!Je)return oe;const N=new Set(Je.sessionIds),he=oe.filter(ae=>N.has(ae.id));if(Je.id===fe[0]?.id){const ae=new Set(fe.flatMap(ye=>ye.sessionIds)),_e=oe.filter(ye=>!ae.has(ye.id));return[...new Map([...he,..._e].map(ye=>[ye.id,ye])).values()]}return he},[Je,oe,fe]),Ie=Ce.useCallback(async()=>{const N=St();if(C(!0),E(null),!N){E("Preload API unavailable"),u("Preload API unavailable"),C(!1);return}try{const he=await N.listSessions();G(he),u(he.length?`${he.length} session${he.length===1?"":"s"}`:"No sessions")}catch(he){const ae=he instanceof Error?he.message:String(he);E(ae),u(ae)}finally{C(!1)}},[]);Ce.useEffect(()=>{Ie()},[Ie]),Ce.useEffect(()=>{const N=St();N&&N.listBackends?.().then(Ve).catch(()=>Ve([]))},[]),Ce.useEffect(()=>{if(et!=="wsl"){ni([]),ri("");return}const N=St();N&&N.listWslDistributions?.().then(ni).catch(()=>ni([]))},[et]),Ce.useEffect(()=>{if(!a){mt([]);return}const N=St();N&&N.listHistory?.().then(mt).catch(()=>mt([]))},[a]),Ce.useEffect(()=>{const N=St(),he=yi((h?.kind==="ssh"?h.host:"")||(P?oe.find(_e=>_e.id===P)?.host:"")||""),ae=he?$e.filter(_e=>yi(_e.hostName??"")===he||_e.alias===he):[];if(ae.length===0){hi([]);return}N?.discoverRemoteScreens&&(pi(!0),Promise.allSettled(ae.map(_e=>N.discoverRemoteScreens(_e))).then(_e=>{const De=[];_e.forEach((ye,we)=>{ye.status==="fulfilled"&&Array.isArray(ye.value)&&ye.value.forEach(tt=>{De.push({session:tt,connection:ae[we]})})}),hi(De)}).catch(()=>hi([])).finally(()=>pi(!1)))},[$e,h?.host,oe,P]),Ce.useEffect(()=>{const N=St();N&&N.listKnownConnections?.().then(At).catch(()=>At([]))},[]),Ce.useEffect(()=>{!h&&Le.length&&d(Le[0])},[h,Le]),Ce.useEffect(()=>{const N=he=>{if(he.key==="Escape"){if(R.status==="listening"){he.preventDefault(),un(),u("Voice cancelled");return}if(z){he.preventDefault(),H(!1);return}if(ue){he.preventDefault(),I(null);return}if(v){he.preventDefault(),D(null);return}}if(!(he.ctrlKey||he.metaKey)||!he.shiftKey)return;const ae=he.key.toLowerCase();ae==="o"&&(he.preventDefault(),H(_e=>!_e)),ae==="n"&&(he.preventDefault(),A(Wo(fe)),D("workspace")),ae==="t"&&(he.preventDefault(),w(Zf(Je?.name??"term",Le)),D("local")),ae==="l"&&(he.preventDefault(),B(_e=>_e==="stack"?"split-v":"stack")),ae==="b"&&(he.preventDefault(),m(_e=>!_e))};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[z,ue,v,R.status,fe,Je,Le]);const ht=async N=>{d(N),u(N.persistence==="process"?`${N.host} · ${N.name} · process only (install screen for persistence)`:`${N.host} · ${N.name}`),H(!1)},rt=(N,he=ee)=>{Se(ae=>ae.map(_e=>_e.id!==he?{..._e,sessionIds:_e.sessionIds.filter(De=>De!==N.id)}:_e.sessionIds.includes(N.id)?_e:{..._e,sessionIds:[..._e.sessionIds,N.id]}))},fi=async N=>{N.preventDefault();const he=J.trim()||Wo(fe),ae=Pf(he);Se(_e=>[..._e,ae]),f(ae.id),d(null),D(null),u(`Workspace “${he}” ready`)},Tt=async N=>{N.preventDefault();const he=St();if(he){if(Le.length>=4){u("This workspace supports up to 4 sessions."),D(null);return}b(!0);try{const ae=await he.createLocalSession({name:O,backend:et,wslDistribution:et==="wsl"?si:void 0});G(_e=>[..._e.filter(De=>De.id!==ae.id),ae]),rt(ae),re(ae.id),W(null),B(Ta(Le.length+1)),D(null),await ht(ae)}catch(ae){u(ae instanceof Error?ae.message:String(ae))}finally{b(!1)}}},Ra=async N=>{N.preventDefault();const he=St();if(he){if(Le.length>=4){u("This workspace supports up to 4 sessions."),D(null);return}b(!0);try{const ae=await he.createSshSession({name:L||void 0,target:Q});G(_e=>[..._e.filter(De=>De.id!==ae.id),ae]),rt(ae),re(ae.id),W(null),B(Ta(Le.length+1)),D(null),await ht(ae)}catch(ae){u(ae instanceof Error?ae.message:String(ae))}finally{b(!1)}}},ln=async(N,he)=>{try{const ae=St();if(!ae)return;u(`Attaching to ${N.name} on ${he.alias}…`);const De=(await ae.buildRemoteScreenAttach?.(he,N.screenName??N.name))?.args,ye=Array.isArray(De)?De.indexOf("--"):-1,we=ye>0?De[ye-1]:he.hostName??he.alias,tt=await ae.createSshSession({target:we,name:N.name}),Ye=N.screenName??N.name,Ke={...tt,screenName:Ye,persistence:"screen",backend:"screen"};G(gt=>gt.some(bt=>bt.id===Ke.id)?gt.map(bt=>bt.id===Ke.id?Ke:bt):[...gt,Ke]),rt(Ke),await ht(Ke),await ae.attachSession(Ke.id);const Ei=De&&ye>0?De.slice(ye+1).join(" "):`screen -x ${Ye}`;ae.write(Ke.id,`${Ei}\r`),u(`Connected to ${N.name} on ${he.alias}`)}catch(ae){u(ae instanceof Error?ae.message:String(ae))}},on=()=>{A(Wo(fe)),D("workspace")},Si=()=>{w(Zf(Je?.name??"term",Le)),xe("bash"),ri(""),D("local")},yi=N=>N.replace(/^.*@/,""),ks=()=>{const N=yi((h?.kind==="ssh"?h.host:"")||(P?oe.find(we=>we.id===P)?.host:"")||""),he=N?ai.filter(we=>yi(we.connection.hostName??"")===N||we.connection.alias===N).reduce((we,tt)=>{const Ye=tt.connection.hostName||tt.connection.alias;return(we[Ye]=we[Ye]||[]).push(tt),we},{}):{},ae=oe.filter(we=>we.persistence==="screen"&&!Le.some(tt=>tt.id===we.id)),_e=Object.keys(he).length>0,De=ae.length>0;if(!_e&&!De)return M.jsxs("div",{className:"session-empty",children:[M.jsx("b",{children:"No screens"}),M.jsx("small",{children:N?"No remote screens found for this host.":"Open a remote session to discover screens, or start a local screen."})]});const ye=[];if(_e)for(const[we,tt]of Object.entries(he)){const Ye=tt,Ke=M.jsx("div",{className:"session-group-label",children:we},`${we}-label`),Ei=Ye.map(({session:gt})=>{const Xt=Ye.find(bt=>bt.session.id===gt.id)?.connection;return M.jsx(Aa,{session:gt,ghosted:!0,onClick:async()=>{if(!Xt)return;const bt=St();if(bt)try{const Rt=(await bt.buildRemoteScreenAttach?.(Xt,gt.screenName??gt.name))?.args,ms=Array.isArray(Rt)&&Rt.indexOf("--")>0?Rt[Rt.indexOf("--")-1]:Xt.hostName??Xt.alias,je={...await bt.createSshSession({target:ms,name:gt.name}),screenName:gt.screenName??gt.name,persistence:"screen",backend:"screen"};G(Vi=>Vi.some(Mt=>Mt.id===je.id)?Vi.map(Mt=>Mt.id===je.id?je:Mt):[...Vi,je]),rt(je),re(je.id),W(null),q==="stack"&&B("split-v"),await ht(je),await bt.attachSession(je.id);const dn=Rt&&Rt.indexOf("--")>0?Rt.slice(Rt.indexOf("--")+1).join(" "):`screen -x ${je.screenName??je.name}`;await new Promise(Vi=>{let Mt=!1;const wi=()=>{Mt||(Mt=!0,Vi())},Po=bt.onData?.((_n,mr)=>{_n===je.id&&(/\n(\S+)[#$] /.test(mr)||/(^|\r?\n)\S+[#$] /.test(mr))&&wi()});setTimeout(wi,1e3)}),bt.write(je.id,`${dn}\r`),await Ie(),u(`Attached ${je.name} on ${Xt.alias}`)}catch(li){u(li instanceof Error?li.message:String(li))}}},gt.id)});ye.push(Ke,...Ei)}return De&&!_e&&(ye.push(M.jsx("div",{className:"session-group-label",children:"local"},"local-label")),ae.forEach(we=>{ye.push(M.jsx(Aa,{session:we,ghosted:!0,onClick:()=>{rt(we),ht(we),u(`Reconnecting to ${we.name}…`)}},we.id))})),M.jsx(M.Fragment,{children:ye})},bi=q==="split-v"?"pane-grid split-v":q==="split-h"?"pane-grid split-h":q==="grid"?"pane-grid grid":"pane-grid",Ci=q==="stack"?1:q==="grid"?4:2;q==="stack"?h||Le.slice(0,1):Le.slice(0,Ci);const Ki=Le.slice(0,4),Ma=Math.max(Ci,Ki.length),cn=N=>{re(N),W(he=>he===N?null:N)},Hs=N=>{if(!j||Le.length<2)return;const ae=(Le.findIndex(De=>De.id===j)+N+Le.length)%Le.length,_e=Le[ae];re(_e.id),d(_e),W(_e.id)},vs=()=>{if(!ve.current){const N=new Worker(new URL(""+new URL("voice-worker-Bde9NFkO.js",import.meta.url).href,import.meta.url),{type:"module"});N.onmessage=he=>{const ae=he.data;if(ae.type==="result"){const _e=de.current;de.current=null,$({status:"idle",sessionId:null}),ae.text&&_e?(St()?.write(_e,ae.text),u(`Voice: "${ae.text}"`)):u("Voice: nothing transcribed")}else ae.type==="error"?(de.current=null,$({status:"idle",sessionId:null}),u(`Voice error: ${ae.message}`)):ae.type==="loading"&&typeof ae.progress=="number"&&u(`Loading speech model… ${Math.round(ae.progress)}%`)},ve.current=N}return ve.current},un=()=>{window.clearTimeout(Te.current),le.current?.cancel(),le.current=null,de.current=null,$({status:"idle",sessionId:null})},vr=async()=>{const N=le.current,he=de.current;if(!N||!he)return;window.clearTimeout(Te.current),le.current=null,$({status:"transcribing",sessionId:he}),u("Transcribing…");const ae=await N.stop();if(!ae||wv(ae)){de.current=null,$({status:"idle",sessionId:null}),u("Voice: no speech detected");return}vs().postMessage({type:"transcribe",audio:ae},[ae.buffer])},hn=async N=>{if(R.status==="listening"&&R.sessionId===N.id){await vr();return}if(R.status!=="idle")return;const he=new Dv;try{await he.start()}catch(ae){u(`Microphone unavailable: ${ae instanceof Error?ae.message:String(ae)}`);return}le.current=he,de.current=N.id,$({status:"listening",sessionId:N.id}),re(N.id),window.clearTimeout(Te.current),Te.current=window.setTimeout(()=>{vr()},yv*1e3),u(`Listening on ${N.name}… click the mic again or press Esc to finish`)},fn=async N=>{R.sessionId===N.id&&un();const he=Le.filter(_e=>_e.id!==N.id);Se(_e=>_e.map(De=>({...De,sessionIds:De.sessionIds.filter(ye=>ye!==N.id)}))),h?.id===N.id&&d(he[0]??null),P===N.id&&re(he[0]?.id),j===N.id&&W(null),B(Ta(he.length));const ae=St();if(ae)try{await ae.closeSession(N.id)}catch(_e){u(_e instanceof Error?_e.message:String(_e));return}u(N.persistence==="screen"?`Closed ${N.name} · screen session survives`:N.kind==="ssh"?`Closed ${N.name} · SSH connection ended`:`Closed ${N.name} · process ended`),Ie()};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:fe.map(N=>M.jsxs("button",{type:"button",className:`workspace-tab ${N.id===Je?.id?"active":""}`,onClick:()=>{f(N.id);const he=oe.find(ae=>N.sessionIds.includes(ae.id));d(he??null)},children:[M.jsx("span",{className:"tab-dot"}),N.name,M.jsx("span",{className:"tab-meta",children:N.sessionIds.length||(N.id===fe[0]?.id?Le.length:0)})]},N.id))}),M.jsxs("div",{className:"window-actions",children:[M.jsxs("button",{type:"button",className:"bar-button",onClick:()=>H(N=>!N),title:"Session overview (Ctrl+Shift+O)",children:[M.jsx(at,{name:"grid"}),M.jsx("span",{children:"Overview"})]}),M.jsxs("button",{type:"button",className:"bar-button",onClick:on,title:"New workspace (Ctrl+Shift+N)",children:[M.jsx(at,{name:"plus"}),M.jsx("span",{children:"New"})]}),M.jsxs("button",{type:"button",className:"bar-button",onClick:async()=>{const N=St();N&&I(await N.requestAiCommand())},children:[M.jsx(at,{name:"spark"}),M.jsx("span",{children:"Suggest"})]}),M.jsx("button",{type:"button",className:"bar-button theme-button",onClick:()=>ge(N=>N==="dark"?"light":"dark"),title:`Switch to ${ie==="dark"?"light":"dark"} theme`,"aria-label":`Switch to ${ie==="dark"?"light":"dark"} theme`,"aria-pressed":ie==="light",children:M.jsx(at,{name:ie==="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(N=>!N),children:M.jsx(at,{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(at,{name:"sessions"})}),M.jsx("button",{type:"button",className:"rail-button",onClick:()=>H(!0),title:"Overview",children:M.jsx(at,{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(at,{name:"ssh"})}),M.jsx("button",{type:"button",className:"rail-button",title:"Settings",children:M.jsx(at,{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:Je?.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(at,{name:"panel-left"})}),M.jsx("button",{type:"button",className:"square-button history-button",onClick:()=>l(N=>!N),title:"Session history","aria-label":"Open session history","aria-expanded":a,children:M.jsx(at,{name:"history"})}),M.jsx("button",{type:"button",className:"square-button",onClick:Si,title:"New local terminal","aria-label":"New local terminal",children:M.jsx(at,{name:"plus"})})]})]}),M.jsx("div",{className:"drawer-tools",role:"tablist","aria-label":"Session inventory",children:["terminals","screens","connections"].map(N=>{const he={terminals:"Terminals",screens:"Screens",connections:"Connections"},ae=N==="terminals"?Le.length:N==="screens"?oe.filter(_e=>(_e.persistence==="screen"||_e.screenName)&&!Le.some(De=>De.id===_e.id)).length+ai.length:oe.filter(_e=>_e.kind==="ssh").length;return M.jsxs("button",{type:"button",role:"tab","aria-selected":o===N,className:`drawer-tool ${o===N?"active":""}`,onClick:()=>c(N),children:[he[N]," ",M.jsx("span",{children:ae})]},N)})}),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."})]}):y?M.jsxs("div",{className:"session-empty session-error",children:[M.jsx("b",{children:"Session inventory unavailable"}),M.jsx("small",{children:y}),M.jsx("button",{type:"button",onClick:()=>{Ie()},children:"Retry"})]}):o==="terminals"?Le.length?Le.map(N=>M.jsx(Aa,{session:N,active:h?.id===N.id,onClick:()=>{ht(N)}},N.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"?ks():o==="connections"?$e.length?$e.map(N=>M.jsxs("button",{type:"button",className:"session-row",onClick:()=>{ce(N.hostName??N.alias),D("ssh")},children:[M.jsx("span",{className:"status-dot"}),M.jsxs("span",{className:"session-copy",children:[M.jsx("b",{children:N.alias}),M.jsx("small",{children:N.hostName?`${N.user??""}${N.user?"@":""}${N.hostName}${N.port?`:${N.port}`:""}`:"Saved SSH connection"})]}),M.jsx("span",{className:"session-state",children:"→"})]},N.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."})]}):oe.filter(N=>N.kind==="ssh"&&N.scope==="remote"&&N.source==="discovered").length?oe.filter(N=>N.kind==="ssh"&&N.scope==="remote"&&N.source==="discovered").map(N=>M.jsx(Aa,{session:N,ghosted:!0,onClick:async()=>{rt(N),u(`Attaching remote screen ${N.name}…`);const he=St();if(he)try{const _e=(await he.buildRemoteScreenAttach?.({alias:N.host,hostName:N.host},N.screenName??N.name))?.args?.find(ye=>ye.includes("@")||!ye.startsWith("-"))??N.host,De=await he.createSshSession({target:_e,name:N.name});G(ye=>ye.map(we=>we.id===N.id?De:we)),await ht(De)}catch(ae){u(ae instanceof Error?ae.message:String(ae))}}},N.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:Si,children:[M.jsx(at,{name:"plus"})," Local terminal ",M.jsx("kbd",{children:"⌘⇧T"})]}),M.jsxs("button",{type:"button",className:"drawer-action",onClick:()=>D("ssh"),children:[M.jsx(at,{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(at,{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??Je?.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"||j?"layout-button active":"layout-button",onClick:()=>{if(j)W(null);else if(Le.length>1){const N=P??h?.id??Le[0]?.id;N&&W(N)}else B("stack")},title:j?"Restore panes":Le.length>1?"Maximize focused pane":"Single pane",children:M.jsx(at,{name:"stack"})}),M.jsx("button",{type:"button",className:q==="split-v"&&!j?"layout-button active":"layout-button",onClick:()=>{W(null),B("split-v")},title:"Vertical split",children:M.jsx(at,{name:"split-v"})}),M.jsx("button",{type:"button",className:q==="split-h"&&!j?"layout-button active":"layout-button",onClick:()=>{W(null),B("split-h")},title:"Horizontal split",children:M.jsx(at,{name:"split-h"})}),M.jsx("button",{type:"button",className:q==="grid"&&!j?"layout-button active":"layout-button",onClick:()=>{W(null),B("grid")},title:"Four-pane grid",children:M.jsx(at,{name:"grid"})})]})]}),M.jsx("div",{className:`${bi} ${j?"maximized-pane-grid":""}`,children:Array.from({length:Ma},(N,he)=>{const ae=Ki[he];if(!ae)return M.jsx(Tv,{index:he+1,onCreate:Si},he);const _e=R.sessionId===ae.id&&R.status!=="idle"?R.status:null;return M.jsxs("article",{className:`pane terminal-pane ${P===ae.id?"focused":""} ${j===ae.id?"maximized-pane":""} ${he>=Ci?"overflow-pane":""}`,onMouseDown:()=>re(ae.id),children:[M.jsxs("div",{className:"pane-title",children:[M.jsxs("span",{children:[M.jsx("span",{className:"pane-live"})," ",ae.name]}),M.jsxs("span",{className:"pane-actions",children:[(j||Le.length>1)&&M.jsxs(M.Fragment,{children:[M.jsx("button",{type:"button",className:"pane-nav",onClick:()=>Hs(-1),title:"Previous session",children:M.jsx(at,{name:"chevron-left"})}),M.jsx("button",{type:"button",className:"pane-nav",onClick:()=>Hs(1),title:"Next session",children:M.jsx(at,{name:"chevron-right"})})]}),p?"connecting…":_e?`${_e}…`:ae.kind==="ssh"?"ssh":"bash",M.jsx("button",{type:"button",className:_e?`pane-mic ${_e}`:"pane-mic",onClick:()=>{hn(ae)},disabled:R.status!=="idle"&&!_e,title:_e==="listening"?"Stop and transcribe":_e==="transcribing"?"Transcribing…":"Voice input","aria-label":_e==="listening"?`Stop recording ${ae.name}`:`Voice input for ${ae.name}`,children:M.jsx(at,{name:"mic"})}),M.jsx("button",{type:"button",className:"pane-maximize",onClick:()=>cn(ae.id),title:j?"Restore pane":"Maximize pane",children:M.jsx(at,{name:j?"restore":"maximize"})}),M.jsx("button",{type:"button",className:"pane-close",onClick:()=>{fn(ae)},title:"Close pane","aria-label":`Close ${ae.name}`,children:M.jsx(at,{name:"x"})})]})]}),M.jsx(Av,{sessionId:ae.id,focused:P===ae.id,onStatus:u,theme:ie})]},ae.id)})}),M.jsxs("footer",{className:"status-bar",children:[M.jsx("span",{children:"ZeroG"}),M.jsx("span",{className:"status-separator"}),M.jsx("span",{children:Je?.name??"Workspace"}),M.jsx("span",{className:"status-separator"}),M.jsx("span",{children:j?"maximized pane":q==="stack"?"1 pane":`${Ci} 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:()=>H(!1),children:M.jsxs("section",{className:"overview",onClick:N=>N.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:Je?.name??"Choose a session"})]}),M.jsx("button",{type:"button",className:"close-button",onClick:()=>H(!1),children:"Esc"})]}),M.jsx("div",{className:"thumbnail-grid",children:Le.length?Le.map(N=>M.jsxs("button",{type:"button",className:`thumbnail ${h?.id===N.id?"active":""}`,onClick:()=>{ht(N)},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:N.name}),M.jsxs("small",{children:[N.kind==="ssh"?N.host:"local screen"," · ",N.status]})]})]},N.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:()=>{H(!1),Si()},children:"+ Local terminal"}),M.jsx("button",{type:"button",onClick:()=>{H(!1),D("ssh")},children:"Connect SSH"}),M.jsx("button",{type:"button",onClick:()=>{H(!1),on()},children:"+ Workspace"}),M.jsx("span",{className:"overview-hint",children:"Press Esc to close"})]})]})}),a&&M.jsx("div",{className:"history-layer",onClick:()=>l(!1),children:M.jsxs("div",{className:"history-popover",role:"dialog","aria-label":"Session history",onClick:N=>N.stopPropagation(),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:"×"})]}),gi.length?gi.slice().sort((N,he)=>he.timestamp.localeCompare(N.timestamp)).map(N=>M.jsxs("button",{type:"button",className:"history-item",onClick:async()=>{l(!1);const he=!!N.session.screenName,ae=N.session.kind==="ssh"&&!he;if(he||N.session.backend==="screen"){c("screens");const _e=N.session.screenName||N.session.name,De=oe.find(Ye=>Ye.kind==="ssh"&&Ye.screenName===_e),ye=oe.find(Ye=>Ye.screenName===_e&&Ye.kind==="local");if(De){rt(De),await ht(De),u(`Reconnecting to ${De.name}…`);return}if(ye){rt(ye),await ht(ye),u(`Reconnecting to ${ye.name}…`);return}const we=St();if(!we)return;const tt=$e.find(Ye=>(N.session.host||"").includes(Ye.hostName||Ye.alias)||(Ye.hostName||Ye.alias).includes(N.session.host||""));if(tt){await ln({...N.session,screenName:_e,host:tt.hostName||tt.alias},tt);return}if(N.session.host){const Ye=N.session.host,Ke=await we.createSshSession({target:Ye,name:N.session.name});G(gt=>[...gt,Ke]),rt(Ke),re(Ke.id),W(null),B(Ta(Le.length+1)),await ht(Ke);const Ei=N.session.screenName||N.session.name;we.write(Ke.id,`screen -x ${Ei}\r`),u(`Connected to ${Ke.name}`)}return}if(ae){const _e=N.session.host||N.session.sshTarget||"",De=_e.replace(/[^a-zA-Z0-9_.-]+/g,"-").slice(0,40);ce(_e),K(N.session.name&&N.session.name!==De?N.session.name:"");const ye=St();if(!ye)return;const we=$e.find(Ke=>_e.includes(Ke.hostName||Ke.alias)||(Ke.hostName||Ke.alias).includes(_e)),tt=N.session.name||De,Ye=await ye.createSshSession({target:_e,name:tt});if(G(Ke=>[...Ke,Ye]),rt(Ye),await ht(Ye),u(`Connected to ${Ye.name}`),ye.discoverRemoteScreens&&we)try{const Ke=await ye.discoverRemoteScreens(we);if(Ke.length){const Ei=Ke.find(gt=>gt.status==="detached")??Ke[0];await ln(Ei,we);return}}catch{}return}c("terminals")},children:[M.jsxs("span",{className:"history-main",children:[M.jsx("span",{className:"history-kind",children:N.event.toUpperCase()}),M.jsxs("span",{className:"history-text",children:[M.jsx("b",{children:N.session.name}),M.jsxs("small",{children:[N.session.host," · ",N.available?"available":"unavailable"]})]})]}),M.jsx("button",{type:"button",className:"history-remove","aria-label":"Remove history entry",onClick:he=>{he.stopPropagation(),St()?.removeHistory(N.id).then(()=>mt(ae=>ae.filter(_e=>_e.id!==N.id))).catch(()=>{})},children:"×"})]},N.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:N=>N.stopPropagation(),onSubmit:v==="workspace"?fi:v==="local"?Tt:Ra,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:J,onChange:N=>A(N.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 “",Je?.name??"this workspace","”."]}),M.jsxs("label",{children:["Terminal name",M.jsx("input",{autoFocus:!0,value:O,onChange:N=>w(N.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:et,onChange:N=>{const he=N.target.value;xe(he)},children:ze.length?ze.map(N=>M.jsx("option",{value:N.backend,children:N.label},N.backend)):M.jsx("option",{value:"bash",children:"bash"})})]}),et==="wsl"&&M.jsxs("label",{children:["WSL distribution",M.jsx("input",{value:si,onChange:N=>ri(N.target.value),placeholder:"Ubuntu"})]})]}),v==="ssh"&&M.jsxs(M.Fragment,{children:[M.jsxs("p",{children:["Connect a remote host into “",Je?.name??"this workspace","”."]}),M.jsxs("label",{children:["SSH target",M.jsx("input",{autoFocus:!0,value:Q,onChange:N=>ce(N.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:N=>K(N.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"})]})]})}),ue&&M.jsx("div",{className:"modal-layer",onClick:()=>I(null),children:M.jsxs("div",{className:"modal-card approval-card",onClick:N=>N.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:ue.explanation}),M.jsx("code",{children:ue.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&&St()?.write(h.id,`${ue.command}\r`),I(null)},children:"Approve & run"})]})]})})]})}function Mv(ie){return ie==="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 Wo(ie){let ge=ie.length+1;const oe=new Set(ie.map(G=>G.name.toLowerCase()));for(;oe.has(`workspace ${ge}`);)ge+=1;return`Workspace ${ge}`}function Zf(ie,ge){const oe=ie.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,24)||"term",G=new Set(ge.map(Se=>Se.name.toLowerCase()));if(!G.has(oe))return oe;let fe=2;for(;G.has(`${oe}-${fe}`);)fe+=1;return`${oe}-${fe}`}function Ta(ie){return ie<=1?"stack":ie===2?"split-v":"grid"}vv.createRoot(document.getElementById("root")).render(M.jsx(Rv,{}));
|