@aiwg/cockpit 2026.6.3
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 +337 -0
- package/bridge/package.json +13 -0
- package/bridge/src/public/index.html +395 -0
- package/bridge/src/server.mjs +1132 -0
- package/bridge/src/smoke.mjs +158 -0
- package/contrib/aiwg-core.json +15 -0
- package/contrib/contribution.schema.json +69 -0
- package/desktop/README.md +42 -0
- package/desktop/src-tauri/Cargo.toml +17 -0
- package/desktop/src-tauri/build.rs +3 -0
- package/desktop/src-tauri/frontend/index.html +11 -0
- package/desktop/src-tauri/src/main.rs +55 -0
- package/desktop/src-tauri/tauri.conf.json +20 -0
- package/package.json +49 -0
- package/runtime-docs/README.md +38 -0
- package/shell-core/runtime.mjs +45 -0
- package/shell-core/smoke.mjs +36 -0
- package/vscode/README.md +25 -0
- package/vscode/extension.js +59 -0
- package/vscode/package.json +29 -0
- package/web/dist/assets/index-B5anpdS1.js +67 -0
- package/web/dist/assets/index-CP3BF6uZ.css +32 -0
- package/web/dist/index.html +14 -0
- package/web/index.html +13 -0
- package/web/package.json +31 -0
- package/web/src/App.test.tsx +237 -0
- package/web/src/App.tsx +255 -0
- package/web/src/api.ts +20 -0
- package/web/src/components/Actions.tsx +60 -0
- package/web/src/components/Approvals.tsx +62 -0
- package/web/src/components/CapabilitySearch.tsx +73 -0
- package/web/src/components/Explore.tsx +41 -0
- package/web/src/components/Inventory.tsx +124 -0
- package/web/src/components/LaunchInstanceModal.test.tsx +97 -0
- package/web/src/components/LaunchInstanceModal.tsx +236 -0
- package/web/src/components/Library.tsx +76 -0
- package/web/src/components/Running.tsx +60 -0
- package/web/src/components/Sessions.test.tsx +125 -0
- package/web/src/components/Sessions.tsx +189 -0
- package/web/src/components/StartSessionModal.test.tsx +86 -0
- package/web/src/components/StartSessionModal.tsx +168 -0
- package/web/src/components/Welcome.tsx +474 -0
- package/web/src/main.tsx +11 -0
- package/web/src/styles.css +254 -0
- package/web/src/types.ts +47 -0
- package/web/src/useDebounce.ts +10 -0
- package/web/src/useSession.ts +220 -0
- package/web/src/util.test.ts +30 -0
- package/web/src/util.ts +17 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
(function(){const te=document.createElement("link").relList;if(te&&te.supports&&te.supports("modulepreload"))return;for(const le of document.querySelectorAll('link[rel="modulepreload"]'))O(le);new MutationObserver(le=>{for(const ne of le)if(ne.type==="childList")for(const $ of ne.addedNodes)$.tagName==="LINK"&&$.rel==="modulepreload"&&O($)}).observe(document,{childList:!0,subtree:!0});function Q(le){const ne={};return le.integrity&&(ne.integrity=le.integrity),le.referrerPolicy&&(ne.referrerPolicy=le.referrerPolicy),le.crossOrigin==="use-credentials"?ne.credentials="include":le.crossOrigin==="anonymous"?ne.credentials="omit":ne.credentials="same-origin",ne}function O(le){if(le.ep)return;le.ep=!0;const ne=Q(le);fetch(le.href,ne)}})();var bo={exports:{}},Gr={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Tf;function fv(){if(Tf)return Gr;Tf=1;var j=Symbol.for("react.transitional.element"),te=Symbol.for("react.fragment");function Q(O,le,ne){var $=null;if(ne!==void 0&&($=""+ne),le.key!==void 0&&($=""+le.key),"key"in le){ne={};for(var f in le)f!=="key"&&(ne[f]=le[f])}else ne=le;return le=ne.ref,{$$typeof:j,type:O,key:$,ref:le!==void 0?le:null,props:ne}}return Gr.Fragment=te,Gr.jsx=Q,Gr.jsxs=Q,Gr}var kf;function dv(){return kf||(kf=1,bo.exports=fv()),bo.exports}var S=dv(),Co={exports:{}},ye={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Lf;function _v(){if(Lf)return ye;Lf=1;var j=Symbol.for("react.transitional.element"),te=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),le=Symbol.for("react.profiler"),ne=Symbol.for("react.consumer"),$=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function y(A){return A===null||typeof A!="object"?null:(A=g&&A[g]||A["@@iterator"],typeof A=="function"?A:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,o={};function c(A,M,F){this.props=A,this.context=M,this.refs=o,this.updater=F||D}c.prototype.isReactComponent={},c.prototype.setState=function(A,M){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,M,"setState")},c.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function n(){}n.prototype=c.prototype;function l(A,M,F){this.props=A,this.context=M,this.refs=o,this.updater=F||D}var _=l.prototype=new n;_.constructor=l,m(_,c.prototype),_.isPureReactComponent=!0;var E=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},p=Object.prototype.hasOwnProperty;function R(A,M,F){var Z=F.ref;return{$$typeof:j,type:A,key:M,ref:Z!==void 0?Z:null,props:F}}function T(A,M){return R(A.type,M,A.props)}function N(A){return typeof A=="object"&&A!==null&&A.$$typeof===j}function z(A){var M={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(F){return M[F]})}var H=/\/+/g;function P(A,M){return typeof A=="object"&&A!==null&&A.key!=null?z(""+A.key):M.toString(36)}function ee(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(C,C):(A.status="pending",A.then(function(M){A.status==="pending"&&(A.status="fulfilled",A.value=M)},function(M){A.status==="pending"&&(A.status="rejected",A.reason=M)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function q(A,M,F,Z,he){var fe=typeof A;(fe==="undefined"||fe==="boolean")&&(A=null);var G=!1;if(A===null)G=!0;else switch(fe){case"bigint":case"string":case"number":G=!0;break;case"object":switch(A.$$typeof){case j:case te:G=!0;break;case v:return G=A._init,q(G(A._payload),M,F,Z,he)}}if(G)return he=he(A),G=Z===""?"."+P(A,0):Z,E(he)?(F="",G!=null&&(F=G.replace(H,"$&/")+"/"),q(he,M,F,"",function(se){return se})):he!=null&&(N(he)&&(he=T(he,F+(he.key==null||A&&A.key===he.key?"":(""+he.key).replace(H,"$&/")+"/")+G)),M.push(he)),1;G=0;var L=Z===""?".":Z+":";if(E(A))for(var ae=0;ae<A.length;ae++)Z=A[ae],fe=L+P(Z,ae),G+=q(Z,M,F,fe,he);else if(ae=y(A),typeof ae=="function")for(A=ae.call(A),ae=0;!(Z=A.next()).done;)Z=Z.value,fe=L+P(Z,ae++),G+=q(Z,M,F,fe,he);else if(fe==="object"){if(typeof A.then=="function")return q(ee(A),M,F,Z,he);throw M=String(A),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return G}function I(A,M,F){if(A==null)return A;var Z=[],he=0;return q(A,Z,"","",function(fe){return M.call(F,fe,he++)}),Z}function X(A){if(A._status===-1){var M=A._result;M=M(),M.then(function(F){(A._status===0||A._status===-1)&&(A._status=1,A._result=F)},function(F){(A._status===0||A._status===-1)&&(A._status=2,A._result=F)}),A._status===-1&&(A._status=0,A._result=M)}if(A._status===1)return A._result.default;throw A._result}var x=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},B={map:I,forEach:function(A,M,F){I(A,function(){M.apply(this,arguments)},F)},count:function(A){var M=0;return I(A,function(){M++}),M},toArray:function(A){return I(A,function(M){return M})||[]},only:function(A){if(!N(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ye.Activity=h,ye.Children=B,ye.Component=c,ye.Fragment=Q,ye.Profiler=le,ye.PureComponent=l,ye.StrictMode=O,ye.Suspense=u,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,ye.__COMPILER_RUNTIME={__proto__:null,c:function(A){return w.H.useMemoCache(A)}},ye.cache=function(A){return function(){return A.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(A,M,F){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var Z=m({},A.props),he=A.key;if(M!=null)for(fe in M.key!==void 0&&(he=""+M.key),M)!p.call(M,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&M.ref===void 0||(Z[fe]=M[fe]);var fe=arguments.length-2;if(fe===1)Z.children=F;else if(1<fe){for(var G=Array(fe),L=0;L<fe;L++)G[L]=arguments[L+2];Z.children=G}return R(A.type,he,Z)},ye.createContext=function(A){return A={$$typeof:$,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:ne,_context:A},A},ye.createElement=function(A,M,F){var Z,he={},fe=null;if(M!=null)for(Z in M.key!==void 0&&(fe=""+M.key),M)p.call(M,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(he[Z]=M[Z]);var G=arguments.length-2;if(G===1)he.children=F;else if(1<G){for(var L=Array(G),ae=0;ae<G;ae++)L[ae]=arguments[ae+2];he.children=L}if(A&&A.defaultProps)for(Z in G=A.defaultProps,G)he[Z]===void 0&&(he[Z]=G[Z]);return R(A,fe,he)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(A){return{$$typeof:f,render:A}},ye.isValidElement=N,ye.lazy=function(A){return{$$typeof:v,_payload:{_status:-1,_result:A},_init:X}},ye.memo=function(A,M){return{$$typeof:d,type:A,compare:M===void 0?null:M}},ye.startTransition=function(A){var M=w.T,F={};w.T=F;try{var Z=A(),he=w.S;he!==null&&he(F,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(C,x)}catch(fe){x(fe)}finally{M!==null&&F.types!==null&&(M.types=F.types),w.T=M}},ye.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},ye.use=function(A){return w.H.use(A)},ye.useActionState=function(A,M,F){return w.H.useActionState(A,M,F)},ye.useCallback=function(A,M){return w.H.useCallback(A,M)},ye.useContext=function(A){return w.H.useContext(A)},ye.useDebugValue=function(){},ye.useDeferredValue=function(A,M){return w.H.useDeferredValue(A,M)},ye.useEffect=function(A,M){return w.H.useEffect(A,M)},ye.useEffectEvent=function(A){return w.H.useEffectEvent(A)},ye.useId=function(){return w.H.useId()},ye.useImperativeHandle=function(A,M,F){return w.H.useImperativeHandle(A,M,F)},ye.useInsertionEffect=function(A,M){return w.H.useInsertionEffect(A,M)},ye.useLayoutEffect=function(A,M){return w.H.useLayoutEffect(A,M)},ye.useMemo=function(A,M){return w.H.useMemo(A,M)},ye.useOptimistic=function(A,M){return w.H.useOptimistic(A,M)},ye.useReducer=function(A,M,F){return w.H.useReducer(A,M,F)},ye.useRef=function(A){return w.H.useRef(A)},ye.useState=function(A){return w.H.useState(A)},ye.useSyncExternalStore=function(A,M,F){return w.H.useSyncExternalStore(A,M,F)},ye.useTransition=function(){return w.H.useTransition()},ye.version="19.2.7",ye}var Mf;function ko(){return Mf||(Mf=1,Co.exports=_v()),Co.exports}var ue=ko(),Eo={exports:{}},Yr={},wo={exports:{}},xo={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Of;function vv(){return Of||(Of=1,(function(j){function te(q,I){var X=q.length;q.push(I);e:for(;0<X;){var x=X-1>>>1,B=q[x];if(0<le(B,I))q[x]=I,q[X]=B,X=x;else break e}}function Q(q){return q.length===0?null:q[0]}function O(q){if(q.length===0)return null;var I=q[0],X=q.pop();if(X!==I){q[0]=X;e:for(var x=0,B=q.length,A=B>>>1;x<A;){var M=2*(x+1)-1,F=q[M],Z=M+1,he=q[Z];if(0>le(F,X))Z<B&&0>le(he,F)?(q[x]=he,q[Z]=X,x=Z):(q[x]=F,q[M]=X,x=M);else if(Z<B&&0>le(he,X))q[x]=he,q[Z]=X,x=Z;else break e}}return I}function le(q,I){var X=q.sortIndex-I.sortIndex;return X!==0?X:q.id-I.id}if(j.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ne=performance;j.unstable_now=function(){return ne.now()}}else{var $=Date,f=$.now();j.unstable_now=function(){return $.now()-f}}var u=[],d=[],v=1,h=null,g=3,y=!1,D=!1,m=!1,o=!1,c=typeof setTimeout=="function"?setTimeout:null,n=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function _(q){for(var I=Q(d);I!==null;){if(I.callback===null)O(d);else if(I.startTime<=q)O(d),I.sortIndex=I.expirationTime,te(u,I);else break;I=Q(d)}}function E(q){if(m=!1,_(q),!D)if(Q(u)!==null)D=!0,C||(C=!0,z());else{var I=Q(d);I!==null&&ee(E,I.startTime-q)}}var C=!1,w=-1,p=5,R=-1;function T(){return o?!0:!(j.unstable_now()-R<p)}function N(){if(o=!1,C){var q=j.unstable_now();R=q;var I=!0;try{e:{D=!1,m&&(m=!1,n(w),w=-1),y=!0;var X=g;try{t:{for(_(q),h=Q(u);h!==null&&!(h.expirationTime>q&&T());){var x=h.callback;if(typeof x=="function"){h.callback=null,g=h.priorityLevel;var B=x(h.expirationTime<=q);if(q=j.unstable_now(),typeof B=="function"){h.callback=B,_(q),I=!0;break t}h===Q(u)&&O(u),_(q)}else O(u);h=Q(u)}if(h!==null)I=!0;else{var A=Q(d);A!==null&&ee(E,A.startTime-q),I=!1}}break e}finally{h=null,g=X,y=!1}I=void 0}}finally{I?z():C=!1}}}var z;if(typeof l=="function")z=function(){l(N)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,P=H.port2;H.port1.onmessage=N,z=function(){P.postMessage(null)}}else z=function(){c(N,0)};function ee(q,I){w=c(function(){q(j.unstable_now())},I)}j.unstable_IdlePriority=5,j.unstable_ImmediatePriority=1,j.unstable_LowPriority=4,j.unstable_NormalPriority=3,j.unstable_Profiling=null,j.unstable_UserBlockingPriority=2,j.unstable_cancelCallback=function(q){q.callback=null},j.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):p=0<q?Math.floor(1e3/q):5},j.unstable_getCurrentPriorityLevel=function(){return g},j.unstable_next=function(q){switch(g){case 1:case 2:case 3:var I=3;break;default:I=g}var X=g;g=I;try{return q()}finally{g=X}},j.unstable_requestPaint=function(){o=!0},j.unstable_runWithPriority=function(q,I){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var X=g;g=q;try{return I()}finally{g=X}},j.unstable_scheduleCallback=function(q,I,X){var x=j.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?x+X:x):X=x,q){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=X+B,q={id:v++,callback:I,priorityLevel:q,startTime:X,expirationTime:B,sortIndex:-1},X>x?(q.sortIndex=X,te(d,q),Q(u)===null&&q===Q(d)&&(m?(n(w),w=-1):m=!0,ee(E,X-x))):(q.sortIndex=B,te(u,q),D||y||(D=!0,C||(C=!0,z()))),q},j.unstable_shouldYield=T,j.unstable_wrapCallback=function(q){var I=g;return function(){var X=g;g=I;try{return q.apply(this,arguments)}finally{g=X}}}})(xo)),xo}var Bf;function mv(){return Bf||(Bf=1,wo.exports=vv()),wo.exports}var Do={exports:{}},ut={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var jf;function pv(){if(jf)return ut;jf=1;var j=ko();function te(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)d+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Q(){}var O={d:{f:Q,r:function(){throw Error(te(522))},D:Q,C:Q,L:Q,m:Q,X:Q,S:Q,M:Q},p:0,findDOMNode:null},le=Symbol.for("react.portal");function ne(u,d,v){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:le,key:h==null?null:""+h,children:u,containerInfo:d,implementation:v}}var $=j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(u,d){if(u==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,ut.createPortal=function(u,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(te(299));return ne(u,d,null,v)},ut.flushSync=function(u){var d=$.T,v=O.p;try{if($.T=null,O.p=2,u)return u()}finally{$.T=d,O.p=v,O.d.f()}},ut.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,O.d.C(u,d))},ut.prefetchDNS=function(u){typeof u=="string"&&O.d.D(u)},ut.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var v=d.as,h=f(v,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;v==="style"?O.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:g,fetchPriority:y}):v==="script"&&O.d.X(u,{crossOrigin:h,integrity:g,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ut.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var v=f(d.as,d.crossOrigin);O.d.M(u,{crossOrigin:v,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&O.d.M(u)},ut.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var v=d.as,h=f(v,d.crossOrigin);O.d.L(u,v,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ut.preloadModule=function(u,d){if(typeof u=="string")if(d){var v=f(d.as,d.crossOrigin);O.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:v,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else O.d.m(u)},ut.requestFormReset=function(u){O.d.r(u)},ut.unstable_batchedUpdates=function(u,d){return u(d)},ut.useFormState=function(u,d,v){return $.H.useFormState(u,d,v)},ut.useFormStatus=function(){return $.H.useHostTransitionStatus()},ut.version="19.2.7",ut}var Hf;function gv(){if(Hf)return Do.exports;Hf=1;function j(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(te){console.error(te)}}return j(),Do.exports=pv(),Do.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Nf;function Sv(){if(Nf)return Yr;Nf=1;var j=mv(),te=ko(),Q=gv();function O(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 le(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ne(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 $(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 u(e){if(ne(e)!==e)throw Error(O(188))}function d(e){var t=e.alternate;if(!t){if(t=ne(e),t===null)throw Error(O(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var a=r.alternate;if(a===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===a.child){for(a=r.child;a;){if(a===i)return u(r),e;if(a===s)return u(r),t;a=a.sibling}throw Error(O(188))}if(i.return!==s.return)i=r,s=a;else{for(var b=!1,k=r.child;k;){if(k===i){b=!0,i=r,s=a;break}if(k===s){b=!0,s=r,i=a;break}k=k.sibling}if(!b){for(k=a.child;k;){if(k===i){b=!0,i=a,s=r;break}if(k===s){b=!0,s=a,i=r;break}k=k.sibling}if(!b)throw Error(O(189))}}if(i.alternate!==s)throw Error(O(190))}if(i.tag!==3)throw Error(O(188));return i.stateNode.current===i?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),l=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),T=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function z(e){return e===null||typeof e!="object"?null:(e=N&&e[N]||e["@@iterator"],typeof e=="function"?e:null)}var H=Symbol.for("react.client.reference");function P(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===H?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 E:return"Suspense";case C:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case l:return e.displayName||"Context";case n: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 w:return t=e.displayName||null,t!==null?t:P(e.type)||"Memo";case p:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,q=te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Q.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},x=[],B=-1;function A(e){return{current:e}}function M(e){0>B||(e.current=x[B],x[B]=null,B--)}function F(e,t){B++,x[B]=e.current,e.current=t}var Z=A(null),he=A(null),fe=A(null),G=A(null);function L(e,t){switch(F(fe,t),F(he,e),F(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Qh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Qh(t),e=Zh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(Z),F(Z,e)}function ae(){M(Z),M(he),M(fe)}function se(e){e.memoizedState!==null&&F(G,e);var t=Z.current,i=Zh(t,e.type);t!==i&&(F(he,e),F(Z,i))}function _e(e){he.current===e&&(M(Z),M(he)),G.current===e&&(M(G),zr._currentValue=X)}var de,Ee;function Oe(e){if(de===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||"",Ee=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+de+e+Ee}var Ie=!1;function it(e,t){if(!e||Ie)return"";Ie=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ie){var J=ie}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(ie){J=ie}e.call(ce.prototype)}}else{try{throw Error()}catch(ie){J=ie}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ie){if(ie&&J&&typeof ie.stack=="string")return[ie.stack,J.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 a=s.DetermineComponentFrameRoot(),b=a[0],k=a[1];if(b&&k){var U=b.split(`
|
|
44
|
+
`),W=k.split(`
|
|
45
|
+
`);for(r=s=0;s<U.length&&!U[s].includes("DetermineComponentFrameRoot");)s++;for(;r<W.length&&!W[r].includes("DetermineComponentFrameRoot");)r++;if(s===U.length||r===W.length)for(s=U.length-1,r=W.length-1;1<=s&&0<=r&&U[s]!==W[r];)r--;for(;1<=s&&0<=r;s--,r--)if(U[s]!==W[r]){if(s!==1||r!==1)do if(s--,r--,0>r||U[s]!==W[r]){var re=`
|
|
46
|
+
`+U[s].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=s&&0<=r);break}}}finally{Ie=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Oe(i):""}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return Oe(e.type);case 16:return Oe("Lazy");case 13:return e.child!==t&&t!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return it(e.type,!1);case 11:return it(e.type.render,!1);case 1:return it(e.type,!0);case 31:return Oe("Activity");default:return""}}function di(e){try{var t="",i=null;do t+=Se(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var qi=Object.prototype.hasOwnProperty,Ii=j.unstable_scheduleCallback,Gi=j.unstable_cancelCallback,us=j.unstable_shouldYield,ft=j.unstable_requestPaint,et=j.unstable_now,kt=j.unstable_getCurrentPriorityLevel,_i=j.unstable_ImmediatePriority,hs=j.unstable_UserBlockingPriority,yt=j.unstable_NormalPriority,fs=j.unstable_LowPriority,It=j.unstable_IdlePriority,Yi=j.log,Ge=j.unstable_setDisableYieldValue,Fi=null,bt=null;function vi(e){if(typeof Yi=="function"&&Ge(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Fi,e)}catch{}}var Ct=Math.clz32?Math.clz32:Zf,Wf=Math.log,Qf=Math.LN2;function Zf(e){return e>>>=0,e===0?32:31-(Wf(e)/Qf|0)|0}var Fr=256,Kr=262144,Xr=4194304;function Ki(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 $r(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,a=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var k=s&134217727;return k!==0?(s=k&~a,s!==0?r=Ki(s):(b&=k,b!==0?r=Ki(b):i||(i=k&~e,i!==0&&(r=Ki(i))))):(k=s&~a,k!==0?r=Ki(k):b!==0?r=Ki(b):i||(i=s&~e,i!==0&&(r=Ki(i)))),r===0?0:t!==0&&t!==r&&(t&a)===0&&(a=r&-r,i=t&-t,a>=i||a===32&&(i&4194048)!==0)?t:r}function Qs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Jf(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 Mo(){var e=Xr;return Xr<<=1,(Xr&62914560)===0&&(Xr=4194304),e}function oa(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Zs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ed(e,t,i,s,r,a){var b=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 k=e.entanglements,U=e.expirationTimes,W=e.hiddenUpdates;for(i=b&~i;0<i;){var re=31-Ct(i),ce=1<<re;k[re]=0,U[re]=-1;var J=W[re];if(J!==null)for(W[re]=null,re=0;re<J.length;re++){var ie=J[re];ie!==null&&(ie.lane&=-536870913)}i&=~ce}s!==0&&Oo(e,s,0),a!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=a&~(b&~t))}function Oo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Ct(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Bo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Ct(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function jo(e,t){var i=t&-t;return i=(i&42)!==0?1:ca(i),(i&(e.suspendedLanes|t))!==0?0:i}function ca(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 ua(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ho(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Cf(e.type))}function No(e,t){var i=I.p;try{return I.p=e,t()}finally{I.p=i}}var mi=Math.random().toString(36).slice(2),nt="__reactFiber$"+mi,dt="__reactProps$"+mi,ds="__reactContainer$"+mi,ha="__reactEvents$"+mi,td="__reactListeners$"+mi,id="__reactHandles$"+mi,zo="__reactResources$"+mi,Js="__reactMarker$"+mi;function fa(e){delete e[nt],delete e[dt],delete e[ha],delete e[td],delete e[id]}function _s(e){var t=e[nt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ds]||i[nt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=af(e);e!==null;){if(i=e[nt])return i;e=af(e)}return t}e=i,i=e.parentNode}return null}function vs(e){if(e=e[nt]||e[ds]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function er(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(O(33))}function ms(e){var t=e[zo];return t||(t=e[zo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[Js]=!0}var Uo=new Set,qo={};function Xi(e,t){ps(e,t),ps(e+"Capture",t)}function ps(e,t){for(qo[e]=t,e=0;e<t.length;e++)Uo.add(t[e])}var sd=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]*$"),Io={},Go={};function rd(e){return qi.call(Go,e)?!0:qi.call(Io,e)?!1:sd.test(e)?Go[e]=!0:(Io[e]=!0,!1)}function Pr(e,t,i){if(rd(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 Vr(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 Vt(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Lt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nd(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,a=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(b){i=""+b,a.call(this,b)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(b){i=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function da(e){if(!e._valueTracker){var t=Yo(e)?"checked":"value";e._valueTracker=nd(e,t,""+e[t])}}function Fo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Yo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Wr(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 ad=/[\n"\\]/g;function Mt(e){return e.replace(ad,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function _a(e,t,i,s,r,a,b,k){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Lt(t)):e.value!==""+Lt(t)&&(e.value=""+Lt(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?va(e,b,Lt(t)):i!=null?va(e,b,Lt(i)):s!=null&&e.removeAttribute("value"),r==null&&a!=null&&(e.defaultChecked=!!a),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+Lt(k):e.removeAttribute("name")}function Ko(e,t,i,s,r,a,b,k){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||i!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){da(e);return}i=i!=null?""+Lt(i):"",t=t!=null?""+Lt(t):i,k||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=k?e.checked:!!s,e.defaultChecked=!!s,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),da(e)}function va(e,t,i){t==="number"&&Wr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function gs(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Lt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Xo(e,t,i){if(t!=null&&(t=""+Lt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Lt(i):""}function $o(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(O(92));if(ee(s)){if(1<s.length)throw Error(O(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Lt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),da(e)}function Ss(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var ld=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 Po(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||ld.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Vo(e,t,i){if(t!=null&&typeof t!="object")throw Error(O(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&&Po(e,r,s)}else for(var a in t)t.hasOwnProperty(a)&&Po(e,a,t[a])}function ma(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 od=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"]]),cd=/^[\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 Qr(e){return cd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Wt(){}var pa=null;function ga(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ys=null,bs=null;function Wo(e){var t=vs(e);if(t&&(e=t.stateNode)){var i=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(_a(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="'+Mt(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[dt]||null;if(!r)throw Error(O(90));_a(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&&Fo(s)}break e;case"textarea":Xo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&gs(e,!!i.multiple,t,!1)}}}var Sa=!1;function Qo(e,t,i){if(Sa)return e(t,i);Sa=!0;try{var s=e(t);return s}finally{if(Sa=!1,(ys!==null||bs!==null)&&(Un(),ys&&(t=ys,e=bs,bs=ys=null,Wo(t),e)))for(t=0;t<e.length;t++)Wo(e[t])}}function tr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[dt]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(O(231,t,typeof i));return i}var Qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ya=!1;if(Qt)try{var ir={};Object.defineProperty(ir,"passive",{get:function(){ya=!0}}),window.addEventListener("test",ir,ir),window.removeEventListener("test",ir,ir)}catch{ya=!1}var pi=null,ba=null,Zr=null;function Zo(){if(Zr)return Zr;var e,t=ba,i=t.length,s,r="value"in pi?pi.value:pi.textContent,a=r.length;for(e=0;e<i&&t[e]===r[e];e++);var b=i-e;for(s=1;s<=b&&t[i-s]===r[a-s];s++);return Zr=r.slice(e,1<s?1-s:void 0)}function Jr(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 en(){return!0}function Jo(){return!1}function _t(e){function t(i,s,r,a,b){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=a,this.target=b,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(i=e[k],this[k]=i?i(a):a[k]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?en:Jo,this.isPropagationStopped=Jo,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=en)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=en)},persist:function(){},isPersistent:en}),t}var $i={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tn=_t($i),sr=h({},$i,{view:0,detail:0}),ud=_t(sr),Ca,Ea,rr,sn=h({},sr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rr&&(rr&&e.type==="mousemove"?(Ca=e.screenX-rr.screenX,Ea=e.screenY-rr.screenY):Ea=Ca=0,rr=e),Ca)},movementY:function(e){return"movementY"in e?e.movementY:Ea}}),ec=_t(sn),hd=h({},sn,{dataTransfer:0}),fd=_t(hd),dd=h({},sr,{relatedTarget:0}),wa=_t(dd),_d=h({},$i,{animationName:0,elapsedTime:0,pseudoElement:0}),vd=_t(_d),md=h({},$i,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pd=_t(md),gd=h({},$i,{data:0}),tc=_t(gd),Sd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yd={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"},bd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bd[e])?!!t[e]:!1}function xa(){return Cd}var Ed=h({},sr,{key:function(e){if(e.key){var t=Sd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Jr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xa,charCode:function(e){return e.type==="keypress"?Jr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Jr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wd=_t(Ed),xd=h({},sn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ic=_t(xd),Dd=h({},sr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xa}),Ad=_t(Dd),Rd=h({},$i,{propertyName:0,elapsedTime:0,pseudoElement:0}),Td=_t(Rd),kd=h({},sn,{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}),Ld=_t(kd),Md=h({},$i,{newState:0,oldState:0}),Od=_t(Md),Bd=[9,13,27,32],Da=Qt&&"CompositionEvent"in window,nr=null;Qt&&"documentMode"in document&&(nr=document.documentMode);var jd=Qt&&"TextEvent"in window&&!nr,sc=Qt&&(!Da||nr&&8<nr&&11>=nr),rc=" ",nc=!1;function ac(e,t){switch(e){case"keyup":return Bd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cs=!1;function Hd(e,t){switch(e){case"compositionend":return lc(t);case"keypress":return t.which!==32?null:(nc=!0,rc);case"textInput":return e=t.data,e===rc&&nc?null:e;default:return null}}function Nd(e,t){if(Cs)return e==="compositionend"||!Da&&ac(e,t)?(e=Zo(),Zr=ba=pi=null,Cs=!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 sc&&t.locale!=="ko"?null:t.data;default:return null}}var zd={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 oc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zd[e.type]:t==="textarea"}function cc(e,t,i,s){ys?bs?bs.push(s):bs=[s]:ys=s,t=Xn(t,"onChange"),0<t.length&&(i=new tn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var ar=null,lr=null;function Ud(e){Kh(e,0)}function rn(e){var t=er(e);if(Fo(t))return e}function uc(e,t){if(e==="change")return t}var hc=!1;if(Qt){var Aa;if(Qt){var Ra="oninput"in document;if(!Ra){var fc=document.createElement("div");fc.setAttribute("oninput","return;"),Ra=typeof fc.oninput=="function"}Aa=Ra}else Aa=!1;hc=Aa&&(!document.documentMode||9<document.documentMode)}function dc(){ar&&(ar.detachEvent("onpropertychange",_c),lr=ar=null)}function _c(e){if(e.propertyName==="value"&&rn(lr)){var t=[];cc(t,lr,e,ga(e)),Qo(Ud,t)}}function qd(e,t,i){e==="focusin"?(dc(),ar=t,lr=i,ar.attachEvent("onpropertychange",_c)):e==="focusout"&&dc()}function Id(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return rn(lr)}function Gd(e,t){if(e==="click")return rn(t)}function Yd(e,t){if(e==="input"||e==="change")return rn(t)}function Fd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:Fd;function or(e,t){if(Et(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(!qi.call(t,r)||!Et(e[r],t[r]))return!1}return!0}function vc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mc(e,t){var i=vc(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=vc(i)}}function pc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(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=Wr(e.document)}return t}function Ta(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Kd=Qt&&"documentMode"in document&&11>=document.documentMode,Es=null,ka=null,cr=null,La=!1;function Sc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;La||Es==null||Es!==Wr(s)||(s=Es,"selectionStart"in s&&Ta(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),cr&&or(cr,s)||(cr=s,s=Xn(ka,"onSelect"),0<s.length&&(t=new tn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function Pi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var ws={animationend:Pi("Animation","AnimationEnd"),animationiteration:Pi("Animation","AnimationIteration"),animationstart:Pi("Animation","AnimationStart"),transitionrun:Pi("Transition","TransitionRun"),transitionstart:Pi("Transition","TransitionStart"),transitioncancel:Pi("Transition","TransitionCancel"),transitionend:Pi("Transition","TransitionEnd")},Ma={},yc={};Qt&&(yc=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);function Vi(e){if(Ma[e])return Ma[e];if(!ws[e])return e;var t=ws[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in yc)return Ma[e]=t[i];return e}var bc=Vi("animationend"),Cc=Vi("animationiteration"),Ec=Vi("animationstart"),Xd=Vi("transitionrun"),$d=Vi("transitionstart"),Pd=Vi("transitioncancel"),wc=Vi("transitionend"),xc=new Map,Oa="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(" ");Oa.push("scrollEnd");function Gt(e,t){xc.set(e,t),Xi(t,[e])}var nn=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)},Ot=[],xs=0,Ba=0;function an(){for(var e=xs,t=Ba=xs=0;t<e;){var i=Ot[t];Ot[t++]=null;var s=Ot[t];Ot[t++]=null;var r=Ot[t];Ot[t++]=null;var a=Ot[t];if(Ot[t++]=null,s!==null&&r!==null){var b=s.pending;b===null?r.next=r:(r.next=b.next,b.next=r),s.pending=r}a!==0&&Dc(i,r,a)}}function ln(e,t,i,s){Ot[xs++]=e,Ot[xs++]=t,Ot[xs++]=i,Ot[xs++]=s,Ba|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ja(e,t,i,s){return ln(e,t,i,s),on(e)}function Wi(e,t){return ln(e,null,null,t),on(e)}function Dc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,a=e.return;a!==null;)a.childLanes|=i,s=a.alternate,s!==null&&(s.childLanes|=i),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(r=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,r&&t!==null&&(r=31-Ct(i),e=a.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),a):null}function on(e){if(50<Lr)throw Lr=0,Fl=null,Error(O(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ds={};function Vd(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 wt(e,t,i,s){return new Vd(e,t,i,s)}function Ha(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zt(e,t){var i=e.alternate;return i===null?(i=wt(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 Ac(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 cn(e,t,i,s,r,a){var b=0;if(s=e,typeof e=="function")Ha(e)&&(b=1);else if(typeof e=="string")b=ev(e,i,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=wt(31,i,t,r),e.elementType=R,e.lanes=a,e;case m:return Qi(i.children,r,a,t);case o:b=8,r|=24;break;case c:return e=wt(12,i,t,r|2),e.elementType=c,e.lanes=a,e;case E:return e=wt(13,i,t,r),e.elementType=E,e.lanes=a,e;case C:return e=wt(19,i,t,r),e.elementType=C,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:b=10;break e;case n:b=9;break e;case _:b=11;break e;case w:b=14;break e;case p:b=16,s=null;break e}b=29,i=Error(O(130,e===null?"null":typeof e,"")),s=null}return t=wt(b,i,t,r),t.elementType=e,t.type=s,t.lanes=a,t}function Qi(e,t,i,s){return e=wt(7,e,s,t),e.lanes=i,e}function Na(e,t,i){return e=wt(6,e,null,t),e.lanes=i,e}function Rc(e){var t=wt(18,null,null,0);return t.stateNode=e,t}function za(e,t,i){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Tc=new WeakMap;function Bt(e,t){if(typeof e=="object"&&e!==null){var i=Tc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:di(t)},Tc.set(e,t),t)}return{value:e,source:t,stack:di(t)}}var As=[],Rs=0,un=null,ur=0,jt=[],Ht=0,gi=null,Kt=1,Xt="";function Jt(e,t){As[Rs++]=ur,As[Rs++]=un,un=e,ur=t}function kc(e,t,i){jt[Ht++]=Kt,jt[Ht++]=Xt,jt[Ht++]=gi,gi=e;var s=Kt;e=Xt;var r=32-Ct(s)-1;s&=~(1<<r),i+=1;var a=32-Ct(t)+r;if(30<a){var b=r-r%5;a=(s&(1<<b)-1).toString(32),s>>=b,r-=b,Kt=1<<32-Ct(t)+r|i<<r|s,Xt=a+e}else Kt=1<<a|i<<r|s,Xt=e}function Ua(e){e.return!==null&&(Jt(e,1),kc(e,1,0))}function qa(e){for(;e===un;)un=As[--Rs],As[Rs]=null,ur=As[--Rs],As[Rs]=null;for(;e===gi;)gi=jt[--Ht],jt[Ht]=null,Xt=jt[--Ht],jt[Ht]=null,Kt=jt[--Ht],jt[Ht]=null}function Lc(e,t){jt[Ht++]=Kt,jt[Ht++]=Xt,jt[Ht++]=gi,Kt=t.id,Xt=t.overflow,gi=e}var at=null,Ye=null,Re=!1,Si=null,Nt=!1,Ia=Error(O(519));function yi(e){var t=Error(O(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hr(Bt(t,e)),Ia}function Mc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[nt]=e,t[dt]=s,i){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(i=0;i<Or.length;i++)xe(Or[i],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),Ko(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),$o(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||Vh(t.textContent,i)?(s.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),s.onScroll!=null&&xe("scroll",t),s.onScrollEnd!=null&&xe("scrollend",t),s.onClick!=null&&(t.onclick=Wt),t=!0):t=!1,t||yi(e,!0)}function Oc(e){for(at=e.return;at;)switch(at.tag){case 5:case 31:case 13:Nt=!1;return;case 27:case 3:Nt=!0;return;default:at=at.return}}function Ts(e){if(e!==at)return!1;if(!Re)return Oc(e),Re=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||no(e.type,e.memoizedProps)),i=!i),i&&Ye&&yi(e),Oc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));Ye=nf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));Ye=nf(e)}else t===27?(t=Ye,Bi(e.type)?(e=uo,uo=null,Ye=e):Ye=t):Ye=at?Ut(e.stateNode.nextSibling):null;return!0}function Zi(){Ye=at=null,Re=!1}function Ga(){var e=Si;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),Si=null),e}function hr(e){Si===null?Si=[e]:Si.push(e)}var Ya=A(null),Ji=null,ei=null;function bi(e,t,i){F(Ya,t._currentValue),t._currentValue=i}function ti(e){e._currentValue=Ya.current,M(Ya)}function Fa(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 Ka(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var a=r.dependencies;if(a!==null){var b=r.child;a=a.firstContext;e:for(;a!==null;){var k=a;a=r;for(var U=0;U<t.length;U++)if(k.context===t[U]){a.lanes|=i,k=a.alternate,k!==null&&(k.lanes|=i),Fa(a.return,i,e),s||(b=null);break e}a=k.next}}else if(r.tag===18){if(b=r.return,b===null)throw Error(O(341));b.lanes|=i,a=b.alternate,a!==null&&(a.lanes|=i),Fa(b,i,e),b=null}else b=r.child;if(b!==null)b.return=r;else for(b=r;b!==null;){if(b===e){b=null;break}if(r=b.sibling,r!==null){r.return=b.return,b=r;break}b=b.return}r=b}}function ks(e,t,i,s){e=null;for(var r=t,a=!1;r!==null;){if(!a){if((r.flags&524288)!==0)a=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var b=r.alternate;if(b===null)throw Error(O(387));if(b=b.memoizedProps,b!==null){var k=r.type;Et(r.pendingProps.value,b.value)||(e!==null?e.push(k):e=[k])}}else if(r===G.current){if(b=r.alternate,b===null)throw Error(O(387));b.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(zr):e=[zr])}r=r.return}e!==null&&Ka(t,e,i,s),t.flags|=262144}function hn(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function es(e){Ji=e,ei=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function lt(e){return Bc(Ji,e)}function fn(e,t){return Ji===null&&es(e),Bc(e,t)}function Bc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ei===null){if(e===null)throw Error(O(308));ei=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ei=ei.next=t;return i}var Wd=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()})}},Qd=j.unstable_scheduleCallback,Zd=j.unstable_NormalPriority,We={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xa(){return{controller:new Wd,data:new Map,refCount:0}}function fr(e){e.refCount--,e.refCount===0&&Qd(Zd,function(){e.controller.abort()})}var dr=null,$a=0,Ls=0,Ms=null;function Jd(e,t){if(dr===null){var i=dr=[];$a=0,Ls=Wl(),Ms={status:"pending",value:void 0,then:function(s){i.push(s)}}}return $a++,t.then(jc,jc),t}function jc(){if(--$a===0&&dr!==null){Ms!==null&&(Ms.status="fulfilled");var e=dr;dr=null,Ls=0,Ms=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function e_(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 Hc=q.S;q.S=function(e,t){Sh=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Jd(e,t),Hc!==null&&Hc(e,t)};var ts=A(null);function Pa(){var e=ts.current;return e!==null?e:Ue.pooledCache}function dn(e,t){t===null?F(ts,ts.current):F(ts,t.pool)}function Nc(){var e=Pa();return e===null?null:{parent:We._currentValue,pool:e}}var Os=Error(O(460)),Va=Error(O(474)),_n=Error(O(542)),vn={then:function(){}};function zc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Uc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Wt,Wt),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ic(e),e;default:if(typeof t.status=="string")t.then(Wt,Wt);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(O(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,Ic(e),e}throw ss=t,Os}}function is(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ss=i,Os):i}}var ss=null;function qc(){if(ss===null)throw Error(O(459));var e=ss;return ss=null,e}function Ic(e){if(e===Os||e===_n)throw Error(O(483))}var Bs=null,_r=0;function mn(e){var t=_r;return _r+=1,Bs===null&&(Bs=[]),Uc(Bs,e,t)}function vr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function pn(e,t){throw t.$$typeof===g?Error(O(525)):(e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Gc(e){function t(K,Y){if(e){var V=K.deletions;V===null?(K.deletions=[Y],K.flags|=16):V.push(Y)}}function i(K,Y){if(!e)return null;for(;Y!==null;)t(K,Y),Y=Y.sibling;return null}function s(K){for(var Y=new Map;K!==null;)K.key!==null?Y.set(K.key,K):Y.set(K.index,K),K=K.sibling;return Y}function r(K,Y){return K=Zt(K,Y),K.index=0,K.sibling=null,K}function a(K,Y,V){return K.index=V,e?(V=K.alternate,V!==null?(V=V.index,V<Y?(K.flags|=67108866,Y):V):(K.flags|=67108866,Y)):(K.flags|=1048576,Y)}function b(K){return e&&K.alternate===null&&(K.flags|=67108866),K}function k(K,Y,V,oe){return Y===null||Y.tag!==6?(Y=Na(V,K.mode,oe),Y.return=K,Y):(Y=r(Y,V),Y.return=K,Y)}function U(K,Y,V,oe){var pe=V.type;return pe===m?re(K,Y,V.props.children,oe,V.key):Y!==null&&(Y.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===p&&is(pe)===Y.type)?(Y=r(Y,V.props),vr(Y,V),Y.return=K,Y):(Y=cn(V.type,V.key,V.props,null,K.mode,oe),vr(Y,V),Y.return=K,Y)}function W(K,Y,V,oe){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==V.containerInfo||Y.stateNode.implementation!==V.implementation?(Y=za(V,K.mode,oe),Y.return=K,Y):(Y=r(Y,V.children||[]),Y.return=K,Y)}function re(K,Y,V,oe,pe){return Y===null||Y.tag!==7?(Y=Qi(V,K.mode,oe,pe),Y.return=K,Y):(Y=r(Y,V),Y.return=K,Y)}function ce(K,Y,V){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=Na(""+Y,K.mode,V),Y.return=K,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case y:return V=cn(Y.type,Y.key,Y.props,null,K.mode,V),vr(V,Y),V.return=K,V;case D:return Y=za(Y,K.mode,V),Y.return=K,Y;case p:return Y=is(Y),ce(K,Y,V)}if(ee(Y)||z(Y))return Y=Qi(Y,K.mode,V,null),Y.return=K,Y;if(typeof Y.then=="function")return ce(K,mn(Y),V);if(Y.$$typeof===l)return ce(K,fn(K,Y),V);pn(K,Y)}return null}function J(K,Y,V,oe){var pe=Y!==null?Y.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return pe!==null?null:k(K,Y,""+V,oe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case y:return V.key===pe?U(K,Y,V,oe):null;case D:return V.key===pe?W(K,Y,V,oe):null;case p:return V=is(V),J(K,Y,V,oe)}if(ee(V)||z(V))return pe!==null?null:re(K,Y,V,oe,null);if(typeof V.then=="function")return J(K,Y,mn(V),oe);if(V.$$typeof===l)return J(K,Y,fn(K,V),oe);pn(K,V)}return null}function ie(K,Y,V,oe,pe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return K=K.get(V)||null,k(Y,K,""+oe,pe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case y:return K=K.get(oe.key===null?V:oe.key)||null,U(Y,K,oe,pe);case D:return K=K.get(oe.key===null?V:oe.key)||null,W(Y,K,oe,pe);case p:return oe=is(oe),ie(K,Y,V,oe,pe)}if(ee(oe)||z(oe))return K=K.get(V)||null,re(Y,K,oe,pe,null);if(typeof oe.then=="function")return ie(K,Y,V,mn(oe),pe);if(oe.$$typeof===l)return ie(K,Y,V,fn(Y,oe),pe);pn(Y,oe)}return null}function ve(K,Y,V,oe){for(var pe=null,ke=null,me=Y,Ce=Y=0,Ae=null;me!==null&&Ce<V.length;Ce++){me.index>Ce?(Ae=me,me=null):Ae=me.sibling;var Le=J(K,me,V[Ce],oe);if(Le===null){me===null&&(me=Ae);break}e&&me&&Le.alternate===null&&t(K,me),Y=a(Le,Y,Ce),ke===null?pe=Le:ke.sibling=Le,ke=Le,me=Ae}if(Ce===V.length)return i(K,me),Re&&Jt(K,Ce),pe;if(me===null){for(;Ce<V.length;Ce++)me=ce(K,V[Ce],oe),me!==null&&(Y=a(me,Y,Ce),ke===null?pe=me:ke.sibling=me,ke=me);return Re&&Jt(K,Ce),pe}for(me=s(me);Ce<V.length;Ce++)Ae=ie(me,K,Ce,V[Ce],oe),Ae!==null&&(e&&Ae.alternate!==null&&me.delete(Ae.key===null?Ce:Ae.key),Y=a(Ae,Y,Ce),ke===null?pe=Ae:ke.sibling=Ae,ke=Ae);return e&&me.forEach(function(Ui){return t(K,Ui)}),Re&&Jt(K,Ce),pe}function ge(K,Y,V,oe){if(V==null)throw Error(O(151));for(var pe=null,ke=null,me=Y,Ce=Y=0,Ae=null,Le=V.next();me!==null&&!Le.done;Ce++,Le=V.next()){me.index>Ce?(Ae=me,me=null):Ae=me.sibling;var Ui=J(K,me,Le.value,oe);if(Ui===null){me===null&&(me=Ae);break}e&&me&&Ui.alternate===null&&t(K,me),Y=a(Ui,Y,Ce),ke===null?pe=Ui:ke.sibling=Ui,ke=Ui,me=Ae}if(Le.done)return i(K,me),Re&&Jt(K,Ce),pe;if(me===null){for(;!Le.done;Ce++,Le=V.next())Le=ce(K,Le.value,oe),Le!==null&&(Y=a(Le,Y,Ce),ke===null?pe=Le:ke.sibling=Le,ke=Le);return Re&&Jt(K,Ce),pe}for(me=s(me);!Le.done;Ce++,Le=V.next())Le=ie(me,K,Ce,Le.value,oe),Le!==null&&(e&&Le.alternate!==null&&me.delete(Le.key===null?Ce:Le.key),Y=a(Le,Y,Ce),ke===null?pe=Le:ke.sibling=Le,ke=Le);return e&&me.forEach(function(hv){return t(K,hv)}),Re&&Jt(K,Ce),pe}function ze(K,Y,V,oe){if(typeof V=="object"&&V!==null&&V.type===m&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case y:e:{for(var pe=V.key;Y!==null;){if(Y.key===pe){if(pe=V.type,pe===m){if(Y.tag===7){i(K,Y.sibling),oe=r(Y,V.props.children),oe.return=K,K=oe;break e}}else if(Y.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===p&&is(pe)===Y.type){i(K,Y.sibling),oe=r(Y,V.props),vr(oe,V),oe.return=K,K=oe;break e}i(K,Y);break}else t(K,Y);Y=Y.sibling}V.type===m?(oe=Qi(V.props.children,K.mode,oe,V.key),oe.return=K,K=oe):(oe=cn(V.type,V.key,V.props,null,K.mode,oe),vr(oe,V),oe.return=K,K=oe)}return b(K);case D:e:{for(pe=V.key;Y!==null;){if(Y.key===pe)if(Y.tag===4&&Y.stateNode.containerInfo===V.containerInfo&&Y.stateNode.implementation===V.implementation){i(K,Y.sibling),oe=r(Y,V.children||[]),oe.return=K,K=oe;break e}else{i(K,Y);break}else t(K,Y);Y=Y.sibling}oe=za(V,K.mode,oe),oe.return=K,K=oe}return b(K);case p:return V=is(V),ze(K,Y,V,oe)}if(ee(V))return ve(K,Y,V,oe);if(z(V)){if(pe=z(V),typeof pe!="function")throw Error(O(150));return V=pe.call(V),ge(K,Y,V,oe)}if(typeof V.then=="function")return ze(K,Y,mn(V),oe);if(V.$$typeof===l)return ze(K,Y,fn(K,V),oe);pn(K,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,Y!==null&&Y.tag===6?(i(K,Y.sibling),oe=r(Y,V),oe.return=K,K=oe):(i(K,Y),oe=Na(V,K.mode,oe),oe.return=K,K=oe),b(K)):i(K,Y)}return function(K,Y,V,oe){try{_r=0;var pe=ze(K,Y,V,oe);return Bs=null,pe}catch(me){if(me===Os||me===_n)throw me;var ke=wt(29,me,null,K.mode);return ke.lanes=oe,ke.return=K,ke}finally{}}}var rs=Gc(!0),Yc=Gc(!1),Ci=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qa(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 Ei(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Me&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=on(e),Dc(e,null,i),t}return ln(e,s,t,i),on(e)}function mr(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Bo(e,i)}}function Za(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,a=null;if(i=i.firstBaseUpdate,i!==null){do{var b={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};a===null?r=a=b:a=a.next=b,i=i.next}while(i!==null);a===null?r=a=t:a=a.next=t}else r=a=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:a,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 Ja=!1;function pr(){if(Ja){var e=Ms;if(e!==null)throw e}}function gr(e,t,i,s){Ja=!1;var r=e.updateQueue;Ci=!1;var a=r.firstBaseUpdate,b=r.lastBaseUpdate,k=r.shared.pending;if(k!==null){r.shared.pending=null;var U=k,W=U.next;U.next=null,b===null?a=W:b.next=W,b=U;var re=e.alternate;re!==null&&(re=re.updateQueue,k=re.lastBaseUpdate,k!==b&&(k===null?re.firstBaseUpdate=W:k.next=W,re.lastBaseUpdate=U))}if(a!==null){var ce=r.baseState;b=0,re=W=U=null,k=a;do{var J=k.lane&-536870913,ie=J!==k.lane;if(ie?(De&J)===J:(s&J)===J){J!==0&&J===Ls&&(Ja=!0),re!==null&&(re=re.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var ve=e,ge=k;J=t;var ze=i;switch(ge.tag){case 1:if(ve=ge.payload,typeof ve=="function"){ce=ve.call(ze,ce,J);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ge.payload,J=typeof ve=="function"?ve.call(ze,ce,J):ve,J==null)break e;ce=h({},ce,J);break e;case 2:Ci=!0}}J=k.callback,J!==null&&(e.flags|=64,ie&&(e.flags|=8192),ie=r.callbacks,ie===null?r.callbacks=[J]:ie.push(J))}else ie={lane:J,tag:k.tag,payload:k.payload,callback:k.callback,next:null},re===null?(W=re=ie,U=ce):re=re.next=ie,b|=J;if(k=k.next,k===null){if(k=r.shared.pending,k===null)break;ie=k,k=ie.next,ie.next=null,r.lastBaseUpdate=ie,r.shared.pending=null}}while(!0);re===null&&(U=ce),r.baseState=U,r.firstBaseUpdate=W,r.lastBaseUpdate=re,a===null&&(r.shared.lanes=0),Ti|=b,e.lanes=b,e.memoizedState=ce}}function Fc(e,t){if(typeof e!="function")throw Error(O(191,e));e.call(t)}function Kc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Fc(i[e],t)}var js=A(null),gn=A(0);function Xc(e,t){e=ui,F(gn,e),F(js,t),ui=e|t.baseLanes}function el(){F(gn,ui),F(js,js.current)}function tl(){ui=gn.current,M(js),M(gn)}var xt=A(null),zt=null;function xi(e){var t=e.alternate;F(Pe,Pe.current&1),F(xt,e),zt===null&&(t===null||js.current!==null||t.memoizedState!==null)&&(zt=e)}function il(e){F(Pe,Pe.current),F(xt,e),zt===null&&(zt=e)}function $c(e){e.tag===22?(F(Pe,Pe.current),F(xt,e),zt===null&&(zt=e)):Di()}function Di(){F(Pe,Pe.current),F(xt,xt.current)}function Dt(e){M(xt),zt===e&&(zt=null),M(Pe)}var Pe=A(0);function Sn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||oo(i)||co(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 ii=0,be=null,He=null,Qe=null,yn=!1,Hs=!1,ns=!1,bn=0,Sr=0,Ns=null,t_=0;function Xe(){throw Error(O(321))}function sl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Et(e[i],t[i]))return!1;return!0}function rl(e,t,i,s,r,a){return ii=a,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?ku:Sl,ns=!1,a=i(s,r),ns=!1,Hs&&(a=Vc(t,i,s,r)),Pc(e),a}function Pc(e){q.H=Cr;var t=He!==null&&He.next!==null;if(ii=0,Qe=He=be=null,yn=!1,Sr=0,Ns=null,t)throw Error(O(300));e===null||Ze||(e=e.dependencies,e!==null&&hn(e)&&(Ze=!0))}function Vc(e,t,i,s){be=e;var r=0;do{if(Hs&&(Ns=null),Sr=0,Hs=!1,25<=r)throw Error(O(301));if(r+=1,Qe=He=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}q.H=Lu,a=t(i,s)}while(Hs);return a}function i_(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?yr(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(be.flags|=1024),t}function nl(){var e=bn!==0;return bn=0,e}function al(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function ll(e){if(yn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yn=!1}ii=0,Qe=He=be=null,Hs=!1,Sr=bn=0,Ns=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?be.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function Ve(){if(He===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=Qe===null?be.memoizedState:Qe.next;if(t!==null)Qe=t,He=e;else{if(e===null)throw be.alternate===null?Error(O(467)):Error(O(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},Qe===null?be.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function Cn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yr(e){var t=Sr;return Sr+=1,Ns===null&&(Ns=[]),e=Uc(Ns,e,t),t=be,(Qe===null?t.memoizedState:Qe.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?ku:Sl),e}function En(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yr(e);if(e.$$typeof===l)return lt(e)}throw Error(O(438,String(e)))}function ol(e){var t=null,i=be.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=be.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=Cn(),be.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]=T;return t.index++,i}function si(e,t){return typeof t=="function"?t(e):t}function wn(e){var t=Ve();return cl(t,He,e)}function cl(e,t,i){var s=e.queue;if(s===null)throw Error(O(311));s.lastRenderedReducer=i;var r=e.baseQueue,a=s.pending;if(a!==null){if(r!==null){var b=r.next;r.next=a.next,a.next=b}t.baseQueue=r=a,s.pending=null}if(a=e.baseState,r===null)e.memoizedState=a;else{t=r.next;var k=b=null,U=null,W=t,re=!1;do{var ce=W.lane&-536870913;if(ce!==W.lane?(De&ce)===ce:(ii&ce)===ce){var J=W.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),ce===Ls&&(re=!0);else if((ii&J)===J){W=W.next,J===Ls&&(re=!0);continue}else ce={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(k=U=ce,b=a):U=U.next=ce,be.lanes|=J,Ti|=J;ce=W.action,ns&&i(a,ce),a=W.hasEagerState?W.eagerState:i(a,ce)}else J={lane:ce,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(k=U=J,b=a):U=U.next=J,be.lanes|=ce,Ti|=ce;W=W.next}while(W!==null&&W!==t);if(U===null?b=a:U.next=k,!Et(a,e.memoizedState)&&(Ze=!0,re&&(i=Ms,i!==null)))throw i;e.memoizedState=a,e.baseState=b,e.baseQueue=U,s.lastRenderedState=a}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ul(e){var t=Ve(),i=t.queue;if(i===null)throw Error(O(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,a=t.memoizedState;if(r!==null){i.pending=null;var b=r=r.next;do a=e(a,b.action),b=b.next;while(b!==r);Et(a,t.memoizedState)||(Ze=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),i.lastRenderedState=a}return[a,s]}function Wc(e,t,i){var s=be,r=Ve(),a=Re;if(a){if(i===void 0)throw Error(O(407));i=i()}else i=t();var b=!Et((He||r).memoizedState,i);if(b&&(r.memoizedState=i,Ze=!0),r=r.queue,dl(Jc.bind(null,s,r,e),[e]),r.getSnapshot!==t||b||Qe!==null&&Qe.memoizedState.tag&1){if(s.flags|=2048,zs(9,{destroy:void 0},Zc.bind(null,s,r,i,t),null),Ue===null)throw Error(O(349));a||(ii&127)!==0||Qc(s,t,i)}return i}function Qc(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=be.updateQueue,t===null?(t=Cn(),be.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Zc(e,t,i,s){t.value=i,t.getSnapshot=s,eu(t)&&tu(e)}function Jc(e,t,i){return i(function(){eu(t)&&tu(e)})}function eu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Et(e,i)}catch{return!0}}function tu(e){var t=Wi(e,2);t!==null&&St(t,e,2)}function hl(e){var t=ht();if(typeof e=="function"){var i=e;if(e=i(),ns){vi(!0);try{i()}finally{vi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:e},t}function iu(e,t,i,s){return e.baseState=i,cl(e,He,typeof s=="function"?s:si)}function s_(e,t,i,s,r){if(An(e))throw Error(O(485));if(e=t.action,e!==null){var a={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){a.listeners.push(b)}};q.T!==null?i(!0):a.isTransition=!1,s(a),i=t.pending,i===null?(a.next=t.pending=a,su(t,a)):(a.next=i.next,t.pending=i.next=a)}}function su(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var a=q.T,b={};q.T=b;try{var k=i(r,s),U=q.S;U!==null&&U(b,k),ru(e,t,k)}catch(W){fl(e,t,W)}finally{a!==null&&b.types!==null&&(a.types=b.types),q.T=a}}else try{a=i(r,s),ru(e,t,a)}catch(W){fl(e,t,W)}}function ru(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){nu(e,t,s)},function(s){return fl(e,t,s)}):nu(e,t,i)}function nu(e,t,i){t.status="fulfilled",t.value=i,au(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,su(e,i)))}function fl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,au(t),t=t.next;while(t!==s)}e.action=null}function au(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function lu(e,t){return t}function ou(e,t){if(Re){var i=Ue.formState;if(i!==null){e:{var s=be;if(Re){if(Ye){t:{for(var r=Ye,a=Nt;r.nodeType!==8;){if(!a){r=null;break t}if(r=Ut(r.nextSibling),r===null){r=null;break t}}a=r.data,r=a==="F!"||a==="F"?r:null}if(r){Ye=Ut(r.nextSibling),s=r.data==="F!";break e}}yi(s)}s=!1}s&&(t=i[0])}}return i=ht(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lu,lastRenderedState:t},i.queue=s,i=Au.bind(null,be,s),s.dispatch=i,s=hl(!1),a=gl.bind(null,be,!1,s.queue),s=ht(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=s_.bind(null,be,r,a,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function cu(e){var t=Ve();return uu(t,He,e)}function uu(e,t,i){if(t=cl(e,t,lu)[0],e=wn(si)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=yr(t)}catch(b){throw b===Os?_n:b}else s=t;t=Ve();var r=t.queue,a=r.dispatch;return i!==t.memoizedState&&(be.flags|=2048,zs(9,{destroy:void 0},r_.bind(null,r,i),null)),[s,a,e]}function r_(e,t){e.action=t}function hu(e){var t=Ve(),i=He;if(i!==null)return uu(t,i,e);Ve(),t=t.memoizedState,i=Ve();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function zs(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=be.updateQueue,t===null&&(t=Cn(),be.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 fu(){return Ve().memoizedState}function xn(e,t,i,s){var r=ht();be.flags|=e,r.memoizedState=zs(1|t,{destroy:void 0},i,s===void 0?null:s)}function Dn(e,t,i,s){var r=Ve();s=s===void 0?null:s;var a=r.memoizedState.inst;He!==null&&s!==null&&sl(s,He.memoizedState.deps)?r.memoizedState=zs(t,a,i,s):(be.flags|=e,r.memoizedState=zs(1|t,a,i,s))}function du(e,t){xn(8390656,8,e,t)}function dl(e,t){Dn(2048,8,e,t)}function n_(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=Cn(),be.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function _u(e){var t=Ve().memoizedState;return n_({ref:t,nextImpl:e}),function(){if((Me&2)!==0)throw Error(O(440));return t.impl.apply(void 0,arguments)}}function vu(e,t){return Dn(4,2,e,t)}function mu(e,t){return Dn(4,4,e,t)}function pu(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 gu(e,t,i){i=i!=null?i.concat([e]):null,Dn(4,4,pu.bind(null,t,e),i)}function _l(){}function Su(e,t){var i=Ve();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&sl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function yu(e,t){var i=Ve();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&sl(t,s[1]))return s[0];if(s=e(),ns){vi(!0);try{e()}finally{vi(!1)}}return i.memoizedState=[s,t],s}function vl(e,t,i){return i===void 0||(ii&1073741824)!==0&&(De&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=bh(),be.lanes|=e,Ti|=e,i)}function bu(e,t,i,s){return Et(i,t)?i:js.current!==null?(e=vl(e,i,s),Et(e,t)||(Ze=!0),e):(ii&42)===0||(ii&1073741824)!==0&&(De&261930)===0?(Ze=!0,e.memoizedState=i):(e=bh(),be.lanes|=e,Ti|=e,t)}function Cu(e,t,i,s,r){var a=I.p;I.p=a!==0&&8>a?a:8;var b=q.T,k={};q.T=k,gl(e,!1,t,i);try{var U=r(),W=q.S;if(W!==null&&W(k,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var re=e_(U,s);br(e,t,re,Tt(e))}else br(e,t,s,Tt(e))}catch(ce){br(e,t,{then:function(){},status:"rejected",reason:ce},Tt())}finally{I.p=a,b!==null&&k.types!==null&&(b.types=k.types),q.T=b}}function a_(){}function ml(e,t,i,s){if(e.tag!==5)throw Error(O(476));var r=Eu(e).queue;Cu(e,r,t,X,i===null?a_:function(){return wu(e),i(s)})}function Eu(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:X},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function wu(e){var t=Eu(e);t.next===null&&(t=e.alternate.memoizedState),br(e,t.next.queue,{},Tt())}function pl(){return lt(zr)}function xu(){return Ve().memoizedState}function Du(){return Ve().memoizedState}function l_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Tt();e=Ei(i);var s=wi(t,e,i);s!==null&&(St(s,t,i),mr(s,t,i)),t={cache:Xa()},e.payload=t;return}t=t.return}}function o_(e,t,i){var s=Tt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},An(e)?Ru(t,i):(i=ja(e,t,i,s),i!==null&&(St(i,e,s),Tu(i,t,s)))}function Au(e,t,i){var s=Tt();br(e,t,i,s)}function br(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(An(e))Ru(t,r);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var b=t.lastRenderedState,k=a(b,i);if(r.hasEagerState=!0,r.eagerState=k,Et(k,b))return ln(e,t,r,0),Ue===null&&an(),!1}catch{}finally{}if(i=ja(e,t,r,s),i!==null)return St(i,e,s),Tu(i,t,s),!0}return!1}function gl(e,t,i,s){if(s={lane:2,revertLane:Wl(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},An(e)){if(t)throw Error(O(479))}else t=ja(e,i,s,2),t!==null&&St(t,e,2)}function An(e){var t=e.alternate;return e===be||t!==null&&t===be}function Ru(e,t){Hs=yn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Tu(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Bo(e,i)}}var Cr={readContext:lt,use:En,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};Cr.useEffectEvent=Xe;var ku={readContext:lt,use:En,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:du,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,xn(4194308,4,pu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return xn(4194308,4,e,t)},useInsertionEffect:function(e,t){xn(4,2,e,t)},useMemo:function(e,t){var i=ht();t=t===void 0?null:t;var s=e();if(ns){vi(!0);try{e()}finally{vi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=ht();if(i!==void 0){var r=i(t);if(ns){vi(!0);try{i(t)}finally{vi(!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=o_.bind(null,be,e),[s.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=hl(e);var t=e.queue,i=Au.bind(null,be,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:_l,useDeferredValue:function(e,t){var i=ht();return vl(i,e,t)},useTransition:function(){var e=hl(!1);return e=Cu.bind(null,be,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=be,r=ht();if(Re){if(i===void 0)throw Error(O(407));i=i()}else{if(i=t(),Ue===null)throw Error(O(349));(De&127)!==0||Qc(s,t,i)}r.memoizedState=i;var a={value:i,getSnapshot:t};return r.queue=a,du(Jc.bind(null,s,a,e),[e]),s.flags|=2048,zs(9,{destroy:void 0},Zc.bind(null,s,a,i,t),null),i},useId:function(){var e=ht(),t=Ue.identifierPrefix;if(Re){var i=Xt,s=Kt;i=(s&~(1<<32-Ct(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=bn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=t_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:pl,useFormState:ou,useActionState:ou,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=gl.bind(null,be,!0,i),i.dispatch=t,[e,t]},useMemoCache:ol,useCacheRefresh:function(){return ht().memoizedState=l_.bind(null,be)},useEffectEvent:function(e){var t=ht(),i={impl:e};return t.memoizedState=i,function(){if((Me&2)!==0)throw Error(O(440));return i.impl.apply(void 0,arguments)}}},Sl={readContext:lt,use:En,useCallback:Su,useContext:lt,useEffect:dl,useImperativeHandle:gu,useInsertionEffect:vu,useLayoutEffect:mu,useMemo:yu,useReducer:wn,useRef:fu,useState:function(){return wn(si)},useDebugValue:_l,useDeferredValue:function(e,t){var i=Ve();return bu(i,He.memoizedState,e,t)},useTransition:function(){var e=wn(si)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:Wc,useId:xu,useHostTransitionStatus:pl,useFormState:cu,useActionState:cu,useOptimistic:function(e,t){var i=Ve();return iu(i,He,e,t)},useMemoCache:ol,useCacheRefresh:Du};Sl.useEffectEvent=_u;var Lu={readContext:lt,use:En,useCallback:Su,useContext:lt,useEffect:dl,useImperativeHandle:gu,useInsertionEffect:vu,useLayoutEffect:mu,useMemo:yu,useReducer:ul,useRef:fu,useState:function(){return ul(si)},useDebugValue:_l,useDeferredValue:function(e,t){var i=Ve();return He===null?vl(i,e,t):bu(i,He.memoizedState,e,t)},useTransition:function(){var e=ul(si)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:Wc,useId:xu,useHostTransitionStatus:pl,useFormState:hu,useActionState:hu,useOptimistic:function(e,t){var i=Ve();return He!==null?iu(i,He,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:ol,useCacheRefresh:Du};Lu.useEffectEvent=_u;function yl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:h({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var bl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Tt(),r=Ei(s);r.payload=t,i!=null&&(r.callback=i),t=wi(e,r,s),t!==null&&(St(t,e,s),mr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Tt(),r=Ei(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=wi(e,r,s),t!==null&&(St(t,e,s),mr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Tt(),s=Ei(i);s.tag=2,t!=null&&(s.callback=t),t=wi(e,s,i),t!==null&&(St(t,e,i),mr(t,e,i))}};function Mu(e,t,i,s,r,a,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,a,b):t.prototype&&t.prototype.isPureReactComponent?!or(i,s)||!or(r,a):!0}function Ou(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&&bl.enqueueReplaceState(t,t.state,null)}function as(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=h({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Bu(e){nn(e)}function ju(e){console.error(e)}function Hu(e){nn(e)}function Rn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Nu(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 Cl(e,t,i){return i=Ei(i),i.tag=3,i.payload={element:null},i.callback=function(){Rn(e,t)},i}function zu(e){return e=Ei(e),e.tag=3,e}function Uu(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var a=s.value;e.payload=function(){return r(a)},e.callback=function(){Nu(t,i,s)}}var b=i.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Nu(t,i,s),typeof r!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})})}function c_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&ks(t,i,r,!0),i=xt.current,i!==null){switch(i.tag){case 31:case 13:return zt===null?qn():i.alternate===null&&$e===0&&($e=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===vn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),$l(e,s,r)),!1;case 22:return i.flags|=65536,s===vn?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)),$l(e,s,r)),!1}throw Error(O(435,i.tag))}return $l(e,s,r),qn(),!1}if(Re)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Ia&&(e=Error(O(422),{cause:s}),hr(Bt(e,i)))):(s!==Ia&&(t=Error(O(423),{cause:s}),hr(Bt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Bt(s,i),r=Cl(e.stateNode,s,r),Za(e,r),$e!==4&&($e=2)),!1;var a=Error(O(520),{cause:s});if(a=Bt(a,i),kr===null?kr=[a]:kr.push(a),$e!==4&&($e=2),t===null)return!0;s=Bt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=Cl(i.stateNode,s,e),Za(i,e),!1;case 1:if(t=i.type,a=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(ki===null||!ki.has(a))))return i.flags|=65536,r&=-r,i.lanes|=r,r=zu(r),Uu(r,e,i,s),Za(i,r),!1}i=i.return}while(i!==null);return!1}var El=Error(O(461)),Ze=!1;function ot(e,t,i,s){t.child=e===null?Yc(t,null,i,s):rs(t,e.child,i,s)}function qu(e,t,i,s,r){i=i.render;var a=t.ref;if("ref"in s){var b={};for(var k in s)k!=="ref"&&(b[k]=s[k])}else b=s;return es(t),s=rl(e,t,i,b,a,r),k=nl(),e!==null&&!Ze?(al(e,t,r),ri(e,t,r)):(Re&&k&&Ua(t),t.flags|=1,ot(e,t,s,r),t.child)}function Iu(e,t,i,s,r){if(e===null){var a=i.type;return typeof a=="function"&&!Ha(a)&&a.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=a,Gu(e,t,a,s,r)):(e=cn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ll(e,r)){var b=a.memoizedProps;if(i=i.compare,i=i!==null?i:or,i(b,s)&&e.ref===t.ref)return ri(e,t,r)}return t.flags|=1,e=Zt(a,s),e.ref=t.ref,e.return=t,t.child=e}function Gu(e,t,i,s,r){if(e!==null){var a=e.memoizedProps;if(or(a,s)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=s=a,Ll(e,r))(e.flags&131072)!==0&&(Ze=!0);else return t.lanes=e.lanes,ri(e,t,r)}return wl(e,t,i,s,r)}function Yu(e,t,i,s){var r=s.children,a=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(a=a!==null?a.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&~a}else s=0,t.child=null;return Fu(e,t,a,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&dn(t,a!==null?a.cachePool:null),a!==null?Xc(t,a):el(),$c(t);else return s=t.lanes=536870912,Fu(e,t,a!==null?a.baseLanes|i:i,i,s)}else a!==null?(dn(t,a.cachePool),Xc(t,a),Di(),t.memoizedState=null):(e!==null&&dn(t,null),el(),Di());return ot(e,t,r,i),t.child}function Er(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fu(e,t,i,s,r){var a=Pa();return a=a===null?null:{parent:We._currentValue,pool:a},t.memoizedState={baseLanes:i,cachePool:a},e!==null&&dn(t,null),el(),$c(t),e!==null&&ks(e,t,s,!0),t.childLanes=r,null}function Tn(e,t){return t=Ln({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ku(e,t,i){return rs(t,e.child,null,i),e=Tn(t,t.pendingProps),e.flags|=2,Dt(t),t.memoizedState=null,e}function u_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Re){if(s.mode==="hidden")return e=Tn(t,s),t.lanes=536870912,Er(null,e);if(il(t),(e=Ye)?(e=rf(e,Nt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gi!==null?{id:Kt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},i=Rc(e),i.return=t,t.child=i,at=t,Ye=null)):e=null,e===null)throw yi(t);return t.lanes=536870912,null}return Tn(t,s)}var a=e.memoizedState;if(a!==null){var b=a.dehydrated;if(il(t),r)if(t.flags&256)t.flags&=-257,t=Ku(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(O(558));else if(Ze||ks(e,t,i,!1),r=(i&e.childLanes)!==0,Ze||r){if(s=Ue,s!==null&&(b=jo(s,i),b!==0&&b!==a.retryLane))throw a.retryLane=b,Wi(e,b),St(s,e,b),El;qn(),t=Ku(e,t,i)}else e=a.treeContext,Ye=Ut(b.nextSibling),at=t,Re=!0,Si=null,Nt=!1,e!==null&&Lc(t,e),t=Tn(t,s),t.flags|=4096;return t}return e=Zt(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kn(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(O(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function wl(e,t,i,s,r){return es(t),i=rl(e,t,i,s,void 0,r),s=nl(),e!==null&&!Ze?(al(e,t,r),ri(e,t,r)):(Re&&s&&Ua(t),t.flags|=1,ot(e,t,i,r),t.child)}function Xu(e,t,i,s,r,a){return es(t),t.updateQueue=null,i=Vc(t,s,i,r),Pc(e),s=nl(),e!==null&&!Ze?(al(e,t,a),ri(e,t,a)):(Re&&s&&Ua(t),t.flags|=1,ot(e,t,i,a),t.child)}function $u(e,t,i,s,r){if(es(t),t.stateNode===null){var a=Ds,b=i.contextType;typeof b=="object"&&b!==null&&(a=lt(b)),a=new i(s,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=bl,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=s,a.state=t.memoizedState,a.refs={},Wa(t),b=i.contextType,a.context=typeof b=="object"&&b!==null?lt(b):Ds,a.state=t.memoizedState,b=i.getDerivedStateFromProps,typeof b=="function"&&(yl(t,i,b,s),a.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(b=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),b!==a.state&&bl.enqueueReplaceState(a,a.state,null),gr(t,s,a,r),pr(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){a=t.stateNode;var k=t.memoizedProps,U=as(i,k);a.props=U;var W=a.context,re=i.contextType;b=Ds,typeof re=="object"&&re!==null&&(b=lt(re));var ce=i.getDerivedStateFromProps;re=typeof ce=="function"||typeof a.getSnapshotBeforeUpdate=="function",k=t.pendingProps!==k,re||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(k||W!==b)&&Ou(t,a,s,b),Ci=!1;var J=t.memoizedState;a.state=J,gr(t,s,a,r),pr(),W=t.memoizedState,k||J!==W||Ci?(typeof ce=="function"&&(yl(t,i,ce,s),W=t.memoizedState),(U=Ci||Mu(t,i,U,s,J,W,b))?(re||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=W),a.props=s,a.state=W,a.context=b,s=U):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{a=t.stateNode,Qa(e,t),b=t.memoizedProps,re=as(i,b),a.props=re,ce=t.pendingProps,J=a.context,W=i.contextType,U=Ds,typeof W=="object"&&W!==null&&(U=lt(W)),k=i.getDerivedStateFromProps,(W=typeof k=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(b!==ce||J!==U)&&Ou(t,a,s,U),Ci=!1,J=t.memoizedState,a.state=J,gr(t,s,a,r),pr();var ie=t.memoizedState;b!==ce||J!==ie||Ci||e!==null&&e.dependencies!==null&&hn(e.dependencies)?(typeof k=="function"&&(yl(t,i,k,s),ie=t.memoizedState),(re=Ci||Mu(t,i,re,s,J,ie,U)||e!==null&&e.dependencies!==null&&hn(e.dependencies))?(W||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(s,ie,U),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(s,ie,U)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ie),a.props=s,a.state=ie,a.context=U,s=re):(typeof a.componentDidUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),s=!1)}return a=s,kn(e,t),s=(t.flags&128)!==0,a||s?(a=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&s?(t.child=rs(t,e.child,null,r),t.child=rs(t,null,i,r)):ot(e,t,i,r),t.memoizedState=a.state,e=t.child):e=ri(e,t,r),e}function Pu(e,t,i,s){return Zi(),t.flags|=256,ot(e,t,i,s),t.child}var xl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dl(e){return{baseLanes:e,cachePool:Nc()}}function Al(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Rt),e}function Vu(e,t,i){var s=t.pendingProps,r=!1,a=(t.flags&128)!==0,b;if((b=a)||(b=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),b&&(r=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(r?xi(t):Di(),(e=Ye)?(e=rf(e,Nt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gi!==null?{id:Kt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},i=Rc(e),i.return=t,t.child=i,at=t,Ye=null)):e=null,e===null)throw yi(t);return co(e)?t.lanes=32:t.lanes=536870912,null}var k=s.children;return s=s.fallback,r?(Di(),r=t.mode,k=Ln({mode:"hidden",children:k},r),s=Qi(s,r,i,null),k.return=t,s.return=t,k.sibling=s,t.child=k,s=t.child,s.memoizedState=Dl(i),s.childLanes=Al(e,b,i),t.memoizedState=xl,Er(null,s)):(xi(t),Rl(t,k))}var U=e.memoizedState;if(U!==null&&(k=U.dehydrated,k!==null)){if(a)t.flags&256?(xi(t),t.flags&=-257,t=Tl(e,t,i)):t.memoizedState!==null?(Di(),t.child=e.child,t.flags|=128,t=null):(Di(),k=s.fallback,r=t.mode,s=Ln({mode:"visible",children:s.children},r),k=Qi(k,r,i,null),k.flags|=2,s.return=t,k.return=t,s.sibling=k,t.child=s,rs(t,e.child,null,i),s=t.child,s.memoizedState=Dl(i),s.childLanes=Al(e,b,i),t.memoizedState=xl,t=Er(null,s));else if(xi(t),co(k)){if(b=k.nextSibling&&k.nextSibling.dataset,b)var W=b.dgst;b=W,s=Error(O(419)),s.stack="",s.digest=b,hr({value:s,source:null,stack:null}),t=Tl(e,t,i)}else if(Ze||ks(e,t,i,!1),b=(i&e.childLanes)!==0,Ze||b){if(b=Ue,b!==null&&(s=jo(b,i),s!==0&&s!==U.retryLane))throw U.retryLane=s,Wi(e,s),St(b,e,s),El;oo(k)||qn(),t=Tl(e,t,i)}else oo(k)?(t.flags|=192,t.child=e.child,t=null):(e=U.treeContext,Ye=Ut(k.nextSibling),at=t,Re=!0,Si=null,Nt=!1,e!==null&&Lc(t,e),t=Rl(t,s.children),t.flags|=4096);return t}return r?(Di(),k=s.fallback,r=t.mode,U=e.child,W=U.sibling,s=Zt(U,{mode:"hidden",children:s.children}),s.subtreeFlags=U.subtreeFlags&65011712,W!==null?k=Zt(W,k):(k=Qi(k,r,i,null),k.flags|=2),k.return=t,s.return=t,s.sibling=k,t.child=s,Er(null,s),s=t.child,k=e.child.memoizedState,k===null?k=Dl(i):(r=k.cachePool,r!==null?(U=We._currentValue,r=r.parent!==U?{parent:U,pool:U}:r):r=Nc(),k={baseLanes:k.baseLanes|i,cachePool:r}),s.memoizedState=k,s.childLanes=Al(e,b,i),t.memoizedState=xl,Er(e.child,s)):(xi(t),i=e.child,e=i.sibling,i=Zt(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=i,t.memoizedState=null,i)}function Rl(e,t){return t=Ln({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ln(e,t){return e=wt(22,e,null,t),e.lanes=0,e}function Tl(e,t,i){return rs(t,e.child,null,i),e=Rl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Fa(e.return,t,i)}function kl(e,t,i,s,r,a){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:a}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=s,b.tail=i,b.tailMode=r,b.treeForkCount=a)}function Qu(e,t,i){var s=t.pendingProps,r=s.revealOrder,a=s.tail;s=s.children;var b=Pe.current,k=(b&2)!==0;if(k?(b=b&1|2,t.flags|=128):b&=1,F(Pe,b),ot(e,t,s,i),s=Re?ur:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wu(e,i,t);else if(e.tag===19)Wu(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&&Sn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),kl(t,!1,r,i,a,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&&Sn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}kl(t,!0,i,null,a,s);break;case"together":kl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function ri(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ti|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ks(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,i=Zt(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Zt(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ll(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&hn(e)))}function h_(e,t,i){switch(t.tag){case 3:L(t,t.stateNode.containerInfo),bi(t,We,e.memoizedState.cache),Zi();break;case 27:case 5:se(t);break;case 4:L(t,t.stateNode.containerInfo);break;case 10:bi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,il(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(xi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Vu(e,t,i):(xi(t),e=ri(e,t,i),e!==null?e.sibling:null);xi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(ks(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return Qu(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),F(Pe,Pe.current),s)break;return null;case 22:return t.lanes=0,Yu(e,t,i,t.pendingProps);case 24:bi(t,We,e.memoizedState.cache)}return ri(e,t,i)}function Zu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ze=!0;else{if(!Ll(e,i)&&(t.flags&128)===0)return Ze=!1,h_(e,t,i);Ze=(e.flags&131072)!==0}else Ze=!1,Re&&(t.flags&1048576)!==0&&kc(t,ur,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=is(t.elementType),t.type=e,typeof e=="function")Ha(e)?(s=as(e,s),t.tag=1,t=$u(null,t,e,s,i)):(t.tag=0,t=wl(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=qu(null,t,e,s,i);break e}else if(r===w){t.tag=14,t=Iu(null,t,e,s,i);break e}}throw t=P(e)||e,Error(O(306,t,""))}}return t;case 0:return wl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=as(s,t.pendingProps),$u(e,t,s,r,i);case 3:e:{if(L(t,t.stateNode.containerInfo),e===null)throw Error(O(387));s=t.pendingProps;var a=t.memoizedState;r=a.element,Qa(e,t),gr(t,s,null,i);var b=t.memoizedState;if(s=b.cache,bi(t,We,s),s!==a.cache&&Ka(t,[We],i,!0),pr(),s=b.element,a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Pu(e,t,s,i);break e}else if(s!==r){r=Bt(Error(O(424)),t),hr(r),t=Pu(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ye=Ut(e.firstChild),at=t,Re=!0,Si=null,Nt=!0,i=Yc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Zi(),s===r){t=ri(e,t,i);break e}ot(e,t,s,i)}t=t.child}return t;case 26:return kn(e,t),e===null?(i=uf(t.type,null,t.pendingProps,null))?t.memoizedState=i:Re||(i=t.type,e=t.pendingProps,s=$n(fe.current).createElement(i),s[nt]=t,s[dt]=e,ct(s,i,e),st(s),t.stateNode=s):t.memoizedState=uf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return se(t),e===null&&Re&&(s=t.stateNode=lf(t.type,t.pendingProps,fe.current),at=t,Nt=!0,r=Ye,Bi(t.type)?(uo=r,Ye=Ut(s.firstChild)):Ye=r),ot(e,t,t.pendingProps.children,i),kn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((r=s=Ye)&&(s=I_(s,t.type,t.pendingProps,Nt),s!==null?(t.stateNode=s,at=t,Ye=Ut(s.firstChild),Nt=!1,r=!0):r=!1),r||yi(t)),se(t),r=t.type,a=t.pendingProps,b=e!==null?e.memoizedProps:null,s=a.children,no(r,a)?s=null:b!==null&&no(r,b)&&(t.flags|=32),t.memoizedState!==null&&(r=rl(e,t,i_,null,null,i),zr._currentValue=r),kn(e,t),ot(e,t,s,i),t.child;case 6:return e===null&&Re&&((e=i=Ye)&&(i=G_(i,t.pendingProps,Nt),i!==null?(t.stateNode=i,at=t,Ye=null,e=!0):e=!1),e||yi(t)),null;case 13:return Vu(e,t,i);case 4:return L(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=rs(t,null,s,i):ot(e,t,s,i),t.child;case 11:return qu(e,t,t.type,t.pendingProps,i);case 7:return ot(e,t,t.pendingProps,i),t.child;case 8:return ot(e,t,t.pendingProps.children,i),t.child;case 12:return ot(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,bi(t,t.type,s.value),ot(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,es(t),r=lt(r),s=s(r),t.flags|=1,ot(e,t,s,i),t.child;case 14:return Iu(e,t,t.type,t.pendingProps,i);case 15:return Gu(e,t,t.type,t.pendingProps,i);case 19:return Qu(e,t,i);case 31:return u_(e,t,i);case 22:return Yu(e,t,i,t.pendingProps);case 24:return es(t),s=lt(We),e===null?(r=Pa(),r===null&&(r=Ue,a=Xa(),r.pooledCache=a,a.refCount++,a!==null&&(r.pooledCacheLanes|=i),r=a),t.memoizedState={parent:s,cache:r},Wa(t),bi(t,We,r)):((e.lanes&i)!==0&&(Qa(e,t),gr(t,null,null,i),pr()),r=e.memoizedState,a=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),bi(t,We,s)):(s=a.cache,bi(t,We,s),s!==r.cache&&Ka(t,[We],i,!0))),ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(O(156,t.tag))}function ni(e){e.flags|=4}function Ml(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(xh())e.flags|=8192;else throw ss=vn,Va}else e.flags&=-16777217}function Ju(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!vf(t))if(xh())e.flags|=8192;else throw ss=vn,Va}function Mn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Mo():536870912,e.lanes|=t,Gs|=t)}function wr(e,t){if(!Re)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Fe(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 f_(e,t,i){var s=t.pendingProps;switch(qa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ti(We),ae(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ts(t)?ni(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ga())),Fe(t),null;case 26:var r=t.type,a=t.memoizedState;return e===null?(ni(t),a!==null?(Fe(t),Ju(t,a)):(Fe(t),Ml(t,r,null,s,i))):a?a!==e.memoizedState?(ni(t),Fe(t),Ju(t,a)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ni(t),Fe(t),Ml(t,r,e,s,i)),null;case 27:if(_e(t),i=fe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ni(t);else{if(!s){if(t.stateNode===null)throw Error(O(166));return Fe(t),null}e=Z.current,Ts(t)?Mc(t):(e=lf(r,s,i),t.stateNode=e,ni(t))}return Fe(t),null;case 5:if(_e(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ni(t);else{if(!s){if(t.stateNode===null)throw Error(O(166));return Fe(t),null}if(a=Z.current,Ts(t))Mc(t);else{var b=$n(fe.current);switch(a){case 1:a=b.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:a=b.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":a=b.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":a=b.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":a=b.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof s.is=="string"?b.createElement("select",{is:s.is}):b.createElement("select"),s.multiple?a.multiple=!0:s.size&&(a.size=s.size);break;default:a=typeof s.is=="string"?b.createElement(r,{is:s.is}):b.createElement(r)}}a[nt]=t,a[dt]=s;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)a.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=a;e:switch(ct(a,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&&ni(t)}}return Fe(t),Ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ni(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(O(166));if(e=fe.current,Ts(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=at,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[nt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Vh(e.nodeValue,i)),e||yi(t,!0)}else e=$n(e).createTextNode(s),e[nt]=t,t.stateNode=e}return Fe(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ts(t),i!==null){if(e===null){if(!s)throw Error(O(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(557));e[nt]=t}else Zi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else i=Ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Dt(t),t):(Dt(t),null);if((t.flags&128)!==0)throw Error(O(558))}return Fe(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ts(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(O(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(O(317));r[nt]=t}else Zi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),r=!1}else r=Ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Dt(t),t):(Dt(t),null)}return Dt(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),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Mn(t,t.updateQueue),Fe(t),null);case 4:return ae(),e===null&&eo(t.stateNode.containerInfo),Fe(t),null;case 10:return ti(t.type),Fe(t),null;case 19:if(M(Pe),s=t.memoizedState,s===null)return Fe(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)wr(s,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Sn(e),a!==null){for(t.flags|=128,wr(s,!1),e=a.updateQueue,t.updateQueue=e,Mn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Ac(i,e),i=i.sibling;return F(Pe,Pe.current&1|2),Re&&Jt(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&et()>Nn&&(t.flags|=128,r=!0,wr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Sn(a),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Mn(t,e),wr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Re)return Fe(t),null}else 2*et()-s.renderingStartTime>Nn&&i!==536870912&&(t.flags|=128,r=!0,wr(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(e=s.last,e!==null?e.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=et(),e.sibling=null,i=Pe.current,F(Pe,r?i&1|2:i&1),Re&&Jt(t,s.treeForkCount),e):(Fe(t),null);case 22:case 23:return Dt(t),tl(),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&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),i=t.updateQueue,i!==null&&Mn(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&&M(ts),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ti(We),Fe(t),null;case 25:return null;case 30:return null}throw Error(O(156,t.tag))}function d_(e,t){switch(qa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ti(We),ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(Dt(t),t.alternate===null)throw Error(O(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Dt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M(Pe),null;case 4:return ae(),null;case 10:return ti(t.type),null;case 22:case 23:return Dt(t),tl(),e!==null&&M(ts),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ti(We),null;case 25:return null;default:return null}}function eh(e,t){switch(qa(t),t.tag){case 3:ti(We),ae();break;case 26:case 27:case 5:_e(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&Dt(t);break;case 13:Dt(t);break;case 19:M(Pe);break;case 10:ti(t.type);break;case 22:case 23:Dt(t),tl(),e!==null&&M(ts);break;case 24:ti(We)}}function xr(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 a=i.create,b=i.inst;s=a(),b.destroy=s}i=i.next}while(i!==r)}}catch(k){je(t,t.return,k)}}function Ai(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var a=r.next;s=a;do{if((s.tag&e)===e){var b=s.inst,k=b.destroy;if(k!==void 0){b.destroy=void 0,r=t;var U=i,W=k;try{W()}catch(re){je(r,U,re)}}}s=s.next}while(s!==a)}}catch(re){je(t,t.return,re)}}function th(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Kc(t,i)}catch(s){je(e,e.return,s)}}}function ih(e,t,i){i.props=as(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){je(e,t,s)}}function Dr(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){je(e,t,r)}}function $t(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){je(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){je(e,t,r)}else i.current=null}function sh(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){je(e,e.return,r)}}function Ol(e,t,i){try{var s=e.stateNode;j_(s,e.type,i,t),s[dt]=t}catch(r){je(e,e.return,r)}}function rh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bi(e.type)||e.tag===4}function Bl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rh(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&&Bi(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=Wt));else if(s!==4&&(s===27&&Bi(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 On(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&&Bi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(On(e,t,i),e=e.sibling;e!==null;)On(e,t,i),e=e.sibling}function nh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ct(t,s,i),t[nt]=e,t[dt]=i}catch(a){je(e,e.return,a)}}var ai=!1,Je=!1,Hl=!1,ah=typeof WeakSet=="function"?WeakSet:Set,rt=null;function __(e,t){if(e=e.containerInfo,so=ea,e=gc(e),Ta(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,a=s.focusNode;s=s.focusOffset;try{i.nodeType,a.nodeType}catch{i=null;break e}var b=0,k=-1,U=-1,W=0,re=0,ce=e,J=null;t:for(;;){for(var ie;ce!==i||r!==0&&ce.nodeType!==3||(k=b+r),ce!==a||s!==0&&ce.nodeType!==3||(U=b+s),ce.nodeType===3&&(b+=ce.nodeValue.length),(ie=ce.firstChild)!==null;)J=ce,ce=ie;for(;;){if(ce===e)break t;if(J===i&&++W===r&&(k=b),J===a&&++re===s&&(U=b),(ie=ce.nextSibling)!==null)break;ce=J,J=ce.parentNode}ce=ie}i=k===-1||U===-1?null:{start:k,end:U}}else i=null}i=i||{start:0,end:0}}else i=null;for(ro={focusedElem:e,selectionRange:i},ea=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){switch(t=rt,a=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&&a!==null){e=void 0,i=t,r=a.memoizedProps,a=a.memoizedState,s=i.stateNode;try{var ve=as(i.type,r);e=s.getSnapshotBeforeUpdate(ve,a),s.__reactInternalSnapshotBeforeUpdate=e}catch(ge){je(i,i.return,ge)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)lo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":lo(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(O(163))}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}}function lh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:oi(e,i),s&4&&xr(5,i);break;case 1:if(oi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(b){je(i,i.return,b)}else{var r=as(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){je(i,i.return,b)}}s&64&&th(i),s&512&&Dr(i,i.return);break;case 3:if(oi(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{Kc(e,t)}catch(b){je(i,i.return,b)}}break;case 27:t===null&&s&4&&nh(i);case 26:case 5:oi(e,i),t===null&&s&4&&sh(i),s&512&&Dr(i,i.return);break;case 12:oi(e,i);break;case 31:oi(e,i),s&4&&uh(e,i);break;case 13:oi(e,i),s&4&&hh(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=E_.bind(null,i),Y_(e,i))));break;case 22:if(s=i.memoizedState!==null||ai,!s){t=t!==null&&t.memoizedState!==null||Je,r=ai;var a=Je;ai=s,(Je=t)&&!a?ci(e,i,(i.subtreeFlags&8772)!==0):oi(e,i),ai=r,Je=a}break;case 30:break;default:oi(e,i)}}function oh(e){var t=e.alternate;t!==null&&(e.alternate=null,oh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&fa(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 Ke=null,vt=!1;function li(e,t,i){for(i=i.child;i!==null;)ch(e,t,i),i=i.sibling}function ch(e,t,i){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Fi,i)}catch{}switch(i.tag){case 26:Je||$t(i,t),li(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Je||$t(i,t);var s=Ke,r=vt;Bi(i.type)&&(Ke=i.stateNode,vt=!1),li(e,t,i),jr(i.stateNode),Ke=s,vt=r;break;case 5:Je||$t(i,t);case 6:if(s=Ke,r=vt,Ke=null,li(e,t,i),Ke=s,vt=r,Ke!==null)if(vt)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(i.stateNode)}catch(a){je(i,t,a)}else try{Ke.removeChild(i.stateNode)}catch(a){je(i,t,a)}break;case 18:Ke!==null&&(vt?(e=Ke,tf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Ws(e)):tf(Ke,i.stateNode));break;case 4:s=Ke,r=vt,Ke=i.stateNode.containerInfo,vt=!0,li(e,t,i),Ke=s,vt=r;break;case 0:case 11:case 14:case 15:Ai(2,i,t),Je||Ai(4,i,t),li(e,t,i);break;case 1:Je||($t(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&ih(i,t,s)),li(e,t,i);break;case 21:li(e,t,i);break;case 22:Je=(s=Je)||i.memoizedState!==null,li(e,t,i),Je=s;break;default:li(e,t,i)}}function uh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ws(e)}catch(i){je(t,t.return,i)}}}function hh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ws(e)}catch(i){je(t,t.return,i)}}function v_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ah),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ah),t;default:throw Error(O(435,e.tag))}}function Bn(e,t){var i=v_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=w_.bind(null,e,s);s.then(r,r)}})}function mt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],a=e,b=t,k=b;e:for(;k!==null;){switch(k.tag){case 27:if(Bi(k.type)){Ke=k.stateNode,vt=!1;break e}break;case 5:Ke=k.stateNode,vt=!1;break e;case 3:case 4:Ke=k.stateNode.containerInfo,vt=!0;break e}k=k.return}if(Ke===null)throw Error(O(160));ch(a,b,r),Ke=null,vt=!1,a=r.alternate,a!==null&&(a.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fh(t,e),t=t.sibling}var Yt=null;function fh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mt(t,e),pt(e),s&4&&(Ai(3,e,e.return),xr(3,e),Ai(5,e,e.return));break;case 1:mt(t,e),pt(e),s&512&&(Je||i===null||$t(i,i.return)),s&64&&ai&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=Yt;if(mt(t,e),pt(e),s&512&&(Je||i===null||$t(i,i.return)),s&4){var a=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":a=r.getElementsByTagName("title")[0],(!a||a[Js]||a[nt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=r.createElement(s),r.head.insertBefore(a,r.querySelector("head > title"))),ct(a,s,i),a[nt]=e,st(a),s=a;break e;case"link":var b=df("link","href",r).get(s+(i.href||""));if(b){for(var k=0;k<b.length;k++)if(a=b[k],a.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&a.getAttribute("rel")===(i.rel==null?null:i.rel)&&a.getAttribute("title")===(i.title==null?null:i.title)&&a.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){b.splice(k,1);break t}}a=r.createElement(s),ct(a,s,i),r.head.appendChild(a);break;case"meta":if(b=df("meta","content",r).get(s+(i.content||""))){for(k=0;k<b.length;k++)if(a=b[k],a.getAttribute("content")===(i.content==null?null:""+i.content)&&a.getAttribute("name")===(i.name==null?null:i.name)&&a.getAttribute("property")===(i.property==null?null:i.property)&&a.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&a.getAttribute("charset")===(i.charSet==null?null:i.charSet)){b.splice(k,1);break t}}a=r.createElement(s),ct(a,s,i),r.head.appendChild(a);break;default:throw Error(O(468,s))}a[nt]=e,st(a),s=a}e.stateNode=s}else _f(r,e.type,e.stateNode);else e.stateNode=ff(r,s,e.memoizedProps);else a!==s?(a===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):a.count--,s===null?_f(r,e.type,e.stateNode):ff(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ol(e,e.memoizedProps,i.memoizedProps)}break;case 27:mt(t,e),pt(e),s&512&&(Je||i===null||$t(i,i.return)),i!==null&&s&4&&Ol(e,e.memoizedProps,i.memoizedProps);break;case 5:if(mt(t,e),pt(e),s&512&&(Je||i===null||$t(i,i.return)),e.flags&32){r=e.stateNode;try{Ss(r,"")}catch(ve){je(e,e.return,ve)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Ol(e,r,i!==null?i.memoizedProps:r)),s&1024&&(Hl=!0);break;case 6:if(mt(t,e),pt(e),s&4){if(e.stateNode===null)throw Error(O(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){je(e,e.return,ve)}}break;case 3:if(Wn=null,r=Yt,Yt=Pn(t.containerInfo),mt(t,e),Yt=r,pt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Ws(t.containerInfo)}catch(ve){je(e,e.return,ve)}Hl&&(Hl=!1,dh(e));break;case 4:s=Yt,Yt=Pn(e.stateNode.containerInfo),mt(t,e),pt(e),Yt=s;break;case 12:mt(t,e),pt(e);break;case 31:mt(t,e),pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bn(e,s)));break;case 13:mt(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Hn=et()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bn(e,s)));break;case 22:r=e.memoizedState!==null;var U=i!==null&&i.memoizedState!==null,W=ai,re=Je;if(ai=W||r,Je=re||U,mt(t,e),Je=re,ai=W,pt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||U||ai||Je||ls(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){U=i=t;try{if(a=U.stateNode,r)b=a.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{k=U.stateNode;var ce=U.memoizedProps.style,J=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;k.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(ve){je(U,U.return,ve)}}}else if(t.tag===6){if(i===null){U=t;try{U.stateNode.nodeValue=r?"":U.memoizedProps}catch(ve){je(U,U.return,ve)}}}else if(t.tag===18){if(i===null){U=t;try{var ie=U.stateNode;r?sf(ie,!0):sf(U.stateNode,!1)}catch(ve){je(U,U.return,ve)}}}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,Bn(e,i))));break;case 19:mt(t,e),pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bn(e,s)));break;case 30:break;case 21:break;default:mt(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(rh(s)){i=s;break}s=s.return}if(i==null)throw Error(O(160));switch(i.tag){case 27:var r=i.stateNode,a=Bl(e);On(e,a,r);break;case 5:var b=i.stateNode;i.flags&32&&(Ss(b,""),i.flags&=-33);var k=Bl(e);On(e,k,b);break;case 3:case 4:var U=i.stateNode.containerInfo,W=Bl(e);jl(e,W,U);break;default:throw Error(O(161))}}catch(re){je(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;dh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function oi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)lh(e,t.alternate,t),t=t.sibling}function ls(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ai(4,t,t.return),ls(t);break;case 1:$t(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&ih(t,t.return,i),ls(t);break;case 27:jr(t.stateNode);case 26:case 5:$t(t,t.return),ls(t);break;case 22:t.memoizedState===null&&ls(t);break;case 30:ls(t);break;default:ls(t)}e=e.sibling}}function ci(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,a=t,b=a.flags;switch(a.tag){case 0:case 11:case 15:ci(r,a,i),xr(4,a);break;case 1:if(ci(r,a,i),s=a,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(W){je(s,s.return,W)}if(s=a,r=s.updateQueue,r!==null){var k=s.stateNode;try{var U=r.shared.hiddenCallbacks;if(U!==null)for(r.shared.hiddenCallbacks=null,r=0;r<U.length;r++)Fc(U[r],k)}catch(W){je(s,s.return,W)}}i&&b&64&&th(a),Dr(a,a.return);break;case 27:nh(a);case 26:case 5:ci(r,a,i),i&&s===null&&b&4&&sh(a),Dr(a,a.return);break;case 12:ci(r,a,i);break;case 31:ci(r,a,i),i&&b&4&&uh(r,a);break;case 13:ci(r,a,i),i&&b&4&&hh(r,a);break;case 22:a.memoizedState===null&&ci(r,a,i),Dr(a,a.return);break;case 30:break;default:ci(r,a,i)}t=t.sibling}}function Nl(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&&fr(i))}function zl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fr(e))}function Ft(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)_h(e,t,i,s),t=t.sibling}function _h(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Ft(e,t,i,s),r&2048&&xr(9,t);break;case 1:Ft(e,t,i,s);break;case 3:Ft(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fr(e)));break;case 12:if(r&2048){Ft(e,t,i,s),e=t.stateNode;try{var a=t.memoizedProps,b=a.id,k=a.onPostCommit;typeof k=="function"&&k(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(U){je(t,t.return,U)}}else Ft(e,t,i,s);break;case 31:Ft(e,t,i,s);break;case 13:Ft(e,t,i,s);break;case 23:break;case 22:a=t.stateNode,b=t.alternate,t.memoizedState!==null?a._visibility&2?Ft(e,t,i,s):Ar(e,t):a._visibility&2?Ft(e,t,i,s):(a._visibility|=2,Us(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Nl(b,t);break;case 24:Ft(e,t,i,s),r&2048&&zl(t.alternate,t);break;default:Ft(e,t,i,s)}}function Us(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,b=t,k=i,U=s,W=b.flags;switch(b.tag){case 0:case 11:case 15:Us(a,b,k,U,r),xr(8,b);break;case 23:break;case 22:var re=b.stateNode;b.memoizedState!==null?re._visibility&2?Us(a,b,k,U,r):Ar(a,b):(re._visibility|=2,Us(a,b,k,U,r)),r&&W&2048&&Nl(b.alternate,b);break;case 24:Us(a,b,k,U,r),r&&W&2048&&zl(b.alternate,b);break;default:Us(a,b,k,U,r)}t=t.sibling}}function Ar(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:Ar(i,s),r&2048&&Nl(s.alternate,s);break;case 24:Ar(i,s),r&2048&&zl(s.alternate,s);break;default:Ar(i,s)}t=t.sibling}}var Rr=8192;function qs(e,t,i){if(e.subtreeFlags&Rr)for(e=e.child;e!==null;)vh(e,t,i),e=e.sibling}function vh(e,t,i){switch(e.tag){case 26:qs(e,t,i),e.flags&Rr&&e.memoizedState!==null&&tv(i,Yt,e.memoizedState,e.memoizedProps);break;case 5:qs(e,t,i);break;case 3:case 4:var s=Yt;Yt=Pn(e.stateNode.containerInfo),qs(e,t,i),Yt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Rr,Rr=16777216,qs(e,t,i),Rr=s):qs(e,t,i));break;default:qs(e,t,i)}}function mh(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 Tr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];rt=s,gh(s,e)}mh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ph(e),e=e.sibling}function ph(e){switch(e.tag){case 0:case 11:case 15:Tr(e),e.flags&2048&&Ai(9,e,e.return);break;case 3:Tr(e);break;case 12:Tr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,jn(e)):Tr(e);break;default:Tr(e)}}function jn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];rt=s,gh(s,e)}mh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ai(8,t,t.return),jn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,jn(t));break;default:jn(t)}e=e.sibling}}function gh(e,t){for(;rt!==null;){var i=rt;switch(i.tag){case 0:case 11:case 15:Ai(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:fr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,rt=s;else e:for(i=e;rt!==null;){s=rt;var r=s.sibling,a=s.return;if(oh(s),s===i){rt=null;break e}if(r!==null){r.return=a,rt=r;break e}rt=a}}}var m_={getCacheForType:function(e){var t=lt(We),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return lt(We).controller.signal}},p_=typeof WeakMap=="function"?WeakMap:Map,Me=0,Ue=null,we=null,De=0,Be=0,At=null,Ri=!1,Is=!1,Ul=!1,ui=0,$e=0,Ti=0,os=0,ql=0,Rt=0,Gs=0,kr=null,gt=null,Il=!1,Hn=0,Sh=0,Nn=1/0,zn=null,ki=null,tt=0,Li=null,Ys=null,hi=0,Gl=0,Yl=null,yh=null,Lr=0,Fl=null;function Tt(){return(Me&2)!==0&&De!==0?De&-De:q.T!==null?Wl():Ho()}function bh(){if(Rt===0)if((De&536870912)===0||Re){var e=Kr;Kr<<=1,(Kr&3932160)===0&&(Kr=262144),Rt=e}else Rt=536870912;return e=xt.current,e!==null&&(e.flags|=32),Rt}function St(e,t,i){(e===Ue&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Fs(e,0),Mi(e,De,Rt,!1)),Zs(e,i),((Me&2)===0||e!==Ue)&&(e===Ue&&((Me&2)===0&&(os|=i),$e===4&&Mi(e,De,Rt,!1)),Pt(e))}function Ch(e,t,i){if((Me&6)!==0)throw Error(O(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Qs(e,t),r=s?y_(e,t):Xl(e,t,!0),a=s;do{if(r===0){Is&&!s&&Mi(e,t,0,!1);break}else{if(i=e.current.alternate,a&&!g_(i)){r=Xl(e,t,!1),a=!1;continue}if(r===2){if(a=t,e.errorRecoveryDisabledLanes&a)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var k=e;r=kr;var U=k.current.memoizedState.isDehydrated;if(U&&(Fs(k,b).flags|=256),b=Xl(k,b,!1),b!==2){if(Ul&&!U){k.errorRecoveryDisabledLanes|=a,os|=a,r=4;break e}a=gt,gt=r,a!==null&&(gt===null?gt=a:gt.push.apply(gt,a))}r=b}if(a=!1,r!==2)continue}}if(r===1){Fs(e,0),Mi(e,t,0,!0);break}e:{switch(s=e,a=r,a){case 0:case 1:throw Error(O(345));case 4:if((t&4194048)!==t)break;case 6:Mi(s,t,Rt,!Ri);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(O(329))}if((t&62914560)===t&&(r=Hn+300-et(),10<r)){if(Mi(s,t,Rt,!Ri),$r(s,0,!0)!==0)break e;hi=t,s.timeoutHandle=Jh(Eh.bind(null,s,i,gt,zn,Il,t,Rt,os,Gs,Ri,a,"Throttled",-0,0),r);break e}Eh(s,i,gt,zn,Il,t,Rt,os,Gs,Ri,a,null,-0,0)}}break}while(!0);Pt(e)}function Eh(e,t,i,s,r,a,b,k,U,W,re,ce,J,ie){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wt},vh(t,a,ce);var ve=(a&62914560)===a?Hn-et():(a&4194048)===a?Sh-et():0;if(ve=iv(ce,ve),ve!==null){hi=a,e.cancelPendingCommit=ve(Lh.bind(null,e,t,a,i,s,r,b,k,U,re,ce,null,J,ie)),Mi(e,a,b,!W);return}}Lh(e,t,a,i,s,r,b,k,U)}function g_(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],a=r.getSnapshot;r=r.value;try{if(!Et(a(),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 Mi(e,t,i,s){t&=~ql,t&=~os,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var a=31-Ct(r),b=1<<a;s[a]=-1,r&=~b}i!==0&&Oo(e,i,t)}function Un(){return(Me&6)===0?(Mr(0),!1):!0}function Kl(){if(we!==null){if(Be===0)var e=we.return;else e=we,ei=Ji=null,ll(e),Bs=null,_r=0,e=we;for(;e!==null;)eh(e.alternate,e),e=e.return;we=null}}function Fs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,z_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),hi=0,Kl(),Ue=e,we=i=Zt(e.current,null),De=t,Be=0,At=null,Ri=!1,Is=Qs(e,t),Ul=!1,Gs=Rt=ql=os=Ti=$e=0,gt=kr=null,Il=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-Ct(s),a=1<<r;t|=e[r],s&=~a}return ui=t,an(),i}function wh(e,t){be=null,q.H=Cr,t===Os||t===_n?(t=qc(),Be=3):t===Va?(t=qc(),Be=4):Be=t===El?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,At=t,we===null&&($e=1,Rn(e,Bt(t,e.current)))}function xh(){var e=xt.current;return e===null?!0:(De&4194048)===De?zt===null:(De&62914560)===De||(De&536870912)!==0?e===zt:!1}function Dh(){var e=q.H;return q.H=Cr,e===null?Cr:e}function Ah(){var e=q.A;return q.A=m_,e}function qn(){$e=4,Ri||(De&4194048)!==De&&xt.current!==null||(Is=!0),(Ti&134217727)===0&&(os&134217727)===0||Ue===null||Mi(Ue,De,Rt,!1)}function Xl(e,t,i){var s=Me;Me|=2;var r=Dh(),a=Ah();(Ue!==e||De!==t)&&(zn=null,Fs(e,t)),t=!1;var b=$e;e:do try{if(Be!==0&&we!==null){var k=we,U=At;switch(Be){case 8:Kl(),b=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var W=Be;if(Be=0,At=null,Ks(e,k,U,W),i&&Is){b=0;break e}break;default:W=Be,Be=0,At=null,Ks(e,k,U,W)}}S_(),b=$e;break}catch(re){wh(e,re)}while(!0);return t&&e.shellSuspendCounter++,ei=Ji=null,Me=s,q.H=r,q.A=a,we===null&&(Ue=null,De=0,an()),b}function S_(){for(;we!==null;)Rh(we)}function y_(e,t){var i=Me;Me|=2;var s=Dh(),r=Ah();Ue!==e||De!==t?(zn=null,Nn=et()+500,Fs(e,t)):Is=Qs(e,t);e:do try{if(Be!==0&&we!==null){t=we;var a=At;t:switch(Be){case 1:Be=0,At=null,Ks(e,t,a,1);break;case 2:case 9:if(zc(a)){Be=0,At=null,Th(t);break}t=function(){Be!==2&&Be!==9||Ue!==e||(Be=7),Pt(e)},a.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:zc(a)?(Be=0,At=null,Th(t)):(Be=0,At=null,Ks(e,t,a,7));break;case 5:var b=null;switch(we.tag){case 26:b=we.memoizedState;case 5:case 27:var k=we;if(b?vf(b):k.stateNode.complete){Be=0,At=null;var U=k.sibling;if(U!==null)we=U;else{var W=k.return;W!==null?(we=W,In(W)):we=null}break t}}Be=0,At=null,Ks(e,t,a,5);break;case 6:Be=0,At=null,Ks(e,t,a,6);break;case 8:Kl(),$e=6;break e;default:throw Error(O(462))}}b_();break}catch(re){wh(e,re)}while(!0);return ei=Ji=null,q.H=s,q.A=r,Me=i,we!==null?0:(Ue=null,De=0,an(),$e)}function b_(){for(;we!==null&&!us();)Rh(we)}function Rh(e){var t=Zu(e.alternate,e,ui);e.memoizedProps=e.pendingProps,t===null?In(e):we=t}function Th(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Xu(i,t,t.pendingProps,t.type,void 0,De);break;case 11:t=Xu(i,t,t.pendingProps,t.type.render,t.ref,De);break;case 5:ll(t);default:eh(i,t),t=we=Ac(t,ui),t=Zu(i,t,ui)}e.memoizedProps=e.pendingProps,t===null?In(e):we=t}function Ks(e,t,i,s){ei=Ji=null,ll(t),Bs=null,_r=0;var r=t.return;try{if(c_(e,r,t,i,De)){$e=1,Rn(e,Bt(i,e.current)),we=null;return}}catch(a){if(r!==null)throw we=r,a;$e=1,Rn(e,Bt(i,e.current)),we=null;return}t.flags&32768?(Re||s===1?e=!0:Is||(De&536870912)!==0?e=!1:(Ri=e=!0,(s===2||s===9||s===3||s===6)&&(s=xt.current,s!==null&&s.tag===13&&(s.flags|=16384))),kh(t,e)):In(t)}function In(e){var t=e;do{if((t.flags&32768)!==0){kh(t,Ri);return}e=t.return;var i=f_(t.alternate,t,ui);if(i!==null){we=i;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);$e===0&&($e=5)}function kh(e,t){do{var i=d_(e.alternate,e);if(i!==null){i.flags&=32767,we=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=i}while(e!==null);$e=6,we=null}function Lh(e,t,i,s,r,a,b,k,U){e.cancelPendingCommit=null;do Gn();while(tt!==0);if((Me&6)!==0)throw Error(O(327));if(t!==null){if(t===e.current)throw Error(O(177));if(a=t.lanes|t.childLanes,a|=Ba,ed(e,i,a,b,k,U),e===Ue&&(we=Ue=null,De=0),Ys=t,Li=e,hi=i,Gl=a,Yl=r,yh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,x_(yt,function(){return Hh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null,r=I.p,I.p=2,b=Me,Me|=4;try{__(e,t,i)}finally{Me=b,I.p=r,q.T=s}}tt=1,Mh(),Oh(),Bh()}}function Mh(){if(tt===1){tt=0;var e=Li,t=Ys,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=q.T,q.T=null;var s=I.p;I.p=2;var r=Me;Me|=4;try{fh(t,e);var a=ro,b=gc(e.containerInfo),k=a.focusedElem,U=a.selectionRange;if(b!==k&&k&&k.ownerDocument&&pc(k.ownerDocument.documentElement,k)){if(U!==null&&Ta(k)){var W=U.start,re=U.end;if(re===void 0&&(re=W),"selectionStart"in k)k.selectionStart=W,k.selectionEnd=Math.min(re,k.value.length);else{var ce=k.ownerDocument||document,J=ce&&ce.defaultView||window;if(J.getSelection){var ie=J.getSelection(),ve=k.textContent.length,ge=Math.min(U.start,ve),ze=U.end===void 0?ge:Math.min(U.end,ve);!ie.extend&&ge>ze&&(b=ze,ze=ge,ge=b);var K=mc(k,ge),Y=mc(k,ze);if(K&&Y&&(ie.rangeCount!==1||ie.anchorNode!==K.node||ie.anchorOffset!==K.offset||ie.focusNode!==Y.node||ie.focusOffset!==Y.offset)){var V=ce.createRange();V.setStart(K.node,K.offset),ie.removeAllRanges(),ge>ze?(ie.addRange(V),ie.extend(Y.node,Y.offset)):(V.setEnd(Y.node,Y.offset),ie.addRange(V))}}}}for(ce=[],ie=k;ie=ie.parentNode;)ie.nodeType===1&&ce.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ce.length;k++){var oe=ce[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ea=!!so,ro=so=null}finally{Me=r,I.p=s,q.T=i}}e.current=t,tt=2}}function Oh(){if(tt===2){tt=0;var e=Li,t=Ys,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=q.T,q.T=null;var s=I.p;I.p=2;var r=Me;Me|=4;try{lh(e,t.alternate,t)}finally{Me=r,I.p=s,q.T=i}}tt=3}}function Bh(){if(tt===4||tt===3){tt=0,ft();var e=Li,t=Ys,i=hi,s=yh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?tt=5:(tt=0,Ys=Li=null,jh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ki=null),ua(i),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Fi,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=q.T,r=I.p,I.p=2,q.T=null;try{for(var a=e.onRecoverableError,b=0;b<s.length;b++){var k=s[b];a(k.value,{componentStack:k.stack})}}finally{q.T=t,I.p=r}}(hi&3)!==0&&Gn(),Pt(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Fl?Lr++:(Lr=0,Fl=e):Lr=0,Mr(0)}}function jh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fr(t)))}function Gn(){return Mh(),Oh(),Bh(),Hh()}function Hh(){if(tt!==5)return!1;var e=Li,t=Gl;Gl=0;var i=ua(hi),s=q.T,r=I.p;try{I.p=32>i?32:i,q.T=null,i=Yl,Yl=null;var a=Li,b=hi;if(tt=0,Ys=Li=null,hi=0,(Me&6)!==0)throw Error(O(331));var k=Me;if(Me|=4,ph(a.current),_h(a,a.current,b,i),Me=k,Mr(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Fi,a)}catch{}return!0}finally{I.p=r,q.T=s,jh(e,t)}}function Nh(e,t,i){t=Bt(i,t),t=Cl(e.stateNode,t,2),e=wi(e,t,2),e!==null&&(Zs(e,2),Pt(e))}function je(e,t,i){if(e.tag===3)Nh(e,e,i);else for(;t!==null;){if(t.tag===3){Nh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ki===null||!ki.has(s))){e=Bt(i,e),i=zu(2),s=wi(t,i,2),s!==null&&(Uu(i,s,t,e),Zs(s,2),Pt(s));break}}t=t.return}}function $l(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new p_;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)||(Ul=!0,r.add(i),e=C_.bind(null,e,t,i),t.then(e,e))}function C_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ue===e&&(De&i)===i&&($e===4||$e===3&&(De&62914560)===De&&300>et()-Hn?(Me&2)===0&&Fs(e,0):ql|=i,Gs===De&&(Gs=0)),Pt(e)}function zh(e,t){t===0&&(t=Mo()),e=Wi(e,t),e!==null&&(Zs(e,t),Pt(e))}function E_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),zh(e,i)}function w_(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(O(314))}s!==null&&s.delete(t),zh(e,i)}function x_(e,t){return Ii(e,t)}var Yn=null,Xs=null,Pl=!1,Fn=!1,Vl=!1,Oi=0;function Pt(e){e!==Xs&&e.next===null&&(Xs===null?Yn=Xs=e:Xs=Xs.next=e),Fn=!0,Pl||(Pl=!0,A_())}function Mr(e,t){if(!Vl&&Fn){Vl=!0;do for(var i=!1,s=Yn;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var a=0;else{var b=s.suspendedLanes,k=s.pingedLanes;a=(1<<31-Ct(42|e)+1)-1,a&=r&~(b&~k),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(i=!0,Gh(s,a))}else a=De,a=$r(s,s===Ue?a:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(a&3)===0||Qs(s,a)||(i=!0,Gh(s,a));s=s.next}while(i);Vl=!1}}function D_(){Uh()}function Uh(){Fn=Pl=!1;var e=0;Oi!==0&&N_()&&(e=Oi);for(var t=et(),i=null,s=Yn;s!==null;){var r=s.next,a=qh(s,t);a===0?(s.next=null,i===null?Yn=r:i.next=r,r===null&&(Xs=i)):(i=s,(e!==0||(a&3)!==0)&&(Fn=!0)),s=r}tt!==0&&tt!==5||Mr(e),Oi!==0&&(Oi=0)}function qh(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var b=31-Ct(a),k=1<<b,U=r[b];U===-1?((k&i)===0||(k&s)!==0)&&(r[b]=Jf(k,t)):U<=t&&(e.expiredLanes|=k),a&=~k}if(t=Ue,i=De,i=$r(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Gi(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Qs(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Gi(s),ua(i)){case 2:case 8:i=hs;break;case 32:i=yt;break;case 268435456:i=It;break;default:i=yt}return s=Ih.bind(null,e),i=Ii(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Gi(s),e.callbackPriority=2,e.callbackNode=null,2}function Ih(e,t){if(tt!==0&&tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gn()&&e.callbackNode!==i)return null;var s=De;return s=$r(e,e===Ue?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Ch(e,s,t),qh(e,et()),e.callbackNode!=null&&e.callbackNode===i?Ih.bind(null,e):null)}function Gh(e,t){if(Gn())return null;Ch(e,t,!0)}function A_(){U_(function(){(Me&6)!==0?Ii(_i,D_):Uh()})}function Wl(){if(Oi===0){var e=Ls;e===0&&(e=Fr,Fr<<=1,(Fr&261888)===0&&(Fr=256)),Oi=e}return Oi}function Yh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Qr(""+e)}function Fh(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 R_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var a=Yh((r[dt]||null).action),b=s.submitter;b&&(t=(t=b[dt]||null)?Yh(t.formAction):b.getAttribute("formAction"),t!==null&&(a=t,b=null));var k=new tn("action","action",null,s,r);e.push({event:k,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Oi!==0){var U=b?Fh(r,b):new FormData(r);ml(i,{pending:!0,data:U,method:r.method,action:a},null,U)}}else typeof a=="function"&&(k.preventDefault(),U=b?Fh(r,b):new FormData(r),ml(i,{pending:!0,data:U,method:r.method,action:a},a,U))},currentTarget:r}]})}}for(var Ql=0;Ql<Oa.length;Ql++){var Zl=Oa[Ql],T_=Zl.toLowerCase(),k_=Zl[0].toUpperCase()+Zl.slice(1);Gt(T_,"on"+k_)}Gt(bc,"onAnimationEnd"),Gt(Cc,"onAnimationIteration"),Gt(Ec,"onAnimationStart"),Gt("dblclick","onDoubleClick"),Gt("focusin","onFocus"),Gt("focusout","onBlur"),Gt(Xd,"onTransitionRun"),Gt($d,"onTransitionStart"),Gt(Pd,"onTransitionCancel"),Gt(wc,"onTransitionEnd"),ps("onMouseEnter",["mouseout","mouseover"]),ps("onMouseLeave",["mouseout","mouseover"]),ps("onPointerEnter",["pointerout","pointerover"]),ps("onPointerLeave",["pointerout","pointerover"]),Xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="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(" "),L_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Or));function Kh(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 a=void 0;if(t)for(var b=s.length-1;0<=b;b--){var k=s[b],U=k.instance,W=k.currentTarget;if(k=k.listener,U!==a&&r.isPropagationStopped())break e;a=k,r.currentTarget=W;try{a(r)}catch(re){nn(re)}r.currentTarget=null,a=U}else for(b=0;b<s.length;b++){if(k=s[b],U=k.instance,W=k.currentTarget,k=k.listener,U!==a&&r.isPropagationStopped())break e;a=k,r.currentTarget=W;try{a(r)}catch(re){nn(re)}r.currentTarget=null,a=U}}}}function xe(e,t){var i=t[ha];i===void 0&&(i=t[ha]=new Set);var s=e+"__bubble";i.has(s)||(Xh(t,e,2,!1),i.add(s))}function Jl(e,t,i){var s=0;t&&(s|=4),Xh(i,e,s,t)}var Kn="_reactListening"+Math.random().toString(36).slice(2);function eo(e){if(!e[Kn]){e[Kn]=!0,Uo.forEach(function(i){i!=="selectionchange"&&(L_.has(i)||Jl(i,!1,e),Jl(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kn]||(t[Kn]=!0,Jl("selectionchange",!1,t))}}function Xh(e,t,i,s){switch(Cf(t)){case 2:var r=nv;break;case 8:r=av;break;default:r=mo}i=r.bind(null,t,i,e),r=void 0,!ya||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 to(e,t,i,s,r){var a=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var b=s.tag;if(b===3||b===4){var k=s.stateNode.containerInfo;if(k===r)break;if(b===4)for(b=s.return;b!==null;){var U=b.tag;if((U===3||U===4)&&b.stateNode.containerInfo===r)return;b=b.return}for(;k!==null;){if(b=_s(k),b===null)return;if(U=b.tag,U===5||U===6||U===26||U===27){s=a=b;continue e}k=k.parentNode}}s=s.return}Qo(function(){var W=a,re=ga(i),ce=[];e:{var J=xc.get(e);if(J!==void 0){var ie=tn,ve=e;switch(e){case"keypress":if(Jr(i)===0)break e;case"keydown":case"keyup":ie=wd;break;case"focusin":ve="focus",ie=wa;break;case"focusout":ve="blur",ie=wa;break;case"beforeblur":case"afterblur":ie=wa;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":ie=ec;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=fd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=Ad;break;case bc:case Cc:case Ec:ie=vd;break;case wc:ie=Td;break;case"scroll":case"scrollend":ie=ud;break;case"wheel":ie=Ld;break;case"copy":case"cut":case"paste":ie=pd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=ic;break;case"toggle":case"beforetoggle":ie=Od}var ge=(t&4)!==0,ze=!ge&&(e==="scroll"||e==="scrollend"),K=ge?J!==null?J+"Capture":null:J;ge=[];for(var Y=W,V;Y!==null;){var oe=Y;if(V=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||V===null||K===null||(oe=tr(Y,K),oe!=null&&ge.push(Br(Y,oe,V))),ze)break;Y=Y.return}0<ge.length&&(J=new ie(J,ve,null,i,re),ce.push({event:J,listeners:ge}))}}if((t&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",ie=e==="mouseout"||e==="pointerout",J&&i!==pa&&(ve=i.relatedTarget||i.fromElement)&&(_s(ve)||ve[ds]))break e;if((ie||J)&&(J=re.window===re?re:(J=re.ownerDocument)?J.defaultView||J.parentWindow:window,ie?(ve=i.relatedTarget||i.toElement,ie=W,ve=ve?_s(ve):null,ve!==null&&(ze=ne(ve),ge=ve.tag,ve!==ze||ge!==5&&ge!==27&&ge!==6)&&(ve=null)):(ie=null,ve=W),ie!==ve)){if(ge=ec,oe="onMouseLeave",K="onMouseEnter",Y="mouse",(e==="pointerout"||e==="pointerover")&&(ge=ic,oe="onPointerLeave",K="onPointerEnter",Y="pointer"),ze=ie==null?J:er(ie),V=ve==null?J:er(ve),J=new ge(oe,Y+"leave",ie,i,re),J.target=ze,J.relatedTarget=V,oe=null,_s(re)===W&&(ge=new ge(K,Y+"enter",ve,i,re),ge.target=V,ge.relatedTarget=ze,oe=ge),ze=oe,ie&&ve)t:{for(ge=M_,K=ie,Y=ve,V=0,oe=K;oe;oe=ge(oe))V++;oe=0;for(var pe=Y;pe;pe=ge(pe))oe++;for(;0<V-oe;)K=ge(K),V--;for(;0<oe-V;)Y=ge(Y),oe--;for(;V--;){if(K===Y||Y!==null&&K===Y.alternate){ge=K;break t}K=ge(K),Y=ge(Y)}ge=null}else ge=null;ie!==null&&$h(ce,J,ie,ge,!1),ve!==null&&ze!==null&&$h(ce,ze,ve,ge,!0)}}e:{if(J=W?er(W):window,ie=J.nodeName&&J.nodeName.toLowerCase(),ie==="select"||ie==="input"&&J.type==="file")var ke=uc;else if(oc(J))if(hc)ke=Yd;else{ke=Id;var me=qd}else ie=J.nodeName,!ie||ie.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?W&&ma(W.elementType)&&(ke=uc):ke=Gd;if(ke&&(ke=ke(e,W))){cc(ce,ke,i,re);break e}me&&me(e,J,W),e==="focusout"&&W&&J.type==="number"&&W.memoizedProps.value!=null&&va(J,"number",J.value)}switch(me=W?er(W):window,e){case"focusin":(oc(me)||me.contentEditable==="true")&&(Es=me,ka=W,cr=null);break;case"focusout":cr=ka=Es=null;break;case"mousedown":La=!0;break;case"contextmenu":case"mouseup":case"dragend":La=!1,Sc(ce,i,re);break;case"selectionchange":if(Kd)break;case"keydown":case"keyup":Sc(ce,i,re)}var Ce;if(Da)e:{switch(e){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else Cs?ac(e,i)&&(Ae="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ae="onCompositionStart");Ae&&(sc&&i.locale!=="ko"&&(Cs||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&Cs&&(Ce=Zo()):(pi=re,ba="value"in pi?pi.value:pi.textContent,Cs=!0)),me=Xn(W,Ae),0<me.length&&(Ae=new tc(Ae,e,null,i,re),ce.push({event:Ae,listeners:me}),Ce?Ae.data=Ce:(Ce=lc(i),Ce!==null&&(Ae.data=Ce)))),(Ce=jd?Hd(e,i):Nd(e,i))&&(Ae=Xn(W,"onBeforeInput"),0<Ae.length&&(me=new tc("onBeforeInput","beforeinput",null,i,re),ce.push({event:me,listeners:Ae}),me.data=Ce)),R_(ce,e,W,i,re)}Kh(ce,t)})}function Br(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Xn(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,a=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||a===null||(r=tr(e,i),r!=null&&s.unshift(Br(e,r,a)),r=tr(e,t),r!=null&&s.push(Br(e,r,a))),e.tag===3)return s;e=e.return}return[]}function M_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $h(e,t,i,s,r){for(var a=t._reactName,b=[];i!==null&&i!==s;){var k=i,U=k.alternate,W=k.stateNode;if(k=k.tag,U!==null&&U===s)break;k!==5&&k!==26&&k!==27||W===null||(U=W,r?(W=tr(i,a),W!=null&&b.unshift(Br(i,W,U))):r||(W=tr(i,a),W!=null&&b.push(Br(i,W,U)))),i=i.return}b.length!==0&&e.push({event:t,listeners:b})}var O_=/\r\n?/g,B_=/\u0000|\uFFFD/g;function Ph(e){return(typeof e=="string"?e:""+e).replace(O_,`
|
|
49
|
+
`).replace(B_,"")}function Vh(e,t){return t=Ph(t),Ph(e)===t}function Ne(e,t,i,s,r,a){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Ss(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Ss(e,""+s);break;case"className":Vr(e,"class",s);break;case"tabIndex":Vr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Vr(e,i,s);break;case"style":Vo(e,s,a);break;case"data":if(t!=="object"){Vr(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=Qr(""+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 a=="function"&&(i==="formAction"?(t!=="input"&&Ne(e,t,"name",r.name,r,null),Ne(e,t,"formEncType",r.formEncType,r,null),Ne(e,t,"formMethod",r.formMethod,r,null),Ne(e,t,"formTarget",r.formTarget,r,null)):(Ne(e,t,"encType",r.encType,r,null),Ne(e,t,"method",r.method,r,null),Ne(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Qr(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Wt);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(O(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(O(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=Qr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Pr(e,"popover",s);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Pr(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=od.get(i)||i,Pr(e,i,s))}}function io(e,t,i,s,r,a){switch(i){case"style":Vo(e,s,a);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(O(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(O(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Ss(e,s):(typeof s=="number"||typeof s=="bigint")&&Ss(e,""+s);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Wt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),a=e[dt]||null,a=a!=null?a[i]:null,typeof a=="function"&&e.removeEventListener(t,a,r),typeof s=="function")){typeof a!="function"&&a!==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,""):Pr(e,i,s)}}}function ct(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var s=!1,r=!1,a;for(a in i)if(i.hasOwnProperty(a)){var b=i[a];if(b!=null)switch(a){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(O(137,t));default:Ne(e,t,a,b,i,null)}}r&&Ne(e,t,"srcSet",i.srcSet,i,null),s&&Ne(e,t,"src",i.src,i,null);return;case"input":xe("invalid",e);var k=a=b=r=null,U=null,W=null;for(s in i)if(i.hasOwnProperty(s)){var re=i[s];if(re!=null)switch(s){case"name":r=re;break;case"type":b=re;break;case"checked":U=re;break;case"defaultChecked":W=re;break;case"value":a=re;break;case"defaultValue":k=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(O(137,t));break;default:Ne(e,t,s,re,i,null)}}Ko(e,a,k,U,W,b,r,!1);return;case"select":xe("invalid",e),s=b=a=null;for(r in i)if(i.hasOwnProperty(r)&&(k=i[r],k!=null))switch(r){case"value":a=k;break;case"defaultValue":b=k;break;case"multiple":s=k;default:Ne(e,t,r,k,i,null)}t=a,i=b,e.multiple=!!s,t!=null?gs(e,!!s,t,!1):i!=null&&gs(e,!!s,i,!0);return;case"textarea":xe("invalid",e),a=r=s=null;for(b in i)if(i.hasOwnProperty(b)&&(k=i[b],k!=null))switch(b){case"value":s=k;break;case"defaultValue":r=k;break;case"children":a=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(O(91));break;default:Ne(e,t,b,k,i,null)}$o(e,s,r,a);return;case"option":for(U in i)if(i.hasOwnProperty(U)&&(s=i[U],s!=null))switch(U){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ne(e,t,U,s,i,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(s=0;s<Or.length;s++)xe(Or[s],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(W in i)if(i.hasOwnProperty(W)&&(s=i[W],s!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(O(137,t));default:Ne(e,t,W,s,i,null)}return;default:if(ma(t)){for(re in i)i.hasOwnProperty(re)&&(s=i[re],s!==void 0&&io(e,t,re,s,i,void 0));return}}for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null&&Ne(e,t,k,s,i,null))}function j_(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,a=null,b=null,k=null,U=null,W=null,re=null;for(ie in i){var ce=i[ie];if(i.hasOwnProperty(ie)&&ce!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":U=ce;default:s.hasOwnProperty(ie)||Ne(e,t,ie,null,s,ce)}}for(var J in s){var ie=s[J];if(ce=i[J],s.hasOwnProperty(J)&&(ie!=null||ce!=null))switch(J){case"type":a=ie;break;case"name":r=ie;break;case"checked":W=ie;break;case"defaultChecked":re=ie;break;case"value":b=ie;break;case"defaultValue":k=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(O(137,t));break;default:ie!==ce&&Ne(e,t,J,ie,s,ce)}}_a(e,b,k,U,W,re,a,r);return;case"select":ie=b=k=J=null;for(a in i)if(U=i[a],i.hasOwnProperty(a)&&U!=null)switch(a){case"value":break;case"multiple":ie=U;default:s.hasOwnProperty(a)||Ne(e,t,a,null,s,U)}for(r in s)if(a=s[r],U=i[r],s.hasOwnProperty(r)&&(a!=null||U!=null))switch(r){case"value":J=a;break;case"defaultValue":k=a;break;case"multiple":b=a;default:a!==U&&Ne(e,t,r,a,s,U)}t=k,i=b,s=ie,J!=null?gs(e,!!i,J,!1):!!s!=!!i&&(t!=null?gs(e,!!i,t,!0):gs(e,!!i,i?[]:"",!1));return;case"textarea":ie=J=null;for(k in i)if(r=i[k],i.hasOwnProperty(k)&&r!=null&&!s.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ne(e,t,k,null,s,r)}for(b in s)if(r=s[b],a=i[b],s.hasOwnProperty(b)&&(r!=null||a!=null))switch(b){case"value":J=r;break;case"defaultValue":ie=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(O(91));break;default:r!==a&&Ne(e,t,b,r,s,a)}Xo(e,J,ie);return;case"option":for(var ve in i)if(J=i[ve],i.hasOwnProperty(ve)&&J!=null&&!s.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:Ne(e,t,ve,null,s,J)}for(U in s)if(J=s[U],ie=i[U],s.hasOwnProperty(U)&&J!==ie&&(J!=null||ie!=null))switch(U){case"selected":e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:Ne(e,t,U,J,s,ie)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ge in i)J=i[ge],i.hasOwnProperty(ge)&&J!=null&&!s.hasOwnProperty(ge)&&Ne(e,t,ge,null,s,J);for(W in s)if(J=s[W],ie=i[W],s.hasOwnProperty(W)&&J!==ie&&(J!=null||ie!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(O(137,t));break;default:Ne(e,t,W,J,s,ie)}return;default:if(ma(t)){for(var ze in i)J=i[ze],i.hasOwnProperty(ze)&&J!==void 0&&!s.hasOwnProperty(ze)&&io(e,t,ze,void 0,s,J);for(re in s)J=s[re],ie=i[re],!s.hasOwnProperty(re)||J===ie||J===void 0&&ie===void 0||io(e,t,re,J,s,ie);return}}for(var K in i)J=i[K],i.hasOwnProperty(K)&&J!=null&&!s.hasOwnProperty(K)&&Ne(e,t,K,null,s,J);for(ce in s)J=s[ce],ie=i[ce],!s.hasOwnProperty(ce)||J===ie||J==null&&ie==null||Ne(e,t,ce,J,s,ie)}function Wh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function H_(){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],a=r.transferSize,b=r.initiatorType,k=r.duration;if(a&&k&&Wh(b)){for(b=0,k=r.responseEnd,s+=1;s<i.length;s++){var U=i[s],W=U.startTime;if(W>k)break;var re=U.transferSize,ce=U.initiatorType;re&&Wh(ce)&&(U=U.responseEnd,b+=re*(U<k?1:(k-W)/(U-W)))}if(--s,t+=8*(a+b)/(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 so=null,ro=null;function $n(e){return e.nodeType===9?e:e.ownerDocument}function Qh(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 Zh(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 no(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 ao=null;function N_(){var e=window.event;return e&&e.type==="popstate"?e===ao?!1:(ao=e,!0):(ao=null,!1)}var Jh=typeof setTimeout=="function"?setTimeout:void 0,z_=typeof clearTimeout=="function"?clearTimeout:void 0,ef=typeof Promise=="function"?Promise:void 0,U_=typeof queueMicrotask=="function"?queueMicrotask:typeof ef<"u"?function(e){return ef.resolve(null).then(e).catch(q_)}:Jh;function q_(e){setTimeout(function(){throw e})}function Bi(e){return e==="head"}function tf(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),Ws(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")jr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,jr(i);for(var a=i.firstChild;a;){var b=a.nextSibling,k=a.nodeName;a[Js]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&a.rel.toLowerCase()==="stylesheet"||i.removeChild(a),a=b}}else i==="body"&&jr(e.ownerDocument.body);i=r}while(i);Ws(t)}function sf(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 lo(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":lo(i),fa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function I_(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[Js])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==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(a=e.getAttribute("src"),(a!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function G_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ut(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function oo(e){return e.data==="$?"||e.data==="$~"}function co(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Y_(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ut(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var uo=null;function nf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ut(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function af(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 lf(e,t,i){switch(t=$n(i),e){case"html":if(e=t.documentElement,!e)throw Error(O(452));return e;case"head":if(e=t.head,!e)throw Error(O(453));return e;case"body":if(e=t.body,!e)throw Error(O(454));return e;default:throw Error(O(451))}}function jr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);fa(e)}var qt=new Map,of=new Set;function Pn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fi=I.d;I.d={f:F_,r:K_,D:X_,C:$_,L:P_,m:V_,X:Q_,S:W_,M:Z_};function F_(){var e=fi.f(),t=Un();return e||t}function K_(e){var t=vs(e);t!==null&&t.tag===5&&t.type==="form"?wu(t):fi.r(e)}var $s=typeof document>"u"?null:document;function cf(e,t,i){var s=$s;if(s&&typeof t=="string"&&t){var r=Mt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),of.has(r)||(of.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),ct(t,"link",e),st(t),s.head.appendChild(t)))}}function X_(e){fi.D(e),cf("dns-prefetch",e,null)}function $_(e,t){fi.C(e,t),cf("preconnect",e,t)}function P_(e,t,i){fi.L(e,t,i);var s=$s;if(s&&e&&t){var r='link[rel="preload"][as="'+Mt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Mt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Mt(i.imageSizes)+'"]')):r+='[href="'+Mt(e)+'"]';var a=r;switch(t){case"style":a=Ps(e);break;case"script":a=Vs(e)}qt.has(a)||(e=h({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),qt.set(a,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Hr(a))||t==="script"&&s.querySelector(Nr(a))||(t=s.createElement("link"),ct(t,"link",e),st(t),s.head.appendChild(t)))}}function V_(e,t){fi.m(e,t);var i=$s;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Mt(s)+'"][href="'+Mt(e)+'"]',a=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Vs(e)}if(!qt.has(a)&&(e=h({rel:"modulepreload",href:e},t),qt.set(a,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Nr(a)))return}s=i.createElement("link"),ct(s,"link",e),st(s),i.head.appendChild(s)}}}function W_(e,t,i){fi.S(e,t,i);var s=$s;if(s&&e){var r=ms(s).hoistableStyles,a=Ps(e);t=t||"default";var b=r.get(a);if(!b){var k={loading:0,preload:null};if(b=s.querySelector(Hr(a)))k.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=qt.get(a))&&ho(e,i);var U=b=s.createElement("link");st(U),ct(U,"link",e),U._p=new Promise(function(W,re){U.onload=W,U.onerror=re}),U.addEventListener("load",function(){k.loading|=1}),U.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Vn(b,t,s)}b={type:"stylesheet",instance:b,count:1,state:k},r.set(a,b)}}}function Q_(e,t){fi.X(e,t);var i=$s;if(i&&e){var s=ms(i).hoistableScripts,r=Vs(e),a=s.get(r);a||(a=i.querySelector(Nr(r)),a||(e=h({src:e,async:!0},t),(t=qt.get(r))&&fo(e,t),a=i.createElement("script"),st(a),ct(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function Z_(e,t){fi.M(e,t);var i=$s;if(i&&e){var s=ms(i).hoistableScripts,r=Vs(e),a=s.get(r);a||(a=i.querySelector(Nr(r)),a||(e=h({src:e,async:!0,type:"module"},t),(t=qt.get(r))&&fo(e,t),a=i.createElement("script"),st(a),ct(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function uf(e,t,i,s){var r=(r=fe.current)?Pn(r):null;if(!r)throw Error(O(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Ps(i.href),i=ms(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Ps(i.href);var a=ms(r).hoistableStyles,b=a.get(e);if(b||(r=r.ownerDocument||r,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,b),(a=r.querySelector(Hr(e)))&&!a._p&&(b.instance=a,b.state.loading=5),qt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},qt.set(e,i),a||J_(r,e,i,b.state))),t&&s===null)throw Error(O(528,""));return b}if(t&&s!==null)throw Error(O(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Vs(i),i=ms(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(O(444,e))}}function Ps(e){return'href="'+Mt(e)+'"'}function Hr(e){return'link[rel="stylesheet"]['+e+"]"}function hf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function J_(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),ct(t,"link",i),st(t),e.head.appendChild(t))}function Vs(e){return'[src="'+Mt(e)+'"]'}function Nr(e){return"script[async]"+e}function ff(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Mt(i.href)+'"]');if(s)return t.instance=s,st(s),s;var r=h({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),st(s),ct(s,"style",r),Vn(s,i.precedence,e),t.instance=s;case"stylesheet":r=Ps(i.href);var a=e.querySelector(Hr(r));if(a)return t.state.loading|=4,t.instance=a,st(a),a;s=hf(i),(r=qt.get(r))&&ho(s,r),a=(e.ownerDocument||e).createElement("link"),st(a);var b=a;return b._p=new Promise(function(k,U){b.onload=k,b.onerror=U}),ct(a,"link",s),t.state.loading|=4,Vn(a,i.precedence,e),t.instance=a;case"script":return a=Vs(i.src),(r=e.querySelector(Nr(a)))?(t.instance=r,st(r),r):(s=i,(r=qt.get(a))&&(s=h({},i),fo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),st(r),ct(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(O(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Vn(s,i.precedence,e));return t.instance}function Vn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,a=r,b=0;b<s.length;b++){var k=s[b];if(k.dataset.precedence===t)a=k;else if(a!==r)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function ho(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function fo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Wn=null;function df(e,t,i){if(Wn===null){var s=new Map,r=Wn=new Map;r.set(i,s)}else r=Wn,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 a=i[r];if(!(a[Js]||a[nt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var b=a.getAttribute(t)||"";b=e+b;var k=s.get(b);k?k.push(a):s.set(b,[a])}}return s}function _f(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function ev(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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 vf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tv(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=Ps(s.href),a=t.querySelector(Hr(r));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Qn.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=a,st(a);return}a=t.ownerDocument||t,s=hf(s),(r=qt.get(r))&&ho(s,r),a=a.createElement("link"),st(a);var b=a;b._p=new Promise(function(k,U){b.onload=k,b.onerror=U}),ct(a,"link",s),i.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Qn.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var _o=0;function iv(e,t){return e.stylesheets&&e.count===0&&Jn(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Jn(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&_o===0&&(_o=62500*H_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Jn(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>_o?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Qn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jn(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zn=null;function Jn(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zn=new Map,t.forEach(sv,e),Zn=null,Qn.call(e))}function sv(e,t){if(!(t.state.loading&4)){var i=Zn.get(e);if(i)var s=i.get(null);else{i=new Map,Zn.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<r.length;a++){var b=r[a];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(i.set(b.dataset.precedence,b),s=b)}s&&i.set(null,s)}r=t.instance,b=r.getAttribute("data-precedence"),a=i.get(b)||s,a===s&&i.set(null,r),i.set(b,r),this.count++,s=Qn.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),a?a.parentNode.insertBefore(r,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var zr={$$typeof:l,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function rv(e,t,i,s,r,a,b,k,U){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=oa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oa(0),this.hiddenUpdates=oa(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=a,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function mf(e,t,i,s,r,a,b,k,U,W,re,ce){return e=new rv(e,t,i,b,U,W,re,ce,k),t=1,a===!0&&(t|=24),a=wt(3,null,null,t),e.current=a,a.stateNode=e,t=Xa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:s,isDehydrated:i,cache:t},Wa(a),e}function pf(e){return e?(e=Ds,e):Ds}function gf(e,t,i,s,r,a){r=pf(r),s.context===null?s.context=r:s.pendingContext=r,s=Ei(t),s.payload={element:i},a=a===void 0?null:a,a!==null&&(s.callback=a),i=wi(e,s,t),i!==null&&(St(i,e,t),mr(i,e,t))}function Sf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function vo(e,t){Sf(e,t),(e=e.alternate)&&Sf(e,t)}function yf(e){if(e.tag===13||e.tag===31){var t=Wi(e,67108864);t!==null&&St(t,e,67108864),vo(e,67108864)}}function bf(e){if(e.tag===13||e.tag===31){var t=Tt();t=ca(t);var i=Wi(e,t);i!==null&&St(i,e,t),vo(e,t)}}var ea=!0;function nv(e,t,i,s){var r=q.T;q.T=null;var a=I.p;try{I.p=2,mo(e,t,i,s)}finally{I.p=a,q.T=r}}function av(e,t,i,s){var r=q.T;q.T=null;var a=I.p;try{I.p=8,mo(e,t,i,s)}finally{I.p=a,q.T=r}}function mo(e,t,i,s){if(ea){var r=po(s);if(r===null)to(e,t,s,ta,i),Ef(e,s);else if(ov(r,e,t,i,s))s.stopPropagation();else if(Ef(e,s),t&4&&-1<lv.indexOf(e)){for(;r!==null;){var a=vs(r);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var b=Ki(a.pendingLanes);if(b!==0){var k=a;for(k.pendingLanes|=2,k.entangledLanes|=2;b;){var U=1<<31-Ct(b);k.entanglements[1]|=U,b&=~U}Pt(a),(Me&6)===0&&(Nn=et()+500,Mr(0))}}break;case 31:case 13:k=Wi(a,2),k!==null&&St(k,a,2),Un(),vo(a,2)}if(a=po(s),a===null&&to(e,t,s,ta,i),a===r)break;r=a}r!==null&&s.stopPropagation()}else to(e,t,s,null,i)}}function po(e){return e=ga(e),go(e)}var ta=null;function go(e){if(ta=null,e=_s(e),e!==null){var t=ne(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=$(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 ta=e,null}function Cf(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(kt()){case _i:return 2;case hs:return 8;case yt:case fs:return 32;case It:return 268435456;default:return 32}default:return 32}}var So=!1,ji=null,Hi=null,Ni=null,Ur=new Map,qr=new Map,zi=[],lv="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 Ef(e,t){switch(e){case"focusin":case"focusout":ji=null;break;case"dragenter":case"dragleave":Hi=null;break;case"mouseover":case"mouseout":Ni=null;break;case"pointerover":case"pointerout":Ur.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qr.delete(t.pointerId)}}function Ir(e,t,i,s,r,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:a,targetContainers:[r]},t!==null&&(t=vs(t),t!==null&&yf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function ov(e,t,i,s,r){switch(t){case"focusin":return ji=Ir(ji,e,t,i,s,r),!0;case"dragenter":return Hi=Ir(Hi,e,t,i,s,r),!0;case"mouseover":return Ni=Ir(Ni,e,t,i,s,r),!0;case"pointerover":var a=r.pointerId;return Ur.set(a,Ir(Ur.get(a)||null,e,t,i,s,r)),!0;case"gotpointercapture":return a=r.pointerId,qr.set(a,Ir(qr.get(a)||null,e,t,i,s,r)),!0}return!1}function wf(e){var t=_s(e.target);if(t!==null){var i=ne(t);if(i!==null){if(t=i.tag,t===13){if(t=$(i),t!==null){e.blockedOn=t,No(e.priority,function(){bf(i)});return}}else if(t===31){if(t=f(i),t!==null){e.blockedOn=t,No(e.priority,function(){bf(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 ia(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=po(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);pa=s,i.target.dispatchEvent(s),pa=null}else return t=vs(i),t!==null&&yf(t),e.blockedOn=i,!1;t.shift()}return!0}function xf(e,t,i){ia(e)&&i.delete(t)}function cv(){So=!1,ji!==null&&ia(ji)&&(ji=null),Hi!==null&&ia(Hi)&&(Hi=null),Ni!==null&&ia(Ni)&&(Ni=null),Ur.forEach(xf),qr.forEach(xf)}function sa(e,t){e.blockedOn===t&&(e.blockedOn=null,So||(So=!0,j.unstable_scheduleCallback(j.unstable_NormalPriority,cv)))}var ra=null;function Df(e){ra!==e&&(ra=e,j.unstable_scheduleCallback(j.unstable_NormalPriority,function(){ra===e&&(ra=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(go(s||i)===null)continue;break}var a=vs(i);a!==null&&(e.splice(t,3),t-=3,ml(a,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Ws(e){function t(U){return sa(U,e)}ji!==null&&sa(ji,e),Hi!==null&&sa(Hi,e),Ni!==null&&sa(Ni,e),Ur.forEach(t),qr.forEach(t);for(var i=0;i<zi.length;i++){var s=zi[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<zi.length&&(i=zi[0],i.blockedOn===null);)wf(i),i.blockedOn===null&&zi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],a=i[s+1],b=r[dt]||null;if(typeof a=="function")b||Df(i);else if(b){var k=null;if(a&&a.hasAttribute("formAction")){if(r=a,b=a[dt]||null)k=b.formAction;else if(go(r)!==null)continue}else k=b.action;typeof k=="function"?i[s+1]=k:(i.splice(s,3),s-=3),Df(i)}}}function Af(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(b){return r=b})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.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 yo(e){this._internalRoot=e}na.prototype.render=yo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));var i=t.current,s=Tt();gf(i,s,e,t,null,null)},na.prototype.unmount=yo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gf(e.current,2,null,e,null,null),Un(),t[ds]=null}};function na(e){this._internalRoot=e}na.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ho();e={blockedOn:null,target:e,priority:t};for(var i=0;i<zi.length&&t!==0&&t<zi[i].priority;i++);zi.splice(i,0,e),i===0&&wf(e)}};var Rf=te.version;if(Rf!=="19.2.7")throw Error(O(527,Rf,"19.2.7"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=d(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var uv={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var aa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!aa.isDisabled&&aa.supportsFiber)try{Fi=aa.inject(uv),bt=aa}catch{}}return Yr.createRoot=function(e,t){if(!le(e))throw Error(O(299));var i=!1,s="",r=Bu,a=ju,b=Hu;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&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=mf(e,1,!1,null,null,i,s,null,r,a,b,Af),e[ds]=t.current,eo(e),new yo(t)},Yr.hydrateRoot=function(e,t,i){if(!le(e))throw Error(O(299));var s=!1,r="",a=Bu,b=ju,k=Hu,U=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(a=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.formState!==void 0&&(U=i.formState)),t=mf(e,1,!0,t,i??null,s,r,U,a,b,k,Af),t.context=pf(null),i=t.current,s=Tt(),s=ca(s),r=Ei(s),r.callback=null,wi(i,r,s),i=s,t.current.lanes=i,Zs(t,i),Pt(t),e[ds]=t.current,eo(e),new na(t)},Yr.version="19.2.7",Yr}var zf;function yv(){if(zf)return Eo.exports;zf=1;function j(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(te){console.error(te)}}return j(),Eo.exports=Sv(),Eo.exports}var bv=yv(),Ao={exports:{}},Uf;function Cv(){return Uf||(Uf=1,(function(j,te){(function(Q,O){j.exports=O()})(globalThis,(()=>(()=>{var Q={4567:function($,f,u){var d=this&&this.__decorate||function(n,l,_,E){var C,w=arguments.length,p=w<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(n,l,_,E);else for(var R=n.length-1;R>=0;R--)(C=n[R])&&(p=(w<3?C(p):w>3?C(l,_,p):C(l,_))||p);return w>3&&p&&Object.defineProperty(l,_,p),p},v=this&&this.__param||function(n,l){return function(_,E){l(_,E,n)}};Object.defineProperty(f,"__esModule",{value:!0}),f.AccessibilityManager=void 0;const h=u(9042),g=u(9924),y=u(844),D=u(4725),m=u(2585),o=u(3656);let c=f.AccessibilityManager=class extends y.Disposable{constructor(n,l,_,E){super(),this._terminal=n,this._coreBrowserService=_,this._renderService=E,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 C=0;C<this._terminal.rows;C++)this._rowElements[C]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[C]);if(this._topBoundaryFocusListener=C=>this._handleBoundaryFocus(C,0),this._bottomBoundaryFocusListener=C=>this._handleBoundaryFocus(C,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 g.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((C=>this._handleResize(C.rows)))),this.register(this._terminal.onRender((C=>this._refreshRows(C.start,C.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((C=>this._handleChar(C)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
50
|
+
`)))),this.register(this._terminal.onA11yTab((C=>this._handleTab(C)))),this.register(this._terminal.onKey((C=>this._handleKey(C.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,o.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(n){for(let l=0;l<n;l++)this._handleChar(" ")}_handleChar(n){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==n&&(this._charsToAnnounce+=n):this._charsToAnnounce+=n,n===`
|
|
51
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(n){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(n)||this._charsToConsume.push(n)}_refreshRows(n,l){this._liveRegionDebouncer.refresh(n,l,this._terminal.rows)}_renderRows(n,l){const _=this._terminal.buffer,E=_.lines.length.toString();for(let C=n;C<=l;C++){const w=_.lines.get(_.ydisp+C),p=[],R=(w==null?void 0:w.translateToString(!0,void 0,void 0,p))||"",T=(_.ydisp+C+1).toString(),N=this._rowElements[C];N&&(R.length===0?(N.innerText=" ",this._rowColumns.set(N,[0,1])):(N.textContent=R,this._rowColumns.set(N,p)),N.setAttribute("aria-posinset",T),N.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(n,l){const _=n.target,E=this._rowElements[l===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||n.relatedTarget!==E)return;let C,w;if(l===0?(C=_,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(C=this._rowElements.shift(),w=_,this._rowContainer.removeChild(C)),C.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}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(),n.preventDefault(),n.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const n=document.getSelection();if(!n)return;if(n.isCollapsed)return void(this._rowContainer.contains(n.anchorNode)&&this._terminal.clearSelection());if(!n.anchorNode||!n.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:n.anchorNode,offset:n.anchorOffset},_={node:n.focusNode,offset:n.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 E=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:E,offset:((R=E.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(_.node))return;const C=({node:T,offset:N})=>{const z=T instanceof Text?T.parentNode:T;let H=parseInt(z==null?void 0:z.getAttribute("aria-posinset"),10)-1;if(isNaN(H))return console.warn("row is invalid. Race condition?"),null;const P=this._rowColumns.get(z);if(!P)return console.warn("columns is null. Race condition?"),null;let ee=N<P.length?P[N]:P.slice(-1)[0]+1;return ee>=this._terminal.cols&&(++H,ee=0),{row:H,column:ee}},w=C(l),p=C(_);if(w&&p){if(w.row>p.row||w.row===p.row&&w.column>=p.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(p.row-w.row)*this._terminal.cols-w.column+p.column)}}_handleResize(n){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>n;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const n=this._coreBrowserService.mainDocument.createElement("div");return n.setAttribute("role","listitem"),n.tabIndex=-1,this._refreshRowDimensions(n),n}_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 n=0;n<this._terminal.rows;n++)this._refreshRowDimensions(this._rowElements[n])}}_refreshRowDimensions(n){n.style.height=`${this._renderService.dimensions.css.cell.height}px`}};f.AccessibilityManager=c=d([v(1,m.IInstantiationService),v(2,D.ICoreBrowserService),v(3,D.IRenderService)],c)},3614:($,f)=>{function u(g){return g.replace(/\r?\n/g,"\r")}function d(g,y){return y?"\x1B[200~"+g+"\x1B[201~":g}function v(g,y,D,m){g=d(g=u(g),D.decPrivateModes.bracketedPasteMode&&m.rawOptions.ignoreBracketedPasteMode!==!0),D.triggerDataEvent(g,!0),y.value=""}function h(g,y,D){const m=D.getBoundingClientRect(),o=g.clientX-m.left-10,c=g.clientY-m.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${o}px`,y.style.top=`${c}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(f,"__esModule",{value:!0}),f.rightClickHandler=f.moveTextAreaUnderMouseCursor=f.paste=f.handlePasteEvent=f.copyHandler=f.bracketTextForPaste=f.prepareTextForTerminal=void 0,f.prepareTextForTerminal=u,f.bracketTextForPaste=d,f.copyHandler=function(g,y){g.clipboardData&&g.clipboardData.setData("text/plain",y.selectionText),g.preventDefault()},f.handlePasteEvent=function(g,y,D,m){g.stopPropagation(),g.clipboardData&&v(g.clipboardData.getData("text/plain"),y,D,m)},f.paste=v,f.moveTextAreaUnderMouseCursor=h,f.rightClickHandler=function(g,y,D,m,o){h(g,y,D),o&&m.rightClickSelect(g),y.value=m.selectionText,y.select()}},7239:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ColorContrastCache=void 0;const d=u(1505);f.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(v,h,g){this._css.set(v,h,g)}getCss(v,h){return this._css.get(v,h)}setColor(v,h,g){this._color.set(v,h,g)}getColor(v,h){return this._color.get(v,h)}clear(){this._color.clear(),this._css.clear()}}},3656:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.addDisposableDomListener=void 0,f.addDisposableDomListener=function(u,d,v,h){u.addEventListener(d,v,h);let g=!1;return{dispose:()=>{g||(g=!0,u.removeEventListener(d,v,h))}}}},3551:function($,f,u){var d=this&&this.__decorate||function(c,n,l,_){var E,C=arguments.length,w=C<3?n:_===null?_=Object.getOwnPropertyDescriptor(n,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,n,l,_);else for(var p=c.length-1;p>=0;p--)(E=c[p])&&(w=(C<3?E(w):C>3?E(n,l,w):E(n,l))||w);return C>3&&w&&Object.defineProperty(n,l,w),w},v=this&&this.__param||function(c,n){return function(l,_){n(l,_,c)}};Object.defineProperty(f,"__esModule",{value:!0}),f.Linkifier=void 0;const h=u(3656),g=u(8460),y=u(844),D=u(2585),m=u(4725);let o=f.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(c,n,l,_,E){super(),this._element=c,this._mouseService=n,this._renderService=l,this._bufferService=_,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var C;this._lastMouseEvent=void 0,(C=this._activeProviderReplies)==null||C.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){this._lastMouseEvent=c;const n=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!n)return;this._isMouseOut=!1;const l=c.composedPath();for(let _=0;_<l.length;_++){const E=l[_];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._handleHover(n),this._lastBufferCell=n)}_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,n){var _,E;this._activeProviderReplies&&n||((_=this._activeProviderReplies)==null||_.forEach((C=>{C==null||C.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let l=!1;for(const[C,w]of this._linkProviderService.linkProviders.entries())n?(E=this._activeProviderReplies)!=null&&E.get(C)&&(l=this._checkLinkProviderResult(C,c,l)):w.provideLinks(c.y,(p=>{var T,N;if(this._isMouseOut)return;const R=p==null?void 0:p.map((z=>({link:z})));(T=this._activeProviderReplies)==null||T.set(C,R),l=this._checkLinkProviderResult(C,c,l),((N=this._activeProviderReplies)==null?void 0:N.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,n){const l=new Set;for(let _=0;_<n.size;_++){const E=n.get(_);if(E)for(let C=0;C<E.length;C++){const w=E[C],p=w.link.range.start.y<c?0:w.link.range.start.x,R=w.link.range.end.y>c?this._bufferService.cols:w.link.range.end.x;for(let T=p;T<=R;T++){if(l.has(T)){E.splice(C--,1);break}l.add(T)}}}}_checkLinkProviderResult(c,n,l){var C;if(!this._activeProviderReplies)return l;const _=this._activeProviderReplies.get(c);let E=!1;for(let w=0;w<c;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(E=!0);if(!E&&_){const w=_.find((p=>this._linkAtPosition(p.link,n)));w&&(l=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let w=0;w<this._activeProviderReplies.size;w++){const p=(C=this._activeProviderReplies.get(w))==null?void 0:C.find((R=>this._linkAtPosition(R.link,n)));if(p){l=!0,this._handleNewLink(p);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const n=this._positionFromMouseEvent(c,this._element,this._mouseService);n&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,n){this._currentLink&&this._lastMouseEvent&&(!c||!n||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const n=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);n&&this._linkAtPosition(c.link,n)&&(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:()=>{var l,_;return(_=(l=this._currentLink)==null?void 0:l.state)==null?void 0:_.decorations.pointerCursor},set:l=>{var _;(_=this._currentLink)!=null&&_.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:()=>{var l,_;return(_=(l=this._currentLink)==null?void 0:l.state)==null?void 0:_.decorations.underline},set:l=>{var _,E,C;(_=this._currentLink)!=null&&_.state&&((C=(E=this._currentLink)==null?void 0:E.state)==null?void 0:C.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,E=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(_,E),this._lastMouseEvent)){const C=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);C&&this._askForLink(C,!1)}}))))}_linkHover(c,n,l){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(l,n.text)}_fireUnderlineEvent(c,n){const l=c.range,_=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-_-1,l.end.x,l.end.y-_-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(c,n,l){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(l,n.text)}_linkAtPosition(c,n){const l=c.range.start.y*this._bufferService.cols+c.range.start.x,_=c.range.end.y*this._bufferService.cols+c.range.end.x,E=n.y*this._bufferService.cols+n.x;return l<=E&&E<=_}_positionFromMouseEvent(c,n,l){const _=l.getCoords(c,n,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,n,l,_,E){return{x1:c,y1:n,x2:l,y2:_,cols:this._bufferService.cols,fg:E}}};f.Linkifier=o=d([v(1,m.IMouseService),v(2,m.IRenderService),v(3,D.IBufferService),v(4,m.ILinkProviderService)],o)},9042:($,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($,f,u){var d=this&&this.__decorate||function(m,o,c,n){var l,_=arguments.length,E=_<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,c):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,o,c,n);else for(var C=m.length-1;C>=0;C--)(l=m[C])&&(E=(_<3?l(E):_>3?l(o,c,E):l(o,c))||E);return _>3&&E&&Object.defineProperty(o,c,E),E},v=this&&this.__param||function(m,o){return function(c,n){o(c,n,m)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OscLinkProvider=void 0;const h=u(511),g=u(2585);let y=f.OscLinkProvider=class{constructor(m,o,c){this._bufferService=m,this._optionsService=o,this._oscLinkService=c}provideLinks(m,o){var R;const c=this._bufferService.buffer.lines.get(m-1);if(!c)return void o(void 0);const n=[],l=this._optionsService.rawOptions.linkHandler,_=new h.CellData,E=c.getTrimmedLength();let C=-1,w=-1,p=!1;for(let T=0;T<E;T++)if(w!==-1||c.hasContent(T)){if(c.loadCell(T,_),_.hasExtendedAttrs()&&_.extended.urlId){if(w===-1){w=T,C=_.extended.urlId;continue}p=_.extended.urlId!==C}else w!==-1&&(p=!0);if(p||w!==-1&&T===E-1){const N=(R=this._oscLinkService.getLinkData(C))==null?void 0:R.uri;if(N){const z={start:{x:w+1,y:m},end:{x:T+(p||T!==E-1?0:1),y:m}};let H=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const P=new URL(N);["http:","https:"].includes(P.protocol)||(H=!0)}catch{H=!0}H||n.push({text:N,range:z,activate:(P,ee)=>l?l.activate(P,ee,z):D(0,ee),hover:(P,ee)=>{var q;return(q=l==null?void 0:l.hover)==null?void 0:q.call(l,P,ee,z)},leave:(P,ee)=>{var q;return(q=l==null?void 0:l.leave)==null?void 0:q.call(l,P,ee,z)}})}p=!1,_.hasExtendedAttrs()&&_.extended.urlId?(w=T,C=_.extended.urlId):(w=-1,C=-1)}}o(n)}};function D(m,o){if(confirm(`Do you want to navigate to ${o}?
|
|
52
|
+
|
|
53
|
+
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}}f.OscLinkProvider=y=d([v(0,g.IBufferService),v(1,g.IOptionsService),v(2,g.IOscLinkService)],y)},6193:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.RenderDebouncer=void 0,f.RenderDebouncer=class{constructor(u,d){this._renderCallback=u,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,d,v){this._rowCount=v,u=u!==void 0?u:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,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 u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const d=u(3614),v=u(3656),h=u(3551),g=u(9042),y=u(3730),D=u(1680),m=u(3107),o=u(5744),c=u(2950),n=u(1296),l=u(428),_=u(4269),E=u(5114),C=u(8934),w=u(3230),p=u(9312),R=u(4725),T=u(6731),N=u(8055),z=u(8969),H=u(8460),P=u(844),ee=u(6114),q=u(8437),I=u(2584),X=u(7399),x=u(5941),B=u(9074),A=u(2585),M=u(5435),F=u(4567),Z=u(779);class he extends z.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(G={}){super(G),this.browser=ee,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new P.MutableDisposable),this._onCursorMove=this.register(new H.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new H.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new H.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new H.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new H.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new H.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new H.EventEmitter),this._onBlur=this.register(new H.EventEmitter),this._onA11yCharEmitter=this.register(new H.EventEmitter),this._onA11yTabEmitter=this.register(new H.EventEmitter),this._onWillOpen=this.register(new H.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(A.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Z.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((L,ae)=>this.refresh(L,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((L=>this._reportWindowsOptions(L)))),this.register(this._inputHandler.onColor((L=>this._handleColorEvent(L)))),this.register((0,H.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,H.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((L=>this._afterResize(L.cols,L.rows)))),this.register((0,P.toDisposable)((()=>{var L,ae;this._customKeyEventHandler=void 0,(ae=(L=this.element)==null?void 0:L.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(G){if(this._themeService)for(const L of G){let ae,se="";switch(L.index){case 256:ae="foreground",se="10";break;case 257:ae="background",se="11";break;case 258:ae="cursor",se="12";break;default:ae="ansi",se="4;"+L.index}switch(L.type){case 0:const _e=N.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[L.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${I.C0.ESC}]${se};${(0,x.toRgbString)(_e)}${I.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((de=>de.ansi[L.index]=N.channels.toColor(...L.color)));else{const de=ae;this._themeService.modifyColors((Ee=>Ee[de]=N.channels.toColor(...L.color)))}break;case 2:this._themeService.restoreColor(L.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(G){G?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(G){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var G;return(G=this.textarea)==null?void 0:G.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const G=this.buffer.ybase+this.buffer.y,L=this.buffer.lines.get(G);if(!L)return;const ae=Math.min(this.buffer.x,this.cols-1),se=this._renderService.dimensions.css.cell.height,_e=L.getWidth(ae),de=this._renderService.dimensions.css.cell.width*_e,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,Oe=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Oe+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=de+"px",this.textarea.style.height=se+"px",this.textarea.style.lineHeight=se+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(L=>{this.hasSelection()&&(0,d.copyHandler)(L,this._selectionService)})));const G=L=>(0,d.handlePasteEvent)(L,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",G)),this.register((0,v.addDisposableDomListener)(this.element,"paste",G)),ee.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(L=>{L.button===2&&(0,d.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(L=>{(0,d.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ee.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(L=>{L.button===1&&(0,d.moveTextAreaUnderMouseCursor)(L,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(G=>this._keyUp(G)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(G=>this._keyDown(G)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(G=>this._keyPress(G)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(G=>this._compositionHelper.compositionupdate(G)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(G=>this._inputEvent(G)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(G){var ae;if(!G)throw new Error("Terminal requires a parent element.");if(G.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=G.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"),G.appendChild(this.element);const L=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),L.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,v.addDisposableDomListener)(this.screenElement,"mousemove",(se=>this.updateCursorStyle(se)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),L.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),ee.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(E.CoreBrowserService,this.textarea,G.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(se=>this._handleTextAreaFocus(se)))),this.register((0,v.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(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(T.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((se=>this._onRender.fire(se)))),this.onResize((se=>this._renderService.resize(se.cols,se.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(C.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(L);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(D.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((se=>this.scrollLines(se.amount,se.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(p.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((se=>this.scrollLines(se.amount,se.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((se=>this._renderService.handleSelectionChanged(se.start,se.end,se.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((se=>{this.textarea.value=se,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((se=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(m.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(se=>this._selectionService.handleMouseDown(se)))),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(F.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(se=>this._handleScreenReaderModeOptionChange(se)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(se=>{!this._overviewRulerRenderer&&se&&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(n.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const G=this,L=this.element;function ae(de){const Ee=G._mouseService.getMouseReportCoords(de,G.screenElement);if(!Ee)return!1;let Oe,Ie;switch(de.overrideType||de.type){case"mousemove":Ie=32,de.buttons===void 0?(Oe=3,de.button!==void 0&&(Oe=de.button<3?de.button:3)):Oe=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":Ie=0,Oe=de.button<3?de.button:3;break;case"mousedown":Ie=1,Oe=de.button<3?de.button:3;break;case"wheel":if(G._customWheelEventHandler&&G._customWheelEventHandler(de)===!1||G.viewport.getLinesScrolled(de)===0)return!1;Ie=de.deltaY<0?0:1,Oe=4;break;default:return!1}return!(Ie===void 0||Oe===void 0||Oe>4)&&G.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:Oe,action:Ie,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const se={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:de=>(ae(de),de.buttons||(this._document.removeEventListener("mouseup",se.mouseup),se.mousedrag&&this._document.removeEventListener("mousemove",se.mousedrag)),this.cancel(de)),wheel:de=>(ae(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&ae(de)},mousemove:de=>{de.buttons||ae(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?se.mousemove||(L.addEventListener("mousemove",_e.mousemove),se.mousemove=_e.mousemove):(L.removeEventListener("mousemove",se.mousemove),se.mousemove=null),16&de?se.wheel||(L.addEventListener("wheel",_e.wheel,{passive:!1}),se.wheel=_e.wheel):(L.removeEventListener("wheel",se.wheel),se.wheel=null),2&de?se.mouseup||(se.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",se.mouseup),se.mouseup=null),4&de?se.mousedrag||(se.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",se.mousedrag),se.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(L,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return ae(de),se.mouseup&&this._document.addEventListener("mouseup",se.mouseup),se.mousedrag&&this._document.addEventListener("mousemove",se.mousedrag),this.cancel(de)}))),this.register((0,v.addDisposableDomListener)(L,"wheel",(de=>{if(!se.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(de);if(Ee===0)return;const Oe=I.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let Ie="";for(let it=0;it<Math.abs(Ee);it++)Ie+=Oe;return this.coreService.triggerDataEvent(Ie,!0),this.cancel(de,!0)}return this.viewport.handleWheel(de)?this.cancel(de):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(L,"touchstart",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(L,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(G,L){var ae;(ae=this._renderService)==null||ae.refreshRows(G,L)}updateCursorStyle(G){var L;(L=this._selectionService)!=null&&L.shouldColumnSelect(G)?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(G,L,ae=0){var se;ae===1?(super.scrollLines(G,L,ae),this.refresh(0,this.rows-1)):(se=this.viewport)==null||se.scrollLines(G)}paste(G){(0,d.paste)(G,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(G){this._customKeyEventHandler=G}attachCustomWheelEventHandler(G){this._customWheelEventHandler=G}registerLinkProvider(G){return this._linkProviderService.registerLinkProvider(G)}registerCharacterJoiner(G){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const L=this._characterJoinerService.register(G);return this.refresh(0,this.rows-1),L}deregisterCharacterJoiner(G){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(G)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(G){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+G)}registerDecoration(G){return this._decorationService.registerDecoration(G)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(G,L,ae){this._selectionService.setSelection(G,L,ae)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var G;(G=this._selectionService)==null||G.clearSelection()}selectAll(){var G;(G=this._selectionService)==null||G.selectAll()}selectLines(G,L){var ae;(ae=this._selectionService)==null||ae.selectLines(G,L)}_keyDown(G){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1)return!1;const L=this.browser.isMac&&this.options.macOptionIsMeta&&G.altKey;if(!L&&!this._compositionHelper.keydown(G))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;L||G.key!=="Dead"&&G.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,X.evaluateKeyboardEvent)(G,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(G),ae.type===3||ae.type===2){const se=this.rows-1;return this.scrollLines(ae.type===2?-se:se),this.cancel(G,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,G)||(ae.cancel&&this.cancel(G,!0),!ae.key||!!(G.key&&!G.ctrlKey&&!G.altKey&&!G.metaKey&&G.key.length===1&&G.key.charCodeAt(0)>=65&&G.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==I.C0.ETX&&ae.key!==I.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:G}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||G.altKey||G.ctrlKey?this.cancel(G,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(G,L){const ae=G.isMac&&!this.options.macOptionIsMeta&&L.altKey&&!L.ctrlKey&&!L.metaKey||G.isWindows&&L.altKey&&L.ctrlKey&&!L.metaKey||G.isWindows&&L.getModifierState("AltGraph");return L.type==="keypress"?ae:ae&&(!L.keyCode||L.keyCode>47)}_keyUp(G){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1||((function(L){return L.keyCode===16||L.keyCode===17||L.keyCode===18})(G)||this.focus(),this.updateCursorStyle(G),this._keyPressHandled=!1)}_keyPress(G){let L;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1)return!1;if(this.cancel(G),G.charCode)L=G.charCode;else if(G.which===null||G.which===void 0)L=G.keyCode;else{if(G.which===0||G.charCode===0)return!1;L=G.which}return!(!L||(G.altKey||G.ctrlKey||G.metaKey)&&!this._isThirdLevelShift(this.browser,G)||(L=String.fromCharCode(L),this._onKey.fire({key:L,domEvent:G}),this._showCursor(),this.coreService.triggerDataEvent(L,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(G){if(G.data&&G.inputType==="insertText"&&(!G.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const L=G.data;return this.coreService.triggerDataEvent(L,!0),this.cancel(G),!0}return!1}resize(G,L){G!==this.cols||L!==this.rows?super.resize(G,L):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(G,L){var ae,se;(ae=this._charSizeService)==null||ae.measure(),(se=this.viewport)==null||se.syncScrollArea(!0)}clear(){var G;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 L=1;L<this.rows;L++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(G=this.viewport)==null||G.reset(),this.refresh(0,this.rows-1)}}reset(){var L,ae;this.options.rows=this.rows,this.options.cols=this.cols;const G=this._customKeyEventHandler;this._setup(),super.reset(),(L=this._selectionService)==null||L.reset(),this._decorationService.reset(),(ae=this.viewport)==null||ae.reset(),this._customKeyEventHandler=G,this.refresh(0,this.rows-1)}clearTextureAtlas(){var G;(G=this._renderService)==null||G.clearTextureAtlas()}_reportFocus(){var G;(G=this.element)!=null&&G.classList.contains("focus")?this.coreService.triggerDataEvent(I.C0.ESC+"[I"):this.coreService.triggerDataEvent(I.C0.ESC+"[O")}_reportWindowsOptions(G){if(this._renderService)switch(G){case M.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const L=this._renderService.dimensions.css.canvas.width.toFixed(0),ae=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[4;${ae};${L}t`);break;case M.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const se=this._renderService.dimensions.css.cell.width.toFixed(0),_e=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[6;${_e};${se}t`)}}cancel(G,L){if(this.options.cancelEvents||L)return G.preventDefault(),G.stopPropagation(),!1}}f.Terminal=he},9924:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.TimeBasedDebouncer=void 0,f.TimeBasedDebouncer=class{constructor(u,d=1e3){this._renderCallback=u,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,d,v){this._rowCount=v,u=u!==void 0?u:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=h-this._lastRefreshMs,y=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d)}}},1680:function($,f,u){var d=this&&this.__decorate||function(c,n,l,_){var E,C=arguments.length,w=C<3?n:_===null?_=Object.getOwnPropertyDescriptor(n,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,n,l,_);else for(var p=c.length-1;p>=0;p--)(E=c[p])&&(w=(C<3?E(w):C>3?E(n,l,w):E(n,l))||w);return C>3&&w&&Object.defineProperty(n,l,w),w},v=this&&this.__param||function(c,n){return function(l,_){n(l,_,c)}};Object.defineProperty(f,"__esModule",{value:!0}),f.Viewport=void 0;const h=u(3656),g=u(4725),y=u(8460),D=u(844),m=u(2585);let o=f.Viewport=class extends D.Disposable{constructor(c,n,l,_,E,C,w,p){super(),this._viewportElement=c,this._scrollArea=n,this._bufferService=l,this._optionsService=_,this._charSizeService=E,this._renderService=C,this._coreBrowserService=w,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((R=>this._renderDimensions=R))),this._handleThemeChange(p.colors),this.register(p.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(c){if(c)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const n=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==n&&(this._lastRecordedBufferHeight=n,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 n=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:n,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,n){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(n<0&&this._viewportElement.scrollTop!==0||n>0&&l<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const n=this._getPixelsScrolled(c);return n!==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+n:this._smoothScrollState.target+=n,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=n,this._bubbleScroll(c,n))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const n=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+n,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 n=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?n*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._currentRowHeight*this._bufferService.rows),n}getBufferElements(c,n){var p;let l,_="";const E=[],C=n??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let R=c;R<C;R++){const T=w.get(R);if(!T)continue;const N=(p=w.get(R+1))==null?void 0:p.isWrapped;if(_+=T.translateToString(!N),!N||R===w.length-1){const z=document.createElement("div");z.textContent=_,E.push(z),_.length>0&&(l=z),_=""}}return{bufferElements:E,cursorElement:l}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let n=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(n/=this._currentRowHeight+0,this._wheelPartialScroll+=n,n=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._bufferService.rows),n}_applyScrollModifier(c,n){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&n.altKey||l==="ctrl"&&n.ctrlKey||l==="shift"&&n.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 n=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,n!==0&&(this._viewportElement.scrollTop+=n,this._bubbleScroll(c,n))}};f.Viewport=o=d([v(2,m.IBufferService),v(3,m.IOptionsService),v(4,g.ICharSizeService),v(5,g.IRenderService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],o)},3107:function($,f,u){var d=this&&this.__decorate||function(m,o,c,n){var l,_=arguments.length,E=_<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,c):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,o,c,n);else for(var C=m.length-1;C>=0;C--)(l=m[C])&&(E=(_<3?l(E):_>3?l(o,c,E):l(o,c))||E);return _>3&&E&&Object.defineProperty(o,c,E),E},v=this&&this.__param||function(m,o){return function(c,n){o(c,n,m)}};Object.defineProperty(f,"__esModule",{value:!0}),f.BufferDecorationRenderer=void 0;const h=u(4725),g=u(844),y=u(2585);let D=f.BufferDecorationRenderer=class extends g.Disposable{constructor(m,o,c,n,l){super(),this._screenElement=m,this._bufferService=o,this._coreBrowserService=c,this._decorationService=n,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,g.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){var n;const o=this._coreBrowserService.mainDocument.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",((n=m==null?void 0:m.options)==null?void 0:n.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){var o;(o=this._decorationElements.get(m))==null||o.remove(),this._decorationElements.delete(m),m.dispose()}};f.BufferDecorationRenderer=D=d([v(1,y.IBufferService),v(2,h.ICoreBrowserService),v(3,y.IDecorationService),v(4,h.IRenderService)],D)},5871:($,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(u){if(u.options.overviewRulerOptions){for(const d of this._zones)if(d.color===u.options.overviewRulerOptions.color&&d.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,u.marker.line))return;if(this._lineAdjacentToZone(d,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(d,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,d){return d>=u.startBufferLine&&d<=u.endBufferLine}_lineAdjacentToZone(u,d,v){return d>=u.startBufferLine-this._linePadding[v||"full"]&&d<=u.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(u,d){u.startBufferLine=Math.min(u.startBufferLine,d),u.endBufferLine=Math.max(u.endBufferLine,d)}}},5744:function($,f,u){var d=this&&this.__decorate||function(l,_,E,C){var w,p=arguments.length,R=p<3?_:C===null?C=Object.getOwnPropertyDescriptor(_,E):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(l,_,E,C);else for(var T=l.length-1;T>=0;T--)(w=l[T])&&(R=(p<3?w(R):p>3?w(_,E,R):w(_,E))||R);return p>3&&R&&Object.defineProperty(_,E,R),R},v=this&&this.__param||function(l,_){return function(E,C){_(E,C,l)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OverviewRulerRenderer=void 0;const h=u(5871),g=u(4725),y=u(844),D=u(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 n=f.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,_,E,C,w,p,R){var N;super(),this._viewportElement=l,this._screenElement=_,this._bufferService=E,this._decorationService=C,this._renderService=w,this._optionsService=p,this._coreBrowserService=R,this._colorZoneStore=new h.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(),(N=this._viewportElement.parentElement)==null||N.insertBefore(this._canvas,this._viewportElement);const T=this._canvas.getContext("2d");if(!T)throw new Error("Ctx cannot be null");this._ctx=T,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var z;(z=this._canvas)==null||z.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(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=n=d([v(2,D.IBufferService),v(3,D.IDecorationService),v(4,g.IRenderService),v(5,D.IOptionsService),v(6,g.ICoreBrowserService)],n)},2950:function($,f,u){var d=this&&this.__decorate||function(m,o,c,n){var l,_=arguments.length,E=_<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,c):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,o,c,n);else for(var C=m.length-1;C>=0;C--)(l=m[C])&&(E=(_<3?l(E):_>3?l(o,c,E):l(o,c))||E);return _>3&&E&&Object.defineProperty(o,c,E),E},v=this&&this.__param||function(m,o){return function(c,n){o(c,n,m)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CompositionHelper=void 0;const h=u(4725),g=u(2585),y=u(2584);let D=f.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(m,o,c,n,l,_){this._textarea=m,this._compositionView=o,this._bufferService=c,this._optionsService=n,this._coreService=l,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(m){this._compositionView.textContent=m.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(m){if(this._isComposing||this._isSendingComposition){if(m.keyCode===229||m.keyCode===16||m.keyCode===17||m.keyCode===18)return!1;this._finalizeComposition(!1)}return m.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(m){if(this._compositionView.classList.remove("active"),this._isComposing=!1,m){const o={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,o.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(o.start,o.end):this._textarea.value.substring(o.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const o=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(o,!0)}}_handleAnyTextareaChanges(){const m=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const o=this._textarea.value,c=o.replace(m,"");this._dataAlreadySent=c,o.length>m.length?this._coreService.triggerDataEvent(c,!0):o.length<m.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):o.length===m.length&&o!==m&&this._coreService.triggerDataEvent(o,!0)}}),0)}updateCompositionElements(m){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const o=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,n=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=n+"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=n+"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=D=d([v(2,g.IBufferService),v(3,g.IOptionsService),v(4,g.ICoreService),v(5,h.IRenderService)],D)},9806:($,f)=>{function u(d,v,h){const g=h.getBoundingClientRect(),y=d.getComputedStyle(h),D=parseInt(y.getPropertyValue("padding-left")),m=parseInt(y.getPropertyValue("padding-top"));return[v.clientX-g.left-D,v.clientY-g.top-m]}Object.defineProperty(f,"__esModule",{value:!0}),f.getCoords=f.getCoordsRelativeToElement=void 0,f.getCoordsRelativeToElement=u,f.getCoords=function(d,v,h,g,y,D,m,o,c){if(!D)return;const n=u(d,v,h);return n?(n[0]=Math.ceil((n[0]+(c?m/2:0))/m),n[1]=Math.ceil(n[1]/o),n[0]=Math.min(Math.max(n[0],1),g+(c?1:0)),n[1]=Math.min(Math.max(n[1],1),y),n):void 0}},9504:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.moveToCellSequence=void 0;const d=u(2584);function v(o,c,n,l){const _=o-h(o,n),E=c-h(c,n),C=Math.abs(_-E)-(function(w,p,R){let T=0;const N=w-h(w,R),z=p-h(p,R);for(let H=0;H<Math.abs(N-z);H++){const P=g(w,p)==="A"?-1:1,ee=R.buffer.lines.get(N+P*H);ee!=null&&ee.isWrapped&&T++}return T})(o,c,n);return m(C,D(g(o,c),l))}function h(o,c){let n=0,l=c.buffer.lines.get(o),_=l==null?void 0:l.isWrapped;for(;_&&o>=0&&o<c.rows;)n++,l=c.buffer.lines.get(--o),_=l==null?void 0:l.isWrapped;return n}function g(o,c){return o>c?"A":"B"}function y(o,c,n,l,_,E){let C=o,w=c,p="";for(;C!==n||w!==l;)C+=_?1:-1,_&&C>E.cols-1?(p+=E.buffer.translateBufferLineToString(w,!1,o,C),C=0,o=0,w++):!_&&C<0&&(p+=E.buffer.translateBufferLineToString(w,!1,0,o+1),C=E.cols-1,o=C,w--);return p+E.buffer.translateBufferLineToString(w,!1,o,C)}function D(o,c){const n=c?"O":"[";return d.C0.ESC+n+o}function m(o,c){o=Math.floor(o);let n="";for(let l=0;l<o;l++)n+=c;return n}f.moveToCellSequence=function(o,c,n,l){const _=n.buffer.x,E=n.buffer.y;if(!n.buffer.hasScrollback)return(function(p,R,T,N,z,H){return v(R,N,z,H).length===0?"":m(y(p,R,p,R-h(R,z),!1,z).length,D("D",H))})(_,E,0,c,n,l)+v(E,c,n,l)+(function(p,R,T,N,z,H){let P;P=v(R,N,z,H).length>0?N-h(N,z):R;const ee=N,q=(function(I,X,x,B,A,M){let F;return F=v(x,B,A,M).length>0?B-h(B,A):X,I<x&&F<=B||I>=x&&F<B?"C":"D"})(p,R,T,N,z,H);return m(y(p,P,T,ee,q==="C",z).length,D(q,H))})(_,E,o,c,n,l);let C;if(E===c)return C=_>o?"D":"C",m(Math.abs(_-o),D(C,l));C=E>c?"D":"C";const w=Math.abs(E-c);return m((function(p,R){return R.cols-p})(E>c?o:_,n)+(w-1)*n.cols+1+((E>c?_:o)-1),D(C,l))}},1296:function($,f,u){var d=this&&this.__decorate||function(H,P,ee,q){var I,X=arguments.length,x=X<3?P:q===null?q=Object.getOwnPropertyDescriptor(P,ee):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(H,P,ee,q);else for(var B=H.length-1;B>=0;B--)(I=H[B])&&(x=(X<3?I(x):X>3?I(P,ee,x):I(P,ee))||x);return X>3&&x&&Object.defineProperty(P,ee,x),x},v=this&&this.__param||function(H,P){return function(ee,q){P(ee,q,H)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DomRenderer=void 0;const h=u(3787),g=u(2550),y=u(2223),D=u(6171),m=u(6052),o=u(4725),c=u(8055),n=u(8460),l=u(844),_=u(2585),E="xterm-dom-renderer-owner-",C="xterm-rows",w="xterm-fg-",p="xterm-bg-",R="xterm-focus",T="xterm-selection";let N=1,z=f.DomRenderer=class extends l.Disposable{constructor(H,P,ee,q,I,X,x,B,A,M,F,Z,he){super(),this._terminal=H,this._document=P,this._element=ee,this._screenElement=q,this._viewportElement=I,this._helperContainer=X,this._linkifier2=x,this._charSizeService=A,this._optionsService=M,this._bufferService=F,this._coreBrowserService=Z,this._themeService=he,this._terminalClass=N++,this._rowElements=[],this._selectionRenderModel=(0,m.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new n.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(C),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(T),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,D.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((fe=>this._injectCss(fe)))),this._injectCss(this._themeService.colors),this._rowFactory=B.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((fe=>this._handleLinkHover(fe)))),this.register(this._linkifier2.onHideLinkUnderline((fe=>this._handleLinkLeave(fe)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.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 H=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*H,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*H),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/H),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/H),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const ee of this._rowElements)ee.style.width=`${this.dimensions.css.canvas.width}px`,ee.style.height=`${this.dimensions.css.cell.height}px`,ee.style.lineHeight=`${this.dimensions.css.cell.height}px`,ee.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const P=`${this._terminalSelector} .${C} 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(H){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let P=`${this._terminalSelector} .${C} { color: ${H.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;P+=`${this._terminalSelector} .${C} .xterm-dim { color: ${c.color.multiplyOpacity(H.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 ee=`blink_underline_${this._terminalClass}`,q=`blink_bar_${this._terminalClass}`,I=`blink_block_${this._terminalClass}`;P+=`@keyframes ${ee} { 50% { border-bottom-style: hidden; }}`,P+=`@keyframes ${q} { 50% { box-shadow: none; }}`,P+=`@keyframes ${I} { 0% { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css}; } 50% { background-color: inherit; color: ${H.cursor.css}; }}`,P+=`${this._terminalSelector} .${C}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ee} 1s step-end infinite;}${this._terminalSelector} .${C}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${C}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${I} 1s step-end infinite;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-block { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css};}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${H.cursor.css} !important; color: ${H.cursorAccent.css} !important;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${H.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${H.cursor.css} inset;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${H.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,P+=`${this._terminalSelector} .${T} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${T} div { position: absolute; background-color: ${H.selectionBackgroundOpaque.css};}${this._terminalSelector} .${T} div { position: absolute; background-color: ${H.selectionInactiveBackgroundOpaque.css};}`;for(const[X,x]of H.ansi.entries())P+=`${this._terminalSelector} .${w}${X} { color: ${x.css}; }${this._terminalSelector} .${w}${X}.xterm-dim { color: ${c.color.multiplyOpacity(x,.5).css}; }${this._terminalSelector} .${p}${X} { background-color: ${x.css}; }`;P+=`${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(H.background).css}; }${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(H.background),.5).css}; }${this._terminalSelector} .${p}${y.INVERTED_DEFAULT_COLOR} { background-color: ${H.foreground.css}; }`,this._themeStyleElement.textContent=P}_setDefaultSpacing(){const H=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${H}px`,this._rowFactory.defaultSpacing=H}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(H,P){for(let ee=this._rowElements.length;ee<=P;ee++){const q=this._document.createElement("div");this._rowContainer.appendChild(q),this._rowElements.push(q)}for(;this._rowElements.length>P;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(H,P){this._refreshRowElements(H,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(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(H,P,ee){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(H,P,ee),this.renderRows(0,this._bufferService.rows-1),!H||!P)return;this._selectionRenderModel.update(this._terminal,H,P,ee);const q=this._selectionRenderModel.viewportStartRow,I=this._selectionRenderModel.viewportEndRow,X=this._selectionRenderModel.viewportCappedStartRow,x=this._selectionRenderModel.viewportCappedEndRow;if(X>=this._bufferService.rows||x<0)return;const B=this._document.createDocumentFragment();if(ee){const A=H[0]>P[0];B.appendChild(this._createSelectionElement(X,A?P[0]:H[0],A?H[0]:P[0],x-X+1))}else{const A=q===X?H[0]:0,M=X===I?P[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(X,A,M));const F=x-X-1;if(B.appendChild(this._createSelectionElement(X+1,0,this._bufferService.cols,F)),X!==x){const Z=I===x?P[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(x,0,Z))}}this._selectionContainer.appendChild(B)}_createSelectionElement(H,P,ee,q=1){const I=this._document.createElement("div"),X=P*this.dimensions.css.cell.width;let x=this.dimensions.css.cell.width*(ee-P);return X+x>this.dimensions.css.canvas.width&&(x=this.dimensions.css.canvas.width-X),I.style.height=q*this.dimensions.css.cell.height+"px",I.style.top=H*this.dimensions.css.cell.height+"px",I.style.left=`${X}px`,I.style.width=`${x}px`,I}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const H of this._rowElements)H.replaceChildren()}renderRows(H,P){const ee=this._bufferService.buffer,q=ee.ybase+ee.y,I=Math.min(ee.x,this._bufferService.cols-1),X=this._optionsService.rawOptions.cursorBlink,x=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let A=H;A<=P;A++){const M=A+ee.ydisp,F=this._rowElements[A],Z=ee.lines.get(M);if(!F||!Z)break;F.replaceChildren(...this._rowFactory.createRow(Z,M,M===q,x,B,I,X,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!0)}_handleLinkLeave(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!1)}_setCellUnderline(H,P,ee,q,I,X){ee<0&&(H=0),q<0&&(P=0);const x=this._bufferService.rows-1;ee=Math.max(Math.min(ee,x),0),q=Math.max(Math.min(q,x),0),I=Math.min(I,this._bufferService.cols);const B=this._bufferService.buffer,A=B.ybase+B.y,M=Math.min(B.x,I-1),F=this._optionsService.rawOptions.cursorBlink,Z=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let fe=ee;fe<=q;++fe){const G=fe+B.ydisp,L=this._rowElements[fe],ae=B.lines.get(G);if(!L||!ae)break;L.replaceChildren(...this._rowFactory.createRow(ae,G,G===A,Z,he,M,F,this.dimensions.css.cell.width,this._widthCache,X?fe===ee?H:0:-1,X?(fe===q?P:I)-1:-1))}}};f.DomRenderer=z=d([v(7,_.IInstantiationService),v(8,o.ICharSizeService),v(9,_.IOptionsService),v(10,_.IBufferService),v(11,o.ICoreBrowserService),v(12,o.IThemeService)],z)},3787:function($,f,u){var d=this&&this.__decorate||function(C,w,p,R){var T,N=arguments.length,z=N<3?w:R===null?R=Object.getOwnPropertyDescriptor(w,p):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(C,w,p,R);else for(var H=C.length-1;H>=0;H--)(T=C[H])&&(z=(N<3?T(z):N>3?T(w,p,z):T(w,p))||z);return N>3&&z&&Object.defineProperty(w,p,z),z},v=this&&this.__param||function(C,w){return function(p,R){w(p,R,C)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DomRendererRowFactory=void 0;const h=u(2223),g=u(643),y=u(511),D=u(2585),m=u(8055),o=u(4725),c=u(4269),n=u(6171),l=u(3734);let _=f.DomRendererRowFactory=class{constructor(C,w,p,R,T,N,z){this._document=C,this._characterJoinerService=w,this._optionsService=p,this._coreBrowserService=R,this._coreService=T,this._decorationService=N,this._themeService=z,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(C,w,p){this._selectionStart=C,this._selectionEnd=w,this._columnSelectMode=p}createRow(C,w,p,R,T,N,z,H,P,ee,q){const I=[],X=this._characterJoinerService.getJoinedCharacters(w),x=this._themeService.colors;let B,A=C.getNoBgTrimmedLength();p&&A<N+1&&(A=N+1);let M=0,F="",Z=0,he=0,fe=0,G=!1,L=0,ae=!1,se=0;const _e=[],de=ee!==-1&&q!==-1;for(let Ee=0;Ee<A;Ee++){C.loadCell(Ee,this._workCell);let Oe=this._workCell.getWidth();if(Oe===0)continue;let Ie=!1,it=Ee,Se=this._workCell;if(X.length>0&&Ee===X[0][0]){Ie=!0;const Ge=X.shift();Se=new c.JoinedCellData(this._workCell,C.translateToString(!0,Ge[0],Ge[1]),Ge[1]-Ge[0]),it=Ge[1]-1,Oe=Se.getWidth()}const di=this._isCellInSelection(Ee,w),qi=p&&Ee===N,Ii=de&&Ee>=ee&&Ee<=q;let Gi=!1;this._decorationService.forEachDecorationAtCell(Ee,w,void 0,(Ge=>{Gi=!0}));let us=Se.getChars()||g.WHITESPACE_CELL_CHAR;if(us===" "&&(Se.isUnderline()||Se.isOverline())&&(us=" "),se=Oe*H-P.get(us,Se.isBold(),Se.isItalic()),B){if(M&&(di&&ae||!di&&!ae&&Se.bg===Z)&&(di&&ae&&x.selectionForeground||Se.fg===he)&&Se.extended.ext===fe&&Ii===G&&se===L&&!qi&&!Ie&&!Gi){Se.isInvisible()?F+=g.WHITESPACE_CELL_CHAR:F+=us,M++;continue}M&&(B.textContent=F),B=this._document.createElement("span"),M=0,F=""}else B=this._document.createElement("span");if(Z=Se.bg,he=Se.fg,fe=Se.extended.ext,G=Ii,L=se,ae=di,Ie&&N>=Ee&&N<=it&&(N=Ee),!this._coreService.isCursorHidden&&qi&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)z&&_e.push("xterm-cursor-blink"),_e.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(T)switch(T){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(Se.isBold()&&_e.push("xterm-bold"),Se.isItalic()&&_e.push("xterm-italic"),Se.isDim()&&_e.push("xterm-dim"),F=Se.isInvisible()?g.WHITESPACE_CELL_CHAR:Se.getChars()||g.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(_e.push(`xterm-underline-${Se.extended.underlineStyle}`),F===" "&&(F=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let Ge=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&Ge<8&&(Ge+=8),B.style.textDecorationColor=x.ansi[Ge].css}Se.isOverline()&&(_e.push("xterm-overline"),F===" "&&(F=" ")),Se.isStrikethrough()&&_e.push("xterm-strikethrough"),Ii&&(B.style.textDecoration="underline");let ft=Se.getFgColor(),et=Se.getFgColorMode(),kt=Se.getBgColor(),_i=Se.getBgColorMode();const hs=!!Se.isInverse();if(hs){const Ge=ft;ft=kt,kt=Ge;const Fi=et;et=_i,_i=Fi}let yt,fs,It,Yi=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,w,void 0,(Ge=>{Ge.options.layer!=="top"&&Yi||(Ge.backgroundColorRGB&&(_i=50331648,kt=Ge.backgroundColorRGB.rgba>>8&16777215,yt=Ge.backgroundColorRGB),Ge.foregroundColorRGB&&(et=50331648,ft=Ge.foregroundColorRGB.rgba>>8&16777215,fs=Ge.foregroundColorRGB),Yi=Ge.options.layer==="top")})),!Yi&&di&&(yt=this._coreBrowserService.isFocused?x.selectionBackgroundOpaque:x.selectionInactiveBackgroundOpaque,kt=yt.rgba>>8&16777215,_i=50331648,Yi=!0,x.selectionForeground&&(et=50331648,ft=x.selectionForeground.rgba>>8&16777215,fs=x.selectionForeground)),Yi&&_e.push("xterm-decoration-top"),_i){case 16777216:case 33554432:It=x.ansi[kt],_e.push(`xterm-bg-${kt}`);break;case 50331648:It=m.channels.toColor(kt>>16,kt>>8&255,255&kt),this._addStyle(B,`background-color:#${E((kt>>>0).toString(16),"0",6)}`);break;default:hs?(It=x.foreground,_e.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):It=x.background}switch(yt||Se.isDim()&&(yt=m.color.multiplyOpacity(It,.5)),et){case 16777216:case 33554432:Se.isBold()&&ft<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ft+=8),this._applyMinimumContrast(B,It,x.ansi[ft],Se,yt,void 0)||_e.push(`xterm-fg-${ft}`);break;case 50331648:const Ge=m.channels.toColor(ft>>16&255,ft>>8&255,255&ft);this._applyMinimumContrast(B,It,Ge,Se,yt,fs)||this._addStyle(B,`color:#${E(ft.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,It,x.foreground,Se,yt,fs)||hs&&_e.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}_e.length&&(B.className=_e.join(" "),_e.length=0),qi||Ie||Gi?B.textContent=F:M++,se!==this.defaultSpacing&&(B.style.letterSpacing=`${se}px`),I.push(B),Ee=it}return B&&M&&(B.textContent=F),I}_applyMinimumContrast(C,w,p,R,T,N){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,n.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const z=this._getContrastCache(R);let H;if(T||N||(H=z.getColor(w.rgba,p.rgba)),H===void 0){const P=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);H=m.color.ensureContrastRatio(T||w,N||p,P),z.setColor((T||w).rgba,(N||p).rgba,H??null)}return!!H&&(this._addStyle(C,`color:${H.css}`),!0)}_getContrastCache(C){return C.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(C,w){C.setAttribute("style",`${C.getAttribute("style")||""}${w};`)}_isCellInSelection(C,w){const p=this._selectionStart,R=this._selectionEnd;return!(!p||!R)&&(this._columnSelectMode?p[0]<=R[0]?C>=p[0]&&w>=p[1]&&C<R[0]&&w<=R[1]:C<p[0]&&w>=p[1]&&C>=R[0]&&w<=R[1]:w>p[1]&&w<R[1]||p[1]===R[1]&&w===p[1]&&C>=p[0]&&C<R[0]||p[1]<R[1]&&w===R[1]&&C<R[0]||p[1]<R[1]&&w===p[1]&&C>=p[0])}};function E(C,w,p){for(;C.length<p;)C=w+C;return C}f.DomRendererRowFactory=_=d([v(1,o.ICharacterJoinerService),v(2,D.IOptionsService),v(3,o.ICoreBrowserService),v(4,D.ICoreService),v(5,D.IDecorationService),v(6,o.IThemeService)],_)},2550:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.WidthCache=void 0,f.WidthCache=class{constructor(u,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.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 v=u.createElement("span");v.classList.add("xterm-char-measure-element");const h=u.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const g=u.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const y=u.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[v,h,g,y],this._container.appendChild(v),this._container.appendChild(h),this._container.appendChild(g),this._container.appendChild(y),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,d,v,h){u===this._font&&d===this._fontSize&&v===this._weight&&h===this._weightBold||(this._font=u,this._fontSize=d,this._weight=v,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(u,d,v){let h=0;if(!d&&!v&&u.length===1&&(h=u.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const D=this._measure(u,0);return D>0&&(this._flat[h]=D),D}let g=u;d&&(g+="B"),v&&(g+="I");let y=this._holey.get(g);if(y===void 0){let D=0;d&&(D|=1),v&&(D|=2),y=this._measure(u,D),y>0&&this._holey.set(g,y)}return y}_measure(u,d){const v=this._measureElements[d];return v.textContent=u.repeat(32),v.offsetWidth/32}}},2223:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.TEXT_BASELINE=f.DIM_OPACITY=f.INVERTED_DEFAULT_COLOR=void 0;const d=u(6114);f.INVERTED_DEFAULT_COLOR=257,f.DIM_OPACITY=.5,f.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:($,f)=>{function u(v){return 57508<=v&&v<=57558}function d(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=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(v){if(!v)throw new Error("value must not be falsy");return v},f.isPowerlineGlyph=u,f.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},f.isEmoji=d,f.allowRescaling=function(v,h,g,y){return h===1&&g>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!d(v)&&!u(v)&&!(function(D){return 57344<=D&&D<=63743})(v)},f.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(h){return 9472<=h&&h<=9631})(v)},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(v,h,g=0){return(v-(2*Math.round(h)-g))%(2*Math.round(h))}},6052:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.createSelectionRenderModel=void 0;class u{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(v,h,g,y=!1){if(this.selectionStart=h,this.selectionEnd=g,!h||!g||h[0]===g[0]&&h[1]===g[1])return void this.clear();const D=v.buffers.active.ydisp,m=h[1]-D,o=g[1]-D,c=Math.max(m,0),n=Math.min(o,v.rows-1);c>=v.rows||n<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=m,this.viewportEndRow=o,this.viewportCappedStartRow=c,this.viewportCappedEndRow=n,this.startCol=h[0],this.endCol=g[0])}isCellSelected(v,h,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&g>=this.viewportCappedStartRow&&h<this.endCol&&g<=this.viewportCappedEndRow:h<this.startCol&&g>=this.viewportCappedStartRow&&h>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&h>=this.startCol)}}f.createSelectionRenderModel=function(){return new u}},456:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionModel=void 0,f.SelectionModel=class{constructor(u){this._bufferService=u,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 u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,d=this.selectionEnd;return!(!u||!d)&&(u[1]>d[1]||u[1]===d[1]&&u[0]>d[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function($,f,u){var d=this&&this.__decorate||function(n,l,_,E){var C,w=arguments.length,p=w<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(n,l,_,E);else for(var R=n.length-1;R>=0;R--)(C=n[R])&&(p=(w<3?C(p):w>3?C(l,_,p):C(l,_))||p);return w>3&&p&&Object.defineProperty(l,_,p),p},v=this&&this.__param||function(n,l){return function(_,E){l(_,E,n)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CharSizeService=void 0;const h=u(2585),g=u(8460),y=u(844);let D=f.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(n,l,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new c(this._optionsService))}catch{this._measureStrategy=this.register(new o(n,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const n=this._measureStrategy.measure();n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._onCharSizeChange.fire())}};f.CharSizeService=D=d([v(2,h.IOptionsService)],D);class m extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,_){l!==void 0&&l>0&&_!==void 0&&_>0&&(this._result.width=l,this._result.height=_)}}class o extends m{constructor(l,_,E){super(),this._document=l,this._parentElement=_,this._optionsService=E,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($,f,u){var d=this&&this.__decorate||function(c,n,l,_){var E,C=arguments.length,w=C<3?n:_===null?_=Object.getOwnPropertyDescriptor(n,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,n,l,_);else for(var p=c.length-1;p>=0;p--)(E=c[p])&&(w=(C<3?E(w):C>3?E(n,l,w):E(n,l))||w);return C>3&&w&&Object.defineProperty(n,l,w),w},v=this&&this.__param||function(c,n){return function(l,_){n(l,_,c)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CharacterJoinerService=f.JoinedCellData=void 0;const h=u(3734),g=u(643),y=u(511),D=u(2585);class m extends h.AttributeData{constructor(n,l,_){super(),this.content=0,this.combinedData="",this.fg=n.fg,this.bg=n.bg,this.combinedData=l,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(n){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}f.JoinedCellData=m;let o=f.CharacterJoinerService=class $f{constructor(n){this._bufferService=n,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(n){const l={id:this._nextCharacterJoinerId++,handler:n};return this._characterJoiners.push(l),l.id}deregister(n){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===n)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(n){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(n);if(!l||l.length===0)return[];const _=[],E=l.translateToString(!0);let C=0,w=0,p=0,R=l.getFg(0),T=l.getBg(0);for(let N=0;N<l.getTrimmedLength();N++)if(l.loadCell(N,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==T){if(N-C>1){const z=this._getJoinedRanges(E,p,w,l,C);for(let H=0;H<z.length;H++)_.push(z[H])}C=N,p=w,R=this._workCell.fg,T=this._workCell.bg}w+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-C>1){const N=this._getJoinedRanges(E,p,w,l,C);for(let z=0;z<N.length;z++)_.push(N[z])}return _}_getJoinedRanges(n,l,_,E,C){const w=n.substring(l,_);let p=[];try{p=this._characterJoiners[0].handler(w)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const T=this._characterJoiners[R].handler(w);for(let N=0;N<T.length;N++)$f._mergeRanges(p,T[N])}catch(T){console.error(T)}return this._stringRangesToCellRanges(p,E,C),p}_stringRangesToCellRanges(n,l,_){let E=0,C=!1,w=0,p=n[E];if(p){for(let R=_;R<this._bufferService.cols;R++){const T=l.getWidth(R),N=l.getString(R).length||g.WHITESPACE_CELL_CHAR.length;if(T!==0){if(!C&&p[0]<=w&&(p[0]=R,C=!0),p[1]<=w){if(p[1]=R,p=n[++E],!p)break;p[0]<=w?(p[0]=R,C=!0):C=!1}w+=N}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(n,l){let _=!1;for(let E=0;E<n.length;E++){const C=n[E];if(_){if(l[1]<=C[0])return n[E-1][1]=l[1],n;if(l[1]<=C[1])return n[E-1][1]=Math.max(l[1],C[1]),n.splice(E,1),n;n.splice(E,1),E--}else{if(l[1]<=C[0])return n.splice(E,0,l),n;if(l[1]<=C[1])return C[0]=Math.min(l[0],C[0]),n;l[0]<C[1]&&(C[0]=Math.min(l[0],C[0]),_=!0)}}return _?n[n.length-1][1]=l[1]:n.push(l),n}};f.CharacterJoinerService=o=d([v(0,D.IBufferService)],o)},5114:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CoreBrowserService=void 0;const d=u(844),v=u(8460),h=u(3656);class g extends d.Disposable{constructor(m,o,c){super(),this._textarea=m,this._window=o,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((n=>this._screenDprMonitor.setWindow(n)))),this.register((0,v.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=g;class y extends d.Disposable{constructor(m){super(),this._parentWindow=m,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new v.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,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var m;this._outerListener&&((m=this._resolutionMediaMatchList)==null||m.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:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.LinkProviderService=void 0;const d=u(844);class v extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const y=this.linkProviders.indexOf(g);y!==-1&&this.linkProviders.splice(y,1)}}}}f.LinkProviderService=v},8934:function($,f,u){var d=this&&this.__decorate||function(D,m,o,c){var n,l=arguments.length,_=l<3?m:c===null?c=Object.getOwnPropertyDescriptor(m,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(D,m,o,c);else for(var E=D.length-1;E>=0;E--)(n=D[E])&&(_=(l<3?n(_):l>3?n(m,o,_):n(m,o))||_);return l>3&&_&&Object.defineProperty(m,o,_),_},v=this&&this.__param||function(D,m){return function(o,c){m(o,c,D)}};Object.defineProperty(f,"__esModule",{value:!0}),f.MouseService=void 0;const h=u(4725),g=u(9806);let y=f.MouseService=class{constructor(D,m){this._renderService=D,this._charSizeService=m}getCoords(D,m,o,c,n){return(0,g.getCoords)(window,D,m,o,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,n)}getMouseReportCoords(D,m){const o=(0,g.getCoordsRelativeToElement)(window,D,m);if(this._charSizeService.hasValidSize)return o[0]=Math.min(Math.max(o[0],0),this._renderService.dimensions.css.canvas.width-1),o[1]=Math.min(Math.max(o[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(o[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(o[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(o[0]),y:Math.floor(o[1])}}};f.MouseService=y=d([v(0,h.IRenderService),v(1,h.ICharSizeService)],y)},3230:function($,f,u){var d=this&&this.__decorate||function(n,l,_,E){var C,w=arguments.length,p=w<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(n,l,_,E);else for(var R=n.length-1;R>=0;R--)(C=n[R])&&(p=(w<3?C(p):w>3?C(l,_,p):C(l,_))||p);return w>3&&p&&Object.defineProperty(l,_,p),p},v=this&&this.__param||function(n,l){return function(_,E){l(_,E,n)}};Object.defineProperty(f,"__esModule",{value:!0}),f.RenderService=void 0;const h=u(6193),g=u(4725),y=u(8460),D=u(844),m=u(7226),o=u(2585);let c=f.RenderService=class extends D.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(n,l,_,E,C,w,p,R){super(),this._rowCount=n,this._charSizeService=E,this._renderer=this.register(new D.MutableDisposable),this._pausedResizeTask=new m.DebouncedIdleTask,this._observerDisposable=this.register(new D.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((T,N)=>this._renderRows(T,N)),p),this.register(this._renderDebouncer),this.register(p.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>{var T;return(T=this._renderer.value)==null?void 0:T.clear()}))),this.register(_.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(C.onDecorationRegistered((()=>this._fullRefresh()))),this.register(C.onDecorationRemoved((()=>this._fullRefresh()))),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(p.window,l),this.register(p.onWindowChange((T=>this._registerIntersectionObserver(T,l))))}_registerIntersectionObserver(n,l){if("IntersectionObserver"in n){const _=new n.IntersectionObserver((E=>this._handleIntersectionChange(E[E.length-1])),{threshold:0});_.observe(l),this._observerDisposable.value=(0,D.toDisposable)((()=>_.disconnect()))}}_handleIntersectionChange(n){this._isPaused=n.isIntersecting===void 0?n.intersectionRatio===0:!n.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(n,l,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(n,l,this._rowCount))}_renderRows(n,l){this._renderer.value&&(n=Math.min(n,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(n,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:n,end:l}),this._onRender.fire({start:n,end:l}),this._isNextRenderRedrawOnly=!0)}resize(n,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(n){this._renderer.value=n,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(n){return this._renderDebouncer.addRefreshCallback(n)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var n,l;this._renderer.value&&((l=(n=this._renderer.value).clearTextureAtlas)==null||l.call(n),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(n,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var _;return(_=this._renderer.value)==null?void 0:_.handleResize(n,l)})):this._renderer.value.handleResize(n,l),this._fullRefresh())}handleCharSizeChanged(){var n;(n=this._renderer.value)==null||n.handleCharSizeChanged()}handleBlur(){var n;(n=this._renderer.value)==null||n.handleBlur()}handleFocus(){var n;(n=this._renderer.value)==null||n.handleFocus()}handleSelectionChanged(n,l,_){var E;this._selectionState.start=n,this._selectionState.end=l,this._selectionState.columnSelectMode=_,(E=this._renderer.value)==null||E.handleSelectionChanged(n,l,_)}handleCursorMove(){var n;(n=this._renderer.value)==null||n.handleCursorMove()}clear(){var n;(n=this._renderer.value)==null||n.clear()}};f.RenderService=c=d([v(2,o.IOptionsService),v(3,g.ICharSizeService),v(4,o.IDecorationService),v(5,o.IBufferService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],c)},9312:function($,f,u){var d=this&&this.__decorate||function(p,R,T,N){var z,H=arguments.length,P=H<3?R:N===null?N=Object.getOwnPropertyDescriptor(R,T):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(p,R,T,N);else for(var ee=p.length-1;ee>=0;ee--)(z=p[ee])&&(P=(H<3?z(P):H>3?z(R,T,P):z(R,T))||P);return H>3&&P&&Object.defineProperty(R,T,P),P},v=this&&this.__param||function(p,R){return function(T,N){R(T,N,p)}};Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionService=void 0;const h=u(9806),g=u(9504),y=u(456),D=u(4725),m=u(8460),o=u(844),c=u(6114),n=u(4841),l=u(511),_=u(2585),E=" ",C=new RegExp(E,"g");let w=f.SelectionService=class extends o.Disposable{constructor(p,R,T,N,z,H,P,ee,q){super(),this._element=p,this._screenElement=R,this._linkifier=T,this._bufferService=N,this._coreService=z,this._mouseService=H,this._optionsService=P,this._renderService=ee,this._coreBrowserService=q,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=I=>this._handleMouseMove(I),this._mouseUpListener=I=>this._handleMouseUp(I),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((I=>this._handleTrim(I))),this.register(this._bufferService.buffers.onBufferActivate((I=>this._handleBufferActivate(I)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,o.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const p=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!p||!R||p[0]===R[0]&&p[1]===R[1])}get selectionText(){const p=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!p||!R)return"";const T=this._bufferService.buffer,N=[];if(this._activeSelectionMode===3){if(p[0]===R[0])return"";const z=p[0]<R[0]?p[0]:R[0],H=p[0]<R[0]?R[0]:p[0];for(let P=p[1];P<=R[1];P++){const ee=T.translateBufferLineToString(P,!0,z,H);N.push(ee)}}else{const z=p[1]===R[1]?R[0]:void 0;N.push(T.translateBufferLineToString(p[1],!0,p[0],z));for(let H=p[1]+1;H<=R[1]-1;H++){const P=T.lines.get(H),ee=T.translateBufferLineToString(H,!0);P!=null&&P.isWrapped?N[N.length-1]+=ee:N.push(ee)}if(p[1]!==R[1]){const H=T.lines.get(R[1]),P=T.translateBufferLineToString(R[1],!0,0,R[0]);H&&H.isWrapped?N[N.length-1]+=P:N.push(P)}}return N.map((z=>z.replace(C," "))).join(c.isWindows?`\r
|
|
54
|
+
`:`
|
|
55
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(p){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&p&&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(p){const R=this._getMouseBufferCoords(p),T=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;return!!(T&&N&&R)&&this._areCoordsInSelection(R,T,N)}isCellInSelection(p,R){const T=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;return!(!T||!N)&&this._areCoordsInSelection([p,R],T,N)}_areCoordsInSelection(p,R,T){return p[1]>R[1]&&p[1]<T[1]||R[1]===T[1]&&p[1]===R[1]&&p[0]>=R[0]&&p[0]<T[0]||R[1]<T[1]&&p[1]===T[1]&&p[0]<T[0]||R[1]<T[1]&&p[1]===R[1]&&p[0]>=R[0]}_selectWordAtCursor(p,R){var z,H;const T=(H=(z=this._linkifier.currentLink)==null?void 0:z.link)==null?void 0:H.range;if(T)return this._model.selectionStart=[T.start.x-1,T.start.y-1],this._model.selectionStartLength=(0,n.getRangeLength)(T,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const N=this._getMouseBufferCoords(p);return!!N&&(this._selectWordAt(N,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(p,R){this._model.clearSelection(),p=Math.max(p,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,p],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(p){this._model.handleTrim(p)&&this.refresh()}_getMouseBufferCoords(p){const R=this._mouseService.getCoords(p,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(p){let R=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,p,this._screenElement)[1];const T=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=T?0:(R>T&&(R-=T),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(p){return c.isMac?p.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:p.shiftKey}handleMouseDown(p){if(this._mouseDownTimeStamp=p.timeStamp,(p.button!==2||!this.hasSelection)&&p.button===0){if(!this._enabled){if(!this.shouldForceSelection(p))return;p.stopPropagation()}p.preventDefault(),this._dragScrollAmount=0,this._enabled&&p.shiftKey?this._handleIncrementalClick(p):p.detail===1?this._handleSingleClick(p):p.detail===2?this._handleDoubleClick(p):p.detail===3&&this._handleTripleClick(p),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(p){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(p))}_handleSingleClick(p){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(p)?3:0,this._model.selectionStart=this._getMouseBufferCoords(p),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(p){this._selectWordAtCursor(p,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(p){const R=this._getMouseBufferCoords(p);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(p){return p.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(p){if(p.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(p),!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(p),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const T=this._bufferService.buffer;if(this._model.selectionEnd[1]<T.lines.length){const N=T.lines.get(this._model.selectionEnd[1]);N&&N.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}R&&R[0]===this._model.selectionEnd[0]&&R[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const p=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(p.ydisp+this._bufferService.rows,p.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=p.ydisp),this.refresh()}}_handleMouseUp(p){const R=p.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&p.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const T=this._mouseService.getCoords(p,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(T&&T[0]!==void 0&&T[1]!==void 0){const N=(0,g.moveToCellSequence)(T[0]-1,T[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(N,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const p=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,T=!(!p||!R||p[0]===R[0]&&p[1]===R[1]);T?p&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&p[0]===this._oldSelectionStart[0]&&p[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(p,R,T)):this._oldHasSelection&&this._fireOnSelectionChange(p,R,T)}_fireOnSelectionChange(p,R,T){this._oldSelectionStart=p,this._oldSelectionEnd=R,this._oldHasSelection=T,this._onSelectionChange.fire()}_handleBufferActivate(p){this.clearSelection(),this._trimListener.dispose(),this._trimListener=p.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(p,R){let T=R;for(let N=0;R>=N;N++){const z=p.loadCell(N,this._workCell).getChars().length;this._workCell.getWidth()===0?T--:z>1&&R!==N&&(T+=z-1)}return T}setSelection(p,R,T){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[p,R],this._model.selectionStartLength=T,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(p){this._isClickInSelection(p)||(this._selectWordAtCursor(p,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(p,R,T=!0,N=!0){if(p[0]>=this._bufferService.cols)return;const z=this._bufferService.buffer,H=z.lines.get(p[1]);if(!H)return;const P=z.translateBufferLineToString(p[1],!1);let ee=this._convertViewportColToCharacterIndex(H,p[0]),q=ee;const I=p[0]-ee;let X=0,x=0,B=0,A=0;if(P.charAt(ee)===" "){for(;ee>0&&P.charAt(ee-1)===" ";)ee--;for(;q<P.length&&P.charAt(q+1)===" ";)q++}else{let Z=p[0],he=p[0];H.getWidth(Z)===0&&(X++,Z--),H.getWidth(he)===2&&(x++,he++);const fe=H.getString(he).length;for(fe>1&&(A+=fe-1,q+=fe-1);Z>0&&ee>0&&!this._isCharWordSeparator(H.loadCell(Z-1,this._workCell));){H.loadCell(Z-1,this._workCell);const G=this._workCell.getChars().length;this._workCell.getWidth()===0?(X++,Z--):G>1&&(B+=G-1,ee-=G-1),ee--,Z--}for(;he<H.length&&q+1<P.length&&!this._isCharWordSeparator(H.loadCell(he+1,this._workCell));){H.loadCell(he+1,this._workCell);const G=this._workCell.getChars().length;this._workCell.getWidth()===2?(x++,he++):G>1&&(A+=G-1,q+=G-1),q++,he++}}q++;let M=ee+I-X+B,F=Math.min(this._bufferService.cols,q-ee+X+x-B-A);if(R||P.slice(ee,q).trim()!==""){if(T&&M===0&&H.getCodePoint(0)!==32){const Z=z.lines.get(p[1]-1);if(Z&&H.isWrapped&&Z.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,p[1]-1],!1,!0,!1);if(he){const fe=this._bufferService.cols-he.start;M-=fe,F+=fe}}}if(N&&M+F===this._bufferService.cols&&H.getCodePoint(this._bufferService.cols-1)!==32){const Z=z.lines.get(p[1]+1);if(Z!=null&&Z.isWrapped&&Z.getCodePoint(0)!==32){const he=this._getWordAt([0,p[1]+1],!1,!1,!0);he&&(F+=he.length)}}return{start:M,length:F}}}_selectWordAt(p,R){const T=this._getWordAt(p,R);if(T){for(;T.start<0;)T.start+=this._bufferService.cols,p[1]--;this._model.selectionStart=[T.start,p[1]],this._model.selectionStartLength=T.length}}_selectToWordAt(p){const R=this._getWordAt(p,!0);if(R){let T=p[1];for(;R.start<0;)R.start+=this._bufferService.cols,T--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,T++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,T]}}_isCharWordSeparator(p){return p.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(p.getChars())>=0}_selectLineAt(p){const R=this._bufferService.buffer.getWrappedRangeForLine(p),T={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,n.getRangeLength)(T,this._bufferService.cols)}};f.SelectionService=w=d([v(3,_.IBufferService),v(4,_.ICoreService),v(5,D.IMouseService),v(6,_.IOptionsService),v(7,D.IRenderService),v(8,D.ICoreBrowserService)],w)},4725:($,f,u)=>{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=u(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($,f,u){var d=this&&this.__decorate||function(w,p,R,T){var N,z=arguments.length,H=z<3?p:T===null?T=Object.getOwnPropertyDescriptor(p,R):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(w,p,R,T);else for(var P=w.length-1;P>=0;P--)(N=w[P])&&(H=(z<3?N(H):z>3?N(p,R,H):N(p,R))||H);return z>3&&H&&Object.defineProperty(p,R,H),H},v=this&&this.__param||function(w,p){return function(R,T){p(R,T,w)}};Object.defineProperty(f,"__esModule",{value:!0}),f.ThemeService=f.DEFAULT_ANSI_COLORS=void 0;const h=u(7239),g=u(8055),y=u(8460),D=u(844),m=u(2585),o=g.css.toColor("#ffffff"),c=g.css.toColor("#000000"),n=g.css.toColor("#ffffff"),l=g.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};f.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],p=[0,95,135,175,215,255];for(let R=0;R<216;R++){const T=p[R/36%6|0],N=p[R/6%6|0],z=p[R%6];w.push({css:g.channels.toCss(T,N,z),rgba:g.channels.toRgba(T,N,z)})}for(let R=0;R<24;R++){const T=8+10*R;w.push({css:g.channels.toCss(T,T,T),rgba:g.channels.toRgba(T,T,T)})}return w})());let E=f.ThemeService=class extends D.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:o,background:c,cursor:n,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:g.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:g.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(w={}){const p=this._colors;if(p.foreground=C(w.foreground,o),p.background=C(w.background,c),p.cursor=C(w.cursor,n),p.cursorAccent=C(w.cursorAccent,l),p.selectionBackgroundTransparent=C(w.selectionBackground,_),p.selectionBackgroundOpaque=g.color.blend(p.background,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundTransparent=C(w.selectionInactiveBackground,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundOpaque=g.color.blend(p.background,p.selectionInactiveBackgroundTransparent),p.selectionForeground=w.selectionForeground?C(w.selectionForeground,g.NULL_COLOR):void 0,p.selectionForeground===g.NULL_COLOR&&(p.selectionForeground=void 0),g.color.isOpaque(p.selectionBackgroundTransparent)&&(p.selectionBackgroundTransparent=g.color.opacity(p.selectionBackgroundTransparent,.3)),g.color.isOpaque(p.selectionInactiveBackgroundTransparent)&&(p.selectionInactiveBackgroundTransparent=g.color.opacity(p.selectionInactiveBackgroundTransparent,.3)),p.ansi=f.DEFAULT_ANSI_COLORS.slice(),p.ansi[0]=C(w.black,f.DEFAULT_ANSI_COLORS[0]),p.ansi[1]=C(w.red,f.DEFAULT_ANSI_COLORS[1]),p.ansi[2]=C(w.green,f.DEFAULT_ANSI_COLORS[2]),p.ansi[3]=C(w.yellow,f.DEFAULT_ANSI_COLORS[3]),p.ansi[4]=C(w.blue,f.DEFAULT_ANSI_COLORS[4]),p.ansi[5]=C(w.magenta,f.DEFAULT_ANSI_COLORS[5]),p.ansi[6]=C(w.cyan,f.DEFAULT_ANSI_COLORS[6]),p.ansi[7]=C(w.white,f.DEFAULT_ANSI_COLORS[7]),p.ansi[8]=C(w.brightBlack,f.DEFAULT_ANSI_COLORS[8]),p.ansi[9]=C(w.brightRed,f.DEFAULT_ANSI_COLORS[9]),p.ansi[10]=C(w.brightGreen,f.DEFAULT_ANSI_COLORS[10]),p.ansi[11]=C(w.brightYellow,f.DEFAULT_ANSI_COLORS[11]),p.ansi[12]=C(w.brightBlue,f.DEFAULT_ANSI_COLORS[12]),p.ansi[13]=C(w.brightMagenta,f.DEFAULT_ANSI_COLORS[13]),p.ansi[14]=C(w.brightCyan,f.DEFAULT_ANSI_COLORS[14]),p.ansi[15]=C(w.brightWhite,f.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const R=Math.min(p.ansi.length-16,w.extendedAnsi.length);for(let T=0;T<R;T++)p.ansi[T+16]=C(w.extendedAnsi[T],f.DEFAULT_ANSI_COLORS[T+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){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[w]=this._restoreColors.ansi[w]}else for(let p=0;p<this._restoreColors.ansi.length;++p)this._colors.ansi[p]=this._restoreColors.ansi[p]}modifyColors(w){w(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 C(w,p){if(w!==void 0)try{return g.css.toColor(w)}catch{}return p}f.ThemeService=E=d([v(0,m.IOptionsService)],E)},6349:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CircularList=void 0;const d=u(8460),v=u(844);class h extends v.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(y){if(this._maxLength===y)return;const D=new Array(y);for(let m=0;m<Math.min(y,this.length);m++)D[m]=this._array[this._getCyclicIndex(m)];this._array=D,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let D=this._length;D<y;D++)this._array[D]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,D){this._array[this._getCyclicIndex(y)]=D}push(y){this._array[this._getCyclicIndex(this._length)]=y,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(y,D,...m){if(D){for(let o=y;o<this._length-D;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+D)];this._length-=D,this.onDeleteEmitter.fire({index:y,amount:D})}for(let o=this._length-1;o>=y;o--)this._array[this._getCyclicIndex(o+m.length)]=this._array[this._getCyclicIndex(o)];for(let o=0;o<m.length;o++)this._array[this._getCyclicIndex(y+o)]=m[o];if(m.length&&this.onInsertEmitter.fire({index:y,amount:m.length}),this._length+m.length>this._maxLength){const o=this._length+m.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=m.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,D,m){if(!(D<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+m<0)throw new Error("Cannot shift elements in list beyond index 0");if(m>0){for(let c=D-1;c>=0;c--)this.set(y+c+m,this.get(y+c));const o=y+D+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<D;o++)this.set(y+o+m,this.get(y+o))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}f.CircularList=h},1439:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.clone=void 0,f.clone=function u(d,v=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const g in d)h[g]=v<=1?d[g]:d[g]&&u(d[g],v-1);return h}},8055:($,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 u=0,d=0,v=0,h=0;var g,y,D,m,o;function c(l){const _=l.toString(16);return _.length<2?"0"+_:_}function n(l,_){return l<_?(_+.05)/(l+.05):(l+.05)/(_+.05)}f.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(_,E,C,w){return w!==void 0?`#${c(_)}${c(E)}${c(C)}${c(w)}`:`#${c(_)}${c(E)}${c(C)}`},l.toRgba=function(_,E,C,w=255){return(_<<24|E<<16|C<<8|w)>>>0},l.toColor=function(_,E,C,w){return{css:l.toCss(_,E,C,w),rgba:l.toRgba(_,E,C,w)}}})(g||(f.channels=g={})),(function(l){function _(E,C){return h=Math.round(255*C),[u,d,v]=o.toChannels(E.rgba),{css:g.toCss(u,d,v,h),rgba:g.toRgba(u,d,v,h)}}l.blend=function(E,C){if(h=(255&C.rgba)/255,h===1)return{css:C.css,rgba:C.rgba};const w=C.rgba>>24&255,p=C.rgba>>16&255,R=C.rgba>>8&255,T=E.rgba>>24&255,N=E.rgba>>16&255,z=E.rgba>>8&255;return u=T+Math.round((w-T)*h),d=N+Math.round((p-N)*h),v=z+Math.round((R-z)*h),{css:g.toCss(u,d,v),rgba:g.toRgba(u,d,v)}},l.isOpaque=function(E){return(255&E.rgba)==255},l.ensureContrastRatio=function(E,C,w){const p=o.ensureContrastRatio(E.rgba,C.rgba,w);if(p)return g.toColor(p>>24&255,p>>16&255,p>>8&255)},l.opaque=function(E){const C=(255|E.rgba)>>>0;return[u,d,v]=o.toChannels(C),{css:g.toCss(u,d,v),rgba:C}},l.opacity=_,l.multiplyOpacity=function(E,C){return h=255&E.rgba,_(E,h*C/255)},l.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}})(y||(f.color=y={})),(function(l){let _,E;try{const C=document.createElement("canvas");C.width=1,C.height=1;const w=C.getContext("2d",{willReadFrequently:!0});w&&(_=w,_.globalCompositeOperation="copy",E=_.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(C){if(C.match(/#[\da-f]{3,8}/i))switch(C.length){case 4:return u=parseInt(C.slice(1,2).repeat(2),16),d=parseInt(C.slice(2,3).repeat(2),16),v=parseInt(C.slice(3,4).repeat(2),16),g.toColor(u,d,v);case 5:return u=parseInt(C.slice(1,2).repeat(2),16),d=parseInt(C.slice(2,3).repeat(2),16),v=parseInt(C.slice(3,4).repeat(2),16),h=parseInt(C.slice(4,5).repeat(2),16),g.toColor(u,d,v,h);case 7:return{css:C,rgba:(parseInt(C.slice(1),16)<<8|255)>>>0};case 9:return{css:C,rgba:parseInt(C.slice(1),16)>>>0}}const w=C.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return u=parseInt(w[1]),d=parseInt(w[2]),v=parseInt(w[3]),h=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),g.toColor(u,d,v,h);if(!_||!E)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=E,_.fillStyle=C,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[u,d,v,h]=_.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(u,d,v,h),css:C}}})(D||(f.css=D={})),(function(l){function _(E,C,w){const p=E/255,R=C/255,T=w/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))}l.relativeLuminance=function(E){return _(E>>16&255,E>>8&255,255&E)},l.relativeLuminance2=_})(m||(f.rgb=m={})),(function(l){function _(C,w,p){const R=C>>24&255,T=C>>16&255,N=C>>8&255;let z=w>>24&255,H=w>>16&255,P=w>>8&255,ee=n(m.relativeLuminance2(z,H,P),m.relativeLuminance2(R,T,N));for(;ee<p&&(z>0||H>0||P>0);)z-=Math.max(0,Math.ceil(.1*z)),H-=Math.max(0,Math.ceil(.1*H)),P-=Math.max(0,Math.ceil(.1*P)),ee=n(m.relativeLuminance2(z,H,P),m.relativeLuminance2(R,T,N));return(z<<24|H<<16|P<<8|255)>>>0}function E(C,w,p){const R=C>>24&255,T=C>>16&255,N=C>>8&255;let z=w>>24&255,H=w>>16&255,P=w>>8&255,ee=n(m.relativeLuminance2(z,H,P),m.relativeLuminance2(R,T,N));for(;ee<p&&(z<255||H<255||P<255);)z=Math.min(255,z+Math.ceil(.1*(255-z))),H=Math.min(255,H+Math.ceil(.1*(255-H))),P=Math.min(255,P+Math.ceil(.1*(255-P))),ee=n(m.relativeLuminance2(z,H,P),m.relativeLuminance2(R,T,N));return(z<<24|H<<16|P<<8|255)>>>0}l.blend=function(C,w){if(h=(255&w)/255,h===1)return w;const p=w>>24&255,R=w>>16&255,T=w>>8&255,N=C>>24&255,z=C>>16&255,H=C>>8&255;return u=N+Math.round((p-N)*h),d=z+Math.round((R-z)*h),v=H+Math.round((T-H)*h),g.toRgba(u,d,v)},l.ensureContrastRatio=function(C,w,p){const R=m.relativeLuminance(C>>8),T=m.relativeLuminance(w>>8);if(n(R,T)<p){if(T<R){const H=_(C,w,p),P=n(R,m.relativeLuminance(H>>8));if(P<p){const ee=E(C,w,p);return P>n(R,m.relativeLuminance(ee>>8))?H:ee}return H}const N=E(C,w,p),z=n(R,m.relativeLuminance(N>>8));if(z<p){const H=_(C,w,p);return z>n(R,m.relativeLuminance(H>>8))?N:H}return N}},l.reduceLuminance=_,l.increaseLuminance=E,l.toChannels=function(C){return[C>>24&255,C>>16&255,C>>8&255,255&C]}})(o||(f.rgba=o={})),f.toPaddedHex=c,f.contrastRatio=n},8969:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CoreTerminal=void 0;const d=u(844),v=u(2585),h=u(4348),g=u(7866),y=u(744),D=u(7302),m=u(6975),o=u(8460),c=u(1753),n=u(1480),l=u(7994),_=u(9282),E=u(5435),C=u(5981),w=u(2660);let p=!1;class R extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new o.EventEmitter),this._onScroll.event((N=>{var z;(z=this._onScrollApi)==null||z.fire(N.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(N){for(const z in N)this.optionsService.options[z]=N[z]}constructor(N){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new o.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new o.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new o.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new o.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new D.OptionsService(N)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(m.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(n.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new E.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((z=>{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((z=>{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 C.WriteBuffer(((z,H)=>this._inputHandler.parse(z,H)))),this.register((0,o.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(N,z){this._writeBuffer.write(N,z)}writeSync(N,z){this._logService.logLevel<=v.LogLevelEnum.WARN&&!p&&(this._logService.warn("writeSync is unreliable and will be removed soon."),p=!0),this._writeBuffer.writeSync(N,z)}input(N,z=!0){this.coreService.triggerDataEvent(N,z)}resize(N,z){isNaN(N)||isNaN(z)||(N=Math.max(N,y.MINIMUM_COLS),z=Math.max(z,y.MINIMUM_ROWS),this._bufferService.resize(N,z))}scroll(N,z=!1){this._bufferService.scroll(N,z)}scrollLines(N,z,H){this._bufferService.scrollLines(N,z,H)}scrollPages(N){this.scrollLines(N*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(N){const z=N-this._bufferService.buffer.ydisp;z!==0&&this.scrollLines(z)}registerEscHandler(N,z){return this._inputHandler.registerEscHandler(N,z)}registerDcsHandler(N,z){return this._inputHandler.registerDcsHandler(N,z)}registerCsiHandler(N,z){return this._inputHandler.registerCsiHandler(N,z)}registerOscHandler(N,z){return this._inputHandler.registerOscHandler(N,z)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let N=!1;const z=this.optionsService.rawOptions.windowsPty;z&&z.buildNumber!==void 0&&z.buildNumber!==void 0?N=z.backend==="conpty"&&z.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(N=!0),N?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const N=[];N.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),N.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const z of N)z.dispose()}))}}}f.CoreTerminal=R},8460:($,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===u)return void this._listeners.splice(d,1)}}})),this._event}fire(u,d){const v=[];for(let h=0;h<this._listeners.length;h++)v.push(this._listeners[h]);for(let h=0;h<v.length;h++)v[h].call(void 0,u,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},f.forwardEvent=function(u,d){return u((v=>d.fire(v)))},f.runAndSubscribe=function(u,d){return d(void 0),u((v=>d(v)))}},5435:function($,f,u){var d=this&&this.__decorate||function(X,x,B,A){var M,F=arguments.length,Z=F<3?x:A===null?A=Object.getOwnPropertyDescriptor(x,B):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(X,x,B,A);else for(var he=X.length-1;he>=0;he--)(M=X[he])&&(Z=(F<3?M(Z):F>3?M(x,B,Z):M(x,B))||Z);return F>3&&Z&&Object.defineProperty(x,B,Z),Z},v=this&&this.__param||function(X,x){return function(B,A){x(B,A,X)}};Object.defineProperty(f,"__esModule",{value:!0}),f.InputHandler=f.WindowsOptionsReportType=void 0;const h=u(2584),g=u(7116),y=u(2015),D=u(844),m=u(482),o=u(8437),c=u(8460),n=u(643),l=u(511),_=u(3734),E=u(2585),C=u(1480),w=u(6242),p=u(6351),R=u(5941),T={"(":0,")":1,"*":2,"+":3,"-":1,".":2},N=131072;function z(X,x){if(X>24)return x.setWinLines||!1;switch(X){case 1:return!!x.restoreWin;case 2:return!!x.minimizeWin;case 3:return!!x.setWinPosition;case 4:return!!x.setWinSizePixels;case 5:return!!x.raiseWin;case 6:return!!x.lowerWin;case 7:return!!x.refreshWin;case 8:return!!x.setWinSizeChars;case 9:return!!x.maximizeWin;case 10:return!!x.fullscreenWin;case 11:return!!x.getWinState;case 13:return!!x.getWinPosition;case 14:return!!x.getWinSizePixels;case 15:return!!x.getScreenSizePixels;case 16:return!!x.getCellSizePixels;case 18:return!!x.getWinSizeChars;case 19:return!!x.getScreenSizeChars;case 20:return!!x.getIconTitle;case 21:return!!x.getWinTitle;case 22:return!!x.pushTitle;case 23:return!!x.popTitle;case 24:return!!x.setWinLines}return!1}var H;(function(X){X[X.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",X[X.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(H||(f.WindowsOptionsReportType=H={}));let P=0;class ee extends D.Disposable{getAttrData(){return this._curAttrData}constructor(x,B,A,M,F,Z,he,fe,G=new y.EscapeSequenceParser){super(),this._bufferService=x,this._charsetService=B,this._coreService=A,this._logService=M,this._optionsService=F,this._oscLinkService=Z,this._coreMouseService=he,this._unicodeService=fe,this._parser=G,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 q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((L=>this._activeBuffer=L.activeBuffer))),this._parser.setCsiHandlerFallback(((L,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(L),params:ae.toArray()})})),this._parser.setEscHandlerFallback((L=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(L)})})),this._parser.setExecuteHandlerFallback((L=>{this._logService.debug("Unknown EXECUTE code: ",{code:L})})),this._parser.setOscHandlerFallback(((L,ae,se)=>{this._logService.debug("Unknown OSC code: ",{identifier:L,action:ae,data:se})})),this._parser.setDcsHandlerFallback(((L,ae,se)=>{ae==="HOOK"&&(se=se.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(L),action:ae,payload:se})})),this._parser.setPrintHandler(((L,ae,se)=>this.print(L,ae,se))),this._parser.registerCsiHandler({final:"@"},(L=>this.insertChars(L))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(L=>this.scrollLeft(L))),this._parser.registerCsiHandler({final:"A"},(L=>this.cursorUp(L))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(L=>this.scrollRight(L))),this._parser.registerCsiHandler({final:"B"},(L=>this.cursorDown(L))),this._parser.registerCsiHandler({final:"C"},(L=>this.cursorForward(L))),this._parser.registerCsiHandler({final:"D"},(L=>this.cursorBackward(L))),this._parser.registerCsiHandler({final:"E"},(L=>this.cursorNextLine(L))),this._parser.registerCsiHandler({final:"F"},(L=>this.cursorPrecedingLine(L))),this._parser.registerCsiHandler({final:"G"},(L=>this.cursorCharAbsolute(L))),this._parser.registerCsiHandler({final:"H"},(L=>this.cursorPosition(L))),this._parser.registerCsiHandler({final:"I"},(L=>this.cursorForwardTab(L))),this._parser.registerCsiHandler({final:"J"},(L=>this.eraseInDisplay(L,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(L=>this.eraseInDisplay(L,!0))),this._parser.registerCsiHandler({final:"K"},(L=>this.eraseInLine(L,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(L=>this.eraseInLine(L,!0))),this._parser.registerCsiHandler({final:"L"},(L=>this.insertLines(L))),this._parser.registerCsiHandler({final:"M"},(L=>this.deleteLines(L))),this._parser.registerCsiHandler({final:"P"},(L=>this.deleteChars(L))),this._parser.registerCsiHandler({final:"S"},(L=>this.scrollUp(L))),this._parser.registerCsiHandler({final:"T"},(L=>this.scrollDown(L))),this._parser.registerCsiHandler({final:"X"},(L=>this.eraseChars(L))),this._parser.registerCsiHandler({final:"Z"},(L=>this.cursorBackwardTab(L))),this._parser.registerCsiHandler({final:"`"},(L=>this.charPosAbsolute(L))),this._parser.registerCsiHandler({final:"a"},(L=>this.hPositionRelative(L))),this._parser.registerCsiHandler({final:"b"},(L=>this.repeatPrecedingCharacter(L))),this._parser.registerCsiHandler({final:"c"},(L=>this.sendDeviceAttributesPrimary(L))),this._parser.registerCsiHandler({prefix:">",final:"c"},(L=>this.sendDeviceAttributesSecondary(L))),this._parser.registerCsiHandler({final:"d"},(L=>this.linePosAbsolute(L))),this._parser.registerCsiHandler({final:"e"},(L=>this.vPositionRelative(L))),this._parser.registerCsiHandler({final:"f"},(L=>this.hVPosition(L))),this._parser.registerCsiHandler({final:"g"},(L=>this.tabClear(L))),this._parser.registerCsiHandler({final:"h"},(L=>this.setMode(L))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(L=>this.setModePrivate(L))),this._parser.registerCsiHandler({final:"l"},(L=>this.resetMode(L))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(L=>this.resetModePrivate(L))),this._parser.registerCsiHandler({final:"m"},(L=>this.charAttributes(L))),this._parser.registerCsiHandler({final:"n"},(L=>this.deviceStatus(L))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(L=>this.deviceStatusPrivate(L))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(L=>this.softReset(L))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(L=>this.setCursorStyle(L))),this._parser.registerCsiHandler({final:"r"},(L=>this.setScrollRegion(L))),this._parser.registerCsiHandler({final:"s"},(L=>this.saveCursor(L))),this._parser.registerCsiHandler({final:"t"},(L=>this.windowOptions(L))),this._parser.registerCsiHandler({final:"u"},(L=>this.restoreCursor(L))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(L=>this.insertColumns(L))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(L=>this.deleteColumns(L))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(L=>this.selectProtected(L))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(L=>this.requestMode(L,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(L=>this.requestMode(L,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new w.OscHandler((L=>(this.setTitle(L),this.setIconName(L),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((L=>this.setIconName(L)))),this._parser.registerOscHandler(2,new w.OscHandler((L=>this.setTitle(L)))),this._parser.registerOscHandler(4,new w.OscHandler((L=>this.setOrReportIndexedColor(L)))),this._parser.registerOscHandler(8,new w.OscHandler((L=>this.setHyperlink(L)))),this._parser.registerOscHandler(10,new w.OscHandler((L=>this.setOrReportFgColor(L)))),this._parser.registerOscHandler(11,new w.OscHandler((L=>this.setOrReportBgColor(L)))),this._parser.registerOscHandler(12,new w.OscHandler((L=>this.setOrReportCursorColor(L)))),this._parser.registerOscHandler(104,new w.OscHandler((L=>this.restoreIndexedColor(L)))),this._parser.registerOscHandler(110,new w.OscHandler((L=>this.restoreFgColor(L)))),this._parser.registerOscHandler(111,new w.OscHandler((L=>this.restoreBgColor(L)))),this._parser.registerOscHandler(112,new w.OscHandler((L=>this.restoreCursorColor(L)))),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 L in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:L},(()=>this.selectCharset("("+L))),this._parser.registerEscHandler({intermediates:")",final:L},(()=>this.selectCharset(")"+L))),this._parser.registerEscHandler({intermediates:"*",final:L},(()=>this.selectCharset("*"+L))),this._parser.registerEscHandler({intermediates:"+",final:L},(()=>this.selectCharset("+"+L))),this._parser.registerEscHandler({intermediates:"-",final:L},(()=>this.selectCharset("-"+L))),this._parser.registerEscHandler({intermediates:".",final:L},(()=>this.selectCharset("."+L))),this._parser.registerEscHandler({intermediates:"/",final:L},(()=>this.selectCharset("/"+L)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((L=>(this._logService.error("Parsing error: ",L),L))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new p.DcsHandler(((L,ae)=>this.requestStatusString(L,ae))))}_preserveStack(x,B,A,M){this._parseStack.paused=!0,this._parseStack.cursorStartX=x,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=A,this._parseStack.position=M}_logSlowResolvingAsync(x){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([x,new Promise(((B,A)=>setTimeout((()=>A("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(x,B){let A,M=this._activeBuffer.x,F=this._activeBuffer.y,Z=0;const he=this._parseStack.paused;if(he){if(A=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(A),A;M=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,x.length>N&&(Z=this._parseStack.position+N)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof x=="string"?` "${x}"`:` "${Array.prototype.map.call(x,(L=>String.fromCharCode(L))).join("")}"`),typeof x=="string"?x.split("").map((L=>L.charCodeAt(0))):x),this._parseBuffer.length<x.length&&this._parseBuffer.length<N&&(this._parseBuffer=new Uint32Array(Math.min(x.length,N))),he||this._dirtyRowTracker.clearRange(),x.length>N)for(let L=Z;L<x.length;L+=N){const ae=L+N<x.length?L+N:x.length,se=typeof x=="string"?this._stringDecoder.decode(x.substring(L,ae),this._parseBuffer):this._utf8Decoder.decode(x.subarray(L,ae),this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,se))return this._preserveStack(M,F,se,L),this._logSlowResolvingAsync(A),A}else if(!he){const L=typeof x=="string"?this._stringDecoder.decode(x,this._parseBuffer):this._utf8Decoder.decode(x,this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,L))return this._preserveStack(M,F,L,0),this._logSlowResolvingAsync(A),A}this._activeBuffer.x===M&&this._activeBuffer.y===F||this._onCursorMove.fire();const fe=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),G=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);G<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(G,this._bufferService.rows-1),Math.min(fe,this._bufferService.rows-1))}print(x,B,A){let M,F;const Z=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,fe=this._bufferService.cols,G=this._coreService.decPrivateModes.wraparound,L=this._coreService.modes.insertMode,ae=this._curAttrData;let se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&A-B>0&&se.getWidth(this._activeBuffer.x-1)===2&&se.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let _e=this._parser.precedingJoinState;for(let de=B;de<A;++de){if(M=x[de],M<127&&Z){const it=Z[String.fromCharCode(M)];it&&(M=it.charCodeAt(0))}const Ee=this._unicodeService.charProperties(M,_e);F=C.UnicodeService.extractWidth(Ee);const Oe=C.UnicodeService.extractShouldJoin(Ee),Ie=Oe?C.UnicodeService.extractWidth(_e):0;if(_e=Ee,he&&this._onA11yChar.fire((0,m.stringFromCodePoint)(M)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+F-Ie>fe){if(G){const it=se;let Se=this._activeBuffer.x-Ie;for(this._activeBuffer.x=Ie,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),se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ie>0&&se instanceof o.BufferLine&&se.copyCellsFrom(it,Se,0,Ie,!1);Se<fe;)it.setCellFromCodepoint(Se++,0,1,ae)}else if(this._activeBuffer.x=fe-1,F===2)continue}if(Oe&&this._activeBuffer.x){const it=se.getWidth(this._activeBuffer.x-1)?1:2;se.addCodepointToCell(this._activeBuffer.x-it,M,F);for(let Se=F-Ie;--Se>=0;)se.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(L&&(se.insertCells(this._activeBuffer.x,F-Ie,this._activeBuffer.getNullCell(ae)),se.getWidth(fe-1)===2&&se.setCellFromCodepoint(fe-1,n.NULL_CELL_CODE,n.NULL_CELL_WIDTH,ae)),se.setCellFromCodepoint(this._activeBuffer.x++,M,F,ae),F>0)for(;--F;)se.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=_e,this._activeBuffer.x<fe&&A-B>0&&se.getWidth(this._activeBuffer.x)===0&&!se.hasContent(this._activeBuffer.x)&&se.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(x,B){return x.final!=="t"||x.prefix||x.intermediates?this._parser.registerCsiHandler(x,B):this._parser.registerCsiHandler(x,(A=>!z(A.params[0],this._optionsService.rawOptions.windowOptions)||B(A)))}registerDcsHandler(x,B){return this._parser.registerDcsHandler(x,new p.DcsHandler(B))}registerEscHandler(x,B){return this._parser.registerEscHandler(x,B)}registerOscHandler(x,B){return this._parser.registerOscHandler(x,new w.OscHandler(B))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var x;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&x.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const x=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-x),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(x=this._bufferService.cols-1){this._activeBuffer.x=Math.min(x,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(x,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=x,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=x,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(x,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+x,this._activeBuffer.y+B)}cursorUp(x){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,x.params[0]||1)):this._moveCursor(0,-(x.params[0]||1)),!0}cursorDown(x){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,x.params[0]||1)):this._moveCursor(0,x.params[0]||1),!0}cursorForward(x){return this._moveCursor(x.params[0]||1,0),!0}cursorBackward(x){return this._moveCursor(-(x.params[0]||1),0),!0}cursorNextLine(x){return this.cursorDown(x),this._activeBuffer.x=0,!0}cursorPrecedingLine(x){return this.cursorUp(x),this._activeBuffer.x=0,!0}cursorCharAbsolute(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(x){return this._setCursor(x.length>=2?(x.params[1]||1)-1:0,(x.params[0]||1)-1),!0}charPosAbsolute(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(x){return this._moveCursor(x.params[0]||1,0),!0}linePosAbsolute(x){return this._setCursor(this._activeBuffer.x,(x.params[0]||1)-1),!0}vPositionRelative(x){return this._moveCursor(0,x.params[0]||1),!0}hVPosition(x){return this.cursorPosition(x),!0}tabClear(x){const B=x.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=x.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=x.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(x){const B=x.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(x,B,A,M=!1,F=!1){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);Z.replaceCells(B,A,this._activeBuffer.getNullCell(this._eraseAttrData()),F),M&&(Z.isWrapped=!1)}_resetBufferLine(x,B=!1){const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);A&&(A.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+x),A.isWrapped=!1)}eraseInDisplay(x,B=!1){let A;switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);A<this._bufferService.rows;A++)this._resetBufferLine(A,B);this._dirtyRowTracker.markDirty(A);break;case 1:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(A+1).isWrapped=!1);A--;)this._resetBufferLine(A,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(A=this._bufferService.rows,this._dirtyRowTracker.markDirty(A-1);A--;)this._resetBufferLine(A,B);this._dirtyRowTracker.markDirty(0);break;case 3:const M=this._activeBuffer.lines.length-this._bufferService.rows;M>0&&(this._activeBuffer.lines.trimStart(M),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-M,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-M,0),this._onScroll.fire(0))}return!0}eraseInLine(x,B=!1){switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(x){this._restrictCursor();let B=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y,M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,F=this._bufferService.rows-1+this._activeBuffer.ybase-M+1;for(;B--;)this._activeBuffer.lines.splice(F-1,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(x){this._restrictCursor();let B=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y;let M;for(M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,M=this._bufferService.rows-1+this._activeBuffer.ybase-M;B--;)this._activeBuffer.lines.splice(A,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(x){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(x){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(x){let B=x.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(x){let B=x.params[0]||1;for(;B--;)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(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=x.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);M.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=x.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);M.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=x.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);M.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=x.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);M.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(x){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(x.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(x){const B=this._parser.precedingJoinState;if(!B)return!0;const A=x.params[0]||1,M=C.UnicodeService.extractWidth(B),F=this._activeBuffer.x-M,Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(F),he=new Uint32Array(Z.length*A);let fe=0;for(let L=0;L<Z.length;){const ae=Z.codePointAt(L)||0;he[fe++]=ae,L+=ae>65535?2:1}let G=fe;for(let L=1;L<A;++L)he.copyWithin(G,0,fe),G+=fe;return this.print(he,0,G),!0}sendDeviceAttributesPrimary(x){return x.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(x){return x.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(x.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(x){return(this._optionsService.rawOptions.termName+"").indexOf(x)===0}setMode(x){for(let B=0;B<x.length;B++)switch(x.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(x){for(let B=0;B<x.length;B++)switch(x.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(x){for(let B=0;B<x.length;B++)switch(x.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(x){for(let B=0;B<x.length;B++)switch(x.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),x.params[B]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(x,B){const A=this._coreService.decPrivateModes,{activeProtocol:M,activeEncoding:F}=this._coreMouseService,Z=this._coreService,{buffers:he,cols:fe}=this._bufferService,{active:G,alt:L}=he,ae=this._optionsService.rawOptions,se=Oe=>Oe?1:2,_e=x.params[0];return de=_e,Ee=B?_e===2?4:_e===4?se(Z.modes.insertMode):_e===12?3:_e===20?se(ae.convertEol):0:_e===1?se(A.applicationCursorKeys):_e===3?ae.windowOptions.setWinLines?fe===80?2:fe===132?1:0:0:_e===6?se(A.origin):_e===7?se(A.wraparound):_e===8?3:_e===9?se(M==="X10"):_e===12?se(ae.cursorBlink):_e===25?se(!Z.isCursorHidden):_e===45?se(A.reverseWraparound):_e===66?se(A.applicationKeypad):_e===67?4:_e===1e3?se(M==="VT200"):_e===1002?se(M==="DRAG"):_e===1003?se(M==="ANY"):_e===1004?se(A.sendFocus):_e===1005?4:_e===1006?se(F==="SGR"):_e===1015?4:_e===1016?se(F==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?se(G===L):_e===2004?se(A.bracketedPasteMode):0,Z.triggerDataEvent(`${h.C0.ESC}[${B?"":"?"}${de};${Ee}$y`),!0;var de,Ee}_updateAttrColor(x,B,A,M,F){return B===2?(x|=50331648,x&=-16777216,x|=_.AttributeData.fromColorRGB([A,M,F])):B===5&&(x&=-50331904,x|=33554432|255&A),x}_extractColor(x,B,A){const M=[0,0,-1,0,0,0];let F=0,Z=0;do{if(M[Z+F]=x.params[B+Z],x.hasSubParams(B+Z)){const he=x.getSubParams(B+Z);let fe=0;do M[1]===5&&(F=1),M[Z+fe+1+F]=he[fe];while(++fe<he.length&&fe+Z+1+F<M.length);break}if(M[1]===5&&Z+F>=2||M[1]===2&&Z+F>=5)break;M[1]&&(F=1)}while(++Z+B<x.length&&Z+F<M.length);for(let he=2;he<M.length;++he)M[he]===-1&&(M[he]=0);switch(M[0]){case 38:A.fg=this._updateAttrColor(A.fg,M[1],M[3],M[4],M[5]);break;case 48:A.bg=this._updateAttrColor(A.bg,M[1],M[3],M[4],M[5]);break;case 58:A.extended=A.extended.clone(),A.extended.underlineColor=this._updateAttrColor(A.extended.underlineColor,M[1],M[3],M[4],M[5])}return Z}_processUnderline(x,B){B.extended=B.extended.clone(),(!~x||x>5)&&(x=1),B.extended.underlineStyle=x,B.fg|=268435456,x===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(x){x.fg=o.DEFAULT_ATTR_DATA.fg,x.bg=o.DEFAULT_ATTR_DATA.bg,x.extended=x.extended.clone(),x.extended.underlineStyle=0,x.extended.underlineColor&=-67108864,x.updateExtended()}charAttributes(x){if(x.length===1&&x.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=x.length;let A;const M=this._curAttrData;for(let F=0;F<B;F++)A=x.params[F],A>=30&&A<=37?(M.fg&=-50331904,M.fg|=16777216|A-30):A>=40&&A<=47?(M.bg&=-50331904,M.bg|=16777216|A-40):A>=90&&A<=97?(M.fg&=-50331904,M.fg|=16777224|A-90):A>=100&&A<=107?(M.bg&=-50331904,M.bg|=16777224|A-100):A===0?this._processSGR0(M):A===1?M.fg|=134217728:A===3?M.bg|=67108864:A===4?(M.fg|=268435456,this._processUnderline(x.hasSubParams(F)?x.getSubParams(F)[0]:1,M)):A===5?M.fg|=536870912:A===7?M.fg|=67108864:A===8?M.fg|=1073741824:A===9?M.fg|=2147483648:A===2?M.bg|=134217728:A===21?this._processUnderline(2,M):A===22?(M.fg&=-134217729,M.bg&=-134217729):A===23?M.bg&=-67108865:A===24?(M.fg&=-268435457,this._processUnderline(0,M)):A===25?M.fg&=-536870913:A===27?M.fg&=-67108865:A===28?M.fg&=-1073741825:A===29?M.fg&=2147483647:A===39?(M.fg&=-67108864,M.fg|=16777215&o.DEFAULT_ATTR_DATA.fg):A===49?(M.bg&=-67108864,M.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):A===38||A===48||A===58?F+=this._extractColor(x,F,M):A===53?M.bg|=1073741824:A===55?M.bg&=-1073741825:A===59?(M.extended=M.extended.clone(),M.extended.underlineColor=-1,M.updateExtended()):A===100?(M.fg&=-67108864,M.fg|=16777215&o.DEFAULT_ATTR_DATA.fg,M.bg&=-67108864,M.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",A);return!0}deviceStatus(x){switch(x.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${B};${A}R`)}return!0}deviceStatusPrivate(x){if(x.params[0]===6){const B=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${B};${A}R`)}return!0}softReset(x){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=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(x){const B=x.params[0]||1;switch(B){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 A=B%2==1;return this._optionsService.options.cursorBlink=A,!0}setScrollRegion(x){const B=x.params[0]||1;let A;return(x.length<2||(A=x.params[1])>this._bufferService.rows||A===0)&&(A=this._bufferService.rows),A>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=A-1,this._setCursor(0,0)),!0}windowOptions(x){if(!z(x.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=x.length>1?x.params[1]:0;switch(x.params[0]){case 14:B!==2&&this._onRequestWindowsOptionsReport.fire(H.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(H.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(x){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(x){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(x){return this._windowTitle=x,this._onTitleChange.fire(x),!0}setIconName(x){return this._iconName=x,!0}setOrReportIndexedColor(x){const B=[],A=x.split(";");for(;A.length>1;){const M=A.shift(),F=A.shift();if(/^\d+$/.exec(M)){const Z=parseInt(M);if(I(Z))if(F==="?")B.push({type:0,index:Z});else{const he=(0,R.parseColor)(F);he&&B.push({type:1,index:Z,color:he})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(x){const B=x.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(x,B){this._getCurrentLinkId()&&this._finishHyperlink();const A=x.split(":");let M;const F=A.findIndex((Z=>Z.startsWith("id=")));return F!==-1&&(M=A[F].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:M,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(x,B){const A=x.split(";");for(let M=0;M<A.length&&!(B>=this._specialColors.length);++M,++B)if(A[M]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const F=(0,R.parseColor)(A[M]);F&&this._onColor.fire([{type:1,index:this._specialColors[B],color:F}])}return!0}setOrReportFgColor(x){return this._setOrReportSpecialColor(x,0)}setOrReportBgColor(x){return this._setOrReportSpecialColor(x,1)}setOrReportCursorColor(x){return this._setOrReportSpecialColor(x,2)}restoreIndexedColor(x){if(!x)return this._onColor.fire([{type:2}]),!0;const B=[],A=x.split(";");for(let M=0;M<A.length;++M)if(/^\d+$/.exec(A[M])){const F=parseInt(A[M]);I(F)&&B.push({type:2,index:F})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(x){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(x){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(x){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),!0}selectCharset(x){return x.length!==2?(this.selectDefaultCharset(),!0):(x[0]==="/"||this._charsetService.setgCharset(T[x[0]],g.CHARSETS[x[1]]||g.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const x=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,x,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=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(x){return this._charsetService.setgLevel(x),!0}screenAlignmentPattern(){const x=new l.CellData;x.content=4194373,x.fg=this._curAttrData.fg,x.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const A=this._activeBuffer.ybase+this._activeBuffer.y+B,M=this._activeBuffer.lines.get(A);M&&(M.fill(x),M.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(x,B){const A=this._bufferService.buffer,M=this._optionsService.rawOptions;return(F=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${F}${h.C0.ESC}\\`),!0))(x==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:x==='"p'?'P1$r61;1"p':x==="r"?`P1$r${A.scrollTop+1};${A.scrollBottom+1}r`:x==="m"?"P1$r0m":x===" q"?`P1$r${{block:2,underline:4,bar:6}[M.cursorStyle]-(M.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(x,B){this._dirtyRowTracker.markRangeDirty(x,B)}}f.InputHandler=ee;let q=class{constructor(X){this._bufferService=X,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(X){X<this.start?this.start=X:X>this.end&&(this.end=X)}markRangeDirty(X,x){X>x&&(P=X,X=x,x=P),X<this.start&&(this.start=X),x>this.end&&(this.end=x)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function I(X){return 0<=X&&X<256}q=d([v(0,E.IBufferService)],q)},844:($,f)=>{function u(d){for(const v of d)v.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 v=this._disposables.indexOf(d);v!==-1&&this._disposables.splice(v,1)}},f.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var v;this._isDisposed||d===this._value||((v=this._value)==null||v.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},f.toDisposable=function(d){return{dispose:d}},f.disposeArray=u,f.getDisposeArrayDisposable=function(d){return{dispose:()=>u(d)}}},1505:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.FourKeyMap=f.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,h,g){this._data[v]||(this._data[v]={}),this._data[v][h]=g}get(v,h){return this._data[v]?this._data[v][h]:void 0}clear(){this._data={}}}f.TwoKeyMap=u,f.FourKeyMap=class{constructor(){this._data=new u}set(d,v,h,g,y){this._data.get(d,v)||this._data.set(d,v,new u),this._data.get(d,v).set(h,g,y)}get(d,v,h,g){var y;return(y=this._data.get(d,v))==null?void 0:y.get(h,g)}clear(){this._data.clear()}}},6114:($,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 u=f.isNode?"node":navigator.userAgent,d=f.isNode?"node":navigator.platform;f.isFirefox=u.includes("Firefox"),f.isLegacyEdge=u.includes("Edge"),f.isSafari=/^((?!chrome|android).)*safari/i.test(u),f.getSafariVersion=function(){if(!f.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[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(u)},6106:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.SortedList=void 0;let u=0;f.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(u=this._search(this._getKey(d)),this._array.splice(u,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const v=this._getKey(d);if(v===void 0||(u=this._search(v),u===-1)||this._getKey(this._array[u])!==v)return!1;do if(this._array[u]===d)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===v);return!1}*getKeyIterator(d){if(this._array.length!==0&&(u=this._search(d),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===d))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===d)}forEachByKey(d,v){if(this._array.length!==0&&(u=this._search(d),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===d))do v(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===d)}values(){return[...this._array].values()}_search(d){let v=0,h=this._array.length-1;for(;h>=v;){let g=v+h>>1;const y=this._getKey(this._array[g]);if(y>d)h=g-1;else{if(!(y<d)){for(;g>0&&this._getKey(this._array[g-1])===d;)g--;return g}v=g+1}}return v}}},7226:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DebouncedIdleTask=f.IdleTaskQueue=f.PriorityTaskQueue=void 0;const d=u(6114);class v{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(y){this._idleCallback=void 0;let D=0,m=0,o=y.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(D=Date.now(),this._tasks[this._i]()||this._i++,D=Math.max(1,Date.now()-D),m=Math.max(D,m),c=y.timeRemaining(),1.5*m>c)return o-D<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-D))}ms`),void this._start();o=c}this.clear()}}class h extends v{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const D=Date.now()+y;return{timeRemaining:()=>Math.max(0,D-Date.now())}}}f.PriorityTaskQueue=h,f.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:h,f.DebouncedIdleTask=class{constructor(){this._queue=new f.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.updateWindowsModeWrappedState=void 0;const d=u(643);f.updateWindowsModeWrappedState=function(v){const h=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),g=h==null?void 0:h.get(v.cols-1),y=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);y&&g&&(y.isWrapped=g[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&g[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ExtendedAttrs=f.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new u;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}f.AttributeData=u;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,g=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=g}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}f.ExtendedAttrs=d},9092:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Buffer=f.MAX_BUFFER_SIZE=void 0;const d=u(6349),v=u(7226),h=u(3734),g=u(8437),y=u(4634),D=u(511),m=u(643),o=u(4863),c=u(7116);f.MAX_BUFFER_SIZE=4294967295,f.Buffer=class{constructor(n,l,_){this._hasScrollback=n,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=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=D.CellData.fromCharData([0,m.NULL_CELL_CHAR,m.NULL_CELL_WIDTH,m.NULL_CELL_CODE]),this._whitespaceCell=D.CellData.fromCharData([0,m.WHITESPACE_CELL_CHAR,m.WHITESPACE_CELL_WIDTH,m.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.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(n){return n?(this._nullCell.fg=n.fg,this._nullCell.bg=n.bg,this._nullCell.extended=n.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(n){return n?(this._whitespaceCell.fg=n.fg,this._whitespaceCell.bg=n.bg,this._whitespaceCell.extended=n.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(n,l){return new g.BufferLine(this._bufferService.cols,this.getNullCell(n),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const n=this.ybase+this.y-this.ydisp;return n>=0&&n<this._rows}_getCorrectBufferLength(n){if(!this._hasScrollback)return n;const l=n+this._optionsService.rawOptions.scrollback;return l>f.MAX_BUFFER_SIZE?f.MAX_BUFFER_SIZE:l}fillViewportRows(n){if(this.lines.length===0){n===void 0&&(n=g.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(n))}}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(n,l){const _=this.getNullCell(g.DEFAULT_ATTR_DATA);let E=0;const C=this._getCorrectBufferLength(l);if(C>this.lines.maxLength&&(this.lines.maxLength=C),this.lines.length>0){if(this._cols<n)for(let p=0;p<this.lines.length;p++)E+=+this.lines.get(p).resize(n,_);let w=0;if(this._rows<l)for(let p=this._rows;p<l;p++)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 g.BufferLine(n,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(n,_)));else for(let p=this._rows;p>l;p--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(C<this.lines.maxLength){const p=this.lines.length-C;p>0&&(this.lines.trimStart(p),this.ybase=Math.max(this.ybase-p,0),this.ydisp=Math.max(this.ydisp-p,0),this.savedY=Math.max(this.savedY-p,0)),this.lines.maxLength=C}this.x=Math.min(this.x,n-1),this.y=Math.min(this.y,l-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,n-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(n,l),this._cols>n))for(let w=0;w<this.lines.length;w++)E+=+this.lines.get(w).resize(n,_);this._cols=n,this._rows=l,this._memoryCleanupQueue.clear(),E>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let n=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,n=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return n}get _isReflowEnabled(){const n=this._optionsService.rawOptions.windowsPty;return n&&n.buildNumber?this._hasScrollback&&n.backend==="conpty"&&n.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(n,l){this._cols!==n&&(n>this._cols?this._reflowLarger(n,l):this._reflowSmaller(n,l))}_reflowLarger(n,l){const _=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,n,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(_.length>0){const E=(0,y.reflowLargerCreateNewLayout)(this.lines,_);(0,y.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(n,l,E.countRemoved)}}_reflowLargerAdjustViewport(n,l,_){const E=this.getNullCell(g.DEFAULT_ATTR_DATA);let C=_;for(;C-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new g.BufferLine(n,E))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(n,l){const _=this.getNullCell(g.DEFAULT_ATTR_DATA),E=[];let C=0;for(let w=this.lines.length-1;w>=0;w--){let p=this.lines.get(w);if(!p||!p.isWrapped&&p.getTrimmedLength()<=n)continue;const R=[p];for(;p.isWrapped&&w>0;)p=this.lines.get(--w),R.unshift(p);const T=this.ybase+this.y;if(T>=w&&T<w+R.length)continue;const N=R[R.length-1].getTrimmedLength(),z=(0,y.reflowSmallerGetNewLineLengths)(R,this._cols,n),H=z.length-R.length;let P;P=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+H):Math.max(0,this.lines.length-this.lines.maxLength+H);const ee=[];for(let A=0;A<H;A++){const M=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);ee.push(M)}ee.length>0&&(E.push({start:w+R.length+C,newLines:ee}),C+=ee.length),R.push(...ee);let q=z.length-1,I=z[q];I===0&&(q--,I=z[q]);let X=R.length-H-1,x=N;for(;X>=0;){const A=Math.min(x,I);if(R[q]===void 0)break;if(R[q].copyCellsFrom(R[X],x-A,I-A,A,!0),I-=A,I===0&&(q--,I=z[q]),x-=A,x===0){X--;const M=Math.max(X,0);x=(0,y.getWrappedLineTrimmedLength)(R,M,this._cols)}}for(let A=0;A<R.length;A++)z[A]<n&&R[A].setCell(z[A],_);let B=H-P;for(;B-- >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+C)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+H,this.ybase+l-1)}if(E.length>0){const w=[],p=[];for(let q=0;q<this.lines.length;q++)p.push(this.lines.get(q));const R=this.lines.length;let T=R-1,N=0,z=E[N];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+C);let H=0;for(let q=Math.min(this.lines.maxLength-1,R+C-1);q>=0;q--)if(z&&z.start>T+H){for(let I=z.newLines.length-1;I>=0;I--)this.lines.set(q--,z.newLines[I]);q++,w.push({index:T+1,amount:z.newLines.length}),H+=z.newLines.length,z=E[++N]}else this.lines.set(q,p[T--]);let P=0;for(let q=w.length-1;q>=0;q--)w[q].index+=P,this.lines.onInsertEmitter.fire(w[q]),P+=w[q].amount;const ee=Math.max(0,R+C-this.lines.maxLength);ee>0&&this.lines.onTrimEmitter.fire(ee)}}translateBufferLineToString(n,l,_=0,E){const C=this.lines.get(n);return C?C.translateToString(l,_,E):""}getWrappedRangeForLine(n){let l=n,_=n;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:l,last:_}}setupTabStops(n){for(n!=null?this.tabs[n]||(n=this.prevStop(n)):(this.tabs={},n=0);n<this._cols;n+=this._optionsService.rawOptions.tabStopWidth)this.tabs[n]=!0}prevStop(n){for(n==null&&(n=this.x);!this.tabs[--n]&&n>0;);return n>=this._cols?this._cols-1:n<0?0:n}nextStop(n){for(n==null&&(n=this.x);!this.tabs[++n]&&n<this._cols;);return n>=this._cols?this._cols-1:n<0?0:n}clearMarkers(n){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===n&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let n=0;n<this.markers.length;n++)this.markers[n].dispose(),this.markers.splice(n--,1);this._isClearing=!1}addMarker(n){const l=new o.Marker(n);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(n){this._isClearing||this.markers.splice(this.markers.indexOf(n),1)}}},8437:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferLine=f.DEFAULT_ATTR_DATA=void 0;const d=u(3734),v=u(511),h=u(643),g=u(482);f.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let y=0;class D{constructor(o,c,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);const l=c||v.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<o;++_)this.setCell(_,l);this.length=o}get(o){const c=this._data[3*o+0],n=2097151&c;return[this._data[3*o+1],2097152&c?this._combined[o]:n?(0,g.stringFromCodePoint)(n):"",c>>22,2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):n]}set(o,c){this._data[3*o+1]=c[h.CHAR_DATA_ATTR_INDEX],c[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=c[1],this._data[3*o+0]=2097152|o|c[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[h.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,g.stringFromCodePoint)(2097151&c):""}isProtected(o){return 536870912&this._data[3*o+2]}loadCell(o,c){return y=3*o,c.content=this._data[y+0],c.fg=this._data[y+1],c.bg=this._data[y+2],2097152&c.content&&(c.combinedData=this._combined[o]),268435456&c.bg&&(c.extended=this._extendedAttrs[o]),c}setCell(o,c){2097152&c.content&&(this._combined[o]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[o]=c.extended),this._data[3*o+0]=c.content,this._data[3*o+1]=c.fg,this._data[3*o+2]=c.bg}setCellFromCodepoint(o,c,n,l){268435456&l.bg&&(this._extendedAttrs[o]=l.extended),this._data[3*o+0]=c|n<<22,this._data[3*o+1]=l.fg,this._data[3*o+2]=l.bg}addCodepointToCell(o,c,n){let l=this._data[3*o+0];2097152&l?this._combined[o]+=(0,g.stringFromCodePoint)(c):2097151&l?(this._combined[o]=(0,g.stringFromCodePoint)(2097151&l)+(0,g.stringFromCodePoint)(c),l&=-2097152,l|=2097152):l=c|4194304,n&&(l&=-12582913,l|=n<<22),this._data[3*o+0]=l}insertCells(o,c,n){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,n),c<this.length-o){const l=new v.CellData;for(let _=this.length-o-c-1;_>=0;--_)this.setCell(o+c+_,this.loadCell(o+_,l));for(let _=0;_<c;++_)this.setCell(o+_,n)}else for(let l=o;l<this.length;++l)this.setCell(l,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(o,c,n){if(o%=this.length,c<this.length-o){const l=new v.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(_,n)}else for(let l=o;l<this.length;++l)this.setCell(l,n);o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,n),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodepoint(o,0,1,n)}replaceCells(o,c,n,l=!1){if(l)for(o&&this.getWidth(o-1)===2&&!this.isProtected(o-1)&&this.setCellFromCodepoint(o-1,0,1,n),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,n);o<c&&o<this.length;)this.isProtected(o)||this.setCell(o,n),o++;else for(o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,n),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,n);o<c&&o<this.length;)this.setCell(o++,n)}resize(o,c){if(o===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const n=3*o;if(o>this.length){if(this._data.buffer.byteLength>=4*n)this._data=new Uint32Array(this._data.buffer,0,n);else{const l=new Uint32Array(n);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,n);const l=Object.keys(this._combined);for(let E=0;E<l.length;E++){const C=parseInt(l[E],10);C>=o&&delete this._combined[C]}const _=Object.keys(this._extendedAttrs);for(let E=0;E<_.length;E++){const C=parseInt(_[E],10);C>=o&&delete this._extendedAttrs[C]}}return this.length=o,4*n*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 n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,o);else{this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,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 D(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,n,l,_){const E=o._data;if(_)for(let w=l-1;w>=0;w--){for(let p=0;p<3;p++)this._data[3*(n+w)+p]=E[3*(c+w)+p];268435456&E[3*(c+w)+2]&&(this._extendedAttrs[n+w]=o._extendedAttrs[c+w])}else for(let w=0;w<l;w++){for(let p=0;p<3;p++)this._data[3*(n+w)+p]=E[3*(c+w)+p];268435456&E[3*(c+w)+2]&&(this._extendedAttrs[n+w]=o._extendedAttrs[c+w])}const C=Object.keys(o._combined);for(let w=0;w<C.length;w++){const p=parseInt(C[w],10);p>=c&&(this._combined[p-c+n]=o._combined[p])}}translateToString(o,c,n,l){c=c??0,n=n??this.length,o&&(n=Math.min(n,this.getTrimmedLength())),l&&(l.length=0);let _="";for(;c<n;){const E=this._data[3*c+0],C=2097151&E,w=2097152&E?this._combined[c]:C?(0,g.stringFromCodePoint)(C):h.WHITESPACE_CELL_CHAR;if(_+=w,l)for(let p=0;p<w.length;++p)l.push(c);c+=E>>22||1}return l&&l.push(c),_}}f.BufferLine=D},4841:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.getRangeLength=void 0,f.getRangeLength=function(u,d){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return d*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:($,f)=>{function u(d,v,h){if(v===d.length-1)return d[v].getTrimmedLength();const g=!d[v].hasContent(h-1)&&d[v].getWidth(h-1)===1,y=d[v+1].getWidth(0)===2;return g&&y?h-1:h}Object.defineProperty(f,"__esModule",{value:!0}),f.getWrappedLineTrimmedLength=f.reflowSmallerGetNewLineLengths=f.reflowLargerApplyNewLayout=f.reflowLargerCreateNewLayout=f.reflowLargerGetLinesToRemove=void 0,f.reflowLargerGetLinesToRemove=function(d,v,h,g,y){const D=[];for(let m=0;m<d.length-1;m++){let o=m,c=d.get(++o);if(!c.isWrapped)continue;const n=[d.get(m)];for(;o<d.length&&c.isWrapped;)n.push(c),c=d.get(++o);if(g>=m&&g<o){m+=n.length-1;continue}let l=0,_=u(n,l,v),E=1,C=0;for(;E<n.length;){const p=u(n,E,v),R=p-C,T=h-_,N=Math.min(R,T);n[l].copyCellsFrom(n[E],C,_,N,!1),_+=N,_===h&&(l++,_=0),C+=N,C===p&&(E++,C=0),_===0&&l!==0&&n[l-1].getWidth(h-1)===2&&(n[l].copyCellsFrom(n[l-1],h-1,_++,1,!1),n[l-1].setCell(h-1,y))}n[l].replaceCells(_,h,y);let w=0;for(let p=n.length-1;p>0&&(p>l||n[p].getTrimmedLength()===0);p--)w++;w>0&&(D.push(m+n.length-w),D.push(w)),m+=n.length-1}return D},f.reflowLargerCreateNewLayout=function(d,v){const h=[];let g=0,y=v[g],D=0;for(let m=0;m<d.length;m++)if(y===m){const o=v[++g];d.onDeleteEmitter.fire({index:m-D,amount:o}),m+=o-1,D+=o,y=v[++g]}else h.push(m);return{layout:h,countRemoved:D}},f.reflowLargerApplyNewLayout=function(d,v){const h=[];for(let g=0;g<v.length;g++)h.push(d.get(v[g]));for(let g=0;g<h.length;g++)d.set(g,h[g]);d.length=v.length},f.reflowSmallerGetNewLineLengths=function(d,v,h){const g=[],y=d.map(((c,n)=>u(d,n,v))).reduce(((c,n)=>c+n));let D=0,m=0,o=0;for(;o<y;){if(y-o<h){g.push(y-o);break}D+=h;const c=u(d,m,v);D>c&&(D-=c,m++);const n=d[m].getWidth(D-1)===2;n&&D--;const l=n?h-1:h;g.push(l),o+=l}return g},f.getWrappedLineTrimmedLength=u},5295:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferSet=void 0;const d=u(8460),v=u(844),h=u(9092);class g extends v.Disposable{constructor(D,m){super(),this._optionsService=D,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 h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(D){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(D),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(D,m){this._normal.resize(D,m),this._alt.resize(D,m),this.setupTabStops(D)}setupTabStops(D){this._normal.setupTabStops(D),this._alt.setupTabStops(D)}}f.BufferSet=g},511:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CellData=void 0;const d=u(482),v=u(643),h=u(3734);class g extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(D){const m=new g;return m.setFromCharData(D),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(D){this.fg=D[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let m=!1;if(D[v.CHAR_DATA_CHAR_INDEX].length>2)m=!0;else if(D[v.CHAR_DATA_CHAR_INDEX].length===2){const o=D[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=o&&o<=56319){const c=D[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(o-55296)+c-56320+65536|D[v.CHAR_DATA_WIDTH_INDEX]<<22:m=!0}else m=!0}else this.content=D[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|D[v.CHAR_DATA_WIDTH_INDEX]<<22;m&&(this.combinedData=D[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|D[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}f.CellData=g},643:($,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:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Marker=void 0;const d=u(8460),v=u(844);class h{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}f.Marker=h,h._nextId=1},7116:($,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:($,f)=>{var u,d,v;Object.defineProperty(f,"__esModule",{value:!0}),f.C1_ESCAPED=f.C1=f.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
56
|
+
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(u||(f.C0=u={})),(function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""})(d||(f.C1=d={})),(function(h){h.ST=`${u.ESC}\\`})(v||(f.C1_ESCAPED=v={}))},7399:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.evaluateKeyboardEvent=void 0;const d=u(2584),v={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(h,g,y,D){const m={type:0,cancel:!1,key:void 0},o=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?m.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?m.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?m.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(m.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:m.key=h.ctrlKey?"\b":d.C0.DEL,h.altKey&&(m.key=d.C0.ESC+m.key);break;case 9:if(h.shiftKey){m.key=d.C0.ESC+"[Z";break}m.key=d.C0.HT,m.cancel=!0;break;case 13:m.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,m.cancel=!0;break;case 27:m.key=d.C0.ESC,h.altKey&&(m.key=d.C0.ESC+d.C0.ESC),m.cancel=!0;break;case 37:if(h.metaKey)break;o?(m.key=d.C0.ESC+"[1;"+(o+1)+"D",m.key===d.C0.ESC+"[1;3D"&&(m.key=d.C0.ESC+(y?"b":"[1;5D"))):m.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;o?(m.key=d.C0.ESC+"[1;"+(o+1)+"C",m.key===d.C0.ESC+"[1;3C"&&(m.key=d.C0.ESC+(y?"f":"[1;5C"))):m.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;o?(m.key=d.C0.ESC+"[1;"+(o+1)+"A",y||m.key!==d.C0.ESC+"[1;3A"||(m.key=d.C0.ESC+"[1;5A")):m.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;o?(m.key=d.C0.ESC+"[1;"+(o+1)+"B",y||m.key!==d.C0.ESC+"[1;3B"||(m.key=d.C0.ESC+"[1;5B")):m.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.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":g?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:m.key=o?d.C0.ESC+"[1;"+(o+1)+"F":g?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?m.type=2:h.ctrlKey?m.key=d.C0.ESC+"[5;"+(o+1)+"~":m.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?m.type=3:h.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(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(y&&!D||!h.altKey||h.metaKey)!y||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?m.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(m.key=d.C0.US),h.key==="@"&&(m.key=d.C0.NUL)):h.keyCode===65&&(m.type=1);else{const c=v[h.keyCode],n=c==null?void 0:c[h.shiftKey?1:0];if(n)m.key=d.C0.ESC+n;else if(h.keyCode>=65&&h.keyCode<=90){const l=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(l);h.shiftKey&&(_=_.toUpperCase()),m.key=d.C0.ESC+_}else if(h.keyCode===32)m.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let l=h.code.slice(3,4);h.shiftKey||(l=l.toLowerCase()),m.key=d.C0.ESC+l,m.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?m.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?m.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?m.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?m.key=d.C0.DEL:h.keyCode===219?m.key=d.C0.ESC:h.keyCode===220?m.key=d.C0.FS:h.keyCode===221&&(m.key=d.C0.GS)}return m}},482:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Utf8ToUtf32=f.StringToUtf32=f.utf32ToString=f.stringFromCodePoint=void 0,f.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},f.utf32ToString=function(u,d=0,v=u.length){let h="";for(let g=d;g<v;++g){let y=u[g];y>65535?(y-=65536,h+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):h+=String.fromCharCode(y)}return h},f.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,d){const v=u.length;if(!v)return 0;let h=0,g=0;if(this._interim){const y=u.charCodeAt(g++);56320<=y&&y<=57343?d[h++]=1024*(this._interim-55296)+y-56320+65536:(d[h++]=this._interim,d[h++]=y),this._interim=0}for(let y=g;y<v;++y){const D=u.charCodeAt(y);if(55296<=D&&D<=56319){if(++y>=v)return this._interim=D,h;const m=u.charCodeAt(y);56320<=m&&m<=57343?d[h++]=1024*(D-55296)+m-56320+65536:(d[h++]=D,d[h++]=m)}else D!==65279&&(d[h++]=D)}return h}},f.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,d){const v=u.length;if(!v)return 0;let h,g,y,D,m=0,o=0,c=0;if(this.interim[0]){let _=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let C,w=0;for(;(C=63&this.interim[++w])&&w<4;)E<<=6,E|=C;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=p-w;for(;c<R;){if(c>=v)return 0;if(C=u[c++],(192&C)!=128){c--,_=!0;break}this.interim[w++]=C,E<<=6,E|=63&C}_||(p===2?E<128?c--:d[m++]=E:p===3?E<2048||E>=55296&&E<=57343||E===65279||(d[m++]=E):E<65536||E>1114111||(d[m++]=E)),this.interim.fill(0)}const n=v-4;let l=c;for(;l<v;){for(;!(!(l<n)||128&(h=u[l])||128&(g=u[l+1])||128&(y=u[l+2])||128&(D=u[l+3]));)d[m++]=h,d[m++]=g,d[m++]=y,d[m++]=D,l+=4;if(h=u[l++],h<128)d[m++]=h;else if((224&h)==192){if(l>=v)return this.interim[0]=h,m;if(g=u[l++],(192&g)!=128){l--;continue}if(o=(31&h)<<6|63&g,o<128){l--;continue}d[m++]=o}else if((240&h)==224){if(l>=v)return this.interim[0]=h,m;if(g=u[l++],(192&g)!=128){l--;continue}if(l>=v)return this.interim[0]=h,this.interim[1]=g,m;if(y=u[l++],(192&y)!=128){l--;continue}if(o=(15&h)<<12|(63&g)<<6|63&y,o<2048||o>=55296&&o<=57343||o===65279)continue;d[m++]=o}else if((248&h)==240){if(l>=v)return this.interim[0]=h,m;if(g=u[l++],(192&g)!=128){l--;continue}if(l>=v)return this.interim[0]=h,this.interim[1]=g,m;if(y=u[l++],(192&y)!=128){l--;continue}if(l>=v)return this.interim[0]=h,this.interim[1]=g,this.interim[2]=y,m;if(D=u[l++],(192&D)!=128){l--;continue}if(o=(7&h)<<18|(63&g)<<12|(63&y)<<6|63&D,o<65536||o>1114111)continue;d[m++]=o}}return m}}},225:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeV6=void 0;const d=u(1480),v=[[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]],h=[[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 g;f.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let y=0;y<v.length;++y)g.fill(0,v[y][0],v[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?g[y]:(function(D,m){let o,c=0,n=m.length-1;if(D<m[0][0]||D>m[n][1])return!1;for(;n>=c;)if(o=c+n>>1,D>m[o][1])c=o+1;else{if(!(D<m[o][0]))return!0;n=o-1}return!1})(y,h)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,D){let m=this.wcwidth(y),o=m===0&&D!==0;if(o){const c=d.UnicodeService.extractWidth(D);c===0?o=!1:c>m&&(m=c)}return d.UnicodeService.createPropertyValue(0,m,o)}}},5981:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.WriteBuffer=void 0;const d=u(8460),v=u(844);class h extends v.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,D){if(D!==void 0&&this._syncCalls>D)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let m;for(this._isSyncWriting=!0;m=this._writeBuffer.shift();){this._action(m);const o=this._callbacks.shift();o&&o()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,D){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(D),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(D)}_innerWrite(y=0,D=!0){const m=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const o=this._writeBuffer[this._bufferOffset],c=this._action(o,D);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 n=this._callbacks[this._bufferOffset];if(n&&n(),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=h},5941:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.toRgbString=f.parseColor=void 0;const u=/^([\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 v(h,g){const y=h.toString(16),D=y.length<2?"0"+y:y;switch(g){case 4:return y[0];case 8:return D;case 12:return(D+D).slice(0,3);default:return D+D}}f.parseColor=function(h){if(!h)return;let g=h.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const y=u.exec(g);if(y){const D=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/D*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/D*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/D*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),d.exec(g)&&[3,6,9,12].includes(g.length))){const y=g.length/3,D=[0,0,0];for(let m=0;m<3;++m){const o=parseInt(g.slice(y*m,y*m+y),16);D[m]=y===1?o<<4:y===2?o:y===3?o>>4:o>>8}return D}},f.toRgbString=function(h,g=16){const[y,D,m]=h;return`rgb:${v(y,g)}/${v(D,g)}/${v(m,g)}`}},5770:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.PAYLOAD_LIMIT=void 0,f.PAYLOAD_LIMIT=1e7},6351:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DcsHandler=f.DcsParser=void 0;const d=u(482),v=u(8742),h=u(5770),g=[];f.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(D,m){this._handlers[D]===void 0&&(this._handlers[D]=[]);const o=this._handlers[D];return o.push(m),{dispose:()=>{const c=o.indexOf(m);c!==-1&&o.splice(c,1)}}}clearHandler(D){this._handlers[D]&&delete this._handlers[D]}setHandlerFallback(D){this._handlerFb=D}reset(){if(this._active.length)for(let D=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;D>=0;--D)this._active[D].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(D,m){if(this.reset(),this._ident=D,this._active=this._handlers[D]||g,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(D,m,o){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(D,m,o);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(D,m,o))}unhook(D,m=!0){if(this._active.length){let o=!1,c=this._active.length-1,n=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,o=m,n=this._stack.fallThrough,this._stack.paused=!1),!n&&o===!1){for(;c>=0&&(o=this._active[c].unhook(D),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",D);this._active=g,this._ident=0}};const y=new v.Params;y.addParam(0),f.DcsHandler=class{constructor(D){this._handler=D,this._data="",this._params=y,this._hitLimit=!1}hook(D){this._params=D.length>1||D.params[0]?D.clone():y,this._data="",this._hitLimit=!1}put(D,m,o){this._hitLimit||(this._data+=(0,d.utf32ToString)(D,m,o),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(D){let m=!1;if(this._hitLimit)m=!1;else if(D&&(m=this._handler(this._data,this._params),m instanceof Promise))return m.then((o=>(this._params=y,this._data="",this._hitLimit=!1,o)));return this._params=y,this._data="",this._hitLimit=!1,m}}},2015:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.EscapeSequenceParser=f.VT500_TRANSITION_TABLE=f.TransitionTable=void 0;const d=u(844),v=u(8742),h=u(6242),g=u(6351);class y{constructor(c){this.table=new Uint8Array(c)}setDefault(c,n){this.table.fill(c<<4|n)}add(c,n,l,_){this.table[n<<8|c]=l<<4|_}addMany(c,n,l,_){for(let E=0;E<c.length;E++)this.table[n<<8|c[E]]=l<<4|_}}f.TransitionTable=y;const D=160;f.VT500_TRANSITION_TABLE=(function(){const o=new y(4095),c=Array.apply(null,Array(256)).map(((w,p)=>p)),n=(w,p)=>c.slice(w,p),l=n(32,127),_=n(0,24);_.push(25),_.push.apply(_,n(28,32));const E=n(0,14);let C;for(C in o.setDefault(1,0),o.addMany(l,0,2,0),E)o.addMany([24,26,153,154],C,3,0),o.addMany(n(128,144),C,3,0),o.addMany(n(144,152),C,3,0),o.add(156,C,0,0),o.add(27,C,11,1),o.add(157,C,4,8),o.addMany([152,158,159],C,0,7),o.add(155,C,11,3),o.add(144,C,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(n(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(n(64,127),3,7,0),o.addMany(n(48,60),3,8,4),o.addMany([60,61,62,63],3,9,4),o.addMany(n(48,60),4,8,4),o.addMany(n(64,127),4,7,0),o.addMany([60,61,62,63],4,0,6),o.addMany(n(32,64),6,0,6),o.add(127,6,0,6),o.addMany(n(64,127),6,0,0),o.addMany(n(32,48),3,9,5),o.addMany(n(32,48),5,9,5),o.addMany(n(48,64),5,0,6),o.addMany(n(64,127),5,7,0),o.addMany(n(32,48),4,9,5),o.addMany(n(32,48),1,9,2),o.addMany(n(32,48),2,9,2),o.addMany(n(48,127),2,10,0),o.addMany(n(48,80),1,10,0),o.addMany(n(81,88),1,10,0),o.addMany([89,90,92],1,10,0),o.addMany(n(96,127),1,10,0),o.add(80,1,11,9),o.addMany(_,9,0,9),o.add(127,9,0,9),o.addMany(n(28,32),9,0,9),o.addMany(n(32,48),9,9,12),o.addMany(n(48,60),9,8,10),o.addMany([60,61,62,63],9,9,10),o.addMany(_,11,0,11),o.addMany(n(32,128),11,0,11),o.addMany(n(28,32),11,0,11),o.addMany(_,10,0,10),o.add(127,10,0,10),o.addMany(n(28,32),10,0,10),o.addMany(n(48,60),10,8,10),o.addMany([60,61,62,63],10,0,11),o.addMany(n(32,48),10,9,12),o.addMany(_,12,0,12),o.add(127,12,0,12),o.addMany(n(28,32),12,0,12),o.addMany(n(32,48),12,9,12),o.addMany(n(48,64),12,0,11),o.addMany(n(64,127),12,12,13),o.addMany(n(64,127),10,12,13),o.addMany(n(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(D,0,2,0),o.add(D,8,5,8),o.add(D,6,0,6),o.add(D,11,0,11),o.add(D,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 v.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(n,l,_)=>{},this._executeHandlerFb=n=>{},this._csiHandlerFb=(n,l)=>{},this._escHandlerFb=n=>{},this._errorHandlerFb=n=>n,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,n=[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 E=0;E<c.intermediates.length;++E){const C=c.intermediates.charCodeAt(E);if(32>C||C>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=C}}if(c.final.length!==1)throw new Error("final must be a single byte");const _=c.final.charCodeAt(0);if(n[0]>_||_>n[1])throw new Error(`final must be in range ${n[0]} .. ${n[1]}`);return l<<=8,l|=_,l}identToString(c){const n=[];for(;c;)n.push(String.fromCharCode(255&c)),c>>=8;return n.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,n){const l=this._identifier(c,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const _=this._escHandlers[l];return _.push(n),{dispose:()=>{const E=_.indexOf(n);E!==-1&&_.splice(E,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,n){this._executeHandlers[c.charCodeAt(0)]=n}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,n){const l=this._identifier(c);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const _=this._csiHandlers[l];return _.push(n),{dispose:()=>{const E=_.indexOf(n);E!==-1&&_.splice(E,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,n){return this._dcsParser.registerHandler(this._identifier(c),n)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,n){return this._oscParser.registerHandler(c,n)}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,n,l,_,E){this._parseStack.state=c,this._parseStack.handlers=n,this._parseStack.handlerPos=l,this._parseStack.transition=_,this._parseStack.chunkPos=E}parse(c,n,l){let _,E=0,C=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=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 p=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&R>-1){for(;R>=0&&(_=p[R](this._params),_!==!0);R--)if(_ instanceof Promise)return this._parseStack.handlerPos=R,_}this._parseStack.handlers=[];break;case 4:if(l===!1&&R>-1){for(;R>=0&&(_=p[R](),_!==!0);R--)if(_ instanceof Promise)return this._parseStack.handlerPos=R,_}this._parseStack.handlers=[];break;case 6:if(E=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(E!==24&&E!==26,l),_)return _;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=c[this._parseStack.chunkPos],_=this._oscParser.end(E!==24&&E!==26,l),_)return _;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,w=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let p=w;p<n;++p){switch(E=c[p],C=this._transitions.table[this.currentState<<8|(E<160?E:D)],C>>4){case 2:for(let H=p+1;;++H){if(H>=n||(E=c[H])<32||E>126&&E<D){this._printHandler(c,p,H),p=H-1;break}if(++H>=n||(E=c[H])<32||E>126&&E<D){this._printHandler(c,p,H),p=H-1;break}if(++H>=n||(E=c[H])<32||E>126&&E<D){this._printHandler(c,p,H),p=H-1;break}if(++H>=n||(E=c[H])<32||E>126&&E<D){this._printHandler(c,p,H),p=H-1;break}}break;case 3:this._executeHandlers[E]?this._executeHandlers[E]():this._executeHandlerFb(E),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:p,code:E,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|E];let T=R?R.length-1:-1;for(;T>=0&&(_=R[T](this._params),_!==!0);T--)if(_ instanceof Promise)return this._preserveStack(3,R,T,C,p),_;T<0&&this._csiHandlerFb(this._collect<<8|E,this._params),this.precedingJoinState=0;break;case 8:do switch(E){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(E-48)}while(++p<n&&(E=c[p])>47&&E<60);p--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const N=this._escHandlers[this._collect<<8|E];let z=N?N.length-1:-1;for(;z>=0&&(_=N[z](),_!==!0);z--)if(_ instanceof Promise)return this._preserveStack(4,N,z,C,p),_;z<0&&this._escHandlerFb(this._collect<<8|E),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|E,this._params);break;case 13:for(let H=p+1;;++H)if(H>=n||(E=c[H])===24||E===26||E===27||E>127&&E<D){this._dcsParser.put(c,p,H),p=H-1;break}break;case 14:if(_=this._dcsParser.unhook(E!==24&&E!==26),_)return this._preserveStack(6,[],0,C,p),_;E===27&&(C|=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 H=p+1;;H++)if(H>=n||(E=c[H])<32||E>127&&E<D){this._oscParser.put(c,p,H),p=H-1;break}break;case 6:if(_=this._oscParser.end(E!==24&&E!==26),_)return this._preserveStack(5,[],0,C,p),_;E===27&&(C|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&C}}}f.EscapeSequenceParser=m},6242:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.OscHandler=f.OscParser=void 0;const d=u(5770),v=u(482),h=[];f.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,y){this._handlers[g]===void 0&&(this._handlers[g]=[]);const D=this._handlers[g];return D.push(y),{dispose:()=>{const m=D.indexOf(y);m!==-1&&D.splice(m,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,y,D){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(g,y,D);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(g,y,D))}start(){this.reset(),this._state=1}put(g,y,D){if(this._state!==3){if(this._state===1)for(;y<D;){const m=g[y++];if(m===59){this._state=2,this._start();break}if(m<48||57<m)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+m-48}this._state===2&&D-y>0&&this._put(g,y,D)}}end(g,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let D=!1,m=this._active.length-1,o=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,D=y,o=this._stack.fallThrough,this._stack.paused=!1),!o&&D===!1){for(;m>=0&&(D=this._active[m].end(g),D!==!0);m--)if(D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,D;m--}for(;m>=0;m--)if(D=this._active[m].end(!1),D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,D}else this._handlerFb(this._id,"END",g);this._active=h,this._id=-1,this._state=0}}},f.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,y,D){this._hitLimit||(this._data+=(0,v.utf32ToString)(g,y,D),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let y=!1;if(this._hitLimit)y=!1;else if(g&&(y=this._handler(this._data),y instanceof Promise))return y.then((D=>(this._data="",this._hitLimit=!1,D)));return this._data="",this._hitLimit=!1,y}}},8742:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Params=void 0;const u=2147483647;class d{static fromArray(h){const g=new d;if(!h.length)return g;for(let y=Array.isArray(h[0])?1:0;y<h.length;++y){const D=h[y];if(Array.isArray(D))for(let m=0;m<D.length;++m)g.addSubParam(D[m]);else g.addParam(D)}return g}constructor(h=32,g=32){if(this.maxLength=h,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new d(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let g=0;g<this.length;++g){h.push(this.params[g]);const y=this._subParamsIdx[g]>>8,D=255&this._subParamsIdx[g];D-y>0&&h.push(Array.prototype.slice.call(this._subParams,y,D))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>u?u:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>u?u:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const g=this._subParamsIdx[h]>>8,y=255&this._subParamsIdx[h];return y-g>0?this._subParams.subarray(g,y):null}getSubParamsAll(){const h={};for(let g=0;g<this.length;++g){const y=this._subParamsIdx[g]>>8,D=255&this._subParamsIdx[g];D-y>0&&(h[g]=this._subParams.slice(y,D))}return h}addDigit(h){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,D=y[g-1];y[g-1]=~D?Math.min(10*D+h,u):h}}f.Params=d},5741:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.AddonManager=void 0,f.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,d){const v={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(v),d.dispose=()=>this._wrappedAddonDispose(v),d.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let d=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===u){d=v;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(d,1)}}},8771:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferApiView=void 0;const d=u(3785),v=u(511);f.BufferApiView=class{constructor(h,g){this._buffer=h,this.type=g}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const g=this._buffer.lines.get(h);if(g)return new d.BufferLineApiView(g)}getNullCell(){return new v.CellData}}},3785:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferLineApiView=void 0;const d=u(511);f.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,h){if(!(v<0||v>=this._line.length))return h?(this._line.loadCell(v,h),h):this._line.loadCell(v,new d.CellData)}translateToString(v,h,g){return this._line.translateToString(v,h,g)}}},8285:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferNamespaceApi=void 0;const d=u(8771),v=u(8460),h=u(844);class g extends h.Disposable{constructor(D){super(),this._core=D,this._onBufferChange=this.register(new v.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=g},7975:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ParserApi=void 0,f.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,d){return this._core.registerCsiHandler(u,(v=>d(v.toArray())))}addCsiHandler(u,d){return this.registerCsiHandler(u,d)}registerDcsHandler(u,d){return this._core.registerDcsHandler(u,((v,h)=>d(v,h.toArray())))}addDcsHandler(u,d){return this.registerDcsHandler(u,d)}registerEscHandler(u,d){return this._core.registerEscHandler(u,d)}addEscHandler(u,d){return this.registerEscHandler(u,d)}registerOscHandler(u,d){return this._core.registerOscHandler(u,d)}addOscHandler(u,d){return this.registerOscHandler(u,d)}}},7090:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeApi=void 0,f.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function($,f,u){var d=this&&this.__decorate||function(o,c,n,l){var _,E=arguments.length,C=E<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,c,n,l);else for(var w=o.length-1;w>=0;w--)(_=o[w])&&(C=(E<3?_(C):E>3?_(c,n,C):_(c,n))||C);return E>3&&C&&Object.defineProperty(c,n,C),C},v=this&&this.__param||function(o,c){return function(n,l){c(n,l,o)}};Object.defineProperty(f,"__esModule",{value:!0}),f.BufferService=f.MINIMUM_ROWS=f.MINIMUM_COLS=void 0;const h=u(8460),g=u(844),y=u(5295),D=u(2585);f.MINIMUM_COLS=2,f.MINIMUM_ROWS=1;let m=f.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(o){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(o.rawOptions.cols||0,f.MINIMUM_COLS),this.rows=Math.max(o.rawOptions.rows||0,f.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(o,this))}resize(o,c){this.cols=o,this.rows=c,this.buffers.resize(o,c),this._onResize.fire({cols:o,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(o,c=!1){const n=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===o.fg&&l.getBg(0)===o.bg||(l=n.getBlankLine(o,c),this._cachedBlankLine=l),l.isWrapped=c;const _=n.ybase+n.scrollTop,E=n.ybase+n.scrollBottom;if(n.scrollTop===0){const C=n.lines.isFull;E===n.lines.length-1?C?n.lines.recycle().copyFrom(l):n.lines.push(l.clone()):n.lines.splice(E+1,0,l.clone()),C?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{const C=E-_+1;n.lines.shiftElements(_+1,C-1,-1),n.lines.set(E,l.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(o,c,n){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([v(0,D.IOptionsService)],m)},7994:($,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(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,d){this._charsets[u]=d,this.glevel===u&&(this.charset=d)}}},1753:function($,f,u){var d=this&&this.__decorate||function(l,_,E,C){var w,p=arguments.length,R=p<3?_:C===null?C=Object.getOwnPropertyDescriptor(_,E):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(l,_,E,C);else for(var T=l.length-1;T>=0;T--)(w=l[T])&&(R=(p<3?w(R):p>3?w(_,E,R):w(_,E))||R);return p>3&&R&&Object.defineProperty(_,E,R),R},v=this&&this.__param||function(l,_){return function(E,C){_(E,C,l)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CoreMouseService=void 0;const h=u(2585),g=u(8460),y=u(844),D={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 E=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(E|=64,E|=l.action):(E|=3&l.button,4&l.button&&(E|=64),8&l.button&&(E|=128),l.action===32?E|=32:l.action!==0||_||(E|=3)),E}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 n=f.CoreMouseService=class extends y.Disposable{constructor(l,_){super(),this._bufferService=l,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(D))this.addProtocol(E,D[E]);for(const E of Object.keys(c))this.addEncoding(E,c[E]);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,_,E){if(E){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=n=d([v(0,h.IBufferService),v(1,h.ICoreService)],n)},6975:function($,f,u){var d=this&&this.__decorate||function(n,l,_,E){var C,w=arguments.length,p=w<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(n,l,_,E);else for(var R=n.length-1;R>=0;R--)(C=n[R])&&(p=(w<3?C(p):w>3?C(l,_,p):C(l,_))||p);return w>3&&p&&Object.defineProperty(l,_,p),p},v=this&&this.__param||function(n,l){return function(_,E){l(_,E,n)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CoreService=void 0;const h=u(1439),g=u(8460),y=u(844),D=u(2585),m=Object.freeze({insertMode:!1}),o=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=f.CoreService=class extends y.Disposable{constructor(n,l,_){super(),this._bufferService=n,this._logService=l,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(m),this.decPrivateModes=(0,h.clone)(o)}reset(){this.modes=(0,h.clone)(m),this.decPrivateModes=(0,h.clone)(o)}triggerDataEvent(n,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 "${n}"`,(()=>n.split("").map((E=>E.charCodeAt(0))))),this._onData.fire(n)}triggerBinaryEvent(n){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${n}"`,(()=>n.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(n))}};f.CoreService=c=d([v(0,D.IBufferService),v(1,D.ILogService),v(2,D.IOptionsService)],c)},9074:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DecorationService=void 0;const d=u(8055),v=u(8460),h=u(844),g=u(6106);let y=0,D=0;class m extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((n=>n==null?void 0:n.marker.line)),this._onDecorationRegistered=this.register(new v.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new v.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(n){if(n.marker.isDisposed)return;const l=new o(n);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 n of this._decorations.values())n.dispose();this._decorations.clear()}*getDecorationsAtCell(n,l,_){let E=0,C=0;for(const w of this._decorations.getKeyIterator(l))E=w.options.x??0,C=E+(w.options.width??1),n>=E&&n<C&&(!_||(w.options.layer??"bottom")===_)&&(yield w)}forEachDecorationAtCell(n,l,_,E){this._decorations.forEachByKey(l,(C=>{y=C.options.x??0,D=y+(C.options.width??1),n>=y&&n<D&&(!_||(C.options.layer??"bottom")===_)&&E(C)}))}}f.DecorationService=m;class o extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(n){super(),this.options=n,this.onRenderEmitter=this.register(new v.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new v.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=n.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.InstantiationService=f.ServiceCollection=void 0;const d=u(2585),v=u(8343);class h{constructor(...y){this._entries=new Map;for(const[D,m]of y)this.set(D,m)}set(y,D){const m=this._entries.get(y);return this._entries.set(y,D),m}forEach(y){for(const[D,m]of this._entries.entries())y(D,m)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}f.ServiceCollection=h,f.InstantiationService=class{constructor(){this._services=new h,this._services.set(d.IInstantiationService,this)}setService(g,y){this._services.set(g,y)}getService(g){return this._services.get(g)}createInstance(g,...y){const D=(0,v.getServiceDependencies)(g).sort(((c,n)=>c.index-n.index)),m=[];for(const c of D){const n=this._services.get(c.id);if(!n)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${c.id}.`);m.push(n)}const o=D.length>0?D[0].index:y.length;if(y.length!==o)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${o+1} conflicts with ${y.length} static arguments`);return new g(...y,...m)}}},7866:function($,f,u){var d=this&&this.__decorate||function(o,c,n,l){var _,E=arguments.length,C=E<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,c,n,l);else for(var w=o.length-1;w>=0;w--)(_=o[w])&&(C=(E<3?_(C):E>3?_(c,n,C):_(c,n))||C);return E>3&&C&&Object.defineProperty(c,n,C),C},v=this&&this.__param||function(o,c){return function(n,l){c(n,l,o)}};Object.defineProperty(f,"__esModule",{value:!0}),f.traceCall=f.setTraceLogger=f.LogService=void 0;const h=u(844),g=u(2585),y={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let D,m=f.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(o){super(),this._optionsService=o,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),D=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(o){for(let c=0;c<o.length;c++)typeof o[c]=="function"&&(o[c]=o[c]())}_log(o,c,n){this._evalLazyOptionalParams(n),o.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...n)}trace(o,...c){var n;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.trace.bind(this._optionsService.options.logger))??console.log,o,c)}debug(o,...c){var n;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.debug.bind(this._optionsService.options.logger))??console.log,o,c)}info(o,...c){var n;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.info.bind(this._optionsService.options.logger))??console.info,o,c)}warn(o,...c){var n;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.warn.bind(this._optionsService.options.logger))??console.warn,o,c)}error(o,...c){var n;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.error.bind(this._optionsService.options.logger))??console.error,o,c)}};f.LogService=m=d([v(0,g.IOptionsService)],m),f.setTraceLogger=function(o){D=o},f.traceCall=function(o,c,n){if(typeof n.value!="function")throw new Error("not supported");const l=n.value;n.value=function(..._){if(D.logLevel!==g.LogLevelEnum.TRACE)return l.apply(this,_);D.trace(`GlyphRenderer#${l.name}(${_.map((C=>JSON.stringify(C))).join(", ")})`);const E=l.apply(this,_);return D.trace(`GlyphRenderer#${l.name} return`,E),E}}},7302:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.OptionsService=f.DEFAULT_OPTIONS=void 0;const d=u(8460),v=u(844),h=u(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:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends v.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 n=m[c];o[c]=this._sanitizeAndValidateOption(c,n)}catch(n){console.error(n)}this.rawOptions=o,this.options={...o},this._setupOptions(),this.register((0,v.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,n)=>{if(!(c in f.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);n=this._sanitizeAndValidateOption(c,n),this.rawOptions[c]!==n&&(this.rawOptions[c]=n,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const n={get:m.bind(this,c),set:o.bind(this,c)};Object.defineProperty(this.options,c,n)}}_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=g.includes(o)?o:f.DEFAULT_OPTIONS[m];break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(`${m} cannot be less than 1, value: ${o}`);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(`${m} cannot be less than 0, value: ${o}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(`${m} cannot be less than or equal to 0, value: ${o}`);break;case"rows":case"cols":if(!o&&o!==0)throw new Error(`${m} must be numeric, value: ${o}`);break;case"windowsPty":o=o??{}}return o}}f.OptionsService=y},2660:function($,f,u){var d=this&&this.__decorate||function(y,D,m,o){var c,n=arguments.length,l=n<3?D:o===null?o=Object.getOwnPropertyDescriptor(D,m):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(y,D,m,o);else for(var _=y.length-1;_>=0;_--)(c=y[_])&&(l=(n<3?c(l):n>3?c(D,m,l):c(D,m))||l);return n>3&&l&&Object.defineProperty(D,m,l),l},v=this&&this.__param||function(y,D){return function(m,o){D(m,o,y)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OscLinkService=void 0;const h=u(2585);let g=f.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const D=this._bufferService.buffer;if(y.id===void 0){const _=D.addMarker(D.ybase+D.y),E={data:y,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(E,_))),this._dataByLinkId.set(E.id,E),E.id}const m=y,o=this._getEntryIdKey(m),c=this._entriesWithId.get(o);if(c)return this.addLineToLink(c.id,D.ybase+D.y),c.id;const n=D.addMarker(D.ybase+D.y),l={id:this._nextId++,key:this._getEntryIdKey(m),data:m,lines:[n]};return n.onDispose((()=>this._removeMarkerFromLink(l,n))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(y,D){const m=this._dataByLinkId.get(y);if(m&&m.lines.every((o=>o.line!==D))){const o=this._bufferService.buffer.addMarker(D);m.lines.push(o),o.onDispose((()=>this._removeMarkerFromLink(m,o)))}}getLinkData(y){var D;return(D=this._dataByLinkId.get(y))==null?void 0:D.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,D){const m=y.lines.indexOf(D);m!==-1&&(y.lines.splice(m,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};f.OscLinkService=g=d([v(0,h.IBufferService)],g)},8343:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.createDecorator=f.getServiceDependencies=f.serviceRegistry=void 0;const u="di$target",d="di$dependencies";f.serviceRegistry=new Map,f.getServiceDependencies=function(v){return v[d]||[]},f.createDecorator=function(v){if(f.serviceRegistry.has(v))return f.serviceRegistry.get(v);const h=function(g,y,D){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(m,o,c){o[u]===o?o[d].push({id:m,index:c}):(o[d]=[{id:m,index:c}],o[u]=o)})(h,g,D)};return h.toString=()=>v,f.serviceRegistry.set(v,h),h}},2585:($,f,u)=>{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=u(8343);var v;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(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(v||(f.LogLevelEnum=v={})),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:($,f,u)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeService=void 0;const d=u(8460),v=u(225);class h{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,D,m=!1){return(16777215&y)<<3|(3&D)<<1|(m?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const y=new v.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let D=0,m=0;const o=y.length;for(let c=0;c<o;++c){let n=y.charCodeAt(c);if(55296<=n&&n<=56319){if(++c>=o)return D+this.wcwidth(n);const E=y.charCodeAt(c);56320<=E&&E<=57343?n=1024*(n-55296)+E-56320+65536:D+=this.wcwidth(E)}const l=this.charProperties(n,m);let _=h.extractWidth(l);h.extractShouldJoin(l)&&(_-=h.extractWidth(m)),D+=_,m=l}return D}charProperties(y,D){return this._activeProvider.charProperties(y,D)}}f.UnicodeService=h}},O={};function le($){var f=O[$];if(f!==void 0)return f.exports;var u=O[$]={exports:{}};return Q[$].call(u.exports,u,u.exports,le),u.exports}var ne={};return(()=>{var $=ne;Object.defineProperty($,"__esModule",{value:!0}),$.Terminal=void 0;const f=le(9042),u=le(3236),d=le(844),v=le(5741),h=le(8285),g=le(7975),y=le(7090),D=["cols","rows"];class m extends d.Disposable{constructor(c){super(),this._core=this.register(new u.Terminal(c)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const n=_=>this._core.options[_],l=(_,E)=>{this._checkReadonlyOptions(_),this._core.options[_]=E};for(const _ in this._core.options){const E={get:n.bind(this,_),set:l.bind(this,_)};Object.defineProperty(this._publicOptions,_,E)}}_checkReadonlyOptions(c){if(D.includes(c))throw new Error(`Option "${c}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let n="none";switch(this._core.coreMouseService.activeProtocol){case"X10":n="x10";break;case"VT200":n="vt200";break;case"DRAG":n="drag";break;case"ANY":n="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:n,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const n in c)this._publicOptions[n]=c[n]}blur(){this._core.blur()}focus(){this._core.focus()}input(c,n=!0){this._core.input(c,n)}resize(c,n){this._verifyIntegers(c,n),this._core.resize(c,n)}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,n,l){this._verifyIntegers(c,n,l),this._core.select(c,n,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,n){this._verifyIntegers(c,n),this._core.selectLines(c,n)}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,n){this._core.write(c,n)}writeln(c,n){this._core.write(c),this._core.write(`\r
|
|
57
|
+
`,n)}paste(c){this._core.paste(c)}refresh(c,n){this._verifyIntegers(c,n),this._core.refresh(c,n)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return f}_verifyIntegers(...c){for(const n of c)if(n===1/0||isNaN(n)||n%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const n of c)if(n&&(n===1/0||isNaN(n)||n%1!=0||n<0))throw new Error("This API only accepts positive integers")}}$.Terminal=m})(),ne})()))})(Ao)),Ao.exports}var Ev=Cv(),Ro={exports:{}},qf;function wv(){return qf||(qf=1,(function(j,te){(function(Q,O){j.exports=O()})(self,(()=>(()=>{var Q={};return(()=>{var O=Q;Object.defineProperty(O,"__esModule",{value:!0}),O.FitAddon=void 0,O.FitAddon=class{activate(le){this._terminal=le}dispose(){}fit(){const le=this.proposeDimensions();if(!le||!this._terminal||isNaN(le.cols)||isNaN(le.rows))return;const ne=this._terminal._core;this._terminal.rows===le.rows&&this._terminal.cols===le.cols||(ne._renderService.clear(),this._terminal.resize(le.cols,le.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const le=this._terminal._core,ne=le._renderService.dimensions;if(ne.css.cell.width===0||ne.css.cell.height===0)return;const $=this._terminal.options.scrollback===0?0:le.viewport.scrollBarWidth,f=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(f.getPropertyValue("height")),d=Math.max(0,parseInt(f.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),h=u-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),g=d-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-$;return{cols:Math.max(2,Math.floor(g/ne.css.cell.width)),rows:Math.max(1,Math.floor(h/ne.css.cell.height))}}}})(),Q})()))})(Ro)),Ro.exports}var xv=wv();const If=20,Gf=5,To=new TextEncoder,Dv=new TextDecoder,Yf=j=>{try{const te=atob(j),Q=new Uint8Array(te.length);for(let O=0;O<te.length;O++)Q[O]=te.charCodeAt(O);return Q}catch{return new Uint8Array(0)}},Ff=j=>{const te=To.encode(j);let Q="";for(let O=0;O<te.length;O++)Q+=String.fromCharCode(te[O]);return btoa(Q)};function Av(j){return j.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g,"").replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[()][A-Za-z0-9]/g,"")}function Rv(j){const Q=Av(j).replace(/\r/g,`
|
|
58
|
+
`).split(`
|
|
59
|
+
`).map(ne=>ne.trim()).filter(Boolean).slice(-24),O=Q.join(`
|
|
60
|
+
`);return[/Enter to select\b/i,/(?:↑|up)\/(?:↓|down)|arrow keys|navigate/i,/\bEsc to cancel\b/i,/\b(?:y\/n|Y\/n|y\/N|\[y\/N\]|\[Y\/n\])\b/,/\b(?:choose|select|pick) (?:one|an option|a number)\b/i,/\?$/].some(ne=>ne.test(O))?Q.slice(-10).join(`
|
|
61
|
+
`).slice(0,900):""}function Tv(){const j=ue.useRef(null),te=ue.useRef(0),Q=ue.useRef(null),O=ue.useRef(null),le=ue.useRef(null),ne=ue.useRef(null),$=ue.useRef(""),[f,u]=ue.useState({attached:!1,role:null,url:null}),[d,v]=ue.useState({needed:!1,prompt:"",since:null,source:"pty"}),h=()=>{var C;try{(C=O.current)==null||C.fit()}catch{}},g=C=>{const w=Dv.decode(C,{stream:!0});if(!w)return;$.current=($.current+w).slice(-6e3);const p=Rv($.current);p&&v(R=>R.needed&&R.prompt===p?R:{needed:!0,prompt:p,since:new Date().toISOString(),source:"pty"})},y=C=>{var w;g(C);try{(w=Q.current)==null||w.write(C)}catch{}},D=(C,w)=>{var p;try{(p=j.current)==null||p.send(JSON.stringify(w===void 0?{op:C}:{op:C,payload:w}))}catch{}},m=()=>v({needed:!1,prompt:"",since:null,source:"pty"}),o=ue.useCallback(C=>{if(C){if(!Q.current){const w=new Ev.Terminal({convertEol:!1,scrollback:2e3,cursorBlink:!1,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:13,theme:{background:"#0a0c10",foreground:"#cdd3de"}}),p=new xv.FitAddon;w.loadAddon(p),Q.current=w,O.current=p,w.onData(R=>{ne.current==="controller"&&(m(),D("pty.session_input",{data:Ff(R)}))}),w.onResize(({cols:R,rows:T})=>{R<If||T<Gf||D("pty.session_resize",{cols:R,rows:T})})}try{C.querySelector(".xterm")||Q.current.open(C)}catch{}!le.current&&typeof ResizeObserver<"u"&&(le.current=new ResizeObserver(()=>h()),le.current.observe(C)),h(),requestAnimationFrame(()=>h())}},[]);ue.useEffect(()=>{const C=()=>h();return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]),ue.useEffect(()=>()=>{var C,w,p;try{(C=le.current)==null||C.disconnect()}catch{}try{(w=Q.current)==null||w.dispose()}catch{}(p=j.current)==null||p.close()},[]);const c=ue.useCallback((C,w=!1,p="observer")=>{var T,N;if((T=j.current)==null||T.close(),w||(te.current=0),ne.current=null,m(),$.current="",u({attached:!1,role:null,url:C}),!w)try{(N=Q.current)==null||N.reset()}catch{}const R=new WebSocket(w?`${C}?replay_from=${te.current}`:C);j.current=R,R.addEventListener("open",()=>u(z=>({...z,attached:!0,url:C}))),R.addEventListener("close",()=>{ne.current=null,u(z=>({...z,attached:!1,role:null}))}),R.addEventListener("error",()=>y(To.encode(`\r
|
|
62
|
+
[connection error]\r
|
|
63
|
+
`))),R.addEventListener("message",z=>{var P,ee,q,I;let H;try{H=JSON.parse(z.data)}catch{return}switch(H.op){case"binding_hello":{D("pty.join_session",{role:p});const X=Q.current;X&&X.cols>=If&&X.rows>=Gf&&D("pty.session_resize",{cols:X.cols,rows:X.rows});break}case"role_assigned":ne.current=((P=H.payload)==null?void 0:P.role)??null,u(X=>{var x;return{...X,role:((x=H.payload)==null?void 0:x.role)??null}}),requestAnimationFrame(()=>h());break;case"output":H.seq&&(te.current=Math.max(te.current,H.seq)),y(Yf(((ee=H.payload)==null?void 0:ee.data)??""));break;case"keyframe":for(const X of((q=H.payload)==null?void 0:q.frames)??[])X.seq&&(te.current=Math.max(te.current,X.seq)),y(Yf(X.payload.data));break;case"error":y(To.encode(`\r
|
|
64
|
+
[${((I=H.payload)==null?void 0:I.code)??"error"}]\r
|
|
65
|
+
`));break}})},[]),n=ue.useCallback(()=>{var C;(C=j.current)==null||C.close(),j.current=null},[]),l=ue.useCallback((C,w)=>{const p=w??ne.current??"observer";n(),setTimeout(()=>c(C,!0,p),50)},[c,n]),_=ue.useCallback(()=>D("pty.request_keyframe"),[]),E=ue.useCallback(C=>!j.current||ne.current!=="controller"||!C?!1:(m(),D("pty.session_input",{data:Ff(C+`\r
|
|
66
|
+
`)}),!0),[]);return{state:f,responseNeeded:d,attach:c,detach:n,replay:l,requestKeyframe:_,sendInput:E,openTerminal:o,isController:f.role==="controller"}}const kv=typeof window<"u"&&window.__COCKPIT_TOKEN__||"";function Lv(j,te={}){return fetch(j,{...te,headers:{...te.headers||{},authorization:`Bearer ${kv}`}})}async function Te(j,te={}){const Q=await Lv(j,te);if(!Q.ok)throw new Error(`${j} → ${Q.status}`);return Q.status===204?{}:Q.json()}const qe=j=>j&&j.length>12?j.slice(0,8)+"…":j;function Pf(j,te){return j==="agent"?`@${te}`:j==="command"?`/${te}`:te}const Kf=[[50,10],[72,16],[88,34],[84,58],[68,72],[50,72],[32,72],[16,58],[12,34],[28,16],[50,30]];function Mv({onStartSession:j,onLaunchInstance:te,goTo:Q}){var p,R;const[O,le]=ue.useState(null),[ne]=ue.useState(()=>!localStorage.getItem("cockpit.welcomed")),[$,f]=ue.useState(""),[u,d]=ue.useState("auto"),[v,h]=ue.useState("observe"),[g,y]=ue.useState(()=>Nv());ue.useEffect(()=>{localStorage.setItem("cockpit.welcomed","1")},[]),ue.useEffect(()=>{(async()=>{try{const[T,N]=await Promise.all([Te("/api/inventory"),Te("/api/health")]),[z,H,P]=await Promise.all([Te("/api/running").catch(()=>({running:[]})),Te("/api/approvals?status=pending").catch(()=>({approvals:[]})),Te("/api/cost").catch(()=>null)]);le({instances:T.instances,running:z.running??[],approvals:H.approvals??[],cost:P,executor:N.executor_url,connected:T.instances.length>0,inventoryWarning:Ov(T)})}catch{le({instances:[],running:[],approvals:[],cost:null,executor:"",connected:!1})}})()},[]);const D=(O==null?void 0:O.instances.filter(T=>T.state==="running"))??[],m={host:(O==null?void 0:O.instances.some(T=>T.runtime_posture.kind==="host"))??!1,container:(O==null?void 0:O.instances.some(T=>T.runtime_posture.kind==="container"||T.runtime_posture.kind==="docker"))??!1,vm:(O==null?void 0:O.instances.some(T=>T.runtime_posture.kind==="vm"))??!1},o=async()=>{var T;await((T=navigator.clipboard)==null?void 0:T.writeText("aiwg cockpit"))},c=zv(O),n=((O==null?void 0:O.approvals.length)??0)+(m.host&&m.container&&m.vm?0:1),l=D.find(T=>T.id===$)??D[0]??(O==null?void 0:O.instances[0]),_=l?(p=O==null?void 0:O.cost)==null?void 0:p.per_instance.find(T=>T.instance_id===l.id):void 0,E=((R=O==null?void 0:O.cost)==null?void 0:R.total.usd)??0,C=O!=null&&O.cost?Math.min(100,Math.max(6,E*12)):0,w=[l?l.loadout:"no stack",u==="auto"?"auto runtime":u,v].join(" / ");return S.jsxs("div",{className:"welcome operator-wall",children:[S.jsxs("section",{className:`wall-hero ${O!=null&&O.connected?"wall-hero-compact":""}`,"aria-labelledby":"cockpit-wall-title",children:[S.jsxs("div",{children:[S.jsx("p",{className:"eyebrow",children:"Operator wall"}),S.jsx("h2",{id:"cockpit-wall-title",children:"Work alongside your agents"}),S.jsx("p",{className:"lead",children:"Observe live stacks, take control when a session allows it, and keep approvals, cost, runtime posture, and handoff context visible in one control plane."})]}),S.jsxs("div",{className:"hero-actions","aria-label":"Primary Cockpit actions",children:[S.jsx("button",{className:"cta",onClick:te,children:"+ New instance + session"}),S.jsx("button",{className:"cta",onClick:j,children:"▸ Start a session"}),S.jsx("button",{onClick:()=>Q("running"),children:"View board"}),S.jsx("button",{onClick:o,children:"Copy CLI"}),(O==null?void 0:O.connected)&&S.jsxs("div",{className:"segmented",role:"group","aria-label":"Wall review mode",children:[S.jsx("button",{"aria-pressed":g==="topology",onClick:()=>y("topology"),children:"Topology"}),S.jsx("button",{"aria-pressed":g==="handoff",onClick:()=>y("handoff"),children:"Handoff"})]})]})]}),O?O.connected?S.jsxs(S.Fragment,{children:[S.jsx("section",{className:"radial-wall","aria-labelledby":"operator-wall-map-title",children:S.jsxs("div",{className:`radial-map mode-${g}`,"aria-label":"Operator wall topology",children:[S.jsxs("svg",{className:"radial-links",viewBox:"0 0 100 100","aria-hidden":"true",focusable:"false",children:[S.jsx("circle",{className:"link-ring",cx:"50",cy:"50",r:"37"}),S.jsx("circle",{className:"link-ring link-ring-inner",cx:"50",cy:"50",r:"22"}),c.map(T=>S.jsx("line",{className:`link-line link-${T.state}`,x1:"50",y1:"50",x2:T.x,y2:T.y},T.key)),S.jsx("path",{className:"handoff-arc",d:"M 17 58 C 29 19, 70 13, 87 42"})]}),S.jsxs("button",{className:"central-hub",onClick:j,"aria-label":"Start from Cockpit command hub",children:[S.jsx("span",{className:"hub-core","aria-hidden":"true"}),S.jsx("strong",{children:"Cockpit"}),S.jsxs("span",{children:[D.length," running · ",O.approvals.length," approvals"]})]}),c.map((T,N)=>S.jsxs("button",{className:`orbit-node node-${T.family} node-${T.state}`,style:Hv(T),onClick:()=>Q(T.tab),"aria-label":`${T.label}: ${T.meta}`,children:[S.jsx("span",{className:`node-glyph glyph-${T.family}`,"aria-hidden":"true"}),S.jsxs("span",{className:"node-copy",children:[S.jsx("strong",{children:T.label}),S.jsx("span",{children:T.meta})]}),N===3&&S.jsx("span",{className:"handoff-marker","aria-hidden":"true"})]},T.key)),g==="handoff"&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"handoff-callout handoff-source",children:[S.jsx("span",{children:"Source"}),S.jsx("strong",{children:O.running[0]?qe(O.running[0].instance_id):"ready"})]}),S.jsxs("div",{className:"handoff-callout handoff-destination",children:[S.jsx("span",{children:"Destination"}),S.jsx("strong",{children:D[1]?qe(D[1].id):"next stack"})]})]}),S.jsxs("div",{className:"radial-overlay","aria-labelledby":"operator-wall-map-title",children:[S.jsxs("div",{className:"radial-overlay-head",children:[S.jsxs("div",{children:[S.jsx("p",{className:"eyebrow",children:g==="handoff"?"Mission route":"Live topology"}),S.jsx("h3",{id:"operator-wall-map-title",children:g==="handoff"?"Mission-handoff operator wall":"Eleven-stack operator wall"})]}),S.jsxs("div",{className:"mission-route","aria-label":"Mission handoff state",children:[S.jsx("span",{children:"Mission"}),S.jsx("strong",{children:O.running[0]?qe(O.running[0].task_id):"ready"}),S.jsx("span",{className:n>0?"route-attention":"route-ready",children:n>0?`${n} gate(s)`:"clear"})]})]}),S.jsxs("dl",{className:"wall-readout",children:[S.jsxs("div",{children:[S.jsx("dt",{children:"Coverage"}),S.jsxs("dd",{children:[[m.host,m.container,m.vm].filter(Boolean).length,"/3"]})]}),S.jsxs("div",{children:[S.jsx("dt",{children:"Executor"}),S.jsx("dd",{children:O.executor||"unknown"})]}),S.jsxs("div",{children:[S.jsx("dt",{children:"Control"}),S.jsx("dd",{children:D.some(T=>T.session_backends.some(N=>N.available&&N.drive))?"drive available":"observe first"})]}),S.jsxs("div",{children:[S.jsx("dt",{children:"Quota"}),S.jsx("dd",{children:O.cost?`$${O.cost.total.usd.toFixed(2)}`:"n/a"})]}),S.jsxs("div",{children:[S.jsx("dt",{children:"Gates"}),S.jsx("dd",{children:n>0?`${n} attention`:"clear"})]})]})]})]})}),S.jsx("section",{className:"stack-board","aria-label":"Running stack board",children:D.slice(0,6).map(T=>{var P;const N=O.running.find(ee=>ee.instance_id===T.id),z=(P=O.cost)==null?void 0:P.per_instance.find(ee=>ee.instance_id===T.id),H=T.session_backends.some(ee=>ee.available&&ee.drive);return S.jsxs("article",{className:`stack-card accent-${jv(T.id)}`,children:[S.jsxs("div",{className:"stack-head",children:[S.jsx("span",{className:`topology topology-${Bv(T)}`,"aria-hidden":"true"}),S.jsxs("div",{children:[S.jsx("h3",{children:T.loadout}),S.jsxs("p",{children:[qe(T.id)," · ",T.runtime_posture.label]})]}),S.jsx("span",{className:`badge isolation-${T.runtime_posture.isolation}`,children:T.state})]}),S.jsxs("div",{className:"stack-log",role:"img","aria-label":`Recent activity for ${T.loadout}`,children:[S.jsx("span",{children:N?`task ${qe(N.task_id)} · ${N.state}`:"idle · ready for session attach"}),S.jsxs("span",{children:[T.transport.label," · ",T.transport.mode]}),S.jsx("span",{children:H?"Drive enabled":"Observe only"})]}),S.jsx("div",{className:"segment-progress","aria-label":"Session progress",children:S.jsx("span",{style:{width:N?"68%":"28%"}})}),S.jsxs("div",{className:"transport-bar",children:[S.jsx("button",{onClick:()=>Q("sessions"),children:"Attach"}),S.jsx("button",{onClick:()=>Q("running"),children:"Details"}),S.jsx("span",{children:z?`$${z.usd.toFixed(2)}`:"cost n/a"})]})]},T.id)})}),S.jsxs("section",{className:"telemetry-strip","aria-label":"Fleet telemetry",children:[S.jsxs("button",{onClick:()=>Q("inventory"),children:[S.jsx("strong",{children:O.instances.length}),S.jsxs("span",{children:["instances · ",D.length," running"]})]}),S.jsxs("button",{onClick:()=>Q("running"),children:[S.jsx("strong",{children:O.running.length}),S.jsx("span",{children:"active tasks"})]}),S.jsxs("button",{onClick:()=>Q("approvals"),children:[S.jsx("strong",{children:O.approvals.length}),S.jsx("span",{children:"pending approvals"})]}),S.jsxs("button",{onClick:()=>Q("running"),children:[S.jsx("strong",{children:O.cost?`$${O.cost.total.usd.toFixed(2)}`:"--"}),S.jsx("span",{children:"cost · quota"})]}),S.jsxs("button",{onClick:()=>Q("inventory"),children:[S.jsx("strong",{children:m.host&&m.container&&m.vm?"3/3":`${[m.host,m.container,m.vm].filter(Boolean).length}/3`}),S.jsx("span",{children:"host · docker · vm"})]})]}),S.jsxs("section",{className:"control-planner","aria-label":"Guided start and cost quota",children:[S.jsxs("div",{className:"guided-start","aria-label":"Guided start",children:[S.jsxs("div",{children:[S.jsx("p",{className:"eyebrow",children:"Guided start"}),S.jsx("h3",{children:"Pick stack, runtime, and task posture."}),S.jsxs("p",{className:"hint",children:["Plan: ",w]})]}),S.jsxs("div",{className:"planner-grid",children:[S.jsxs("label",{children:[S.jsx("span",{children:"Stack"}),S.jsx("select",{value:(l==null?void 0:l.id)??"",onChange:T=>f(T.target.value),children:D.map(T=>S.jsxs("option",{value:T.id,children:[T.loadout," · ",T.runtime_posture.kind]},T.id))})]}),S.jsxs("label",{children:[S.jsx("span",{children:"Runtime"}),S.jsxs("select",{value:u,onChange:T=>d(T.target.value),children:[S.jsx("option",{value:"auto",children:"Auto from selected stack"}),S.jsx("option",{value:"host",children:"Host"}),S.jsx("option",{value:"container",children:"Docker/container"}),S.jsx("option",{value:"vm",children:"VM"})]})]}),S.jsxs("label",{children:[S.jsx("span",{children:"Task"}),S.jsxs("select",{value:v,onChange:T=>h(T.target.value),children:[S.jsx("option",{value:"observe",children:"Observe first"}),S.jsx("option",{value:"drive",children:"Drive when granted"}),S.jsx("option",{value:"handoff",children:"Mission handoff"})]})]})]}),S.jsxs("div",{className:"cta-row",children:[S.jsx("button",{className:"cta",onClick:j,children:"▸ Start planned session"}),S.jsx("button",{onClick:()=>Q("explore"),children:"Browse capabilities"}),O.approvals.length>0&&S.jsxs("button",{onClick:()=>Q("approvals"),children:["Review ",O.approvals.length," approval(s)"]})]})]}),S.jsxs("aside",{className:"quota-panel","aria-label":"Cost and quota",children:[S.jsx("p",{className:"eyebrow",children:"Cost & quota"}),S.jsxs("div",{className:"quota-donut",style:{"--quota":`${C}%`},children:[S.jsx("strong",{children:O.cost?`$${E.toFixed(2)}`:"--"}),S.jsx("span",{children:O.cost?`${O.cost.total.input_tokens+O.cost.total.output_tokens} tokens`:"metrics unavailable"})]}),S.jsxs("dl",{className:"quota-readout",children:[S.jsxs("div",{children:[S.jsx("dt",{children:"Selected stack"}),S.jsx("dd",{children:_?`$${_.usd.toFixed(2)}`:"n/a"})]}),S.jsxs("div",{children:[S.jsx("dt",{children:"Headroom"}),S.jsx("dd",{children:O.cost?C>80?"near limit":"clear":"unknown"})]}),S.jsxs("div",{children:[S.jsx("dt",{children:"Approval load"}),S.jsxs("dd",{children:[O.approvals.length," pending"]})]})]})]})]})]}):S.jsxs("div",{className:"card warn-card",children:[S.jsx("h3",{children:"No stack connected"}),O.executor?S.jsxs(S.Fragment,{children:[S.jsxs("p",{children:["Bridge is connected to a real executor at ",S.jsx("code",{children:O.executor}),", but that executor is not reporting any registered instances or agents."]}),O.inventoryWarning&&S.jsxs("p",{className:"warn",children:["Inventory note: ",O.inventoryWarning]}),S.jsxs("div",{className:"cta-row",children:[S.jsx("button",{className:"cta",onClick:te,children:"+ Launch instance"}),S.jsx("button",{onClick:()=>Q("inventory"),children:"Open inventory"})]})]}):S.jsxs(S.Fragment,{children:[S.jsx("p",{children:"Cockpit talks to a real agentic-sandbox executor. Start the executor, then point the Bridge at it:"}),S.jsx("pre",{className:"terminal",children:"AIWG_COCKPIT_EXECUTOR_URL=http://127.0.0.1:<executor-port> node apps/cockpit/bridge/src/server.mjs"})]})]}):S.jsx("p",{className:"empty",children:"Checking your stacks…"}),ne&&S.jsxs("div",{className:"card tour",children:[S.jsx("h3",{children:"Three things to know"}),S.jsxs("ol",{children:[S.jsxs("li",{children:[S.jsx("strong",{children:"Sessions"})," are where work happens — attach to observe, take the wheel to drive. Output mirrors to every viewer."]}),S.jsxs("li",{children:[S.jsx("strong",{children:"Actions"})," and the ",S.jsx("strong",{children:"+ capability picker"})," drop a command into a session; the agent runs it. The Cockpit never runs the CLI."]}),S.jsxs("li",{children:[S.jsx("strong",{children:"Explore"})," browses the read-only AIWG catalog. Your own copied/imported assets live in your library — AIWG files are never overwritten."]})]})]})]})}function Ov(j){const te=j.admin_error;return[j.degraded_admin_inventory,te==null?void 0:te.code,te==null?void 0:te.title,te==null?void 0:te.detail].filter(Boolean).join(" · ")||void 0}function Bv(j){return j.runtime_posture.kind==="host"?"terminal":j.runtime_posture.kind==="vm"||j.runtime_posture.kind==="container"||j.runtime_posture.kind==="docker"?"cube":"window"}function jv(j){let te=0;for(const Q of j)te+=Q.charCodeAt(0);return te%4+1}function Hv(j){return{"--x":`${j.x}%`,"--y":`${j.y}%`}}function Nv(){return new URLSearchParams(window.location.search).get("wall")==="handoff"?"handoff":"topology"}function zv(j){var d;const te=(j==null?void 0:j.instances.filter(v=>v.state==="running"))??[],Q=j==null?void 0:j.instances.find(v=>v.runtime_posture.kind==="host"),O=j==null?void 0:j.instances.find(v=>v.runtime_posture.kind==="container"||v.runtime_posture.kind==="docker"),le=j==null?void 0:j.instances.find(v=>v.runtime_posture.kind==="vm"),ne=(j==null?void 0:j.instances.some(v=>v.session_backends.some(h=>h.available&&h.drive)))??!1,$=(j==null?void 0:j.approvals.length)??0,f=(d=j==null?void 0:j.cost)==null?void 0:d.total.usd;return[{key:"host",label:(Q==null?void 0:Q.loadout)||"Host CLI",meta:Q?`${qe(Q.id)} · ${Q.state}`:"not connected",family:"host",tab:"inventory",state:Q?"running":"blocked"},{key:"vm",label:(le==null?void 0:le.loadout)||"VM sandbox",meta:le?`${qe(le.id)} · ${le.state}`:"not connected",family:"vm",tab:"inventory",state:le?"running":"blocked"},{key:"container",label:(O==null?void 0:O.loadout)||"Docker runtime",meta:O?`${qe(O.id)} · ${O.state}`:"not connected",family:"container",tab:"inventory",state:O?"running":"blocked"},{key:"mission",label:"Mission handoff",meta:j!=null&&j.running[0]?`${qe(j.running[0].task_id)} · ${j.running[0].state}`:"ready",family:"mission",tab:"running",state:j!=null&&j.running.length?"running":"ready"},{key:"approvals",label:"Approvals",meta:$?`${$} pending`:"clear",family:"approval",tab:"approvals",state:$?"attention":"ready"},{key:"cost",label:"Cost & quota",meta:f===void 0?"metrics n/a":`$${f.toFixed(2)}`,family:"cost",tab:"running",state:f===void 0?"idle":"ready"},{key:"capabilities",label:"Capability search",meta:"catalog ready",family:"capability",tab:"explore",state:"ready"},{key:"library",label:"Library",meta:"workspace assets",family:"library",tab:"library",state:"ready"},{key:"actions",label:"Actions",meta:ne?"drive available":"observe first",family:"action",tab:"actions",state:ne?"ready":"idle"},{key:"sessions",label:"Sessions",meta:te.length?`${te.length} attachable`:"none active",family:"session",tab:"sessions",state:te.length?"running":"idle"},{key:"inventory",label:"Inventory",meta:`${(j==null?void 0:j.instances.length)??0} registered`,family:"inventory",tab:"inventory",state:j!=null&&j.instances.length?"ready":"idle"}].map((v,h)=>({...v,x:Kf[h][0],y:Kf[h][1]}))}function Uv({onStartSession:j,onLaunchInstance:te}){const[Q,O]=ue.useState(null),[le,ne]=ue.useState(""),[$,f]=ue.useState(""),u=ue.useCallback(()=>{Te("/api/inventory").then(v=>{O(v),ne("")}).catch(v=>ne(v.message))},[]);ue.useEffect(()=>{u()},[u]);const d=(v,h)=>Te(v,{method:h}).then(()=>{f(""),u()}).catch(g=>f(g.message));return le?S.jsxs("p",{className:"err",children:["Could not load inventory: ",le]}):Q?Q.instances.length?S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"section-toolbar",children:[S.jsxs("div",{children:[S.jsx("h2",{children:"Agent instances"}),S.jsxs("p",{className:"hint",children:[Q.count," target(s) · ",new Date(Q.fetched_at).toLocaleTimeString()]})]}),te&&S.jsx("button",{className:"cta",onClick:te,children:"+ New instance + session"})]}),$&&S.jsxs("p",{className:"err",children:["Action failed: ",$]}),S.jsxs("table",{children:[S.jsx("caption",{children:"Available instance deployments"}),S.jsx("thead",{children:S.jsxs("tr",{children:[S.jsx("th",{scope:"col",children:"Instance"}),S.jsx("th",{scope:"col",children:"Runtime"}),S.jsx("th",{scope:"col",children:"Loadout"}),S.jsx("th",{scope:"col",children:"Transport"}),S.jsx("th",{scope:"col",children:"Host daemon"}),S.jsx("th",{scope:"col",children:"State"}),S.jsx("th",{scope:"col",children:"Tenant"}),S.jsx("th",{scope:"col",children:"Manage"})]})}),S.jsx("tbody",{children:Q.instances.map(v=>S.jsx("tr",{children:(()=>{var y,D,m,o,c,n,l;const h=(y=v.session_backends)==null?void 0:y.some(_=>_.available),g=(m=(D=v.session_backends)==null?void 0:D.find(_=>!_.available))==null?void 0:m.reason;return S.jsxs(S.Fragment,{children:[S.jsxs("td",{children:[S.jsx("code",{title:v.id,children:((o=v.launch_context)==null?void 0:o.name)??qe(v.id)}),((c=v.launch_context)==null?void 0:c.name)&&S.jsx("div",{className:"cell-note",children:qe(v.id)})]}),S.jsxs("td",{children:[S.jsx("span",{className:`badge isolation-${v.runtime_posture.isolation}`,title:v.runtime_posture.warning||v.runtime_posture.label,children:v.runtime_posture.label}),v.runtime_posture.warning&&S.jsx("div",{className:"cell-note",children:v.runtime_posture.warning})]}),S.jsxs("td",{children:[v.loadout,((n=v.launch_context)==null?void 0:n.image_ref)&&S.jsx("div",{className:"cell-note",children:v.launch_context.image_ref}),((l=v.launch_context)==null?void 0:l.source)&&S.jsx("div",{className:"cell-note",children:v.launch_context.source})]}),S.jsxs("td",{children:[S.jsx("span",{className:`badge trust-${v.transport.trust}`,title:`${v.transport.source}${v.transport.evidence?`: ${v.transport.evidence}`:""}`,children:v.transport.label}),S.jsxs("div",{className:"cell-note",children:[v.transport.mode,v.transport.stale?" · stale":""]})]}),S.jsxs("td",{children:[S.jsx("span",{className:`badge daemon-${v.host_daemon.status}`,children:v.host_daemon.status.replace("_"," ")}),v.host_daemon.detail&&S.jsx("div",{className:"cell-note",children:v.host_daemon.detail}),v.host_daemon.operator_command&&S.jsx("code",{title:"Operator start command",children:v.host_daemon.operator_command})]}),S.jsx("td",{children:S.jsxs("span",{className:`state ${v.state}`,children:[S.jsx("span",{className:"dot","aria-hidden":"true"}),v.state]})}),S.jsx("td",{children:v.tenant}),S.jsxs("td",{className:"manage-actions",children:[v.state==="running"&&j&&S.jsx("button",{className:"cta","aria-label":`Start session on ${qe(v.id)}`,disabled:!h,title:h?void 0:g,onClick:()=>j(v.id),children:"New Session"})," ",v.state==="running"?S.jsx("button",{"aria-label":`Stop instance ${qe(v.id)}`,onClick:()=>d(`/api/instances/${encodeURIComponent(v.id)}/stop`,"POST"),children:"Stop Instance"}):S.jsx("button",{"aria-label":`Start instance ${qe(v.id)}`,onClick:()=>d(`/api/instances/${encodeURIComponent(v.id)}/start`,"POST"),children:"Start Instance"})," ",S.jsx("button",{"aria-label":`Destroy instance ${qe(v.id)}`,disabled:v.state!=="running"&&v.runtime==="docker",title:v.state!=="running"&&v.runtime==="docker"?"Sandbox reports this stopped Docker row but admin-v2 no longer has a destroyable instance record.":void 0,onClick:()=>{confirm(`Destroy ${qe(v.id)}? This cannot be undone.`)&&d(`/api/instances/${encodeURIComponent(v.id)}`,"DELETE")},children:"Destroy"})]})]})})()},v.id))})]})]}):S.jsxs("section",{className:"empty-state",children:[S.jsx("h2",{children:"No instances"}),S.jsx("p",{className:"hint",children:"Bridge is connected, but no host, Docker, or VM targets are registered."}),te&&S.jsx("button",{className:"cta",onClick:te,children:"+ New instance + session"})]}):S.jsx("p",{className:"empty",children:"Loading…"})}function qv(){const[j,te]=ue.useState(null),[Q,O]=ue.useState(null),[le,ne]=ue.useState(""),$=ue.useCallback(()=>{Te("/api/running").then(u=>{te(u),ne("")}).catch(u=>ne(u.message)),Te("/api/cost").then(O).catch(()=>O(null))},[]);ue.useEffect(()=>{$()},[$]);const f=u=>Te(`/api/tasks/${encodeURIComponent(u.instance_id)}/${encodeURIComponent(u.task_id)}/cancel`,{method:"POST"}).then($).catch(d=>alert(d.message));return le?S.jsxs("p",{className:"err",children:["Could not load running: ",le]}):j?S.jsxs(S.Fragment,{children:[S.jsxs("p",{className:"hint",children:[S.jsx("strong",{children:"Fleet overview."})," Every task running across all stacks — a read-only board. To attach to one and observe or drive it, open it in ",S.jsx("strong",{children:"Sessions"})," (the attached workspace)."]}),Q&&S.jsxs("p",{className:"hint",children:["Spend across stacks: ",S.jsxs("strong",{children:["$",Q.total.usd.toFixed(2)]})," · ",(Q.total.input_tokens+Q.total.output_tokens).toLocaleString()," tokens"]}),j.running.length?S.jsxs("table",{children:[S.jsxs("caption",{children:["Running across all stacks — ",j.count," task(s)"]}),S.jsx("thead",{children:S.jsxs("tr",{children:[S.jsx("th",{scope:"col",children:"Instance"}),S.jsx("th",{scope:"col",children:"Runtime"}),S.jsx("th",{scope:"col",children:"Transport"}),S.jsx("th",{scope:"col",children:"Task"}),S.jsx("th",{scope:"col",children:"State"}),S.jsx("th",{scope:"col",children:"Tenant"}),S.jsx("th",{scope:"col",children:"Control"})]})}),S.jsx("tbody",{children:j.running.map(u=>S.jsxs("tr",{children:[S.jsx("td",{children:S.jsx("code",{title:u.instance_id,children:qe(u.instance_id)})}),S.jsx("td",{children:u.runtime_posture?S.jsx("span",{className:`badge isolation-${u.runtime_posture.isolation}`,title:u.runtime_posture.warning||u.runtime_posture.label,children:u.runtime_posture.label}):S.jsx("span",{className:"badge",children:"unknown"})}),S.jsx("td",{children:u.transport?S.jsx("span",{className:`badge trust-${u.transport.trust}`,children:u.transport.label}):S.jsx("span",{className:"badge",children:"unknown"})}),S.jsx("td",{children:S.jsx("code",{title:u.task_id,children:qe(u.task_id)})}),S.jsx("td",{children:S.jsxs("span",{className:`state ${u.state}`,children:[S.jsx("span",{className:"dot","aria-hidden":"true"}),u.state]})}),S.jsx("td",{children:u.tenant}),S.jsx("td",{children:S.jsx("button",{"aria-label":`Stop task ${qe(u.task_id)}`,onClick:()=>f(u),children:"Stop"})})]},u.task_id))})]}):S.jsx("p",{className:"empty",children:"Nothing running yet — use “Start a session” (top right or Home) to put an agent to work."})]}):S.jsx("p",{className:"empty",children:"Loading…"})}function Iv(j,te=300){const[Q,O]=ue.useState(j);return ue.useEffect(()=>{const le=setTimeout(()=>O(j),te);return()=>clearTimeout(le)},[j,te]),Q}const Gv=["all","skill","agent","command","rule","flow"];function Lo({onPick:j,autoFocus:te,compact:Q}){const[O,le]=ue.useState(""),[ne,$]=ue.useState("all"),[f,u]=ue.useState(null),[d,v]=ue.useState(""),h=Iv(O,300),g=ue.useRef(null);return ue.useEffect(()=>{var y;te&&((y=g.current)==null||y.focus())},[te]),ue.useEffect(()=>{const y=D=>{var m;(D.ctrlKey||D.metaKey)&&D.key==="k"&&(D.preventDefault(),(m=g.current)==null||m.focus())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[]),ue.useEffect(()=>{const y=h.trim();if(!y){u(null);return}let D=!0;return Te(`/api/capabilities?q=${encodeURIComponent(y)}&type=${encodeURIComponent(ne)}&limit=12`).then(m=>{D&&(u(m.results),v(""))}).catch(m=>{D&&v(m.message)}),()=>{D=!1}},[h,ne]),S.jsxs("div",{children:[S.jsxs("div",{className:"controls",children:[S.jsx("input",{ref:g,type:"search",value:O,onChange:y=>le(y.target.value),placeholder:"Search capabilities… (Ctrl/⌘-K)","aria-label":"Search capabilities",style:{minWidth:Q?220:300}}),S.jsx("select",{value:ne,onChange:y=>$(y.target.value),"aria-label":"Capability type filter",children:Gv.map(y=>S.jsx("option",{value:y,children:y},y))})]}),d&&S.jsx("p",{className:"err",children:d}),f===null?S.jsx("p",{className:"hint",children:"Type to search skills, agents, commands, rules, flows."}):f.length?S.jsx("div",{className:"capgrid",role:"listbox","aria-label":"Capability results",children:f.map(y=>{var D;return S.jsxs("button",{className:"capcard",role:"option","aria-selected":!1,onClick:()=>j(y),children:[S.jsxs("div",{className:"capcard-head",children:[S.jsx("span",{className:"badge",children:y.type})," ",S.jsx("strong",{children:y.name}),S.jsx("span",{className:"capcard-score",children:(y.score??0).toFixed(2)})]}),S.jsx("div",{className:"capcard-cap",children:(y.capability||y.title||"").slice(0,110)}),(D=y.triggers)!=null&&D.length?S.jsx("div",{className:"capcard-tags",children:y.triggers.slice(0,3).map(m=>S.jsx("span",{className:"tag",children:m},m))}):null]},y.path)})}):S.jsx("p",{className:"empty",children:"No matches."})]})}function Yv({session:j,composer:te,setComposer:Q,onRequestStart:O,refreshMs:le=5e3}){const[ne,$]=ue.useState([]),[f,u]=ue.useState([]),[d,v]=ue.useState(""),[h,g]=ue.useState(""),[y,D]=ue.useState(""),[m,o]=ue.useState(!1),[c,n]=ue.useState(""),[l,_]=ue.useState(""),E=ue.useRef(null),C=I=>{var x;const X=te&&!te.endsWith(" ")?" ":"";Q(te+X+Pf(I.type,I.name)),o(!1),(x=E.current)==null||x.focus()},w=ue.useCallback(()=>Te("/api/inventory").then(I=>{const X=Fv(I.instances).filter(x=>{var B;return x.state==="running"&&((B=x.session_backends)==null?void 0:B.some(A=>A.available))});$(X),v(x=>{var B;return x&&X.some(A=>A.id===x)?x:((B=X[0])==null?void 0:B.id)??""}),D(x=>{var A,M;if(x&&X.some(F=>F.session_backends.some(Z=>`${Z.mode}:${Z.backend}`===x&&Z.available)))return x;const B=((A=X[0])==null?void 0:A.session_backends.find(F=>F.available))??((M=X[0])==null?void 0:M.session_backends[0]);return B?`${B.mode}:${B.backend}`:""})}).catch(()=>{}),[]);ue.useEffect(()=>{w();const I=window.setInterval(w,le);return()=>window.clearInterval(I)},[w,le]);const p=ue.useCallback(I=>{I&&Te(`/api/sessions?instance=${encodeURIComponent(I)}`).then(X=>{const x=X.sessions??[];u(x),g(B=>{var A;return B&&x.some(M=>M.attach_url===B)?B:((A=x[0])==null?void 0:A.attach_url)??""})}).catch(X=>{u([]),g(""),_(X.message)})},[]);ue.useEffect(()=>{p(d)},[d,p]);const R=()=>{j.sendInput(te)&&Q("")},T=j.state.attached,N=j.state.role==="controller"?"controller":"observer",z=ne.find(I=>I.id===d),H=(z==null?void 0:z.session_backends)??[],P=H.find(I=>`${I.mode}:${I.backend}`===y)??H.find(I=>I.available)??H[0],ee=f.find(I=>I.attach_url===h);ue.useEffect(()=>{if(!j.state.url)return;const I=f.some(X=>X.attach_url===j.state.url);f.length&&!I&&j.detach()},[j.state.url,j.detach,f]),ue.useEffect(()=>{if(!z)return;if(!z.session_backends.some(X=>`${X.mode}:${X.backend}`===y)){const X=z.session_backends.find(x=>x.available)??z.session_backends[0];D(X?`${X.mode}:${X.backend}`:"")}},[y,z]);const q=async()=>{if(!z||!ee)return;const I=ee.session_name??ee.id;if(confirm(`End session ${I}? This closes the PTY and detaches connected views.`)){n(ee.id),_("");try{await Te(`/api/instances/${encodeURIComponent(z.id)}/sessions/${encodeURIComponent(ee.id)}`,{method:"DELETE"}),j.state.url===ee.attach_url&&j.detach(),await p(z.id)}catch(X){_(X.message)}finally{n("")}}};return S.jsxs(S.Fragment,{children:[S.jsxs("p",{className:"hint",children:[S.jsx("strong",{children:"Workspace."})," Attach to a single session on one instance to observe or drive it. Start a new session above, or pick a live task from the ",S.jsx("strong",{children:"Running"})," fleet board and open it here."]}),S.jsxs("div",{className:"controls",children:[S.jsx("label",{htmlFor:"sel-instance",children:"Instance"}),S.jsxs("select",{id:"sel-instance",value:d,onChange:I=>v(I.target.value),children:[ne.map(I=>{var X;return S.jsxs("option",{value:I.id,children:[((X=I.launch_context)==null?void 0:X.name)??qe(I.id)," · ",I.loadout]},I.id)}),!ne.length&&S.jsx("option",{value:"",children:"— no session-capable running instances —"})]}),S.jsx("label",{htmlFor:"sel-backend",children:"Mode"}),S.jsx("select",{id:"sel-backend",value:y,onChange:I=>D(I.target.value),children:H.length?H.map(I=>S.jsxs("option",{value:`${I.mode}:${I.backend}`,disabled:!I.available,children:[I.mode," · ",I.backend,I.available?"":` — ${I.reason??"unsupported"}`]},`${I.mode}:${I.backend}`)):S.jsx("option",{value:"",children:"— not advertised —"})}),S.jsx("button",{onClick:()=>O(d),children:"Start…"}),S.jsx("label",{htmlFor:"sel-session",children:"Session"}),S.jsx("select",{id:"sel-session",value:h,onChange:I=>g(I.target.value),children:f.length?f.map(I=>{var X;return S.jsxs("option",{value:I.attach_url,children:[I.id," · ",I.mode??I.session_class??"managed","/",I.backend??I.session_backend??"tmux"," · ",((X=z==null?void 0:z.launch_context)==null?void 0:X.name)??qe(d)]},I.id)}):S.jsx("option",{value:"",children:"— no sessions —"})}),S.jsx("button",{disabled:!h||T&&j.state.role==="observer",onClick:()=>j.attach(h,!1,"observer"),children:"Observe"}),S.jsx("button",{disabled:!h||(P==null?void 0:P.drive)===!1||T&&j.state.role==="controller",onClick:()=>j.attach(h,!1,"controller"),children:T&&j.state.role==="observer"?"Take Control":"Drive"}),S.jsx("button",{disabled:!T||(P==null?void 0:P.keyframe)===!1,onClick:j.requestKeyframe,children:"Keyframe"}),S.jsx("button",{disabled:!T,onClick:()=>j.replay(h,N),children:"Reattach + replay"}),S.jsx("button",{disabled:!ee||c===(ee==null?void 0:ee.id),onClick:q,title:"Terminate the selected PTY session on the agent",children:c===(ee==null?void 0:ee.id)?"Ending…":"End Session"}),S.jsx("button",{disabled:!T,onClick:j.detach,children:"Detach"}),j.state.role&&S.jsx("span",{className:`badge ${j.state.role}`,children:j.state.role})]}),l&&S.jsxs("p",{className:"err",children:["Session action failed: ",l]}),z&&S.jsxs("p",{className:"hint",children:[z.runtime_posture.label," · ",z.transport.label," (",z.transport.mode,") · attach starts as observe unless control is explicitly granted.",T&&j.state.role==="observer"?" Click Take Control to re-attach with write access.":"",P&&!P.available?` ${P.reason??"Selected backend is unavailable."}`:""]}),S.jsx("div",{className:"terminal",ref:j.openTerminal,role:"log","aria-label":"Session output"}),m&&S.jsxs("div",{className:"picker",children:[S.jsx("p",{className:"hint",style:{marginTop:0},children:"Pick a capability to insert into the command — then Send to inject it. (Lookup is UI; the agent runs it.)"}),S.jsx(Lo,{compact:!0,autoFocus:!0,onPick:C})]}),S.jsxs("div",{className:"inputrow",children:[S.jsx("button",{"aria-label":"Insert a capability",title:"Insert a capability (search)",onClick:()=>o(I=>!I),children:"+"}),S.jsx("input",{ref:E,value:te,onChange:I=>Q(I.target.value),onKeyDown:I=>{I.key==="Enter"&&R()},placeholder:j.isController?"Type to drive the session…":"Observing — input is read-only",disabled:!j.isController,"aria-label":"Session input"}),S.jsx("button",{disabled:!j.isController,onClick:R,children:"Send"})]}),S.jsx("p",{className:"hint",children:"Pick or start a session, then Attach. Cockpit requests observe-first access; drive/control is explicit and denial reasons stay visible through the session stream. Actions inject their command right here."})]})}function Fv(j){const te=new Set;return j.filter(Q=>te.has(Q.id)?!1:(te.add(Q.id),!0))}function Kv({responses:j=[],goSessions:te}){const[Q,O]=ue.useState(null),[le,ne]=ue.useState(""),$=ue.useCallback(()=>{Te("/api/approvals?status=pending").then(u=>{O(u.approvals),ne("")}).catch(u=>ne(u.message))},[]);ue.useEffect(()=>{$()},[$]);const f=(u,d)=>Te(`/api/approvals/${encodeURIComponent(u)}?decision=${d}`,{method:"POST"}).then($).catch(v=>alert(v.message));return S.jsxs(S.Fragment,{children:[S.jsxs("p",{className:"hint",children:["Unified response-needed inbox — formal ",S.jsx("code",{children:"hitl-prompt/v1"})," approvals, provider prompts, and agent sessions waiting for human input."]}),le&&S.jsx("p",{className:"err",children:le}),j.length>0&&S.jsxs("section",{className:"response-needed","aria-label":"Sessions waiting for response",children:[S.jsx("h2",{children:"Response Needed"}),j.map(u=>S.jsxs("article",{className:"response-item",children:[S.jsxs("div",{children:[S.jsx("strong",{children:u.source==="pty"?"Interactive session prompt":u.source}),S.jsx("p",{children:u.prompt}),S.jsxs("span",{children:[S.jsx("code",{children:qe(u.instance_id)})," · ",u.status]})]}),te&&S.jsx("button",{onClick:te,children:"Open Session"})]},u.id))]}),Q?!Q.length&&!j.length?S.jsx("p",{className:"empty",children:"No pending approvals or responses."}):Q.length?S.jsxs("table",{children:[S.jsxs("caption",{children:[Q.length," approval request(s) awaiting your decision"]}),S.jsx("thead",{children:S.jsxs("tr",{children:[S.jsx("th",{scope:"col",children:"Request"}),S.jsx("th",{scope:"col",children:"Risk"}),S.jsx("th",{scope:"col",children:"Instance"}),S.jsx("th",{scope:"col",children:"Decision"})]})}),S.jsx("tbody",{children:Q.map(u=>S.jsxs("tr",{children:[S.jsx("td",{children:u.prompt}),S.jsx("td",{children:S.jsx("span",{className:`badge ${u.risk==="high"?"high":""}`,children:u.risk})}),S.jsx("td",{children:S.jsx("code",{title:u.instance_id,children:qe(u.instance_id)})}),S.jsxs("td",{style:{whiteSpace:"nowrap"},children:[S.jsx("button",{onClick:()=>f(u.id,"approve"),children:"Approve"})," ",S.jsx("button",{onClick:()=>f(u.id,"deny"),children:"Deny"})]})]},u.id))})]}):null:S.jsx("p",{className:"empty",children:"Loading…"})]})}function Xv(){const[j,te]=ue.useState(null),[Q,O]=ue.useState(""),le=ne=>{te(null),O("");const $=`type=${encodeURIComponent(ne.type)}&name=${encodeURIComponent(ne.name)}&path=${encodeURIComponent(ne.path)}`;Te(`/api/show?${$}`).then(te).catch(f=>O(f.message))};return S.jsxs(S.Fragment,{children:[S.jsxs("p",{className:"hint",children:["Read-only catalog from the AIWG registry — display, not execution. To ",S.jsx("em",{children:"run"})," a capability, inject it into a session (Actions/Sessions). Search modeled on the fortemi-react patterns."]}),Q&&S.jsx("p",{className:"err",children:Q}),S.jsxs("div",{className:"grid2",children:[S.jsx(Lo,{onPick:le,autoFocus:!0}),S.jsx("div",{role:"region","aria-label":"Capability detail",children:j?S.jsxs(S.Fragment,{children:[S.jsxs("div",{style:{marginBottom:8},children:[S.jsx("span",{className:"badge",children:j.type})," ",S.jsx("strong",{children:j.name})]}),S.jsx("div",{className:"terminal",style:{maxHeight:"52vh"},children:j.body})]}):S.jsx("p",{className:"empty",children:"Select a capability to inspect its definition."})})]})]})}function $v({session:j,setComposer:te,goSessions:Q}){const[O,le]=ue.useState(null),[ne,$]=ue.useState(!1),[f,u]=ue.useState(""),d=ue.useCallback(()=>{Te("/api/library").then(y=>{le(y.library),u("")}).catch(y=>u(y.message))},[]);ue.useEffect(()=>{d()},[d]);const v=async y=>{try{await Te(`/api/library/clone?type=${encodeURIComponent(y.type)}&name=${encodeURIComponent(y.name)}&path=${encodeURIComponent(y.path)}`,{method:"POST"}),$(!1),d()}catch(D){u(D.message)}},h=y=>{confirm(`Remove "${y.name}" from your library? (Your copy only — AIWG is untouched.)`)&&Te(`/api/library/${encodeURIComponent(y.name)}`,{method:"DELETE"}).then(d).catch(D=>alert(D.message))},g=y=>{const D=Pf(y.type,y.name.replace(/\.(md|markdown|ya?ml|json)$/i,""));j.isController&&j.sendInput(D)||te(D),Q()};return S.jsxs(S.Fragment,{children:[S.jsxs("p",{className:"hint",children:["Your ",S.jsx("strong",{children:"own"})," assets — copied, cloned, or imported. Edit them freely; ",S.jsx("strong",{children:"AIWG install files are never touched"}),". Stored on disk under ",S.jsx("code",{children:"~/.aiwg/cockpit/library"}),". Deploying one into a project is an agent action (Use → inject into a session)."]}),f&&S.jsx("p",{className:"err",children:f}),S.jsx("div",{className:"controls",children:S.jsx("button",{onClick:()=>$(y=>!y),children:ne?"Close":"+ Clone from catalog"})}),ne&&S.jsxs("div",{className:"picker",children:[S.jsx("p",{className:"hint",style:{marginTop:0},children:"Search the AIWG catalog and clone a copy into your library."}),S.jsx(Lo,{compact:!0,autoFocus:!0,onPick:v})]}),O?O.length?S.jsxs("table",{children:[S.jsxs("caption",{children:[O.length," asset(s) in your library"]}),S.jsx("thead",{children:S.jsxs("tr",{children:[S.jsx("th",{scope:"col",children:"Name"}),S.jsx("th",{scope:"col",children:"Type"}),S.jsx("th",{scope:"col",children:"Origin"}),S.jsx("th",{scope:"col",children:"Actions"})]})}),S.jsx("tbody",{children:O.map(y=>S.jsxs("tr",{children:[S.jsx("td",{children:S.jsx("strong",{children:y.name})}),S.jsx("td",{children:S.jsx("span",{className:"badge",children:y.type})}),S.jsx("td",{children:y.origin}),S.jsxs("td",{style:{whiteSpace:"nowrap"},children:[S.jsx("button",{onClick:()=>g(y),children:"Use"})," ",S.jsx("button",{onClick:()=>h(y),"aria-label":`Remove ${y.name}`,children:"Remove"})]})]},y.name))})]}):S.jsx("p",{className:"empty",children:"Your library is empty. Clone a capability from the catalog to get a copy you can modify."}):S.jsx("p",{className:"empty",children:"Loading…"})]})}function Pv({session:j,setComposer:te,goSessions:Q}){const[O,le]=ue.useState([]),[ne,$]=ue.useState(""),[f,u]=ue.useState("");ue.useEffect(()=>{Te("/api/contributions").then(h=>le(h.actions)).catch(h=>$(h.message))},[]);const d=h=>{let g=h.inject.command;if(h.inject.needs_args){const y=prompt(`Arguments for ${h.title}${h.inject.args_hint?` (${h.inject.args_hint})`:""}:`,"");if(y===null)return;y.trim()&&(g+=" "+y.trim())}j.isController&&j.sendInput(g)?u(`Injected "${g}" into the attached session — the agent runs it.`):(te(g),u(`Ready to inject "${g}". Attach to a session (drive) or start one, then Send.`)),Q()},v=async h=>{var g;await((g=navigator.clipboard)==null?void 0:g.writeText(h.inject.command)),u(`Copied "${h.inject.command}" to the clipboard.`)};return S.jsxs(S.Fragment,{children:[S.jsxs("p",{className:"hint",children:["Actions are ",S.jsx("strong",{children:"contributed declaratively"}),". Clicking one ",S.jsx("strong",{children:"injects a command into an agentic session"})," ","(focused, else it offers a new one); the agent runs it. The Cockpit never runs the CLI — agents do."]}),ne&&S.jsx("p",{className:"err",children:ne}),S.jsx("div",{className:"controls",role:"group","aria-label":"Contributed actions",children:O.length?O.map(h=>S.jsxs("span",{className:"action-cluster",children:[S.jsxs("button",{className:"act",title:`injects: ${h.inject.command}`,onClick:()=>d(h),children:[h.icon?h.icon+" ":"",h.title]}),S.jsx("button",{className:"copy-command","aria-label":`Copy CLI command for ${h.title}`,title:h.inject.command,onClick:()=>v(h),children:"Copy CLI"})]},h.id)):S.jsx("p",{className:"empty",children:"No contributed actions."})}),S.jsx("p",{className:"empty",children:f||"Output appears in the session terminal — actions drop a command into a session and the agent executes it."})]})}function Vv({open:j,onClose:te,session:Q,onStarted:O,initialInstanceId:le}){var R;const[ne,$]=ue.useState([]),[f,u]=ue.useState(""),[d,v]=ue.useState(""),[h,g]=ue.useState(""),[y,D]=ue.useState("observer"),[m,o]=ue.useState(!1),[c,n]=ue.useState("");ue.useEffect(()=>{if(!j)return;n("");let T=!1;return(async()=>{var N,z,H;try{const P=await Te("/api/inventory");if(T)return;const ee=Wv(P.instances).filter(I=>I.state==="running");$(ee);const q=ee.find(I=>I.id===le)??ee.find(I=>{var X;return(X=I.session_backends)==null?void 0:X.some(x=>x.available)})??ee[0];if(q){u(q.id),v(((N=q.launch_context)==null?void 0:N.loadout)??q.loadout??"");const I=((z=q.session_backends)==null?void 0:z.find(X=>X.available))??((H=q.session_backends)==null?void 0:H[0]);g(I?`${I.mode}:${I.backend}`:"")}else n("No stack connected — start an executor first.")}catch(P){T||n(P.message)}})(),()=>{T=!0}},[j,le]);const l=ne.find(T=>T.id===f),_=(l==null?void 0:l.session_backends)??[],E=_.find(T=>`${T.mode}:${T.backend}`===h)??_.find(T=>T.available)??_[0];if(ue.useEffect(()=>{var N,z,H;if(!l)return;v(((N=l.launch_context)==null?void 0:N.loadout)??l.loadout??"");const T=((z=l.session_backends)==null?void 0:z.find(P=>P.available))??((H=l.session_backends)==null?void 0:H[0]);g(T?`${T.mode}:${T.backend}`:"")},[f]),!j)return null;const C=Q.state.attached,w=!m&&!!l&&!!(E!=null&&E.available),p=async()=>{if(!(!l||!E)){o(!0),n("");try{const T=new URLSearchParams({mode:E.mode,backend:E.backend}),N=await Te(`/api/instances/${encodeURIComponent(l.id)}/sessions?${T}`,{method:"POST"});Q.attach(N.attach_url,!1,y),O(),te()}catch(T){n(T.message),o(!1)}}};return S.jsx("div",{className:"modal-backdrop",role:"presentation",onClick:te,children:S.jsxs("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"start-session-title",onClick:T=>T.stopPropagation(),onKeyDown:T=>{T.key==="Escape"&&te()},children:[S.jsx("h2",{id:"start-session-title",children:"Start a session"}),c&&S.jsx("p",{className:"err",children:c}),C&&S.jsx("p",{className:"hint warn",children:"You have an attached view. Starting creates another managed session and switches Cockpit to it; existing sessions keep running."}),S.jsxs("div",{className:"form-grid",children:[S.jsx("label",{htmlFor:"ss-instance",children:"Instance"}),S.jsx("select",{id:"ss-instance",value:f,onChange:T=>u(T.target.value),children:ne.map(T=>S.jsxs("option",{value:T.id,children:[qe(T.id)," · ",T.runtime," · ",T.state]},T.id))}),S.jsx("label",{children:"Runtime"}),S.jsx("span",{className:"ro",children:l?`${l.runtime_posture.label} (${l.runtime})`:"—"}),S.jsx("label",{children:"Instance loadout"}),S.jsxs("span",{className:"ro",children:[d||"unknown",(R=l==null?void 0:l.launch_context)!=null&&R.image_ref?` · ${l.launch_context.image_ref}`:""]}),S.jsx("label",{htmlFor:"ss-backend",children:"Backend"}),S.jsx("select",{id:"ss-backend",value:h,onChange:T=>g(T.target.value),children:_.length?_.map(T=>S.jsxs("option",{value:`${T.mode}:${T.backend}`,disabled:!T.available,children:[T.mode," · ",T.backend,T.available?"":` — ${T.reason??"unsupported"}`]},`${T.mode}:${T.backend}`)):S.jsx("option",{value:"",children:"— not advertised —"})}),S.jsx("label",{htmlFor:"ss-posture",children:"Posture"}),S.jsxs("select",{id:"ss-posture",value:y,onChange:T=>D(T.target.value),children:[S.jsx("option",{value:"observer",children:"Observe (read-only)"}),S.jsx("option",{value:"controller",disabled:(E==null?void 0:E.drive)===!1,children:"Drive (control)"})]})]}),E&&!E.available&&S.jsx("p",{className:"hint",children:E.reason??"Selected backend is unavailable on this instance."}),S.jsxs("div",{className:"modal-actions",children:[S.jsx("button",{onClick:te,disabled:m,children:"Cancel"}),S.jsx("button",{className:"cta",onClick:p,disabled:!w,children:m?"Starting…":C?"Start another session":"Start session"})]})]})})}function Wv(j){const te=new Set;return j.filter(Q=>te.has(Q.id)?!1:(te.add(Q.id),!0))}const Qv=[{value:"agentic/codex:latest",label:"Codex"},{value:"agentic/claude:latest",label:"Claude"},{value:"agentic/opencode:latest",label:"OpenCode"},{value:"agentic/automation-control:latest",label:"Automation control"},{value:"agentic/agent:dev",label:"Agent dev base"}],Xf=[{id:"host-tools",label:"host-tools",description:"Host tools",runtimes:["host"]},{id:"agentic-dev",label:"agentic-dev",description:"Full development environment",runtimes:["docker","container","qemu","vm"]},{id:"claude-only",label:"claude-only",description:"Claude provider loadout",runtimes:["docker","container","qemu","vm"]},{id:"codex-only",label:"codex-only",description:"Codex provider loadout",runtimes:["docker","container","qemu","vm"]},{id:"opencode-only",label:"opencode-only",description:"OpenCode provider loadout",runtimes:["docker","container","qemu","vm"]},{id:"full-suite",label:"full-suite",description:"Multi-provider tool suite",runtimes:["qemu","vm"]}];function Zv({open:j,onClose:te,onLaunched:Q}){const[O,le]=ue.useState("host"),[ne,$]=ue.useState(()=>`cockpit-${Date.now().toString(36)}`.slice(0,32)),[f,u]=ue.useState("host-tools"),[d,v]=ue.useState([]),[h,g]=ue.useState([]),[y,D]=ue.useState(""),[m,o]=ue.useState("agentic/codex:latest"),[c,n]=ue.useState(""),[l,_]=ue.useState(""),[E,C]=ue.useState(""),[w,p]=ue.useState(""),[R,T]=ue.useState(!0),[N,z]=ue.useState(!1),[H,P]=ue.useState(""),[ee,q]=ue.useState("");if(ue.useEffect(()=>{if(!j)return;let x=!1;return Promise.all([Te("/api/loadouts").catch(()=>({loadouts:[]})),Te("/api/inventory").catch(()=>({instances:[]}))]).then(([B,A])=>{if(x)return;v(B.loadouts??[]),g(A.instances??[]);const M=(A.instances??[]).find(Vf);D(F=>F||(M==null?void 0:M.id)||"")}),()=>{x=!0}},[j]),!j)return null;const I=x=>{le(x),x==="host"?u("host-tools"):x==="docker"?(u("agentic-dev"),o(B=>B||"agentic/codex:latest")):u("profiles/basic.yaml")},X=async()=>{var x,B,A,M,F;z(!0),P(""),q("");try{if(O==="host"){const L=la(h).find(ae=>ae.id===y)??la(h)[0];if(!L)throw new Error("No registered host target is available. Start/register the host agent first, or choose Docker container.");q(R?`Using host target ${((x=L.launch_context)==null?void 0:x.name)??qe(L.id)}; starting session...`:`Using host target ${((B=L.launch_context)==null?void 0:B.name)??qe(L.id)}`),await Q(L.id,R),R&&te();return}const Z={name:ne.replace(/[^a-z0-9-]/g,"-").replace(/^-+/,"a-").slice(0,63),runtime:O,start:!0};f&&(Z.loadout=f),l&&(Z.profile=l),O==="docker"&&(Z.image=m==="__custom__"?c.trim():m,Z.agentshare=!0),O==="qemu"&&E.trim()&&(Z.ssh_key=E.trim()),O==="docker"&&w.trim()&&(Z.mounts=w.split(`
|
|
67
|
+
`).map(L=>L.trim()).filter(Boolean));const he=await Te("/api/instances",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Z)}),fe=he.instance_id??he.instanceId??((A=he.result)==null?void 0:A.instance_id)??((M=he.result)==null?void 0:M.instanceId),G=he.id??((F=he.operation)==null?void 0:F.id);q(R?`Launch accepted: ${fe??G??"operation pending"}; waiting for session...`:`Launch accepted: ${fe??G??"operation pending"}`),await Q(fe,R,G),R&&te()}catch(Z){P(Z.message)}finally{z(!1)}};return S.jsx("div",{className:"modal-backdrop",role:"presentation",onClick:te,children:S.jsxs("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"launch-instance-title",onClick:x=>x.stopPropagation(),children:[S.jsx("h2",{id:"launch-instance-title",children:"New instance"}),S.jsx("p",{className:"hint",children:"Create a runtime target. Existing instances and sessions keep running."}),H&&S.jsx("p",{className:"err",children:H}),ee&&S.jsx("p",{className:"hint ok-text",children:ee}),S.jsxs("div",{className:"form-grid",children:[S.jsx("label",{htmlFor:"li-runtime",children:"Runtime"}),S.jsxs("select",{id:"li-runtime",value:O,onChange:x=>I(x.target.value),children:[S.jsx("option",{value:"host",children:"Host"}),S.jsx("option",{value:"docker",children:"Docker container"}),S.jsx("option",{value:"qemu",children:"VM / QEMU"})]}),O==="host"?S.jsxs(S.Fragment,{children:[S.jsx("label",{htmlFor:"li-host-target",children:"Host target"}),S.jsxs("select",{id:"li-host-target",value:y,onChange:x=>D(x.target.value),children:[la(h).map(x=>{var B;return S.jsxs("option",{value:x.id,children:[((B=x.launch_context)==null?void 0:B.name)??qe(x.id)," - ",x.loadout]},x.id)}),!la(h).length&&S.jsx("option",{value:"",children:"No registered host available"})]})]}):S.jsxs(S.Fragment,{children:[S.jsx("label",{htmlFor:"li-name",children:"Name"}),S.jsx("input",{id:"li-name",value:ne,onChange:x=>$(x.target.value)})]}),S.jsx("label",{htmlFor:"li-loadout",children:"Instance loadout"}),O==="host"?S.jsx("span",{className:"ro",children:"host-tools"}):S.jsx("select",{id:"li-loadout",value:f,onChange:x=>u(x.target.value),children:Jv(d,O).map(x=>S.jsxs("option",{value:x.id,children:[x.label,x.description?` - ${x.description}`:""]},x.id))}),O!=="host"&&S.jsxs(S.Fragment,{children:[S.jsx("label",{htmlFor:"li-profile",children:"Profile"}),S.jsx("input",{id:"li-profile",value:l,onChange:x=>_(x.target.value),placeholder:"optional"})]}),O==="qemu"&&S.jsxs(S.Fragment,{children:[S.jsx("label",{htmlFor:"li-ssh-key",children:"SSH public key"}),S.jsx("input",{id:"li-ssh-key",value:E,onChange:x=>C(x.target.value),placeholder:"auto-detect, or ~/.ssh/agentic_ed25519.pub"})]}),O==="docker"&&S.jsxs(S.Fragment,{children:[S.jsx("label",{htmlFor:"li-image",children:"Container image"}),S.jsxs("div",{className:"field-stack",children:[S.jsxs("select",{id:"li-image",value:m,onChange:x=>o(x.target.value),children:[Qv.map(x=>S.jsxs("option",{value:x.value,children:[x.label," - ",x.value]},x.value)),S.jsx("option",{value:"__custom__",children:"Custom image..."})]}),m==="__custom__"&&S.jsx("input",{"aria-label":"Custom container image",value:c,onChange:x=>n(x.target.value),placeholder:"registry.example.com/team/agent:tag"})]}),S.jsx("label",{htmlFor:"li-mounts",children:"Mounts"}),S.jsx("textarea",{id:"li-mounts",value:w,onChange:x=>p(x.target.value),placeholder:"/host/path:/container/path"})]}),S.jsx("label",{htmlFor:"li-open-session",children:"After launch"}),S.jsxs("label",{className:"check-row",children:[S.jsx("input",{id:"li-open-session",type:"checkbox",checked:R,onChange:x=>T(x.target.checked)}),"Start a session automatically when the instance is ready"]})]}),S.jsxs("div",{className:"modal-actions",children:[S.jsx("button",{onClick:te,disabled:N,children:"Close"}),S.jsx("button",{className:"cta",onClick:X,disabled:N||O==="host"&&!y||O!=="host"&&!ne.trim()||O==="docker"&&m==="__custom__"&&!c.trim(),children:N?"Working...":O==="host"?R?"Start host session":"Use host":R?"Create + start session":"Create instance"})]})]})})}function Jv(j,te){if(te==="host")return Xf.filter(ne=>ne.id==="host-tools");const Q=te==="docker"?["docker","container"]:te==="qemu"?["qemu","vm"]:[te],O=[...j,...Xf].reduce((ne,$)=>(ne.some(f=>f.id===$.id)||ne.push($),ne),[]),le=O.filter(ne=>{var $;return!(($=ne.runtimes)!=null&&$.length)||ne.runtimes.some(f=>Q.includes(String(f).toLowerCase()))});return le.length?le:O}function la(j){return j.filter(Vf)}function Vf(j){var te,Q;return j.state==="running"&&((te=j.runtime_posture)==null?void 0:te.kind)==="host"&&((Q=j.session_backends)==null?void 0:Q.some(O=>O.available!==!1))}const em=[{id:"welcome",label:"Home"},{id:"inventory",label:"Inventory"},{id:"running",label:"Running"},{id:"sessions",label:"Sessions"},{id:"approvals",label:"Approvals"},{id:"explore",label:"Explore"},{id:"library",label:"Library"},{id:"actions",label:"Actions"}],tm=j=>new Promise(te=>window.setTimeout(te,j));function im(){const[j,te]=ue.useState("welcome"),Q=Tv(),[O,le]=ue.useState(""),[ne,$]=ue.useState(null),[f,u]=ue.useState(!1),[d,v]=ue.useState(void 0),[h,g]=ue.useState(!1),[y,D]=ue.useState(0);ue.useEffect(()=>{let n=!1;const l=async()=>{try{const[E,C]=await Promise.all([Te("/api/health"),Te("/api/inventory")]);if(n)return;const[w,p]=await Promise.all([Te("/api/running").catch(()=>({count:0})),Te("/api/approvals?status=pending").catch(()=>({approvals:[]}))]);if(n)return;const R=C.instances.map(T=>T.runtime_posture.kind);$({executor:E.executor_url,instances:C.instances.length,running:w.count,responses:p.approvals.length+(Q.responseNeeded.needed?1:0),host:R.includes("host"),container:R.includes("container")||R.includes("docker"),vm:R.includes("vm")})}catch{n||$(null)}};l();const _=window.setInterval(l,15e3);return()=>{n=!0,window.clearInterval(_)}},[Q.responseNeeded.needed,y]);const m=n=>{v(n),u(!0)},o=async(n,l,_)=>{if(D(E=>E+1),l){const E=await sm(n,_),C=E.session_backends.find(R=>R.available!==!1&&R.drive!==!1)??E.session_backends.find(R=>R.available!==!1)??E.session_backends[0];if(!C||C.available===!1)throw new Error((C==null?void 0:C.reason)??"No available session backend for the new instance.");const w=new URLSearchParams({mode:C.mode,backend:C.backend}),p=await Te(`/api/instances/${encodeURIComponent(E.id)}/sessions?${w}`,{method:"POST"});Q.attach(p.attach_url,!1,C.drive===!1?"observer":"controller"),te("sessions")}else te("inventory");D(E=>E+1)},c=async()=>{var n;await((n=navigator.clipboard)==null?void 0:n.writeText("aiwg cockpit"))};return S.jsxs(S.Fragment,{children:[S.jsxs("header",{children:[S.jsxs("div",{className:"brand-lockup",children:[S.jsx("span",{className:"mark","aria-hidden":"true",children:"◆"}),S.jsx("h1",{children:"AIWG Cockpit"})]}),S.jsxs("div",{className:"top-status","aria-label":"Cockpit status",children:[S.jsx("span",{className:`health-pill ${ne?"ok":"warn"}`,children:ne?"Bridge live":"Bridge checking"}),ne&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"executor-pill",title:ne.executor,children:ne.executor}),S.jsxs("span",{children:[ne.instances," stacks"]}),S.jsxs("span",{children:[ne.running," running"]}),S.jsxs("span",{children:[ne.responses," responses needed"]}),S.jsxs("span",{className:"matrix-mini",title:"Runtime target coverage",children:["host ",ne.host?"✓":"-"," · docker ",ne.container?"✓":"-"," · vm ",ne.vm?"✓":"-"]})]})]}),S.jsx("button",{className:"meta",onClick:()=>g(!0),children:"+ Launch instance"}),S.jsx("button",{className:"meta",onClick:()=>m(),children:"▸ Start a session"}),S.jsx("button",{className:"meta",onClick:c,children:"Copy CLI"})]}),S.jsx("div",{role:"tablist","aria-label":"Cockpit views",children:em.map(n=>S.jsx("button",{role:"tab",id:`tab-${n.id}`,"aria-controls":`panel-${n.id}`,"aria-selected":j===n.id,tabIndex:j===n.id?0:-1,onClick:()=>te(n.id),children:n.label},n.id))}),S.jsxs("main",{children:[S.jsx(cs,{id:"welcome",tab:j,children:S.jsx(Mv,{onStartSession:()=>m(),onLaunchInstance:()=>g(!0),goTo:n=>te(n)})}),S.jsx(cs,{id:"inventory",tab:j,children:S.jsx(Uv,{onStartSession:m,onLaunchInstance:()=>g(!0)})}),S.jsx(cs,{id:"running",tab:j,children:S.jsx(qv,{})}),S.jsx("section",{id:"panel-sessions",role:"tabpanel","aria-labelledby":"tab-sessions",hidden:j!=="sessions",children:S.jsx(Yv,{session:Q,composer:O,setComposer:le,onRequestStart:m})}),S.jsx(cs,{id:"approvals",tab:j,children:S.jsx(Kv,{responses:Q.responseNeeded.needed?[am(Q)]:[],goSessions:()=>te("sessions")})}),S.jsx(cs,{id:"explore",tab:j,children:S.jsx(Xv,{})}),S.jsx(cs,{id:"library",tab:j,children:S.jsx($v,{session:Q,setComposer:le,goSessions:()=>te("sessions")})}),S.jsx(cs,{id:"actions",tab:j,children:S.jsx(Pv,{session:Q,setComposer:le,goSessions:()=>te("sessions")})})]}),S.jsx(Vv,{open:f,onClose:()=>u(!1),session:Q,onStarted:()=>te("sessions"),initialInstanceId:d}),S.jsx(Zv,{open:h,onClose:()=>g(!1),onLaunched:o})]})}async function sm(j,te){var le,ne;let Q="",O="";for(let $=0;$<45;$+=1){if(te){const v=await Te(`/api/operations/${encodeURIComponent(te)}`),h=String(v.state??"").toLowerCase(),g=((le=v.result)==null?void 0:le.instance_id)??((ne=v.result)==null?void 0:ne.instanceId);if(g&&!j&&(j=g),h==="failed")throw new Error(rm(v));h&&(O=nm(v),Q=O)}const u=(await Te("/api/inventory")).instances.filter(v=>String(v.state).toLowerCase()==="running"),d=j?u.find(v=>v.id===j):u[0];if(d){const v=d.session_backends.find(h=>h.available!==!1)??d.session_backends[0];if(v&&v.available!==!1)return d;Q=(v==null?void 0:v.reason)??`instance ${d.id} has no available backend yet`}else Q=[O,j?`instance ${j} not visible in inventory yet`:"no running instance visible in inventory yet"].filter(Boolean).join("; ");await tm(1e3)}throw new Error(`Instance launched, but no session-ready agent appeared within 45s (${Q}).`)}function rm(j){var te,Q,O,le,ne,$;return typeof j.error=="string"?j.error:((te=j.failure)==null?void 0:te.message)??((Q=j.failure)==null?void 0:Q.detail)??((O=j.failure)==null?void 0:O.code)??((le=j.error)==null?void 0:le.message)??((ne=j.error)==null?void 0:ne.detail)??(($=j.error)==null?void 0:$.code)??`operation ${j.id??""} failed`}function nm(j){var Q,O,le,ne,$;const te=[`operation ${j.id??""} is ${j.state??"unknown"}`];return(Q=j.result)!=null&&Q.runtime&&te.push(`runtime ${j.result.runtime}`),(O=j.result)!=null&&O.container_id&&te.push(`container ${j.result.container_id.slice(0,12)}`),(((le=j.result)==null?void 0:le.instance_id)??((ne=j.result)==null?void 0:ne.instanceId))&&te.push(`instance ${j.result.instance_id??j.result.instanceId}`),String(j.state??"").toLowerCase()==="succeeded"&&(($=j.result)!=null&&$.container_id)&&te.push("container was created, but no agent registered; see agentic-sandbox #501"),te.join("; ")}function am(j){return{id:`pty:${j.state.url??"attached"}`,instance_id:"attached session",prompt:j.responseNeeded.prompt,source:j.responseNeeded.source,status:"response-needed",attach_url:j.state.url}}function cs({id:j,tab:te,children:Q}){return S.jsx("section",{id:`panel-${j}`,role:"tabpanel","aria-labelledby":`tab-${j}`,hidden:te!==j,children:te===j?Q:null})}bv.createRoot(document.getElementById("root")).render(S.jsx(ue.StrictMode,{children:S.jsx(im,{})}));
|