hjworktree-cli 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +10 -0
- package/.context-snapshots/context-snapshot-20260106-180000.md +108 -0
- package/.context-snapshots/context-snapshot-20260106-235500.md +108 -0
- package/README.md +134 -0
- package/dist/server/routes/api.d.ts.map +1 -1
- package/dist/server/routes/api.js +45 -1
- package/dist/server/routes/api.js.map +1 -1
- package/dist/server/services/worktreeService.d.ts +23 -0
- package/dist/server/services/worktreeService.d.ts.map +1 -1
- package/dist/server/services/worktreeService.js +156 -14
- package/dist/server/services/worktreeService.js.map +1 -1
- package/dist/server/socketHandlers.d.ts.map +1 -1
- package/dist/server/socketHandlers.js +74 -1
- package/dist/server/socketHandlers.js.map +1 -1
- package/dist/shared/types/index.d.ts +36 -0
- package/dist/shared/types/index.d.ts.map +1 -1
- package/dist/web/assets/{index-C61yAbey.css → index-CsixHL-D.css} +1 -1
- package/dist/web/assets/index-D8dr9mJa.js +53 -0
- package/dist/web/assets/index-D8dr9mJa.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/server/routes/api.ts +51 -2
- package/server/services/worktreeService.ts +181 -13
- package/server/socketHandlers.ts +91 -2
- package/shared/types/index.ts +45 -0
- package/web/src/App.tsx +3 -0
- package/web/src/components/Layout/LeftNavBar.tsx +290 -26
- package/web/src/components/Layout/MainLayout.tsx +2 -6
- package/web/src/components/Modals/AddWorktreeModal.tsx +87 -0
- package/web/src/components/Modals/ConfirmDeleteModal.tsx +114 -0
- package/web/src/components/Modals/ModalContainer.tsx +21 -0
- package/web/src/components/Terminal/TerminalPanel.tsx +32 -37
- package/web/src/stores/useAppStore.ts +200 -3
- package/web/src/styles/global.css +522 -0
- package/dist/web/assets/index-WEdVUKxb.js +0 -53
- package/dist/web/assets/index-WEdVUKxb.js.map +0 -1
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const N of document.querySelectorAll('link[rel="modulepreload"]'))b(N);new MutationObserver(N=>{for(const K of N)if(K.type==="childList")for(const j of K.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&b(j)}).observe(document,{childList:!0,subtree:!0});function h(N){const K={};return N.integrity&&(K.integrity=N.integrity),N.referrerPolicy&&(K.referrerPolicy=N.referrerPolicy),N.crossOrigin==="use-credentials"?K.credentials="include":N.crossOrigin==="anonymous"?K.credentials="omit":K.credentials="same-origin",K}function b(N){if(N.ep)return;N.ep=!0;const K=h(N);fetch(N.href,K)}})();function Oh(C){return C&&C.__esModule&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C}var nl={exports:{}},Ki={},ol={exports:{}},ke={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its 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 _h;function Vd(){if(_h)return ke;_h=1;var C=Symbol.for("react.element"),f=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),K=Symbol.for("react.provider"),j=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),d=Symbol.iterator;function S(T){return T===null||typeof T!="object"?null:(T=d&&T[d]||T["@@iterator"],typeof T=="function"?T:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,g={};function o(T,P,J){this.props=T,this.context=P,this.refs=g,this.updater=J||w}o.prototype.isReactComponent={},o.prototype.setState=function(T,P){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,P,"setState")},o.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function l(){}l.prototype=o.prototype;function s(T,P,J){this.props=T,this.context=P,this.refs=g,this.updater=J||w}var n=s.prototype=new l;n.constructor=s,R(n,o.prototype),n.isPureReactComponent=!0;var p=Array.isArray,E=Object.prototype.hasOwnProperty,k={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function m(T,P,J){var te,ce={},he=null,U=null;if(P!=null)for(te in P.ref!==void 0&&(U=P.ref),P.key!==void 0&&(he=""+P.key),P)E.call(P,te)&&!x.hasOwnProperty(te)&&(ce[te]=P[te]);var B=arguments.length-2;if(B===1)ce.children=J;else if(1<B){for(var Z=Array(B),Q=0;Q<B;Q++)Z[Q]=arguments[Q+2];ce.children=Z}if(T&&T.defaultProps)for(te in B=T.defaultProps,B)ce[te]===void 0&&(ce[te]=B[te]);return{$$typeof:C,type:T,key:he,ref:U,props:ce,_owner:k.current}}function A(T,P){return{$$typeof:C,type:T.type,key:P,ref:T.ref,props:T.props,_owner:T._owner}}function H(T){return typeof T=="object"&&T!==null&&T.$$typeof===C}function F(T){var P={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(J){return P[J]})}var W=/\/+/g;function M(T,P){return typeof T=="object"&&T!==null&&T.key!=null?F(""+T.key):P.toString(36)}function Y(T,P,J,te,ce){var he=typeof T;(he==="undefined"||he==="boolean")&&(T=null);var U=!1;if(T===null)U=!0;else switch(he){case"string":case"number":U=!0;break;case"object":switch(T.$$typeof){case C:case f:U=!0}}if(U)return U=T,ce=ce(U),T=te===""?"."+M(U,0):te,p(ce)?(J="",T!=null&&(J=T.replace(W,"$&/")+"/"),Y(ce,P,J,"",function(Q){return Q})):ce!=null&&(H(ce)&&(ce=A(ce,J+(!ce.key||U&&U.key===ce.key?"":(""+ce.key).replace(W,"$&/")+"/")+T)),P.push(ce)),1;if(U=0,te=te===""?".":te+":",p(T))for(var B=0;B<T.length;B++){he=T[B];var Z=te+M(he,B);U+=Y(he,P,J,Z,ce)}else if(Z=S(T),typeof Z=="function")for(T=Z.call(T),B=0;!(he=T.next()).done;)he=he.value,Z=te+M(he,B++),U+=Y(he,P,J,Z,ce);else if(he==="object")throw P=String(T),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.");return U}function ee(T,P,J){if(T==null)return T;var te=[],ce=0;return Y(T,te,"","",function(he){return P.call(J,he,ce++)}),te}function se(T){if(T._status===-1){var P=T._result;P=P(),P.then(function(J){(T._status===0||T._status===-1)&&(T._status=1,T._result=J)},function(J){(T._status===0||T._status===-1)&&(T._status=2,T._result=J)}),T._status===-1&&(T._status=0,T._result=P)}if(T._status===1)return T._result.default;throw T._result}var le={current:null},X={transition:null},L={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:X,ReactCurrentOwner:k};function O(){throw Error("act(...) is not supported in production builds of React.")}return ke.Children={map:ee,forEach:function(T,P,J){ee(T,function(){P.apply(this,arguments)},J)},count:function(T){var P=0;return ee(T,function(){P++}),P},toArray:function(T){return ee(T,function(P){return P})||[]},only:function(T){if(!H(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},ke.Component=o,ke.Fragment=h,ke.Profiler=N,ke.PureComponent=s,ke.StrictMode=b,ke.Suspense=u,ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,ke.act=O,ke.cloneElement=function(T,P,J){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var te=R({},T.props),ce=T.key,he=T.ref,U=T._owner;if(P!=null){if(P.ref!==void 0&&(he=P.ref,U=k.current),P.key!==void 0&&(ce=""+P.key),T.type&&T.type.defaultProps)var B=T.type.defaultProps;for(Z in P)E.call(P,Z)&&!x.hasOwnProperty(Z)&&(te[Z]=P[Z]===void 0&&B!==void 0?B[Z]:P[Z])}var Z=arguments.length-2;if(Z===1)te.children=J;else if(1<Z){B=Array(Z);for(var Q=0;Q<Z;Q++)B[Q]=arguments[Q+2];te.children=B}return{$$typeof:C,type:T.type,key:ce,ref:he,props:te,_owner:U}},ke.createContext=function(T){return T={$$typeof:j,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:K,_context:T},T.Consumer=T},ke.createElement=m,ke.createFactory=function(T){var P=m.bind(null,T);return P.type=T,P},ke.createRef=function(){return{current:null}},ke.forwardRef=function(T){return{$$typeof:c,render:T}},ke.isValidElement=H,ke.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:se}},ke.memo=function(T,P){return{$$typeof:v,type:T,compare:P===void 0?null:P}},ke.startTransition=function(T){var P=X.transition;X.transition={};try{T()}finally{X.transition=P}},ke.unstable_act=O,ke.useCallback=function(T,P){return le.current.useCallback(T,P)},ke.useContext=function(T){return le.current.useContext(T)},ke.useDebugValue=function(){},ke.useDeferredValue=function(T){return le.current.useDeferredValue(T)},ke.useEffect=function(T,P){return le.current.useEffect(T,P)},ke.useId=function(){return le.current.useId()},ke.useImperativeHandle=function(T,P,J){return le.current.useImperativeHandle(T,P,J)},ke.useInsertionEffect=function(T,P){return le.current.useInsertionEffect(T,P)},ke.useLayoutEffect=function(T,P){return le.current.useLayoutEffect(T,P)},ke.useMemo=function(T,P){return le.current.useMemo(T,P)},ke.useReducer=function(T,P,J){return le.current.useReducer(T,P,J)},ke.useRef=function(T){return le.current.useRef(T)},ke.useState=function(T){return le.current.useState(T)},ke.useSyncExternalStore=function(T,P,J){return le.current.useSyncExternalStore(T,P,J)},ke.useTransition=function(){return le.current.useTransition()},ke.version="18.3.1",ke}var ph;function Cl(){return ph||(ph=1,ol.exports=Vd()),ol.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its 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 vh;function Kd(){if(vh)return Ki;vh=1;var C=Cl(),f=Symbol.for("react.element"),h=Symbol.for("react.fragment"),b=Object.prototype.hasOwnProperty,N=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,K={key:!0,ref:!0,__self:!0,__source:!0};function j(c,u,v){var y,d={},S=null,w=null;v!==void 0&&(S=""+v),u.key!==void 0&&(S=""+u.key),u.ref!==void 0&&(w=u.ref);for(y in u)b.call(u,y)&&!K.hasOwnProperty(y)&&(d[y]=u[y]);if(c&&c.defaultProps)for(y in u=c.defaultProps,u)d[y]===void 0&&(d[y]=u[y]);return{$$typeof:f,type:c,key:S,ref:w,props:d,_owner:N.current}}return Ki.Fragment=h,Ki.jsx=j,Ki.jsxs=j,Ki}var gh;function qd(){return gh||(gh=1,nl.exports=Kd()),nl.exports}var oe=qd(),et=Cl();const Xi=Oh(et);var nn={},ll={exports:{}},ut={},al={exports:{}},cl={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its 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 mh;function Xd(){return mh||(mh=1,(function(C){function f(X,L){var O=X.length;X.push(L);e:for(;0<O;){var T=O-1>>>1,P=X[T];if(0<N(P,L))X[T]=L,X[O]=P,O=T;else break e}}function h(X){return X.length===0?null:X[0]}function b(X){if(X.length===0)return null;var L=X[0],O=X.pop();if(O!==L){X[0]=O;e:for(var T=0,P=X.length,J=P>>>1;T<J;){var te=2*(T+1)-1,ce=X[te],he=te+1,U=X[he];if(0>N(ce,O))he<P&&0>N(U,ce)?(X[T]=U,X[he]=O,T=he):(X[T]=ce,X[te]=O,T=te);else if(he<P&&0>N(U,O))X[T]=U,X[he]=O,T=he;else break e}}return L}function N(X,L){var O=X.sortIndex-L.sortIndex;return O!==0?O:X.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var K=performance;C.unstable_now=function(){return K.now()}}else{var j=Date,c=j.now();C.unstable_now=function(){return j.now()-c}}var u=[],v=[],y=1,d=null,S=3,w=!1,R=!1,g=!1,o=typeof setTimeout=="function"?setTimeout:null,l=typeof clearTimeout=="function"?clearTimeout:null,s=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function n(X){for(var L=h(v);L!==null;){if(L.callback===null)b(v);else if(L.startTime<=X)b(v),L.sortIndex=L.expirationTime,f(u,L);else break;L=h(v)}}function p(X){if(g=!1,n(X),!R)if(h(u)!==null)R=!0,se(E);else{var L=h(v);L!==null&&le(p,L.startTime-X)}}function E(X,L){R=!1,g&&(g=!1,l(m),m=-1),w=!0;var O=S;try{for(n(L),d=h(u);d!==null&&(!(d.expirationTime>L)||X&&!F());){var T=d.callback;if(typeof T=="function"){d.callback=null,S=d.priorityLevel;var P=T(d.expirationTime<=L);L=C.unstable_now(),typeof P=="function"?d.callback=P:d===h(u)&&b(u),n(L)}else b(u);d=h(u)}if(d!==null)var J=!0;else{var te=h(v);te!==null&&le(p,te.startTime-L),J=!1}return J}finally{d=null,S=O,w=!1}}var k=!1,x=null,m=-1,A=5,H=-1;function F(){return!(C.unstable_now()-H<A)}function W(){if(x!==null){var X=C.unstable_now();H=X;var L=!0;try{L=x(!0,X)}finally{L?M():(k=!1,x=null)}}else k=!1}var M;if(typeof s=="function")M=function(){s(W)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,ee=Y.port2;Y.port1.onmessage=W,M=function(){ee.postMessage(null)}}else M=function(){o(W,0)};function se(X){x=X,k||(k=!0,M())}function le(X,L){m=o(function(){X(C.unstable_now())},L)}C.unstable_IdlePriority=5,C.unstable_ImmediatePriority=1,C.unstable_LowPriority=4,C.unstable_NormalPriority=3,C.unstable_Profiling=null,C.unstable_UserBlockingPriority=2,C.unstable_cancelCallback=function(X){X.callback=null},C.unstable_continueExecution=function(){R||w||(R=!0,se(E))},C.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<X?Math.floor(1e3/X):5},C.unstable_getCurrentPriorityLevel=function(){return S},C.unstable_getFirstCallbackNode=function(){return h(u)},C.unstable_next=function(X){switch(S){case 1:case 2:case 3:var L=3;break;default:L=S}var O=S;S=L;try{return X()}finally{S=O}},C.unstable_pauseExecution=function(){},C.unstable_requestPaint=function(){},C.unstable_runWithPriority=function(X,L){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var O=S;S=X;try{return L()}finally{S=O}},C.unstable_scheduleCallback=function(X,L,O){var T=C.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?T+O:T):O=T,X){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=O+P,X={id:y++,callback:L,priorityLevel:X,startTime:O,expirationTime:P,sortIndex:-1},O>T?(X.sortIndex=O,f(v,X),h(u)===null&&X===h(v)&&(g?(l(m),m=-1):g=!0,le(p,O-T))):(X.sortIndex=P,f(u,X),R||w||(R=!0,se(E))),X},C.unstable_shouldYield=F,C.unstable_wrapCallback=function(X){var L=S;return function(){var O=S;S=L;try{return X.apply(this,arguments)}finally{S=O}}}})(cl)),cl}var Sh;function Gd(){return Sh||(Sh=1,al.exports=Xd()),al.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its 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 yh;function Yd(){if(yh)return ut;yh=1;var C=Cl(),f=Gd();function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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."}var b=new Set,N={};function K(e,t){j(e,t),j(e+"Capture",t)}function j(e,t){for(N[e]=t,e=0;e<t.length;e++)b.add(t[e])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,v=/^[: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]*$/,y={},d={};function S(e){return u.call(d,e)?!0:u.call(y,e)?!1:v.test(e)?d[e]=!0:(y[e]=!0,!1)}function w(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R(e,t,r,i){if(t===null||typeof t>"u"||w(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function g(e,t,r,i,a,_,D){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=_,this.removeEmptyString=D}var o={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){o[e]=new g(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];o[t]=new g(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){o[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){o[e]=new g(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){o[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){o[e]=new g(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){o[e]=new g(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){o[e]=new g(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){o[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)});var l=/[\-:]([a-z])/g;function s(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(l,s);o[t]=new g(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(l,s);o[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(l,s);o[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){o[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}),o.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){o[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)});function n(e,t,r,i){var a=o.hasOwnProperty(t)?o[t]:null;(a!==null?a.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(R(t,r,a,i)&&(r=null),i||a===null?S(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,i=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var p=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=Symbol.for("react.element"),k=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),F=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),X=Symbol.iterator;function L(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var O=Object.assign,T;function P(e){if(T===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);T=t&&t[1]||""}return`
|
|
34
|
-
`+T+e}var J=!1;function te(e,t){if(!e||J)return"";J=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(G){var i=G}Reflect.construct(e,[],t)}else{try{t.call()}catch(G){i=G}e.call(t.prototype)}else{try{throw Error()}catch(G){i=G}e()}}catch(G){if(G&&i&&typeof G.stack=="string"){for(var a=G.stack.split(`
|
|
35
|
-
`),_=i.stack.split(`
|
|
36
|
-
`),D=a.length-1,I=_.length-1;1<=D&&0<=I&&a[D]!==_[I];)I--;for(;1<=D&&0<=I;D--,I--)if(a[D]!==_[I]){if(D!==1||I!==1)do if(D--,I--,0>I||a[D]!==_[I]){var z=`
|
|
37
|
-
`+a[D].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=D&&0<=I);break}}}finally{J=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?P(e):""}function ce(e){switch(e.tag){case 5:return P(e.type);case 16:return P("Lazy");case 13:return P("Suspense");case 19:return P("SuspenseList");case 0:case 2:case 15:return e=te(e.type,!1),e;case 11:return e=te(e.type.render,!1),e;case 1:return e=te(e.type,!0),e;default:return""}}function he(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case k:return"Portal";case A:return"Profiler";case m:return"StrictMode";case M:return"Suspense";case Y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case F:return(e.displayName||"Context")+".Consumer";case H:return(e._context.displayName||"Context")+".Provider";case W:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case se:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}function U(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(t);case 8:return t===m?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function B(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Z(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Q(e){var t=Z(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,_=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(D){i=""+D,_.call(this,D)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(D){i=""+D},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function de(e){e._valueTracker||(e._valueTracker=Q(e))}function ue(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Z(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Ee(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}}function Le(e,t){var r=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Te(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=B(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qe(e,t){t=t.checked,t!=null&&n(e,"checked",t,!1)}function ye(e,t){qe(e,t);var r=B(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Er(e,t.type,r):t.hasOwnProperty("defaultValue")&&Er(e,t.type,B(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jt(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Er(e,t,r){(t!=="number"||Ee(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wt=Array.isArray;function Mt(e,t,r,i){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&i&&(e[r].defaultSelected=!0)}else{for(r=""+B(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Zt(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(h(91));return O({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tt(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(h(92));if(Wt(r)){if(1<r.length)throw Error(h(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:B(r)}}function er(e,t){var r=B(t.value),i=B(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function dt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function tr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function kr(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?tr(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ft,br=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,a)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ft=ft||document.createElement("div"),ft.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ft.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nt(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var xt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ae=["Webkit","ms","Moz","O"];Object.keys(xt).forEach(function(e){Ae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xt[t]=xt[e]})});function Yi(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||xt.hasOwnProperty(e)&&xt[e]?(""+t).trim():t+"px"}function Tl(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,a=Yi(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,a):e[r]=a}}var Yh=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vn(e,t){if(t){if(Yh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(h(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(h(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(h(61))}if(t.style!=null&&typeof t.style!="object")throw Error(h(62))}}function gn(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 mn=null;function Sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,Fr=null,zr=null;function Al(e){if(e=Ai(e)){if(typeof yn!="function")throw Error(h(280));var t=e.stateNode;t&&(t=Ss(t),yn(e.stateNode,e.type,t))}}function Bl(e){Fr?zr?zr.push(e):zr=[e]:Fr=e}function Ol(){if(Fr){var e=Fr,t=zr;if(zr=Fr=null,Al(e),t)for(e=0;e<t.length;e++)Al(t[e])}}function Pl(e,t){return e(t)}function Ml(){}var wn=!1;function Il(e,t,r){if(wn)return e(t,r);wn=!0;try{return Pl(e,t,r)}finally{wn=!1,(Fr!==null||zr!==null)&&(Ml(),Ol())}}function hi(e,t){var r=e.stateNode;if(r===null)return null;var i=Ss(r);if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(h(231,t,typeof r));return r}var Cn=!1;if(c)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){Cn=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{Cn=!1}function Qh(e,t,r,i,a,_,D,I,z){var G=Array.prototype.slice.call(arguments,3);try{t.apply(r,G)}catch(ie){this.onError(ie)}}var di=!1,Qi=null,Ji=!1,En=null,Jh={onError:function(e){di=!0,Qi=e}};function Zh(e,t,r,i,a,_,D,I,z){di=!1,Qi=null,Qh.apply(Jh,arguments)}function eu(e,t,r,i,a,_,D,I,z){if(Zh.apply(this,arguments),di){if(di){var G=Qi;di=!1,Qi=null}else throw Error(h(198));Ji||(Ji=!0,En=G)}}function xr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Nl(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 Hl(e){if(xr(e)!==e)throw Error(h(188))}function tu(e){var t=e.alternate;if(!t){if(t=xr(e),t===null)throw Error(h(188));return t!==e?null:e}for(var r=e,i=t;;){var a=r.return;if(a===null)break;var _=a.alternate;if(_===null){if(i=a.return,i!==null){r=i;continue}break}if(a.child===_.child){for(_=a.child;_;){if(_===r)return Hl(a),e;if(_===i)return Hl(a),t;_=_.sibling}throw Error(h(188))}if(r.return!==i.return)r=a,i=_;else{for(var D=!1,I=a.child;I;){if(I===r){D=!0,r=a,i=_;break}if(I===i){D=!0,i=a,r=_;break}I=I.sibling}if(!D){for(I=_.child;I;){if(I===r){D=!0,r=_,i=a;break}if(I===i){D=!0,i=_,r=a;break}I=I.sibling}if(!D)throw Error(h(189))}}if(r.alternate!==i)throw Error(h(190))}if(r.tag!==3)throw Error(h(188));return r.stateNode.current===r?e:t}function Fl(e){return e=tu(e),e!==null?zl(e):null}function zl(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=zl(e);if(t!==null)return t;e=e.sibling}return null}var jl=f.unstable_scheduleCallback,Ul=f.unstable_cancelCallback,ru=f.unstable_shouldYield,iu=f.unstable_requestPaint,He=f.unstable_now,su=f.unstable_getCurrentPriorityLevel,kn=f.unstable_ImmediatePriority,Wl=f.unstable_UserBlockingPriority,Zi=f.unstable_NormalPriority,nu=f.unstable_LowPriority,$l=f.unstable_IdlePriority,es=null,It=null;function ou(e){if(It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(es,e,void 0,(e.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:cu,lu=Math.log,au=Math.LN2;function cu(e){return e>>>=0,e===0?32:31-(lu(e)/au|0)|0}var ts=64,rs=4194304;function fi(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function is(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,_=e.pingedLanes,D=r&268435455;if(D!==0){var I=D&~a;I!==0?i=fi(I):(_&=D,_!==0&&(i=fi(_)))}else D=r&~a,D!==0?i=fi(D):_!==0&&(i=fi(_));if(i===0)return 0;if(t!==0&&t!==i&&(t&a)===0&&(a=i&-i,_=t&-t,a>=_||a===16&&(_&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-Rt(t),a=1<<r,i|=e[r],t&=~a;return i}function hu(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uu(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,_=e.pendingLanes;0<_;){var D=31-Rt(_),I=1<<D,z=a[D];z===-1?((I&r)===0||(I&i)!==0)&&(a[D]=hu(I,t)):z<=t&&(e.expiredLanes|=I),_&=~I}}function bn(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Vl(){var e=ts;return ts<<=1,(ts&4194240)===0&&(ts=64),e}function xn(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function _i(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Rt(t),e[t]=r}function du(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-Rt(r),_=1<<a;t[a]=0,i[a]=-1,e[a]=-1,r&=~_}}function Rn(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Rt(r),a=1<<i;a&t|e[i]&t&&(e[i]|=t),r&=~a}}var Re=0;function Kl(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var ql,Ln,Xl,Gl,Yl,Dn=!1,ss=[],rr=null,ir=null,sr=null,pi=new Map,vi=new Map,nr=[],fu="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 submit".split(" ");function Ql(e,t){switch(e){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":ir=null;break;case"mouseover":case"mouseout":sr=null;break;case"pointerover":case"pointerout":pi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vi.delete(t.pointerId)}}function gi(e,t,r,i,a,_){return e===null||e.nativeEvent!==_?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:_,targetContainers:[a]},t!==null&&(t=Ai(t),t!==null&&Ln(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function _u(e,t,r,i,a){switch(t){case"focusin":return rr=gi(rr,e,t,r,i,a),!0;case"dragenter":return ir=gi(ir,e,t,r,i,a),!0;case"mouseover":return sr=gi(sr,e,t,r,i,a),!0;case"pointerover":var _=a.pointerId;return pi.set(_,gi(pi.get(_)||null,e,t,r,i,a)),!0;case"gotpointercapture":return _=a.pointerId,vi.set(_,gi(vi.get(_)||null,e,t,r,i,a)),!0}return!1}function Jl(e){var t=Rr(e.target);if(t!==null){var r=xr(t);if(r!==null){if(t=r.tag,t===13){if(t=Nl(r),t!==null){e.blockedOn=t,Yl(e.priority,function(){Xl(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ns(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=An(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);mn=i,r.target.dispatchEvent(i),mn=null}else return t=Ai(r),t!==null&&Ln(t),e.blockedOn=r,!1;t.shift()}return!0}function Zl(e,t,r){ns(e)&&r.delete(t)}function pu(){Dn=!1,rr!==null&&ns(rr)&&(rr=null),ir!==null&&ns(ir)&&(ir=null),sr!==null&&ns(sr)&&(sr=null),pi.forEach(Zl),vi.forEach(Zl)}function mi(e,t){e.blockedOn===t&&(e.blockedOn=null,Dn||(Dn=!0,f.unstable_scheduleCallback(f.unstable_NormalPriority,pu)))}function Si(e){function t(a){return mi(a,e)}if(0<ss.length){mi(ss[0],e);for(var r=1;r<ss.length;r++){var i=ss[r];i.blockedOn===e&&(i.blockedOn=null)}}for(rr!==null&&mi(rr,e),ir!==null&&mi(ir,e),sr!==null&&mi(sr,e),pi.forEach(t),vi.forEach(t),r=0;r<nr.length;r++)i=nr[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<nr.length&&(r=nr[0],r.blockedOn===null);)Jl(r),r.blockedOn===null&&nr.shift()}var jr=p.ReactCurrentBatchConfig,os=!0;function vu(e,t,r,i){var a=Re,_=jr.transition;jr.transition=null;try{Re=1,Tn(e,t,r,i)}finally{Re=a,jr.transition=_}}function gu(e,t,r,i){var a=Re,_=jr.transition;jr.transition=null;try{Re=4,Tn(e,t,r,i)}finally{Re=a,jr.transition=_}}function Tn(e,t,r,i){if(os){var a=An(e,t,r,i);if(a===null)Xn(e,t,i,ls,r),Ql(e,i);else if(_u(a,e,t,r,i))i.stopPropagation();else if(Ql(e,i),t&4&&-1<fu.indexOf(e)){for(;a!==null;){var _=Ai(a);if(_!==null&&ql(_),_=An(e,t,r,i),_===null&&Xn(e,t,i,ls,r),_===a)break;a=_}a!==null&&i.stopPropagation()}else Xn(e,t,i,null,r)}}var ls=null;function An(e,t,r,i){if(ls=null,e=Sn(i),e=Rr(e),e!==null)if(t=xr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Nl(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ls=e,null}function ea(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(su()){case kn:return 1;case Wl:return 4;case Zi:case nu:return 16;case $l:return 536870912;default:return 16}default:return 16}}var or=null,Bn=null,as=null;function ta(){if(as)return as;var e,t=Bn,r=t.length,i,a="value"in or?or.value:or.textContent,_=a.length;for(e=0;e<r&&t[e]===a[e];e++);var D=r-e;for(i=1;i<=D&&t[r-i]===a[_-i];i++);return as=a.slice(e,1<i?1-i:void 0)}function cs(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 hs(){return!0}function ra(){return!1}function _t(e){function t(r,i,a,_,D){this._reactName=r,this._targetInst=a,this.type=i,this.nativeEvent=_,this.target=D,this.currentTarget=null;for(var I in e)e.hasOwnProperty(I)&&(r=e[I],this[I]=r?r(_):_[I]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?hs:ra,this.isPropagationStopped=ra,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=hs)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=hs)},persist:function(){},isPersistent:hs}),t}var Ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},On=_t(Ur),yi=O({},Ur,{view:0,detail:0}),mu=_t(yi),Pn,Mn,wi,us=O({},yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nn,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!==wi&&(wi&&e.type==="mousemove"?(Pn=e.screenX-wi.screenX,Mn=e.screenY-wi.screenY):Mn=Pn=0,wi=e),Pn)},movementY:function(e){return"movementY"in e?e.movementY:Mn}}),ia=_t(us),Su=O({},us,{dataTransfer:0}),yu=_t(Su),wu=O({},yi,{relatedTarget:0}),In=_t(wu),Cu=O({},Ur,{animationName:0,elapsedTime:0,pseudoElement:0}),Eu=_t(Cu),ku=O({},Ur,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bu=_t(ku),xu=O({},Ur,{data:0}),sa=_t(xu),Ru={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lu={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"},Du={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tu(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Du[e])?!!t[e]:!1}function Nn(){return Tu}var Au=O({},yi,{key:function(e){if(e.key){var t=Ru[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Lu[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nn,charCode:function(e){return e.type==="keypress"?cs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Bu=_t(Au),Ou=O({},us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),na=_t(Ou),Pu=O({},yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nn}),Mu=_t(Pu),Iu=O({},Ur,{propertyName:0,elapsedTime:0,pseudoElement:0}),Nu=_t(Iu),Hu=O({},us,{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}),Fu=_t(Hu),zu=[9,13,27,32],Hn=c&&"CompositionEvent"in window,Ci=null;c&&"documentMode"in document&&(Ci=document.documentMode);var ju=c&&"TextEvent"in window&&!Ci,oa=c&&(!Hn||Ci&&8<Ci&&11>=Ci),la=" ",aa=!1;function ca(e,t){switch(e){case"keyup":return zu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ha(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function Uu(e,t){switch(e){case"compositionend":return ha(t);case"keypress":return t.which!==32?null:(aa=!0,la);case"textInput":return e=t.data,e===la&&aa?null:e;default:return null}}function Wu(e,t){if(Wr)return e==="compositionend"||!Hn&&ca(e,t)?(e=ta(),as=Bn=or=null,Wr=!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 oa&&t.locale!=="ko"?null:t.data;default:return null}}var $u={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 ua(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$u[e.type]:t==="textarea"}function da(e,t,r,i){Bl(i),t=vs(t,"onChange"),0<t.length&&(r=new On("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Ei=null,ki=null;function Vu(e){Ta(e,0)}function ds(e){var t=Xr(e);if(ue(t))return e}function Ku(e,t){if(e==="change")return t}var fa=!1;if(c){var Fn;if(c){var zn="oninput"in document;if(!zn){var _a=document.createElement("div");_a.setAttribute("oninput","return;"),zn=typeof _a.oninput=="function"}Fn=zn}else Fn=!1;fa=Fn&&(!document.documentMode||9<document.documentMode)}function pa(){Ei&&(Ei.detachEvent("onpropertychange",va),ki=Ei=null)}function va(e){if(e.propertyName==="value"&&ds(ki)){var t=[];da(t,ki,e,Sn(e)),Il(Vu,t)}}function qu(e,t,r){e==="focusin"?(pa(),Ei=t,ki=r,Ei.attachEvent("onpropertychange",va)):e==="focusout"&&pa()}function Xu(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ds(ki)}function Gu(e,t){if(e==="click")return ds(t)}function Yu(e,t){if(e==="input"||e==="change")return ds(t)}function Qu(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lt=typeof Object.is=="function"?Object.is:Qu;function bi(e,t){if(Lt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var a=r[i];if(!u.call(t,a)||!Lt(e[a],t[a]))return!1}return!0}function ga(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ma(e,t){var r=ga(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ga(r)}}function Sa(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sa(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ya(){for(var e=window,t=Ee();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ee(e.document)}return t}function jn(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")}function Ju(e){var t=ya(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Sa(r.ownerDocument.documentElement,r)){if(i!==null&&jn(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,_=Math.min(i.start,a);i=i.end===void 0?_:Math.min(i.end,a),!e.extend&&_>i&&(a=i,i=_,_=a),a=ma(r,_);var D=ma(r,i);a&&D&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==D.node||e.focusOffset!==D.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),_>i?(e.addRange(t),e.extend(D.node,D.offset)):(t.setEnd(D.node,D.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Zu=c&&"documentMode"in document&&11>=document.documentMode,$r=null,Un=null,xi=null,Wn=!1;function wa(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Wn||$r==null||$r!==Ee(i)||(i=$r,"selectionStart"in i&&jn(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),xi&&bi(xi,i)||(xi=i,i=vs(Un,"onSelect"),0<i.length&&(t=new On("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=$r)))}function fs(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vr={animationend:fs("Animation","AnimationEnd"),animationiteration:fs("Animation","AnimationIteration"),animationstart:fs("Animation","AnimationStart"),transitionend:fs("Transition","TransitionEnd")},$n={},Ca={};c&&(Ca=document.createElement("div").style,"AnimationEvent"in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),"TransitionEvent"in window||delete Vr.transitionend.transition);function _s(e){if($n[e])return $n[e];if(!Vr[e])return e;var t=Vr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ca)return $n[e]=t[r];return e}var Ea=_s("animationend"),ka=_s("animationiteration"),ba=_s("animationstart"),xa=_s("transitionend"),Ra=new Map,La="abort auxClick 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(" ");function lr(e,t){Ra.set(e,t),K(t,[e])}for(var Vn=0;Vn<La.length;Vn++){var Kn=La[Vn],ed=Kn.toLowerCase(),td=Kn[0].toUpperCase()+Kn.slice(1);lr(ed,"on"+td)}lr(Ea,"onAnimationEnd"),lr(ka,"onAnimationIteration"),lr(ba,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(xa,"onTransitionEnd"),j("onMouseEnter",["mouseout","mouseover"]),j("onMouseLeave",["mouseout","mouseover"]),j("onPointerEnter",["pointerout","pointerover"]),j("onPointerLeave",["pointerout","pointerover"]),K("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),K("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),K("onBeforeInput",["compositionend","keypress","textInput","paste"]),K("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),K("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),K("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ri="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(" "),rd=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ri));function Da(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,eu(i,t,void 0,e),e.currentTarget=null}function Ta(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],a=i.event;i=i.listeners;e:{var _=void 0;if(t)for(var D=i.length-1;0<=D;D--){var I=i[D],z=I.instance,G=I.currentTarget;if(I=I.listener,z!==_&&a.isPropagationStopped())break e;Da(a,I,G),_=z}else for(D=0;D<i.length;D++){if(I=i[D],z=I.instance,G=I.currentTarget,I=I.listener,z!==_&&a.isPropagationStopped())break e;Da(a,I,G),_=z}}}if(Ji)throw e=En,Ji=!1,En=null,e}function Be(e,t){var r=t[eo];r===void 0&&(r=t[eo]=new Set);var i=e+"__bubble";r.has(i)||(Aa(t,e,2,!1),r.add(i))}function qn(e,t,r){var i=0;t&&(i|=4),Aa(r,e,i,t)}var ps="_reactListening"+Math.random().toString(36).slice(2);function Li(e){if(!e[ps]){e[ps]=!0,b.forEach(function(r){r!=="selectionchange"&&(rd.has(r)||qn(r,!1,e),qn(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ps]||(t[ps]=!0,qn("selectionchange",!1,t))}}function Aa(e,t,r,i){switch(ea(t)){case 1:var a=vu;break;case 4:a=gu;break;default:a=Tn}r=a.bind(null,t,r,e),a=void 0,!Cn||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function Xn(e,t,r,i,a){var _=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var D=i.tag;if(D===3||D===4){var I=i.stateNode.containerInfo;if(I===a||I.nodeType===8&&I.parentNode===a)break;if(D===4)for(D=i.return;D!==null;){var z=D.tag;if((z===3||z===4)&&(z=D.stateNode.containerInfo,z===a||z.nodeType===8&&z.parentNode===a))return;D=D.return}for(;I!==null;){if(D=Rr(I),D===null)return;if(z=D.tag,z===5||z===6){i=_=D;continue e}I=I.parentNode}}i=i.return}Il(function(){var G=_,ie=Sn(r),ne=[];e:{var re=Ra.get(e);if(re!==void 0){var fe=On,pe=e;switch(e){case"keypress":if(cs(r)===0)break e;case"keydown":case"keyup":fe=Bu;break;case"focusin":pe="focus",fe=In;break;case"focusout":pe="blur",fe=In;break;case"beforeblur":case"afterblur":fe=In;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=ia;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=yu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=Mu;break;case Ea:case ka:case ba:fe=Eu;break;case xa:fe=Nu;break;case"scroll":fe=mu;break;case"wheel":fe=Fu;break;case"copy":case"cut":case"paste":fe=bu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=na}var ve=(t&4)!==0,Fe=!ve&&e==="scroll",V=ve?re!==null?re+"Capture":null:re;ve=[];for(var $=G,q;$!==null;){q=$;var ae=q.stateNode;if(q.tag===5&&ae!==null&&(q=ae,V!==null&&(ae=hi($,V),ae!=null&&ve.push(Di($,ae,q)))),Fe)break;$=$.return}0<ve.length&&(re=new fe(re,pe,null,r,ie),ne.push({event:re,listeners:ve}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",re&&r!==mn&&(pe=r.relatedTarget||r.fromElement)&&(Rr(pe)||pe[$t]))break e;if((fe||re)&&(re=ie.window===ie?ie:(re=ie.ownerDocument)?re.defaultView||re.parentWindow:window,fe?(pe=r.relatedTarget||r.toElement,fe=G,pe=pe?Rr(pe):null,pe!==null&&(Fe=xr(pe),pe!==Fe||pe.tag!==5&&pe.tag!==6)&&(pe=null)):(fe=null,pe=G),fe!==pe)){if(ve=ia,ae="onMouseLeave",V="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(ve=na,ae="onPointerLeave",V="onPointerEnter",$="pointer"),Fe=fe==null?re:Xr(fe),q=pe==null?re:Xr(pe),re=new ve(ae,$+"leave",fe,r,ie),re.target=Fe,re.relatedTarget=q,ae=null,Rr(ie)===G&&(ve=new ve(V,$+"enter",pe,r,ie),ve.target=q,ve.relatedTarget=Fe,ae=ve),Fe=ae,fe&&pe)t:{for(ve=fe,V=pe,$=0,q=ve;q;q=Kr(q))$++;for(q=0,ae=V;ae;ae=Kr(ae))q++;for(;0<$-q;)ve=Kr(ve),$--;for(;0<q-$;)V=Kr(V),q--;for(;$--;){if(ve===V||V!==null&&ve===V.alternate)break t;ve=Kr(ve),V=Kr(V)}ve=null}else ve=null;fe!==null&&Ba(ne,re,fe,ve,!1),pe!==null&&Fe!==null&&Ba(ne,Fe,pe,ve,!0)}}e:{if(re=G?Xr(G):window,fe=re.nodeName&&re.nodeName.toLowerCase(),fe==="select"||fe==="input"&&re.type==="file")var ge=Ku;else if(ua(re))if(fa)ge=Yu;else{ge=Xu;var me=qu}else(fe=re.nodeName)&&fe.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(ge=Gu);if(ge&&(ge=ge(e,G))){da(ne,ge,r,ie);break e}me&&me(e,re,G),e==="focusout"&&(me=re._wrapperState)&&me.controlled&&re.type==="number"&&Er(re,"number",re.value)}switch(me=G?Xr(G):window,e){case"focusin":(ua(me)||me.contentEditable==="true")&&($r=me,Un=G,xi=null);break;case"focusout":xi=Un=$r=null;break;case"mousedown":Wn=!0;break;case"contextmenu":case"mouseup":case"dragend":Wn=!1,wa(ne,r,ie);break;case"selectionchange":if(Zu)break;case"keydown":case"keyup":wa(ne,r,ie)}var Se;if(Hn)e:{switch(e){case"compositionstart":var we="onCompositionStart";break e;case"compositionend":we="onCompositionEnd";break e;case"compositionupdate":we="onCompositionUpdate";break e}we=void 0}else Wr?ca(e,r)&&(we="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(we="onCompositionStart");we&&(oa&&r.locale!=="ko"&&(Wr||we!=="onCompositionStart"?we==="onCompositionEnd"&&Wr&&(Se=ta()):(or=ie,Bn="value"in or?or.value:or.textContent,Wr=!0)),me=vs(G,we),0<me.length&&(we=new sa(we,e,null,r,ie),ne.push({event:we,listeners:me}),Se?we.data=Se:(Se=ha(r),Se!==null&&(we.data=Se)))),(Se=ju?Uu(e,r):Wu(e,r))&&(G=vs(G,"onBeforeInput"),0<G.length&&(ie=new sa("onBeforeInput","beforeinput",null,r,ie),ne.push({event:ie,listeners:G}),ie.data=Se))}Ta(ne,t)})}function Di(e,t,r){return{instance:e,listener:t,currentTarget:r}}function vs(e,t){for(var r=t+"Capture",i=[];e!==null;){var a=e,_=a.stateNode;a.tag===5&&_!==null&&(a=_,_=hi(e,r),_!=null&&i.unshift(Di(e,_,a)),_=hi(e,t),_!=null&&i.push(Di(e,_,a))),e=e.return}return i}function Kr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ba(e,t,r,i,a){for(var _=t._reactName,D=[];r!==null&&r!==i;){var I=r,z=I.alternate,G=I.stateNode;if(z!==null&&z===i)break;I.tag===5&&G!==null&&(I=G,a?(z=hi(r,_),z!=null&&D.unshift(Di(r,z,I))):a||(z=hi(r,_),z!=null&&D.push(Di(r,z,I)))),r=r.return}D.length!==0&&e.push({event:t,listeners:D})}var id=/\r\n?/g,sd=/\u0000|\uFFFD/g;function Oa(e){return(typeof e=="string"?e:""+e).replace(id,`
|
|
38
|
-
`).replace(sd,"")}function gs(e,t,r){if(t=Oa(t),Oa(e)!==t&&r)throw Error(h(425))}function ms(){}var Gn=null,Yn=null;function Qn(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jn=typeof setTimeout=="function"?setTimeout:void 0,nd=typeof clearTimeout=="function"?clearTimeout:void 0,Pa=typeof Promise=="function"?Promise:void 0,od=typeof queueMicrotask=="function"?queueMicrotask:typeof Pa<"u"?function(e){return Pa.resolve(null).then(e).catch(ld)}:Jn;function ld(e){setTimeout(function(){throw e})}function Zn(e,t){var r=t,i=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(i===0){e.removeChild(a),Si(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=a}while(r);Si(t)}function ar(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==="$?")break;if(t==="/$")return null}}return e}function Ma(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var qr=Math.random().toString(36).slice(2),Nt="__reactFiber$"+qr,Ti="__reactProps$"+qr,$t="__reactContainer$"+qr,eo="__reactEvents$"+qr,ad="__reactListeners$"+qr,cd="__reactHandles$"+qr;function Rr(e){var t=e[Nt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[$t]||r[Nt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ma(e);e!==null;){if(r=e[Nt])return r;e=Ma(e)}return t}e=r,r=e.parentNode}return null}function Ai(e){return e=e[Nt]||e[$t],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(h(33))}function Ss(e){return e[Ti]||null}var to=[],Gr=-1;function cr(e){return{current:e}}function Oe(e){0>Gr||(e.current=to[Gr],to[Gr]=null,Gr--)}function De(e,t){Gr++,to[Gr]=e.current,e.current=t}var hr={},Ye=cr(hr),ot=cr(!1),Lr=hr;function Yr(e,t){var r=e.type.contextTypes;if(!r)return hr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var a={},_;for(_ in r)a[_]=t[_];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function lt(e){return e=e.childContextTypes,e!=null}function ys(){Oe(ot),Oe(Ye)}function Ia(e,t,r){if(Ye.current!==hr)throw Error(h(168));De(Ye,t),De(ot,r)}function Na(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var a in i)if(!(a in t))throw Error(h(108,U(e)||"Unknown",a));return O({},r,i)}function ws(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hr,Lr=Ye.current,De(Ye,e),De(ot,ot.current),!0}function Ha(e,t,r){var i=e.stateNode;if(!i)throw Error(h(169));r?(e=Na(e,t,Lr),i.__reactInternalMemoizedMergedChildContext=e,Oe(ot),Oe(Ye),De(Ye,e)):Oe(ot),De(ot,r)}var Vt=null,Cs=!1,ro=!1;function Fa(e){Vt===null?Vt=[e]:Vt.push(e)}function hd(e){Cs=!0,Fa(e)}function ur(){if(!ro&&Vt!==null){ro=!0;var e=0,t=Re;try{var r=Vt;for(Re=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}Vt=null,Cs=!1}catch(a){throw Vt!==null&&(Vt=Vt.slice(e+1)),jl(kn,ur),a}finally{Re=t,ro=!1}}return null}var Qr=[],Jr=0,Es=null,ks=0,mt=[],St=0,Dr=null,Kt=1,qt="";function Tr(e,t){Qr[Jr++]=ks,Qr[Jr++]=Es,Es=e,ks=t}function za(e,t,r){mt[St++]=Kt,mt[St++]=qt,mt[St++]=Dr,Dr=e;var i=Kt;e=qt;var a=32-Rt(i)-1;i&=~(1<<a),r+=1;var _=32-Rt(t)+a;if(30<_){var D=a-a%5;_=(i&(1<<D)-1).toString(32),i>>=D,a-=D,Kt=1<<32-Rt(t)+a|r<<a|i,qt=_+e}else Kt=1<<_|r<<a|i,qt=e}function io(e){e.return!==null&&(Tr(e,1),za(e,1,0))}function so(e){for(;e===Es;)Es=Qr[--Jr],Qr[Jr]=null,ks=Qr[--Jr],Qr[Jr]=null;for(;e===Dr;)Dr=mt[--St],mt[St]=null,qt=mt[--St],mt[St]=null,Kt=mt[--St],mt[St]=null}var pt=null,vt=null,Pe=!1,Dt=null;function ja(e,t){var r=Et(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Ua(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,pt=e,vt=ar(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,pt=e,vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Dr!==null?{id:Kt,overflow:qt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Et(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,pt=e,vt=null,!0):!1;default:return!1}}function no(e){return(e.mode&1)!==0&&(e.flags&128)===0}function oo(e){if(Pe){var t=vt;if(t){var r=t;if(!Ua(e,t)){if(no(e))throw Error(h(418));t=ar(r.nextSibling);var i=pt;t&&Ua(e,t)?ja(i,r):(e.flags=e.flags&-4097|2,Pe=!1,pt=e)}}else{if(no(e))throw Error(h(418));e.flags=e.flags&-4097|2,Pe=!1,pt=e}}}function Wa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function bs(e){if(e!==pt)return!1;if(!Pe)return Wa(e),Pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Qn(e.type,e.memoizedProps)),t&&(t=vt)){if(no(e))throw $a(),Error(h(418));for(;t;)ja(e,t),t=ar(t.nextSibling)}if(Wa(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(h(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){vt=ar(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}vt=null}}else vt=pt?ar(e.stateNode.nextSibling):null;return!0}function $a(){for(var e=vt;e;)e=ar(e.nextSibling)}function Zr(){vt=pt=null,Pe=!1}function lo(e){Dt===null?Dt=[e]:Dt.push(e)}var ud=p.ReactCurrentBatchConfig;function Bi(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(h(309));var i=r.stateNode}if(!i)throw Error(h(147,e));var a=i,_=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===_?t.ref:(t=function(D){var I=a.refs;D===null?delete I[_]:I[_]=D},t._stringRef=_,t)}if(typeof e!="string")throw Error(h(284));if(!r._owner)throw Error(h(290,e))}return e}function xs(e,t){throw e=Object.prototype.toString.call(t),Error(h(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Va(e){var t=e._init;return t(e._payload)}function Ka(e){function t(V,$){if(e){var q=V.deletions;q===null?(V.deletions=[$],V.flags|=16):q.push($)}}function r(V,$){if(!e)return null;for(;$!==null;)t(V,$),$=$.sibling;return null}function i(V,$){for(V=new Map;$!==null;)$.key!==null?V.set($.key,$):V.set($.index,$),$=$.sibling;return V}function a(V,$){return V=Sr(V,$),V.index=0,V.sibling=null,V}function _(V,$,q){return V.index=q,e?(q=V.alternate,q!==null?(q=q.index,q<$?(V.flags|=2,$):q):(V.flags|=2,$)):(V.flags|=1048576,$)}function D(V){return e&&V.alternate===null&&(V.flags|=2),V}function I(V,$,q,ae){return $===null||$.tag!==6?($=Zo(q,V.mode,ae),$.return=V,$):($=a($,q),$.return=V,$)}function z(V,$,q,ae){var ge=q.type;return ge===x?ie(V,$,q.props.children,ae,q.key):$!==null&&($.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===se&&Va(ge)===$.type)?(ae=a($,q.props),ae.ref=Bi(V,$,q),ae.return=V,ae):(ae=Ys(q.type,q.key,q.props,null,V.mode,ae),ae.ref=Bi(V,$,q),ae.return=V,ae)}function G(V,$,q,ae){return $===null||$.tag!==4||$.stateNode.containerInfo!==q.containerInfo||$.stateNode.implementation!==q.implementation?($=el(q,V.mode,ae),$.return=V,$):($=a($,q.children||[]),$.return=V,$)}function ie(V,$,q,ae,ge){return $===null||$.tag!==7?($=Hr(q,V.mode,ae,ge),$.return=V,$):($=a($,q),$.return=V,$)}function ne(V,$,q){if(typeof $=="string"&&$!==""||typeof $=="number")return $=Zo(""+$,V.mode,q),$.return=V,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case E:return q=Ys($.type,$.key,$.props,null,V.mode,q),q.ref=Bi(V,null,$),q.return=V,q;case k:return $=el($,V.mode,q),$.return=V,$;case se:var ae=$._init;return ne(V,ae($._payload),q)}if(Wt($)||L($))return $=Hr($,V.mode,q,null),$.return=V,$;xs(V,$)}return null}function re(V,$,q,ae){var ge=$!==null?$.key:null;if(typeof q=="string"&&q!==""||typeof q=="number")return ge!==null?null:I(V,$,""+q,ae);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case E:return q.key===ge?z(V,$,q,ae):null;case k:return q.key===ge?G(V,$,q,ae):null;case se:return ge=q._init,re(V,$,ge(q._payload),ae)}if(Wt(q)||L(q))return ge!==null?null:ie(V,$,q,ae,null);xs(V,q)}return null}function fe(V,$,q,ae,ge){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return V=V.get(q)||null,I($,V,""+ae,ge);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case E:return V=V.get(ae.key===null?q:ae.key)||null,z($,V,ae,ge);case k:return V=V.get(ae.key===null?q:ae.key)||null,G($,V,ae,ge);case se:var me=ae._init;return fe(V,$,q,me(ae._payload),ge)}if(Wt(ae)||L(ae))return V=V.get(q)||null,ie($,V,ae,ge,null);xs($,ae)}return null}function pe(V,$,q,ae){for(var ge=null,me=null,Se=$,we=$=0,Ke=null;Se!==null&&we<q.length;we++){Se.index>we?(Ke=Se,Se=null):Ke=Se.sibling;var xe=re(V,Se,q[we],ae);if(xe===null){Se===null&&(Se=Ke);break}e&&Se&&xe.alternate===null&&t(V,Se),$=_(xe,$,we),me===null?ge=xe:me.sibling=xe,me=xe,Se=Ke}if(we===q.length)return r(V,Se),Pe&&Tr(V,we),ge;if(Se===null){for(;we<q.length;we++)Se=ne(V,q[we],ae),Se!==null&&($=_(Se,$,we),me===null?ge=Se:me.sibling=Se,me=Se);return Pe&&Tr(V,we),ge}for(Se=i(V,Se);we<q.length;we++)Ke=fe(Se,V,we,q[we],ae),Ke!==null&&(e&&Ke.alternate!==null&&Se.delete(Ke.key===null?we:Ke.key),$=_(Ke,$,we),me===null?ge=Ke:me.sibling=Ke,me=Ke);return e&&Se.forEach(function(yr){return t(V,yr)}),Pe&&Tr(V,we),ge}function ve(V,$,q,ae){var ge=L(q);if(typeof ge!="function")throw Error(h(150));if(q=ge.call(q),q==null)throw Error(h(151));for(var me=ge=null,Se=$,we=$=0,Ke=null,xe=q.next();Se!==null&&!xe.done;we++,xe=q.next()){Se.index>we?(Ke=Se,Se=null):Ke=Se.sibling;var yr=re(V,Se,xe.value,ae);if(yr===null){Se===null&&(Se=Ke);break}e&&Se&&yr.alternate===null&&t(V,Se),$=_(yr,$,we),me===null?ge=yr:me.sibling=yr,me=yr,Se=Ke}if(xe.done)return r(V,Se),Pe&&Tr(V,we),ge;if(Se===null){for(;!xe.done;we++,xe=q.next())xe=ne(V,xe.value,ae),xe!==null&&($=_(xe,$,we),me===null?ge=xe:me.sibling=xe,me=xe);return Pe&&Tr(V,we),ge}for(Se=i(V,Se);!xe.done;we++,xe=q.next())xe=fe(Se,V,we,xe.value,ae),xe!==null&&(e&&xe.alternate!==null&&Se.delete(xe.key===null?we:xe.key),$=_(xe,$,we),me===null?ge=xe:me.sibling=xe,me=xe);return e&&Se.forEach(function($d){return t(V,$d)}),Pe&&Tr(V,we),ge}function Fe(V,$,q,ae){if(typeof q=="object"&&q!==null&&q.type===x&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case E:e:{for(var ge=q.key,me=$;me!==null;){if(me.key===ge){if(ge=q.type,ge===x){if(me.tag===7){r(V,me.sibling),$=a(me,q.props.children),$.return=V,V=$;break e}}else if(me.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===se&&Va(ge)===me.type){r(V,me.sibling),$=a(me,q.props),$.ref=Bi(V,me,q),$.return=V,V=$;break e}r(V,me);break}else t(V,me);me=me.sibling}q.type===x?($=Hr(q.props.children,V.mode,ae,q.key),$.return=V,V=$):(ae=Ys(q.type,q.key,q.props,null,V.mode,ae),ae.ref=Bi(V,$,q),ae.return=V,V=ae)}return D(V);case k:e:{for(me=q.key;$!==null;){if($.key===me)if($.tag===4&&$.stateNode.containerInfo===q.containerInfo&&$.stateNode.implementation===q.implementation){r(V,$.sibling),$=a($,q.children||[]),$.return=V,V=$;break e}else{r(V,$);break}else t(V,$);$=$.sibling}$=el(q,V.mode,ae),$.return=V,V=$}return D(V);case se:return me=q._init,Fe(V,$,me(q._payload),ae)}if(Wt(q))return pe(V,$,q,ae);if(L(q))return ve(V,$,q,ae);xs(V,q)}return typeof q=="string"&&q!==""||typeof q=="number"?(q=""+q,$!==null&&$.tag===6?(r(V,$.sibling),$=a($,q),$.return=V,V=$):(r(V,$),$=Zo(q,V.mode,ae),$.return=V,V=$),D(V)):r(V,$)}return Fe}var ei=Ka(!0),qa=Ka(!1),Rs=cr(null),Ls=null,ti=null,ao=null;function co(){ao=ti=Ls=null}function ho(e){var t=Rs.current;Oe(Rs),e._currentValue=t}function uo(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function ri(e,t){Ls=e,ao=ti=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(at=!0),e.firstContext=null)}function yt(e){var t=e._currentValue;if(ao!==e)if(e={context:e,memoizedValue:t,next:null},ti===null){if(Ls===null)throw Error(h(308));ti=e,Ls.dependencies={lanes:0,firstContext:e}}else ti=ti.next=e;return t}var Ar=null;function fo(e){Ar===null?Ar=[e]:Ar.push(e)}function Xa(e,t,r,i){var a=t.interleaved;return a===null?(r.next=r,fo(t)):(r.next=a.next,a.next=r),t.interleaved=r,Xt(e,i)}function Xt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var dr=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fr(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(be&2)!==0){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,Xt(e,r)}return a=i.interleaved,a===null?(t.next=t,fo(i)):(t.next=a.next,a.next=t),i.interleaved=t,Xt(e,r)}function Ds(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Rn(e,r)}}function Ya(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var a=null,_=null;if(r=r.firstBaseUpdate,r!==null){do{var D={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};_===null?a=_=D:_=_.next=D,r=r.next}while(r!==null);_===null?a=_=t:_=_.next=t}else a=_=t;r={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:_,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ts(e,t,r,i){var a=e.updateQueue;dr=!1;var _=a.firstBaseUpdate,D=a.lastBaseUpdate,I=a.shared.pending;if(I!==null){a.shared.pending=null;var z=I,G=z.next;z.next=null,D===null?_=G:D.next=G,D=z;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,I=ie.lastBaseUpdate,I!==D&&(I===null?ie.firstBaseUpdate=G:I.next=G,ie.lastBaseUpdate=z))}if(_!==null){var ne=a.baseState;D=0,ie=G=z=null,I=_;do{var re=I.lane,fe=I.eventTime;if((i&re)===re){ie!==null&&(ie=ie.next={eventTime:fe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var pe=e,ve=I;switch(re=t,fe=r,ve.tag){case 1:if(pe=ve.payload,typeof pe=="function"){ne=pe.call(fe,ne,re);break e}ne=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=ve.payload,re=typeof pe=="function"?pe.call(fe,ne,re):pe,re==null)break e;ne=O({},ne,re);break e;case 2:dr=!0}}I.callback!==null&&I.lane!==0&&(e.flags|=64,re=a.effects,re===null?a.effects=[I]:re.push(I))}else fe={eventTime:fe,lane:re,tag:I.tag,payload:I.payload,callback:I.callback,next:null},ie===null?(G=ie=fe,z=ne):ie=ie.next=fe,D|=re;if(I=I.next,I===null){if(I=a.shared.pending,I===null)break;re=I,I=re.next,re.next=null,a.lastBaseUpdate=re,a.shared.pending=null}}while(!0);if(ie===null&&(z=ne),a.baseState=z,a.firstBaseUpdate=G,a.lastBaseUpdate=ie,t=a.shared.interleaved,t!==null){a=t;do D|=a.lane,a=a.next;while(a!==t)}else _===null&&(a.shared.lanes=0);Pr|=D,e.lanes=D,e.memoizedState=ne}}function Qa(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=r,typeof a!="function")throw Error(h(191,a));a.call(i)}}}var Oi={},Ht=cr(Oi),Pi=cr(Oi),Mi=cr(Oi);function Br(e){if(e===Oi)throw Error(h(174));return e}function po(e,t){switch(De(Mi,t),De(Pi,e),De(Ht,Oi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kr(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kr(t,e)}Oe(Ht),De(Ht,t)}function ii(){Oe(Ht),Oe(Pi),Oe(Mi)}function Ja(e){Br(Mi.current);var t=Br(Ht.current),r=kr(t,e.type);t!==r&&(De(Pi,e),De(Ht,r))}function vo(e){Pi.current===e&&(Oe(Ht),Oe(Pi))}var Me=cr(0);function As(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 go=[];function mo(){for(var e=0;e<go.length;e++)go[e]._workInProgressVersionPrimary=null;go.length=0}var Bs=p.ReactCurrentDispatcher,So=p.ReactCurrentBatchConfig,Or=0,Ie=null,Ue=null,$e=null,Os=!1,Ii=!1,Ni=0,dd=0;function Qe(){throw Error(h(321))}function yo(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Lt(e[r],t[r]))return!1;return!0}function wo(e,t,r,i,a,_){if(Or=_,Ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bs.current=e===null||e.memoizedState===null?vd:gd,e=r(i,a),Ii){_=0;do{if(Ii=!1,Ni=0,25<=_)throw Error(h(301));_+=1,$e=Ue=null,t.updateQueue=null,Bs.current=md,e=r(i,a)}while(Ii)}if(Bs.current=Is,t=Ue!==null&&Ue.next!==null,Or=0,$e=Ue=Ie=null,Os=!1,t)throw Error(h(300));return e}function Co(){var e=Ni!==0;return Ni=0,e}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?Ie.memoizedState=$e=e:$e=$e.next=e,$e}function wt(){if(Ue===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=$e===null?Ie.memoizedState:$e.next;if(t!==null)$e=t,Ue=e;else{if(e===null)throw Error(h(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},$e===null?Ie.memoizedState=$e=e:$e=$e.next=e}return $e}function Hi(e,t){return typeof t=="function"?t(e):t}function Eo(e){var t=wt(),r=t.queue;if(r===null)throw Error(h(311));r.lastRenderedReducer=e;var i=Ue,a=i.baseQueue,_=r.pending;if(_!==null){if(a!==null){var D=a.next;a.next=_.next,_.next=D}i.baseQueue=a=_,r.pending=null}if(a!==null){_=a.next,i=i.baseState;var I=D=null,z=null,G=_;do{var ie=G.lane;if((Or&ie)===ie)z!==null&&(z=z.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),i=G.hasEagerState?G.eagerState:e(i,G.action);else{var ne={lane:ie,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};z===null?(I=z=ne,D=i):z=z.next=ne,Ie.lanes|=ie,Pr|=ie}G=G.next}while(G!==null&&G!==_);z===null?D=i:z.next=I,Lt(i,t.memoizedState)||(at=!0),t.memoizedState=i,t.baseState=D,t.baseQueue=z,r.lastRenderedState=i}if(e=r.interleaved,e!==null){a=e;do _=a.lane,Ie.lanes|=_,Pr|=_,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ko(e){var t=wt(),r=t.queue;if(r===null)throw Error(h(311));r.lastRenderedReducer=e;var i=r.dispatch,a=r.pending,_=t.memoizedState;if(a!==null){r.pending=null;var D=a=a.next;do _=e(_,D.action),D=D.next;while(D!==a);Lt(_,t.memoizedState)||(at=!0),t.memoizedState=_,t.baseQueue===null&&(t.baseState=_),r.lastRenderedState=_}return[_,i]}function Za(){}function ec(e,t){var r=Ie,i=wt(),a=t(),_=!Lt(i.memoizedState,a);if(_&&(i.memoizedState=a,at=!0),i=i.queue,bo(ic.bind(null,r,i,e),[e]),i.getSnapshot!==t||_||$e!==null&&$e.memoizedState.tag&1){if(r.flags|=2048,Fi(9,rc.bind(null,r,i,a,t),void 0,null),Ve===null)throw Error(h(349));(Or&30)!==0||tc(r,t,a)}return a}function tc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function rc(e,t,r,i){t.value=r,t.getSnapshot=i,sc(t)&&nc(e)}function ic(e,t,r){return r(function(){sc(t)&&nc(e)})}function sc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Lt(e,r)}catch{return!0}}function nc(e){var t=Xt(e,1);t!==null&&Ot(t,e,1,-1)}function oc(e){var t=Ft();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:e},t.queue=e,e=e.dispatch=pd.bind(null,Ie,e),[t.memoizedState,e]}function Fi(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function lc(){return wt().memoizedState}function Ps(e,t,r,i){var a=Ft();Ie.flags|=e,a.memoizedState=Fi(1|t,r,void 0,i===void 0?null:i)}function Ms(e,t,r,i){var a=wt();i=i===void 0?null:i;var _=void 0;if(Ue!==null){var D=Ue.memoizedState;if(_=D.destroy,i!==null&&yo(i,D.deps)){a.memoizedState=Fi(t,r,_,i);return}}Ie.flags|=e,a.memoizedState=Fi(1|t,r,_,i)}function ac(e,t){return Ps(8390656,8,e,t)}function bo(e,t){return Ms(2048,8,e,t)}function cc(e,t){return Ms(4,2,e,t)}function hc(e,t){return Ms(4,4,e,t)}function uc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dc(e,t,r){return r=r!=null?r.concat([e]):null,Ms(4,4,uc.bind(null,t,e),r)}function xo(){}function fc(e,t){var r=wt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&yo(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function _c(e,t){var r=wt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&yo(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function pc(e,t,r){return(Or&21)===0?(e.baseState&&(e.baseState=!1,at=!0),e.memoizedState=r):(Lt(r,t)||(r=Vl(),Ie.lanes|=r,Pr|=r,e.baseState=!0),t)}function fd(e,t){var r=Re;Re=r!==0&&4>r?r:4,e(!0);var i=So.transition;So.transition={};try{e(!1),t()}finally{Re=r,So.transition=i}}function vc(){return wt().memoizedState}function _d(e,t,r){var i=gr(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},gc(e))mc(t,r);else if(r=Xa(e,t,r,i),r!==null){var a=it();Ot(r,e,i,a),Sc(r,t,i)}}function pd(e,t,r){var i=gr(e),a={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(gc(e))mc(t,a);else{var _=e.alternate;if(e.lanes===0&&(_===null||_.lanes===0)&&(_=t.lastRenderedReducer,_!==null))try{var D=t.lastRenderedState,I=_(D,r);if(a.hasEagerState=!0,a.eagerState=I,Lt(I,D)){var z=t.interleaved;z===null?(a.next=a,fo(t)):(a.next=z.next,z.next=a),t.interleaved=a;return}}catch{}finally{}r=Xa(e,t,a,i),r!==null&&(a=it(),Ot(r,e,i,a),Sc(r,t,i))}}function gc(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function mc(e,t){Ii=Os=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Sc(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Rn(e,r)}}var Is={readContext:yt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},vd={readContext:yt,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:ac,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ps(4194308,4,uc.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ps(4,2,e,t)},useMemo:function(e,t){var r=Ft();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Ft();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=_d.bind(null,Ie,e),[i.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:oc,useDebugValue:xo,useDeferredValue:function(e){return Ft().memoizedState=e},useTransition:function(){var e=oc(!1),t=e[0];return e=fd.bind(null,e[1]),Ft().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Ie,a=Ft();if(Pe){if(r===void 0)throw Error(h(407));r=r()}else{if(r=t(),Ve===null)throw Error(h(349));(Or&30)!==0||tc(i,t,r)}a.memoizedState=r;var _={value:r,getSnapshot:t};return a.queue=_,ac(ic.bind(null,i,_,e),[e]),i.flags|=2048,Fi(9,rc.bind(null,i,_,r,t),void 0,null),r},useId:function(){var e=Ft(),t=Ve.identifierPrefix;if(Pe){var r=qt,i=Kt;r=(i&~(1<<32-Rt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ni++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=dd++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},gd={readContext:yt,useCallback:fc,useContext:yt,useEffect:bo,useImperativeHandle:dc,useInsertionEffect:cc,useLayoutEffect:hc,useMemo:_c,useReducer:Eo,useRef:lc,useState:function(){return Eo(Hi)},useDebugValue:xo,useDeferredValue:function(e){var t=wt();return pc(t,Ue.memoizedState,e)},useTransition:function(){var e=Eo(Hi)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Za,useSyncExternalStore:ec,useId:vc,unstable_isNewReconciler:!1},md={readContext:yt,useCallback:fc,useContext:yt,useEffect:bo,useImperativeHandle:dc,useInsertionEffect:cc,useLayoutEffect:hc,useMemo:_c,useReducer:ko,useRef:lc,useState:function(){return ko(Hi)},useDebugValue:xo,useDeferredValue:function(e){var t=wt();return Ue===null?t.memoizedState=e:pc(t,Ue.memoizedState,e)},useTransition:function(){var e=ko(Hi)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Za,useSyncExternalStore:ec,useId:vc,unstable_isNewReconciler:!1};function Tt(e,t){if(e&&e.defaultProps){t=O({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Ro(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:O({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Ns={isMounted:function(e){return(e=e._reactInternals)?xr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=it(),a=gr(e),_=Gt(i,a);_.payload=t,r!=null&&(_.callback=r),t=fr(e,_,a),t!==null&&(Ot(t,e,a,i),Ds(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=it(),a=gr(e),_=Gt(i,a);_.tag=1,_.payload=t,r!=null&&(_.callback=r),t=fr(e,_,a),t!==null&&(Ot(t,e,a,i),Ds(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=it(),i=gr(e),a=Gt(r,i);a.tag=2,t!=null&&(a.callback=t),t=fr(e,a,i),t!==null&&(Ot(t,e,i,r),Ds(t,e,i))}};function yc(e,t,r,i,a,_,D){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,_,D):t.prototype&&t.prototype.isPureReactComponent?!bi(r,i)||!bi(a,_):!0}function wc(e,t,r){var i=!1,a=hr,_=t.contextType;return typeof _=="object"&&_!==null?_=yt(_):(a=lt(t)?Lr:Ye.current,i=t.contextTypes,_=(i=i!=null)?Yr(e,a):hr),t=new t(r,_),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ns,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=_),t}function Cc(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Ns.enqueueReplaceState(t,t.state,null)}function Lo(e,t,r,i){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},_o(e);var _=t.contextType;typeof _=="object"&&_!==null?a.context=yt(_):(_=lt(t)?Lr:Ye.current,a.context=Yr(e,_)),a.state=e.memoizedState,_=t.getDerivedStateFromProps,typeof _=="function"&&(Ro(e,t,_,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Ns.enqueueReplaceState(a,a.state,null),Ts(e,r,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function si(e,t){try{var r="",i=t;do r+=ce(i),i=i.return;while(i);var a=r}catch(_){a=`
|
|
39
|
-
Error generating stack: `+_.message+`
|
|
40
|
-
`+_.stack}return{value:e,source:t,stack:a,digest:null}}function Do(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function To(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Sd=typeof WeakMap=="function"?WeakMap:Map;function Ec(e,t,r){r=Gt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){$s||($s=!0,Vo=i),To(e,t)},r}function kc(e,t,r){r=Gt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=t.value;r.payload=function(){return i(a)},r.callback=function(){To(e,t)}}var _=e.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(r.callback=function(){To(e,t),typeof i!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var D=t.stack;this.componentDidCatch(t.value,{componentStack:D!==null?D:""})}),r}function bc(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Sd;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(r)||(a.add(r),e=Od.bind(null,e,t,r),t.then(e,e))}function xc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Rc(e,t,r,i,a){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Gt(-1,1),t.tag=2,fr(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var yd=p.ReactCurrentOwner,at=!1;function rt(e,t,r,i){t.child=e===null?qa(t,null,r,i):ei(t,e.child,r,i)}function Lc(e,t,r,i,a){r=r.render;var _=t.ref;return ri(t,a),i=wo(e,t,r,i,_,a),r=Co(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Yt(e,t,a)):(Pe&&r&&io(t),t.flags|=1,rt(e,t,i,a),t.child)}function Dc(e,t,r,i,a){if(e===null){var _=r.type;return typeof _=="function"&&!Jo(_)&&_.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=_,Tc(e,t,_,i,a)):(e=Ys(r.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(_=e.child,(e.lanes&a)===0){var D=_.memoizedProps;if(r=r.compare,r=r!==null?r:bi,r(D,i)&&e.ref===t.ref)return Yt(e,t,a)}return t.flags|=1,e=Sr(_,i),e.ref=t.ref,e.return=t,t.child=e}function Tc(e,t,r,i,a){if(e!==null){var _=e.memoizedProps;if(bi(_,i)&&e.ref===t.ref)if(at=!1,t.pendingProps=i=_,(e.lanes&a)!==0)(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Yt(e,t,a)}return Ao(e,t,r,i,a)}function Ac(e,t,r){var i=t.pendingProps,a=i.children,_=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(oi,gt),gt|=r;else{if((r&1073741824)===0)return e=_!==null?_.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(oi,gt),gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=_!==null?_.baseLanes:r,De(oi,gt),gt|=i}else _!==null?(i=_.baseLanes|r,t.memoizedState=null):i=r,De(oi,gt),gt|=i;return rt(e,t,a,r),t.child}function Bc(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ao(e,t,r,i,a){var _=lt(r)?Lr:Ye.current;return _=Yr(t,_),ri(t,a),r=wo(e,t,r,i,_,a),i=Co(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Yt(e,t,a)):(Pe&&i&&io(t),t.flags|=1,rt(e,t,r,a),t.child)}function Oc(e,t,r,i,a){if(lt(r)){var _=!0;ws(t)}else _=!1;if(ri(t,a),t.stateNode===null)Fs(e,t),wc(t,r,i),Lo(t,r,i,a),i=!0;else if(e===null){var D=t.stateNode,I=t.memoizedProps;D.props=I;var z=D.context,G=r.contextType;typeof G=="object"&&G!==null?G=yt(G):(G=lt(r)?Lr:Ye.current,G=Yr(t,G));var ie=r.getDerivedStateFromProps,ne=typeof ie=="function"||typeof D.getSnapshotBeforeUpdate=="function";ne||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(I!==i||z!==G)&&Cc(t,D,i,G),dr=!1;var re=t.memoizedState;D.state=re,Ts(t,i,D,a),z=t.memoizedState,I!==i||re!==z||ot.current||dr?(typeof ie=="function"&&(Ro(t,r,ie,i),z=t.memoizedState),(I=dr||yc(t,r,I,i,re,z,G))?(ne||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(t.flags|=4194308)):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=z),D.props=i,D.state=z,D.context=G,i=I):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{D=t.stateNode,Ga(e,t),I=t.memoizedProps,G=t.type===t.elementType?I:Tt(t.type,I),D.props=G,ne=t.pendingProps,re=D.context,z=r.contextType,typeof z=="object"&&z!==null?z=yt(z):(z=lt(r)?Lr:Ye.current,z=Yr(t,z));var fe=r.getDerivedStateFromProps;(ie=typeof fe=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(I!==ne||re!==z)&&Cc(t,D,i,z),dr=!1,re=t.memoizedState,D.state=re,Ts(t,i,D,a);var pe=t.memoizedState;I!==ne||re!==pe||ot.current||dr?(typeof fe=="function"&&(Ro(t,r,fe,i),pe=t.memoizedState),(G=dr||yc(t,r,G,i,re,pe,z)||!1)?(ie||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(i,pe,z),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(i,pe,z)),typeof D.componentDidUpdate=="function"&&(t.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof D.componentDidUpdate!="function"||I===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=pe),D.props=i,D.state=pe,D.context=z,i=G):(typeof D.componentDidUpdate!="function"||I===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),i=!1)}return Bo(e,t,r,i,_,a)}function Bo(e,t,r,i,a,_){Bc(e,t);var D=(t.flags&128)!==0;if(!i&&!D)return a&&Ha(t,r,!1),Yt(e,t,_);i=t.stateNode,yd.current=t;var I=D&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&D?(t.child=ei(t,e.child,null,_),t.child=ei(t,null,I,_)):rt(e,t,I,_),t.memoizedState=i.state,a&&Ha(t,r,!0),t.child}function Pc(e){var t=e.stateNode;t.pendingContext?Ia(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ia(e,t.context,!1),po(e,t.containerInfo)}function Mc(e,t,r,i,a){return Zr(),lo(a),t.flags|=256,rt(e,t,r,i),t.child}var Oo={dehydrated:null,treeContext:null,retryLane:0};function Po(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ic(e,t,r){var i=t.pendingProps,a=Me.current,_=!1,D=(t.flags&128)!==0,I;if((I=D)||(I=e!==null&&e.memoizedState===null?!1:(a&2)!==0),I?(_=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),De(Me,a&1),e===null)return oo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(D=i.children,e=i.fallback,_?(i=t.mode,_=t.child,D={mode:"hidden",children:D},(i&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=D):_=Qs(D,i,0,null),e=Hr(e,i,r,null),_.return=t,e.return=t,_.sibling=e,t.child=_,t.child.memoizedState=Po(r),t.memoizedState=Oo,e):Mo(t,D));if(a=e.memoizedState,a!==null&&(I=a.dehydrated,I!==null))return wd(e,t,D,i,I,a,r);if(_){_=i.fallback,D=t.mode,a=e.child,I=a.sibling;var z={mode:"hidden",children:i.children};return(D&1)===0&&t.child!==a?(i=t.child,i.childLanes=0,i.pendingProps=z,t.deletions=null):(i=Sr(a,z),i.subtreeFlags=a.subtreeFlags&14680064),I!==null?_=Sr(I,_):(_=Hr(_,D,r,null),_.flags|=2),_.return=t,i.return=t,i.sibling=_,t.child=i,i=_,_=t.child,D=e.child.memoizedState,D=D===null?Po(r):{baseLanes:D.baseLanes|r,cachePool:null,transitions:D.transitions},_.memoizedState=D,_.childLanes=e.childLanes&~r,t.memoizedState=Oo,i}return _=e.child,e=_.sibling,i=Sr(_,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Mo(e,t){return t=Qs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hs(e,t,r,i){return i!==null&&lo(i),ei(t,e.child,null,r),e=Mo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wd(e,t,r,i,a,_,D){if(r)return t.flags&256?(t.flags&=-257,i=Do(Error(h(422))),Hs(e,t,D,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(_=i.fallback,a=t.mode,i=Qs({mode:"visible",children:i.children},a,0,null),_=Hr(_,a,D,null),_.flags|=2,i.return=t,_.return=t,i.sibling=_,t.child=i,(t.mode&1)!==0&&ei(t,e.child,null,D),t.child.memoizedState=Po(D),t.memoizedState=Oo,_);if((t.mode&1)===0)return Hs(e,t,D,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var I=i.dgst;return i=I,_=Error(h(419)),i=Do(_,i,void 0),Hs(e,t,D,i)}if(I=(D&e.childLanes)!==0,at||I){if(i=Ve,i!==null){switch(D&-D){case 4:a=2;break;case 16:a=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|D))!==0?0:a,a!==0&&a!==_.retryLane&&(_.retryLane=a,Xt(e,a),Ot(i,e,a,-1))}return Qo(),i=Do(Error(h(421))),Hs(e,t,D,i)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=Pd.bind(null,e),a._reactRetry=t,null):(e=_.treeContext,vt=ar(a.nextSibling),pt=t,Pe=!0,Dt=null,e!==null&&(mt[St++]=Kt,mt[St++]=qt,mt[St++]=Dr,Kt=e.id,qt=e.overflow,Dr=t),t=Mo(t,i.children),t.flags|=4096,t)}function Nc(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),uo(e.return,t,r)}function Io(e,t,r,i,a){var _=e.memoizedState;_===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:a}:(_.isBackwards=t,_.rendering=null,_.renderingStartTime=0,_.last=i,_.tail=r,_.tailMode=a)}function Hc(e,t,r){var i=t.pendingProps,a=i.revealOrder,_=i.tail;if(rt(e,t,i.children,r),i=Me.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nc(e,r,t);else if(e.tag===19)Nc(e,r,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}i&=1}if(De(Me,i),(t.mode&1)===0)t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&As(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),Io(t,!1,a,r,_);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&As(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}Io(t,!0,r,null,_);break;case"together":Io(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(h(153));if(t.child!==null){for(e=t.child,r=Sr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Sr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Cd(e,t,r){switch(t.tag){case 3:Pc(t),Zr();break;case 5:Ja(t);break;case 1:lt(t.type)&&ws(t);break;case 4:po(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,a=t.memoizedProps.value;De(Rs,i._currentValue),i._currentValue=a;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(De(Me,Me.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Ic(e,t,r):(De(Me,Me.current&1),e=Yt(e,t,r),e!==null?e.sibling:null);De(Me,Me.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return Hc(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),De(Me,Me.current),i)break;return null;case 22:case 23:return t.lanes=0,Ac(e,t,r)}return Yt(e,t,r)}var Fc,No,zc,jc;Fc=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},No=function(){},zc=function(e,t,r,i){var a=e.memoizedProps;if(a!==i){e=t.stateNode,Br(Ht.current);var _=null;switch(r){case"input":a=Le(e,a),i=Le(e,i),_=[];break;case"select":a=O({},a,{value:void 0}),i=O({},i,{value:void 0}),_=[];break;case"textarea":a=Zt(e,a),i=Zt(e,i),_=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=ms)}vn(r,i);var D;r=null;for(G in a)if(!i.hasOwnProperty(G)&&a.hasOwnProperty(G)&&a[G]!=null)if(G==="style"){var I=a[G];for(D in I)I.hasOwnProperty(D)&&(r||(r={}),r[D]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(N.hasOwnProperty(G)?_||(_=[]):(_=_||[]).push(G,null));for(G in i){var z=i[G];if(I=a!=null?a[G]:void 0,i.hasOwnProperty(G)&&z!==I&&(z!=null||I!=null))if(G==="style")if(I){for(D in I)!I.hasOwnProperty(D)||z&&z.hasOwnProperty(D)||(r||(r={}),r[D]="");for(D in z)z.hasOwnProperty(D)&&I[D]!==z[D]&&(r||(r={}),r[D]=z[D])}else r||(_||(_=[]),_.push(G,r)),r=z;else G==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,I=I?I.__html:void 0,z!=null&&I!==z&&(_=_||[]).push(G,z)):G==="children"?typeof z!="string"&&typeof z!="number"||(_=_||[]).push(G,""+z):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(N.hasOwnProperty(G)?(z!=null&&G==="onScroll"&&Be("scroll",e),_||I===z||(_=[])):(_=_||[]).push(G,z))}r&&(_=_||[]).push("style",r);var G=_;(t.updateQueue=G)&&(t.flags|=4)}},jc=function(e,t,r,i){r!==i&&(t.flags|=4)};function zi(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Ed(e,t,r){var i=t.pendingProps;switch(so(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return lt(t.type)&&ys(),Je(t),null;case 3:return i=t.stateNode,ii(),Oe(ot),Oe(Ye),mo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(bs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dt!==null&&(Xo(Dt),Dt=null))),No(e,t),Je(t),null;case 5:vo(t);var a=Br(Mi.current);if(r=t.type,e!==null&&t.stateNode!=null)zc(e,t,r,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(h(166));return Je(t),null}if(e=Br(Ht.current),bs(t)){i=t.stateNode,r=t.type;var _=t.memoizedProps;switch(i[Nt]=t,i[Ti]=_,e=(t.mode&1)!==0,r){case"dialog":Be("cancel",i),Be("close",i);break;case"iframe":case"object":case"embed":Be("load",i);break;case"video":case"audio":for(a=0;a<Ri.length;a++)Be(Ri[a],i);break;case"source":Be("error",i);break;case"img":case"image":case"link":Be("error",i),Be("load",i);break;case"details":Be("toggle",i);break;case"input":Te(i,_),Be("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!_.multiple},Be("invalid",i);break;case"textarea":tt(i,_),Be("invalid",i)}vn(r,_),a=null;for(var D in _)if(_.hasOwnProperty(D)){var I=_[D];D==="children"?typeof I=="string"?i.textContent!==I&&(_.suppressHydrationWarning!==!0&&gs(i.textContent,I,e),a=["children",I]):typeof I=="number"&&i.textContent!==""+I&&(_.suppressHydrationWarning!==!0&&gs(i.textContent,I,e),a=["children",""+I]):N.hasOwnProperty(D)&&I!=null&&D==="onScroll"&&Be("scroll",i)}switch(r){case"input":de(i),Jt(i,_,!0);break;case"textarea":de(i),dt(i);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(i.onclick=ms)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{D=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=tr(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=D.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=D.createElement(r,{is:i.is}):(e=D.createElement(r),r==="select"&&(D=e,i.multiple?D.multiple=!0:i.size&&(D.size=i.size))):e=D.createElementNS(e,r),e[Nt]=t,e[Ti]=i,Fc(e,t,!1,!1),t.stateNode=e;e:{switch(D=gn(r,i),r){case"dialog":Be("cancel",e),Be("close",e),a=i;break;case"iframe":case"object":case"embed":Be("load",e),a=i;break;case"video":case"audio":for(a=0;a<Ri.length;a++)Be(Ri[a],e);a=i;break;case"source":Be("error",e),a=i;break;case"img":case"image":case"link":Be("error",e),Be("load",e),a=i;break;case"details":Be("toggle",e),a=i;break;case"input":Te(e,i),a=Le(e,i),Be("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=O({},i,{value:void 0}),Be("invalid",e);break;case"textarea":tt(e,i),a=Zt(e,i),Be("invalid",e);break;default:a=i}vn(r,a),I=a;for(_ in I)if(I.hasOwnProperty(_)){var z=I[_];_==="style"?Tl(e,z):_==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&br(e,z)):_==="children"?typeof z=="string"?(r!=="textarea"||z!=="")&&nt(e,z):typeof z=="number"&&nt(e,""+z):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(N.hasOwnProperty(_)?z!=null&&_==="onScroll"&&Be("scroll",e):z!=null&&n(e,_,z,D))}switch(r){case"input":de(e),Jt(e,i,!1);break;case"textarea":de(e),dt(e);break;case"option":i.value!=null&&e.setAttribute("value",""+B(i.value));break;case"select":e.multiple=!!i.multiple,_=i.value,_!=null?Mt(e,!!i.multiple,_,!1):i.defaultValue!=null&&Mt(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=ms)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)jc(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(h(166));if(r=Br(Mi.current),Br(Ht.current),bs(t)){if(i=t.stateNode,r=t.memoizedProps,i[Nt]=t,(_=i.nodeValue!==r)&&(e=pt,e!==null))switch(e.tag){case 3:gs(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&gs(i.nodeValue,r,(e.mode&1)!==0)}_&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[Nt]=t,t.stateNode=i}return Je(t),null;case 13:if(Oe(Me),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&vt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)$a(),Zr(),t.flags|=98560,_=!1;else if(_=bs(t),i!==null&&i.dehydrated!==null){if(e===null){if(!_)throw Error(h(318));if(_=t.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(h(317));_[Nt]=t}else Zr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),_=!1}else Dt!==null&&(Xo(Dt),Dt=null),_=!0;if(!_)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Me.current&1)!==0?We===0&&(We=3):Qo())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return ii(),No(e,t),e===null&&Li(t.stateNode.containerInfo),Je(t),null;case 10:return ho(t.type._context),Je(t),null;case 17:return lt(t.type)&&ys(),Je(t),null;case 19:if(Oe(Me),_=t.memoizedState,_===null)return Je(t),null;if(i=(t.flags&128)!==0,D=_.rendering,D===null)if(i)zi(_,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(D=As(e),D!==null){for(t.flags|=128,zi(_,!1),i=D.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)_=r,e=i,_.flags&=14680066,D=_.alternate,D===null?(_.childLanes=0,_.lanes=e,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=D.childLanes,_.lanes=D.lanes,_.child=D.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=D.memoizedProps,_.memoizedState=D.memoizedState,_.updateQueue=D.updateQueue,_.type=D.type,e=D.dependencies,_.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return De(Me,Me.current&1|2),t.child}e=e.sibling}_.tail!==null&&He()>li&&(t.flags|=128,i=!0,zi(_,!1),t.lanes=4194304)}else{if(!i)if(e=As(D),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),zi(_,!0),_.tail===null&&_.tailMode==="hidden"&&!D.alternate&&!Pe)return Je(t),null}else 2*He()-_.renderingStartTime>li&&r!==1073741824&&(t.flags|=128,i=!0,zi(_,!1),t.lanes=4194304);_.isBackwards?(D.sibling=t.child,t.child=D):(r=_.last,r!==null?r.sibling=D:t.child=D,_.last=D)}return _.tail!==null?(t=_.tail,_.rendering=t,_.tail=t.sibling,_.renderingStartTime=He(),t.sibling=null,r=Me.current,De(Me,i?r&1|2:r&1),t):(Je(t),null);case 22:case 23:return Yo(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(gt&1073741824)!==0&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(h(156,t.tag))}function kd(e,t){switch(so(t),t.tag){case 1:return lt(t.type)&&ys(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ii(),Oe(ot),Oe(Ye),mo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return vo(t),null;case 13:if(Oe(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(h(340));Zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(Me),null;case 4:return ii(),null;case 10:return ho(t.type._context),null;case 22:case 23:return Yo(),null;case 24:return null;default:return null}}var zs=!1,Ze=!1,bd=typeof WeakSet=="function"?WeakSet:Set,_e=null;function ni(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Ne(e,t,i)}else r.current=null}function Ho(e,t,r){try{r()}catch(i){Ne(e,t,i)}}var Uc=!1;function xd(e,t){if(Gn=os,e=ya(),jn(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,_=i.focusNode;i=i.focusOffset;try{r.nodeType,_.nodeType}catch{r=null;break e}var D=0,I=-1,z=-1,G=0,ie=0,ne=e,re=null;t:for(;;){for(var fe;ne!==r||a!==0&&ne.nodeType!==3||(I=D+a),ne!==_||i!==0&&ne.nodeType!==3||(z=D+i),ne.nodeType===3&&(D+=ne.nodeValue.length),(fe=ne.firstChild)!==null;)re=ne,ne=fe;for(;;){if(ne===e)break t;if(re===r&&++G===a&&(I=D),re===_&&++ie===i&&(z=D),(fe=ne.nextSibling)!==null)break;ne=re,re=ne.parentNode}ne=fe}r=I===-1||z===-1?null:{start:I,end:z}}else r=null}r=r||{start:0,end:0}}else r=null;for(Yn={focusedElem:e,selectionRange:r},os=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var pe=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var ve=pe.memoizedProps,Fe=pe.memoizedState,V=t.stateNode,$=V.getSnapshotBeforeUpdate(t.elementType===t.type?ve:Tt(t.type,ve),Fe);V.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var q=t.stateNode.containerInfo;q.nodeType===1?q.textContent="":q.nodeType===9&&q.documentElement&&q.removeChild(q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(h(163))}}catch(ae){Ne(t,t.return,ae)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return pe=Uc,Uc=!1,pe}function ji(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var _=a.destroy;a.destroy=void 0,_!==void 0&&Ho(t,r,_)}a=a.next}while(a!==i)}}function js(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function Fo(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Wc(e){var t=e.alternate;t!==null&&(e.alternate=null,Wc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[Ti],delete t[eo],delete t[ad],delete t[cd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $c(e){return e.tag===5||e.tag===3||e.tag===4}function Vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$c(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.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 zo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ms));else if(i!==4&&(e=e.child,e!==null))for(zo(e,t,r),e=e.sibling;e!==null;)zo(e,t,r),e=e.sibling}function jo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(jo(e,t,r),e=e.sibling;e!==null;)jo(e,t,r),e=e.sibling}var Xe=null,At=!1;function _r(e,t,r){for(r=r.child;r!==null;)Kc(e,t,r),r=r.sibling}function Kc(e,t,r){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(es,r)}catch{}switch(r.tag){case 5:Ze||ni(r,t);case 6:var i=Xe,a=At;Xe=null,_r(e,t,r),Xe=i,At=a,Xe!==null&&(At?(e=Xe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Xe.removeChild(r.stateNode));break;case 18:Xe!==null&&(At?(e=Xe,r=r.stateNode,e.nodeType===8?Zn(e.parentNode,r):e.nodeType===1&&Zn(e,r),Si(e)):Zn(Xe,r.stateNode));break;case 4:i=Xe,a=At,Xe=r.stateNode.containerInfo,At=!0,_r(e,t,r),Xe=i,At=a;break;case 0:case 11:case 14:case 15:if(!Ze&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var _=a,D=_.destroy;_=_.tag,D!==void 0&&((_&2)!==0||(_&4)!==0)&&Ho(r,t,D),a=a.next}while(a!==i)}_r(e,t,r);break;case 1:if(!Ze&&(ni(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(I){Ne(r,t,I)}_r(e,t,r);break;case 21:_r(e,t,r);break;case 22:r.mode&1?(Ze=(i=Ze)||r.memoizedState!==null,_r(e,t,r),Ze=i):_r(e,t,r);break;default:_r(e,t,r)}}function qc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new bd),t.forEach(function(i){var a=Md.bind(null,e,i);r.has(i)||(r.add(i),i.then(a,a))})}}function Bt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i];try{var _=e,D=t,I=D;e:for(;I!==null;){switch(I.tag){case 5:Xe=I.stateNode,At=!1;break e;case 3:Xe=I.stateNode.containerInfo,At=!0;break e;case 4:Xe=I.stateNode.containerInfo,At=!0;break e}I=I.return}if(Xe===null)throw Error(h(160));Kc(_,D,a),Xe=null,At=!1;var z=a.alternate;z!==null&&(z.return=null),a.return=null}catch(G){Ne(a,t,G)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xc(t,e),t=t.sibling}function Xc(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),zt(e),i&4){try{ji(3,e,e.return),js(3,e)}catch(ve){Ne(e,e.return,ve)}try{ji(5,e,e.return)}catch(ve){Ne(e,e.return,ve)}}break;case 1:Bt(t,e),zt(e),i&512&&r!==null&&ni(r,r.return);break;case 5:if(Bt(t,e),zt(e),i&512&&r!==null&&ni(r,r.return),e.flags&32){var a=e.stateNode;try{nt(a,"")}catch(ve){Ne(e,e.return,ve)}}if(i&4&&(a=e.stateNode,a!=null)){var _=e.memoizedProps,D=r!==null?r.memoizedProps:_,I=e.type,z=e.updateQueue;if(e.updateQueue=null,z!==null)try{I==="input"&&_.type==="radio"&&_.name!=null&&qe(a,_),gn(I,D);var G=gn(I,_);for(D=0;D<z.length;D+=2){var ie=z[D],ne=z[D+1];ie==="style"?Tl(a,ne):ie==="dangerouslySetInnerHTML"?br(a,ne):ie==="children"?nt(a,ne):n(a,ie,ne,G)}switch(I){case"input":ye(a,_);break;case"textarea":er(a,_);break;case"select":var re=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!_.multiple;var fe=_.value;fe!=null?Mt(a,!!_.multiple,fe,!1):re!==!!_.multiple&&(_.defaultValue!=null?Mt(a,!!_.multiple,_.defaultValue,!0):Mt(a,!!_.multiple,_.multiple?[]:"",!1))}a[Ti]=_}catch(ve){Ne(e,e.return,ve)}}break;case 6:if(Bt(t,e),zt(e),i&4){if(e.stateNode===null)throw Error(h(162));a=e.stateNode,_=e.memoizedProps;try{a.nodeValue=_}catch(ve){Ne(e,e.return,ve)}}break;case 3:if(Bt(t,e),zt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(ve){Ne(e,e.return,ve)}break;case 4:Bt(t,e),zt(e);break;case 13:Bt(t,e),zt(e),a=e.child,a.flags&8192&&(_=a.memoizedState!==null,a.stateNode.isHidden=_,!_||a.alternate!==null&&a.alternate.memoizedState!==null||($o=He())),i&4&&qc(e);break;case 22:if(ie=r!==null&&r.memoizedState!==null,e.mode&1?(Ze=(G=Ze)||ie,Bt(t,e),Ze=G):Bt(t,e),zt(e),i&8192){if(G=e.memoizedState!==null,(e.stateNode.isHidden=G)&&!ie&&(e.mode&1)!==0)for(_e=e,ie=e.child;ie!==null;){for(ne=_e=ie;_e!==null;){switch(re=_e,fe=re.child,re.tag){case 0:case 11:case 14:case 15:ji(4,re,re.return);break;case 1:ni(re,re.return);var pe=re.stateNode;if(typeof pe.componentWillUnmount=="function"){i=re,r=re.return;try{t=i,pe.props=t.memoizedProps,pe.state=t.memoizedState,pe.componentWillUnmount()}catch(ve){Ne(i,r,ve)}}break;case 5:ni(re,re.return);break;case 22:if(re.memoizedState!==null){Qc(ne);continue}}fe!==null?(fe.return=re,_e=fe):Qc(ne)}ie=ie.sibling}e:for(ie=null,ne=e;;){if(ne.tag===5){if(ie===null){ie=ne;try{a=ne.stateNode,G?(_=a.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(I=ne.stateNode,z=ne.memoizedProps.style,D=z!=null&&z.hasOwnProperty("display")?z.display:null,I.style.display=Yi("display",D))}catch(ve){Ne(e,e.return,ve)}}}else if(ne.tag===6){if(ie===null)try{ne.stateNode.nodeValue=G?"":ne.memoizedProps}catch(ve){Ne(e,e.return,ve)}}else if((ne.tag!==22&&ne.tag!==23||ne.memoizedState===null||ne===e)&&ne.child!==null){ne.child.return=ne,ne=ne.child;continue}if(ne===e)break e;for(;ne.sibling===null;){if(ne.return===null||ne.return===e)break e;ie===ne&&(ie=null),ne=ne.return}ie===ne&&(ie=null),ne.sibling.return=ne.return,ne=ne.sibling}}break;case 19:Bt(t,e),zt(e),i&4&&qc(e);break;case 21:break;default:Bt(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if($c(r)){var i=r;break e}r=r.return}throw Error(h(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(nt(a,""),i.flags&=-33);var _=Vc(e);jo(e,_,a);break;case 3:case 4:var D=i.stateNode.containerInfo,I=Vc(e);zo(e,I,D);break;default:throw Error(h(161))}}catch(z){Ne(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rd(e,t,r){_e=e,Gc(e)}function Gc(e,t,r){for(var i=(e.mode&1)!==0;_e!==null;){var a=_e,_=a.child;if(a.tag===22&&i){var D=a.memoizedState!==null||zs;if(!D){var I=a.alternate,z=I!==null&&I.memoizedState!==null||Ze;I=zs;var G=Ze;if(zs=D,(Ze=z)&&!G)for(_e=a;_e!==null;)D=_e,z=D.child,D.tag===22&&D.memoizedState!==null?Jc(a):z!==null?(z.return=D,_e=z):Jc(a);for(;_!==null;)_e=_,Gc(_),_=_.sibling;_e=a,zs=I,Ze=G}Yc(e)}else(a.subtreeFlags&8772)!==0&&_!==null?(_.return=a,_e=_):Yc(e)}}function Yc(e){for(;_e!==null;){var t=_e;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ze||js(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Ze)if(r===null)i.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Tt(t.type,r.memoizedProps);i.componentDidUpdate(a,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var _=t.updateQueue;_!==null&&Qa(t,_,i);break;case 3:var D=t.updateQueue;if(D!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Qa(t,D,r)}break;case 5:var I=t.stateNode;if(r===null&&t.flags&4){r=I;var z=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&r.focus();break;case"img":z.src&&(r.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var G=t.alternate;if(G!==null){var ie=G.memoizedState;if(ie!==null){var ne=ie.dehydrated;ne!==null&&Si(ne)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(h(163))}Ze||t.flags&512&&Fo(t)}catch(re){Ne(t,t.return,re)}}if(t===e){_e=null;break}if(r=t.sibling,r!==null){r.return=t.return,_e=r;break}_e=t.return}}function Qc(e){for(;_e!==null;){var t=_e;if(t===e){_e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,_e=r;break}_e=t.return}}function Jc(e){for(;_e!==null;){var t=_e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{js(4,t)}catch(z){Ne(t,r,z)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var a=t.return;try{i.componentDidMount()}catch(z){Ne(t,a,z)}}var _=t.return;try{Fo(t)}catch(z){Ne(t,_,z)}break;case 5:var D=t.return;try{Fo(t)}catch(z){Ne(t,D,z)}}}catch(z){Ne(t,t.return,z)}if(t===e){_e=null;break}var I=t.sibling;if(I!==null){I.return=t.return,_e=I;break}_e=t.return}}var Ld=Math.ceil,Us=p.ReactCurrentDispatcher,Uo=p.ReactCurrentOwner,Ct=p.ReactCurrentBatchConfig,be=0,Ve=null,ze=null,Ge=0,gt=0,oi=cr(0),We=0,Ui=null,Pr=0,Ws=0,Wo=0,Wi=null,ct=null,$o=0,li=1/0,Qt=null,$s=!1,Vo=null,pr=null,Vs=!1,vr=null,Ks=0,$i=0,Ko=null,qs=-1,Xs=0;function it(){return(be&6)!==0?He():qs!==-1?qs:qs=He()}function gr(e){return(e.mode&1)===0?1:(be&2)!==0&&Ge!==0?Ge&-Ge:ud.transition!==null?(Xs===0&&(Xs=Vl()),Xs):(e=Re,e!==0||(e=window.event,e=e===void 0?16:ea(e.type)),e)}function Ot(e,t,r,i){if(50<$i)throw $i=0,Ko=null,Error(h(185));_i(e,r,i),((be&2)===0||e!==Ve)&&(e===Ve&&((be&2)===0&&(Ws|=r),We===4&&mr(e,Ge)),ht(e,i),r===1&&be===0&&(t.mode&1)===0&&(li=He()+500,Cs&&ur()))}function ht(e,t){var r=e.callbackNode;uu(e,t);var i=is(e,e===Ve?Ge:0);if(i===0)r!==null&&Ul(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&Ul(r),t===1)e.tag===0?hd(eh.bind(null,e)):Fa(eh.bind(null,e)),od(function(){(be&6)===0&&ur()}),r=null;else{switch(Kl(i)){case 1:r=kn;break;case 4:r=Wl;break;case 16:r=Zi;break;case 536870912:r=$l;break;default:r=Zi}r=ah(r,Zc.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Zc(e,t){if(qs=-1,Xs=0,(be&6)!==0)throw Error(h(327));var r=e.callbackNode;if(ai()&&e.callbackNode!==r)return null;var i=is(e,e===Ve?Ge:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Gs(e,i);else{t=i;var a=be;be|=2;var _=rh();(Ve!==e||Ge!==t)&&(Qt=null,li=He()+500,Ir(e,t));do try{Ad();break}catch(I){th(e,I)}while(!0);co(),Us.current=_,be=a,ze!==null?t=0:(Ve=null,Ge=0,t=We)}if(t!==0){if(t===2&&(a=bn(e),a!==0&&(i=a,t=qo(e,a))),t===1)throw r=Ui,Ir(e,0),mr(e,i),ht(e,He()),r;if(t===6)mr(e,i);else{if(a=e.current.alternate,(i&30)===0&&!Dd(a)&&(t=Gs(e,i),t===2&&(_=bn(e),_!==0&&(i=_,t=qo(e,_))),t===1))throw r=Ui,Ir(e,0),mr(e,i),ht(e,He()),r;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(h(345));case 2:Nr(e,ct,Qt);break;case 3:if(mr(e,i),(i&130023424)===i&&(t=$o+500-He(),10<t)){if(is(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){it(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Jn(Nr.bind(null,e,ct,Qt),t);break}Nr(e,ct,Qt);break;case 4:if(mr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var D=31-Rt(i);_=1<<D,D=t[D],D>a&&(a=D),i&=~_}if(i=a,i=He()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Ld(i/1960))-i,10<i){e.timeoutHandle=Jn(Nr.bind(null,e,ct,Qt),i);break}Nr(e,ct,Qt);break;case 5:Nr(e,ct,Qt);break;default:throw Error(h(329))}}}return ht(e,He()),e.callbackNode===r?Zc.bind(null,e):null}function qo(e,t){var r=Wi;return e.current.memoizedState.isDehydrated&&(Ir(e,t).flags|=256),e=Gs(e,t),e!==2&&(t=ct,ct=r,t!==null&&Xo(t)),e}function Xo(e){ct===null?ct=e:ct.push.apply(ct,e)}function Dd(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var a=r[i],_=a.getSnapshot;a=a.value;try{if(!Lt(_(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 mr(e,t){for(t&=~Wo,t&=~Ws,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Rt(t),i=1<<r;e[r]=-1,t&=~i}}function eh(e){if((be&6)!==0)throw Error(h(327));ai();var t=is(e,0);if((t&1)===0)return ht(e,He()),null;var r=Gs(e,t);if(e.tag!==0&&r===2){var i=bn(e);i!==0&&(t=i,r=qo(e,i))}if(r===1)throw r=Ui,Ir(e,0),mr(e,t),ht(e,He()),r;if(r===6)throw Error(h(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nr(e,ct,Qt),ht(e,He()),null}function Go(e,t){var r=be;be|=1;try{return e(t)}finally{be=r,be===0&&(li=He()+500,Cs&&ur())}}function Mr(e){vr!==null&&vr.tag===0&&(be&6)===0&&ai();var t=be;be|=1;var r=Ct.transition,i=Re;try{if(Ct.transition=null,Re=1,e)return e()}finally{Re=i,Ct.transition=r,be=t,(be&6)===0&&ur()}}function Yo(){gt=oi.current,Oe(oi)}function Ir(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,nd(r)),ze!==null)for(r=ze.return;r!==null;){var i=r;switch(so(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ys();break;case 3:ii(),Oe(ot),Oe(Ye),mo();break;case 5:vo(i);break;case 4:ii();break;case 13:Oe(Me);break;case 19:Oe(Me);break;case 10:ho(i.type._context);break;case 22:case 23:Yo()}r=r.return}if(Ve=e,ze=e=Sr(e.current,null),Ge=gt=t,We=0,Ui=null,Wo=Ws=Pr=0,ct=Wi=null,Ar!==null){for(t=0;t<Ar.length;t++)if(r=Ar[t],i=r.interleaved,i!==null){r.interleaved=null;var a=i.next,_=r.pending;if(_!==null){var D=_.next;_.next=a,i.next=D}r.pending=i}Ar=null}return e}function th(e,t){do{var r=ze;try{if(co(),Bs.current=Is,Os){for(var i=Ie.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Os=!1}if(Or=0,$e=Ue=Ie=null,Ii=!1,Ni=0,Uo.current=null,r===null||r.return===null){We=1,Ui=t,ze=null;break}e:{var _=e,D=r.return,I=r,z=t;if(t=Ge,I.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var G=z,ie=I,ne=ie.tag;if((ie.mode&1)===0&&(ne===0||ne===11||ne===15)){var re=ie.alternate;re?(ie.updateQueue=re.updateQueue,ie.memoizedState=re.memoizedState,ie.lanes=re.lanes):(ie.updateQueue=null,ie.memoizedState=null)}var fe=xc(D);if(fe!==null){fe.flags&=-257,Rc(fe,D,I,_,t),fe.mode&1&&bc(_,G,t),t=fe,z=G;var pe=t.updateQueue;if(pe===null){var ve=new Set;ve.add(z),t.updateQueue=ve}else pe.add(z);break e}else{if((t&1)===0){bc(_,G,t),Qo();break e}z=Error(h(426))}}else if(Pe&&I.mode&1){var Fe=xc(D);if(Fe!==null){(Fe.flags&65536)===0&&(Fe.flags|=256),Rc(Fe,D,I,_,t),lo(si(z,I));break e}}_=z=si(z,I),We!==4&&(We=2),Wi===null?Wi=[_]:Wi.push(_),_=D;do{switch(_.tag){case 3:_.flags|=65536,t&=-t,_.lanes|=t;var V=Ec(_,z,t);Ya(_,V);break e;case 1:I=z;var $=_.type,q=_.stateNode;if((_.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||q!==null&&typeof q.componentDidCatch=="function"&&(pr===null||!pr.has(q)))){_.flags|=65536,t&=-t,_.lanes|=t;var ae=kc(_,I,t);Ya(_,ae);break e}}_=_.return}while(_!==null)}sh(r)}catch(ge){t=ge,ze===r&&r!==null&&(ze=r=r.return);continue}break}while(!0)}function rh(){var e=Us.current;return Us.current=Is,e===null?Is:e}function Qo(){(We===0||We===3||We===2)&&(We=4),Ve===null||(Pr&268435455)===0&&(Ws&268435455)===0||mr(Ve,Ge)}function Gs(e,t){var r=be;be|=2;var i=rh();(Ve!==e||Ge!==t)&&(Qt=null,Ir(e,t));do try{Td();break}catch(a){th(e,a)}while(!0);if(co(),be=r,Us.current=i,ze!==null)throw Error(h(261));return Ve=null,Ge=0,We}function Td(){for(;ze!==null;)ih(ze)}function Ad(){for(;ze!==null&&!ru();)ih(ze)}function ih(e){var t=lh(e.alternate,e,gt);e.memoizedProps=e.pendingProps,t===null?sh(e):ze=t,Uo.current=null}function sh(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Ed(r,t,gt),r!==null){ze=r;return}}else{if(r=kd(r,t),r!==null){r.flags&=32767,ze=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,ze=null;return}}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);We===0&&(We=5)}function Nr(e,t,r){var i=Re,a=Ct.transition;try{Ct.transition=null,Re=1,Bd(e,t,r,i)}finally{Ct.transition=a,Re=i}return null}function Bd(e,t,r,i){do ai();while(vr!==null);if((be&6)!==0)throw Error(h(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(h(177));e.callbackNode=null,e.callbackPriority=0;var _=r.lanes|r.childLanes;if(du(e,_),e===Ve&&(ze=Ve=null,Ge=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Vs||(Vs=!0,ah(Zi,function(){return ai(),null})),_=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||_){_=Ct.transition,Ct.transition=null;var D=Re;Re=1;var I=be;be|=4,Uo.current=null,xd(e,r),Xc(r,e),Ju(Yn),os=!!Gn,Yn=Gn=null,e.current=r,Rd(r),iu(),be=I,Re=D,Ct.transition=_}else e.current=r;if(Vs&&(Vs=!1,vr=e,Ks=a),_=e.pendingLanes,_===0&&(pr=null),ou(r.stateNode),ht(e,He()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],i(a.value,{componentStack:a.stack,digest:a.digest});if($s)throw $s=!1,e=Vo,Vo=null,e;return(Ks&1)!==0&&e.tag!==0&&ai(),_=e.pendingLanes,(_&1)!==0?e===Ko?$i++:($i=0,Ko=e):$i=0,ur(),null}function ai(){if(vr!==null){var e=Kl(Ks),t=Ct.transition,r=Re;try{if(Ct.transition=null,Re=16>e?16:e,vr===null)var i=!1;else{if(e=vr,vr=null,Ks=0,(be&6)!==0)throw Error(h(331));var a=be;for(be|=4,_e=e.current;_e!==null;){var _=_e,D=_.child;if((_e.flags&16)!==0){var I=_.deletions;if(I!==null){for(var z=0;z<I.length;z++){var G=I[z];for(_e=G;_e!==null;){var ie=_e;switch(ie.tag){case 0:case 11:case 15:ji(8,ie,_)}var ne=ie.child;if(ne!==null)ne.return=ie,_e=ne;else for(;_e!==null;){ie=_e;var re=ie.sibling,fe=ie.return;if(Wc(ie),ie===G){_e=null;break}if(re!==null){re.return=fe,_e=re;break}_e=fe}}}var pe=_.alternate;if(pe!==null){var ve=pe.child;if(ve!==null){pe.child=null;do{var Fe=ve.sibling;ve.sibling=null,ve=Fe}while(ve!==null)}}_e=_}}if((_.subtreeFlags&2064)!==0&&D!==null)D.return=_,_e=D;else e:for(;_e!==null;){if(_=_e,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:ji(9,_,_.return)}var V=_.sibling;if(V!==null){V.return=_.return,_e=V;break e}_e=_.return}}var $=e.current;for(_e=$;_e!==null;){D=_e;var q=D.child;if((D.subtreeFlags&2064)!==0&&q!==null)q.return=D,_e=q;else e:for(D=$;_e!==null;){if(I=_e,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:js(9,I)}}catch(ge){Ne(I,I.return,ge)}if(I===D){_e=null;break e}var ae=I.sibling;if(ae!==null){ae.return=I.return,_e=ae;break e}_e=I.return}}if(be=a,ur(),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(es,e)}catch{}i=!0}return i}finally{Re=r,Ct.transition=t}}return!1}function nh(e,t,r){t=si(r,t),t=Ec(e,t,1),e=fr(e,t,1),t=it(),e!==null&&(_i(e,1,t),ht(e,t))}function Ne(e,t,r){if(e.tag===3)nh(e,e,r);else for(;t!==null;){if(t.tag===3){nh(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(pr===null||!pr.has(i))){e=si(r,e),e=kc(t,e,1),t=fr(t,e,1),e=it(),t!==null&&(_i(t,1,e),ht(t,e));break}}t=t.return}}function Od(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=it(),e.pingedLanes|=e.suspendedLanes&r,Ve===e&&(Ge&r)===r&&(We===4||We===3&&(Ge&130023424)===Ge&&500>He()-$o?Ir(e,0):Wo|=r),ht(e,t)}function oh(e,t){t===0&&((e.mode&1)===0?t=1:(t=rs,rs<<=1,(rs&130023424)===0&&(rs=4194304)));var r=it();e=Xt(e,t),e!==null&&(_i(e,t,r),ht(e,r))}function Pd(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),oh(e,r)}function Md(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(h(314))}i!==null&&i.delete(t),oh(e,r)}var lh;lh=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)at=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return at=!1,Cd(e,t,r);at=(e.flags&131072)!==0}else at=!1,Pe&&(t.flags&1048576)!==0&&za(t,ks,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Fs(e,t),e=t.pendingProps;var a=Yr(t,Ye.current);ri(t,r),a=wo(null,t,i,e,a,r);var _=Co();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(i)?(_=!0,ws(t)):_=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,_o(t),a.updater=Ns,t.stateNode=a,a._reactInternals=t,Lo(t,i,e,r),t=Bo(null,t,i,!0,_,r)):(t.tag=0,Pe&&_&&io(t),rt(null,t,a,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Nd(i),e=Tt(i,e),a){case 0:t=Ao(null,t,i,e,r);break e;case 1:t=Oc(null,t,i,e,r);break e;case 11:t=Lc(null,t,i,e,r);break e;case 14:t=Dc(null,t,i,Tt(i.type,e),r);break e}throw Error(h(306,i,""))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Tt(i,a),Ao(e,t,i,a,r);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Tt(i,a),Oc(e,t,i,a,r);case 3:e:{if(Pc(t),e===null)throw Error(h(387));i=t.pendingProps,_=t.memoizedState,a=_.element,Ga(e,t),Ts(t,i,null,r);var D=t.memoizedState;if(i=D.element,_.isDehydrated)if(_={element:i,isDehydrated:!1,cache:D.cache,pendingSuspenseBoundaries:D.pendingSuspenseBoundaries,transitions:D.transitions},t.updateQueue.baseState=_,t.memoizedState=_,t.flags&256){a=si(Error(h(423)),t),t=Mc(e,t,i,r,a);break e}else if(i!==a){a=si(Error(h(424)),t),t=Mc(e,t,i,r,a);break e}else for(vt=ar(t.stateNode.containerInfo.firstChild),pt=t,Pe=!0,Dt=null,r=qa(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zr(),i===a){t=Yt(e,t,r);break e}rt(e,t,i,r)}t=t.child}return t;case 5:return Ja(t),e===null&&oo(t),i=t.type,a=t.pendingProps,_=e!==null?e.memoizedProps:null,D=a.children,Qn(i,a)?D=null:_!==null&&Qn(i,_)&&(t.flags|=32),Bc(e,t),rt(e,t,D,r),t.child;case 6:return e===null&&oo(t),null;case 13:return Ic(e,t,r);case 4:return po(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=ei(t,null,i,r):rt(e,t,i,r),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Tt(i,a),Lc(e,t,i,a,r);case 7:return rt(e,t,t.pendingProps,r),t.child;case 8:return rt(e,t,t.pendingProps.children,r),t.child;case 12:return rt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,a=t.pendingProps,_=t.memoizedProps,D=a.value,De(Rs,i._currentValue),i._currentValue=D,_!==null)if(Lt(_.value,D)){if(_.children===a.children&&!ot.current){t=Yt(e,t,r);break e}}else for(_=t.child,_!==null&&(_.return=t);_!==null;){var I=_.dependencies;if(I!==null){D=_.child;for(var z=I.firstContext;z!==null;){if(z.context===i){if(_.tag===1){z=Gt(-1,r&-r),z.tag=2;var G=_.updateQueue;if(G!==null){G=G.shared;var ie=G.pending;ie===null?z.next=z:(z.next=ie.next,ie.next=z),G.pending=z}}_.lanes|=r,z=_.alternate,z!==null&&(z.lanes|=r),uo(_.return,r,t),I.lanes|=r;break}z=z.next}}else if(_.tag===10)D=_.type===t.type?null:_.child;else if(_.tag===18){if(D=_.return,D===null)throw Error(h(341));D.lanes|=r,I=D.alternate,I!==null&&(I.lanes|=r),uo(D,r,t),D=_.sibling}else D=_.child;if(D!==null)D.return=_;else for(D=_;D!==null;){if(D===t){D=null;break}if(_=D.sibling,_!==null){_.return=D.return,D=_;break}D=D.return}_=D}rt(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,ri(t,r),a=yt(a),i=i(a),t.flags|=1,rt(e,t,i,r),t.child;case 14:return i=t.type,a=Tt(i,t.pendingProps),a=Tt(i.type,a),Dc(e,t,i,a,r);case 15:return Tc(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Tt(i,a),Fs(e,t),t.tag=1,lt(i)?(e=!0,ws(t)):e=!1,ri(t,r),wc(t,i,a),Lo(t,i,a,r),Bo(null,t,i,!0,e,r);case 19:return Hc(e,t,r);case 22:return Ac(e,t,r)}throw Error(h(156,t.tag))};function ah(e,t){return jl(e,t)}function Id(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,r,i){return new Id(e,t,r,i)}function Jo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Nd(e){if(typeof e=="function")return Jo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===W)return 11;if(e===ee)return 14}return 2}function Sr(e,t){var r=e.alternate;return r===null?(r=Et(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ys(e,t,r,i,a,_){var D=2;if(i=e,typeof e=="function")Jo(e)&&(D=1);else if(typeof e=="string")D=5;else e:switch(e){case x:return Hr(r.children,a,_,t);case m:D=8,a|=8;break;case A:return e=Et(12,r,t,a|2),e.elementType=A,e.lanes=_,e;case M:return e=Et(13,r,t,a),e.elementType=M,e.lanes=_,e;case Y:return e=Et(19,r,t,a),e.elementType=Y,e.lanes=_,e;case le:return Qs(r,a,_,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:D=10;break e;case F:D=9;break e;case W:D=11;break e;case ee:D=14;break e;case se:D=16,i=null;break e}throw Error(h(130,e==null?e:typeof e,""))}return t=Et(D,r,t,a),t.elementType=e,t.type=i,t.lanes=_,t}function Hr(e,t,r,i){return e=Et(7,e,i,t),e.lanes=r,e}function Qs(e,t,r,i){return e=Et(22,e,i,t),e.elementType=le,e.lanes=r,e.stateNode={isHidden:!1},e}function Zo(e,t,r){return e=Et(6,e,null,t),e.lanes=r,e}function el(e,t,r){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hd(e,t,r,i,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xn(0),this.expirationTimes=xn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xn(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function tl(e,t,r,i,a,_,D,I,z){return e=new Hd(e,t,r,I,z),t===1?(t=1,_===!0&&(t|=8)):t=0,_=Et(3,null,null,t),e.current=_,_.stateNode=e,_.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},_o(_),e}function Fd(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function ch(e){if(!e)return hr;e=e._reactInternals;e:{if(xr(e)!==e||e.tag!==1)throw Error(h(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(h(171))}if(e.tag===1){var r=e.type;if(lt(r))return Na(e,r,t)}return t}function hh(e,t,r,i,a,_,D,I,z){return e=tl(r,i,!0,e,a,_,D,I,z),e.context=ch(null),r=e.current,i=it(),a=gr(r),_=Gt(i,a),_.callback=t??null,fr(r,_,a),e.current.lanes=a,_i(e,a,i),ht(e,i),e}function Js(e,t,r,i){var a=t.current,_=it(),D=gr(a);return r=ch(r),t.context===null?t.context=r:t.pendingContext=r,t=Gt(_,D),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=fr(a,t,D),e!==null&&(Ot(e,a,D,_),Ds(e,a,D)),D}function Zs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function uh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function rl(e,t){uh(e,t),(e=e.alternate)&&uh(e,t)}function zd(){return null}var dh=typeof reportError=="function"?reportError:function(e){console.error(e)};function il(e){this._internalRoot=e}en.prototype.render=il.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(h(409));Js(e,t,null,null)},en.prototype.unmount=il.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mr(function(){Js(null,e,null,null)}),t[$t]=null}};function en(e){this._internalRoot=e}en.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gl();e={blockedOn:null,target:e,priority:t};for(var r=0;r<nr.length&&t!==0&&t<nr[r].priority;r++);nr.splice(r,0,e),r===0&&Jl(e)}};function sl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tn(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fh(){}function jd(e,t,r,i,a){if(a){if(typeof i=="function"){var _=i;i=function(){var G=Zs(D);_.call(G)}}var D=hh(t,i,e,0,null,!1,!1,"",fh);return e._reactRootContainer=D,e[$t]=D.current,Li(e.nodeType===8?e.parentNode:e),Mr(),D}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var I=i;i=function(){var G=Zs(z);I.call(G)}}var z=tl(e,0,!1,null,null,!1,!1,"",fh);return e._reactRootContainer=z,e[$t]=z.current,Li(e.nodeType===8?e.parentNode:e),Mr(function(){Js(t,z,r,i)}),z}function rn(e,t,r,i,a){var _=r._reactRootContainer;if(_){var D=_;if(typeof a=="function"){var I=a;a=function(){var z=Zs(D);I.call(z)}}Js(t,D,e,a)}else D=jd(r,t,e,a,i);return Zs(D)}ql=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=fi(t.pendingLanes);r!==0&&(Rn(t,r|1),ht(t,He()),(be&6)===0&&(li=He()+500,ur()))}break;case 13:Mr(function(){var i=Xt(e,1);if(i!==null){var a=it();Ot(i,e,1,a)}}),rl(e,1)}},Ln=function(e){if(e.tag===13){var t=Xt(e,134217728);if(t!==null){var r=it();Ot(t,e,134217728,r)}rl(e,134217728)}},Xl=function(e){if(e.tag===13){var t=gr(e),r=Xt(e,t);if(r!==null){var i=it();Ot(r,e,t,i)}rl(e,t)}},Gl=function(){return Re},Yl=function(e,t){var r=Re;try{return Re=e,t()}finally{Re=r}},yn=function(e,t,r){switch(t){case"input":if(ye(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var a=Ss(i);if(!a)throw Error(h(90));ue(i),ye(i,a)}}}break;case"textarea":er(e,r);break;case"select":t=r.value,t!=null&&Mt(e,!!r.multiple,t,!1)}},Pl=Go,Ml=Mr;var Ud={usingClientEntryPoint:!1,Events:[Ai,Xr,Ss,Bl,Ol,Go]},Vi={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Wd={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:p.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Fl(e),e===null?null:e.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||zd,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sn.isDisabled&&sn.supportsFiber)try{es=sn.inject(Wd),It=sn}catch{}}return ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ud,ut.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sl(t))throw Error(h(200));return Fd(e,t,null,r)},ut.createRoot=function(e,t){if(!sl(e))throw Error(h(299));var r=!1,i="",a=dh;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=tl(e,1,!1,null,null,r,!1,i,a),e[$t]=t.current,Li(e.nodeType===8?e.parentNode:e),new il(t)},ut.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(h(188)):(e=Object.keys(e).join(","),Error(h(268,e)));return e=Fl(t),e=e===null?null:e.stateNode,e},ut.flushSync=function(e){return Mr(e)},ut.hydrate=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!0,r)},ut.hydrateRoot=function(e,t,r){if(!sl(e))throw Error(h(405));var i=r!=null&&r.hydratedSources||null,a=!1,_="",D=dh;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(_=r.identifierPrefix),r.onRecoverableError!==void 0&&(D=r.onRecoverableError)),t=hh(t,null,e,1,r??null,a,!1,_,D),e[$t]=t.current,Li(e),i)for(e=0;e<i.length;e++)r=i[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new en(t)},ut.render=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!1,r)},ut.unmountComponentAtNode=function(e){if(!tn(e))throw Error(h(40));return e._reactRootContainer?(Mr(function(){rn(null,null,e,!1,function(){e._reactRootContainer=null,e[$t]=null})}),!0):!1},ut.unstable_batchedUpdates=Go,ut.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!tn(r))throw Error(h(200));if(e==null||e._reactInternals===void 0)throw Error(h(38));return rn(e,t,r,!1,i)},ut.version="18.3.1-next-f1338f8080-20240426",ut}var wh;function Qd(){if(wh)return ll.exports;wh=1;function C(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(C)}catch(f){console.error(f)}}return C(),ll.exports=Yd(),ll.exports}var Ch;function Jd(){if(Ch)return nn;Ch=1;var C=Qd();return nn.createRoot=C.createRoot,nn.hydrateRoot=C.hydrateRoot,nn}var Zd=Jd();const ef=Oh(Zd),Eh=C=>{let f;const h=new Set,b=(v,y)=>{const d=typeof v=="function"?v(f):v;if(!Object.is(d,f)){const S=f;f=y??(typeof d!="object"||d===null)?d:Object.assign({},f,d),h.forEach(w=>w(f,S))}},N=()=>f,c={setState:b,getState:N,getInitialState:()=>u,subscribe:v=>(h.add(v),()=>h.delete(v))},u=f=C(b,N,c);return c},tf=(C=>C?Eh(C):Eh),rf=C=>C;function sf(C,f=rf){const h=Xi.useSyncExternalStore(C.subscribe,Xi.useCallback(()=>f(C.getState()),[C,f]),Xi.useCallback(()=>f(C.getInitialState()),[C,f]));return Xi.useDebugValue(h),h}const kh=C=>{const f=tf(C),h=b=>sf(f,b);return Object.assign(h,f),h},nf=(C=>C?kh(C):kh),wr=["branch","agent","worktree","running"],Ph=[{id:"codex",name:"Codex CLI",command:"codex",installCommand:"npm install -g @openai/codex",description:"OpenAI Codex CLI - AI-powered coding assistant"},{id:"claude",name:"Claude Code",command:"claude",installCommand:"npm install -g @anthropic-ai/claude-code",description:"Anthropic Claude Code - Advanced AI coding assistant"},{id:"gemini",name:"Gemini CLI",command:"gemini",installCommand:"npm install -g @google/gemini-cli",description:"Google Gemini CLI - Multi-modal AI assistant"}],pl=10,an=1,of=3,lf="hjWorktree CLI",af="2.0.0",bh={step:"branch",completedSteps:[],projectInfo:null,branches:[],selectedBranch:null,selectedAgent:"claude",worktreeCount:of,terminals:[],activeTerminalIndex:0,isLoading:!1,loadingMessage:"",error:null},st=nf((C,f)=>({...bh,setStep:h=>C({step:h}),goToStep:h=>{const{canNavigateTo:b,step:N,isStepComplete:K,completedSteps:j}=f();if(!b(h))return;const c=[...j];K(N)&&!c.includes(N)&&c.push(N),C({step:h,completedSteps:c})},goToNext:()=>{const{step:h,isStepComplete:b,completedSteps:N}=f(),K=wr.indexOf(h);if(K<wr.length-1&&b(h)){const j=[...N];j.includes(h)||j.push(h),C({step:wr[K+1],completedSteps:j})}},goToPrev:()=>{const{step:h}=f(),b=wr.indexOf(h);b>0&&C({step:wr[b-1]})},canNavigateTo:h=>{const{step:b,completedSteps:N,isStepComplete:K}=f(),j=wr.indexOf(b),c=wr.indexOf(h);if(c===j||c<j)return!0;for(let u=0;u<c;u++){const v=wr[u];if(!N.includes(v)&&!K(v))return!1}return!0},isStepComplete:h=>{const{selectedBranch:b,selectedAgent:N,worktreeCount:K,terminals:j}=f();switch(h){case"branch":return b!==null;case"agent":return N!==null;case"worktree":return K>=an;case"running":return j.length>0;default:return!1}},getStepStatus:h=>{const{step:b,completedSteps:N,isStepComplete:K}=f();return h===b?"current":N.includes(h)||K(h)?"completed":"pending"},setProjectInfo:h=>C({projectInfo:h}),fetchProjectInfo:async()=>{try{const h=await fetch("/api/info");if(!h.ok)throw new Error("Failed to fetch project info");const b=await h.json();C({projectInfo:b})}catch(h){C({error:h instanceof Error?h.message:"Unknown error"})}},setBranches:h=>C({branches:h}),setSelectedBranch:h=>C({selectedBranch:h}),fetchBranches:async()=>{try{const h=await fetch("/api/branches");if(!h.ok)throw new Error("Failed to fetch branches");const b=await h.json();if(C({branches:b}),!f().selectedBranch&&b.length>0){const K=b.find(j=>j.isCurrent);C({selectedBranch:(K==null?void 0:K.name)||b[0].name})}}catch(h){C({error:h instanceof Error?h.message:"Unknown error"})}},setSelectedAgent:h=>C({selectedAgent:h}),setWorktreeCount:h=>C({worktreeCount:Math.max(an,Math.min(pl,h))}),incrementWorktreeCount:()=>{const{worktreeCount:h}=f();h<pl&&C({worktreeCount:h+1})},decrementWorktreeCount:()=>{const{worktreeCount:h}=f();h>an&&C({worktreeCount:h-1})},addTerminal:h=>C(b=>({terminals:[...b.terminals,h]})),updateTerminalStatus:(h,b)=>C(N=>({terminals:N.terminals.map(K=>K.sessionId===h?{...K,status:b}:K)})),removeTerminal:h=>C(b=>{const N=b.terminals.filter(j=>j.sessionId!==h),K=Math.min(b.activeTerminalIndex,Math.max(0,N.length-1));return{terminals:N,activeTerminalIndex:K,step:N.length===0?"branch":b.step,completedSteps:N.length===0?[]:b.completedSteps}}),setActiveTerminal:h=>C({activeTerminalIndex:h}),clearAllTerminals:()=>C({terminals:[],activeTerminalIndex:0}),execute:async()=>{const{selectedBranch:h,worktreeCount:b,selectedAgent:N,setLoading:K,setError:j,setStep:c,addTerminal:u}=f();if(!h){j("Please select a branch");return}K(!0,"Creating worktrees..."),j(null);try{const v=await fetch("/api/worktrees",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h,count:b,agentType:N})});if(!v.ok){const d=await v.json();throw new Error(d.error||"Failed to create worktrees")}const{worktrees:y}=await v.json();for(const d of y){const S=`${d.name}-${Date.now()}`;u({sessionId:S,worktreePath:d.path,worktreeName:d.name,branchName:d.branch,agentType:N,status:"initializing"})}C({step:"running",completedSteps:["branch","agent","worktree"]})}catch(v){j(v instanceof Error?v.message:"Unknown error")}finally{K(!1)}},setLoading:(h,b="")=>C({isLoading:h,loadingMessage:b}),setError:h=>C({error:h}),reset:()=>C(bh)})),Ut=Object.create(null);Ut.open="0";Ut.close="1";Ut.ping="2";Ut.pong="3";Ut.message="4";Ut.upgrade="5";Ut.noop="6";const cn=Object.create(null);Object.keys(Ut).forEach(C=>{cn[Ut[C]]=C});const vl={type:"error",data:"parser error"},Mh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ih=typeof ArrayBuffer=="function",Nh=C=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(C):C&&C.buffer instanceof ArrayBuffer,El=({type:C,data:f},h,b)=>Mh&&f instanceof Blob?h?b(f):xh(f,b):Ih&&(f instanceof ArrayBuffer||Nh(f))?h?b(f):xh(new Blob([f]),b):b(Ut[C]+(f||"")),xh=(C,f)=>{const h=new FileReader;return h.onload=function(){const b=h.result.split(",")[1];f("b"+(b||""))},h.readAsDataURL(C)};function Rh(C){return C instanceof Uint8Array?C:C instanceof ArrayBuffer?new Uint8Array(C):new Uint8Array(C.buffer,C.byteOffset,C.byteLength)}let hl;function cf(C,f){if(Mh&&C.data instanceof Blob)return C.data.arrayBuffer().then(Rh).then(f);if(Ih&&(C.data instanceof ArrayBuffer||Nh(C.data)))return f(Rh(C.data));El(C,!1,h=>{hl||(hl=new TextEncoder),f(hl.encode(h))})}const Lh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let C=0;C<Lh.length;C++)Gi[Lh.charCodeAt(C)]=C;const hf=C=>{let f=C.length*.75,h=C.length,b,N=0,K,j,c,u;C[C.length-1]==="="&&(f--,C[C.length-2]==="="&&f--);const v=new ArrayBuffer(f),y=new Uint8Array(v);for(b=0;b<h;b+=4)K=Gi[C.charCodeAt(b)],j=Gi[C.charCodeAt(b+1)],c=Gi[C.charCodeAt(b+2)],u=Gi[C.charCodeAt(b+3)],y[N++]=K<<2|j>>4,y[N++]=(j&15)<<4|c>>2,y[N++]=(c&3)<<6|u&63;return v},uf=typeof ArrayBuffer=="function",kl=(C,f)=>{if(typeof C!="string")return{type:"message",data:Hh(C,f)};const h=C.charAt(0);return h==="b"?{type:"message",data:df(C.substring(1),f)}:cn[h]?C.length>1?{type:cn[h],data:C.substring(1)}:{type:cn[h]}:vl},df=(C,f)=>{if(uf){const h=hf(C);return Hh(h,f)}else return{base64:!0,data:C}},Hh=(C,f)=>{switch(f){case"blob":return C instanceof Blob?C:new Blob([C]);case"arraybuffer":default:return C instanceof ArrayBuffer?C:C.buffer}},Fh="",ff=(C,f)=>{const h=C.length,b=new Array(h);let N=0;C.forEach((K,j)=>{El(K,!1,c=>{b[j]=c,++N===h&&f(b.join(Fh))})})},_f=(C,f)=>{const h=C.split(Fh),b=[];for(let N=0;N<h.length;N++){const K=kl(h[N],f);if(b.push(K),K.type==="error")break}return b};function pf(){return new TransformStream({transform(C,f){cf(C,h=>{const b=h.length;let N;if(b<126)N=new Uint8Array(1),new DataView(N.buffer).setUint8(0,b);else if(b<65536){N=new Uint8Array(3);const K=new DataView(N.buffer);K.setUint8(0,126),K.setUint16(1,b)}else{N=new Uint8Array(9);const K=new DataView(N.buffer);K.setUint8(0,127),K.setBigUint64(1,BigInt(b))}C.data&&typeof C.data!="string"&&(N[0]|=128),f.enqueue(N),f.enqueue(h)})}})}let ul;function on(C){return C.reduce((f,h)=>f+h.length,0)}function ln(C,f){if(C[0].length===f)return C.shift();const h=new Uint8Array(f);let b=0;for(let N=0;N<f;N++)h[N]=C[0][b++],b===C[0].length&&(C.shift(),b=0);return C.length&&b<C[0].length&&(C[0]=C[0].slice(b)),h}function vf(C,f){ul||(ul=new TextDecoder);const h=[];let b=0,N=-1,K=!1;return new TransformStream({transform(j,c){for(h.push(j);;){if(b===0){if(on(h)<1)break;const u=ln(h,1);K=(u[0]&128)===128,N=u[0]&127,N<126?b=3:N===126?b=1:b=2}else if(b===1){if(on(h)<2)break;const u=ln(h,2);N=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),b=3}else if(b===2){if(on(h)<8)break;const u=ln(h,8),v=new DataView(u.buffer,u.byteOffset,u.length),y=v.getUint32(0);if(y>Math.pow(2,21)-1){c.enqueue(vl);break}N=y*Math.pow(2,32)+v.getUint32(4),b=3}else{if(on(h)<N)break;const u=ln(h,N);c.enqueue(kl(K?u:ul.decode(u),f)),b=0}if(N===0||N>C){c.enqueue(vl);break}}}})}const zh=4;function je(C){if(C)return gf(C)}function gf(C){for(var f in je.prototype)C[f]=je.prototype[f];return C}je.prototype.on=je.prototype.addEventListener=function(C,f){return this._callbacks=this._callbacks||{},(this._callbacks["$"+C]=this._callbacks["$"+C]||[]).push(f),this};je.prototype.once=function(C,f){function h(){this.off(C,h),f.apply(this,arguments)}return h.fn=f,this.on(C,h),this};je.prototype.off=je.prototype.removeListener=je.prototype.removeAllListeners=je.prototype.removeEventListener=function(C,f){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var h=this._callbacks["$"+C];if(!h)return this;if(arguments.length==1)return delete this._callbacks["$"+C],this;for(var b,N=0;N<h.length;N++)if(b=h[N],b===f||b.fn===f){h.splice(N,1);break}return h.length===0&&delete this._callbacks["$"+C],this};je.prototype.emit=function(C){this._callbacks=this._callbacks||{};for(var f=new Array(arguments.length-1),h=this._callbacks["$"+C],b=1;b<arguments.length;b++)f[b-1]=arguments[b];if(h){h=h.slice(0);for(var b=0,N=h.length;b<N;++b)h[b].apply(this,f)}return this};je.prototype.emitReserved=je.prototype.emit;je.prototype.listeners=function(C){return this._callbacks=this._callbacks||{},this._callbacks["$"+C]||[]};je.prototype.hasListeners=function(C){return!!this.listeners(C).length};const _n=typeof Promise=="function"&&typeof Promise.resolve=="function"?f=>Promise.resolve().then(f):(f,h)=>h(f,0),bt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),mf="arraybuffer";function jh(C,...f){return f.reduce((h,b)=>(C.hasOwnProperty(b)&&(h[b]=C[b]),h),{})}const Sf=bt.setTimeout,yf=bt.clearTimeout;function pn(C,f){f.useNativeTimers?(C.setTimeoutFn=Sf.bind(bt),C.clearTimeoutFn=yf.bind(bt)):(C.setTimeoutFn=bt.setTimeout.bind(bt),C.clearTimeoutFn=bt.clearTimeout.bind(bt))}const wf=1.33;function Cf(C){return typeof C=="string"?Ef(C):Math.ceil((C.byteLength||C.size)*wf)}function Ef(C){let f=0,h=0;for(let b=0,N=C.length;b<N;b++)f=C.charCodeAt(b),f<128?h+=1:f<2048?h+=2:f<55296||f>=57344?h+=3:(b++,h+=4);return h}function Uh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kf(C){let f="";for(let h in C)C.hasOwnProperty(h)&&(f.length&&(f+="&"),f+=encodeURIComponent(h)+"="+encodeURIComponent(C[h]));return f}function bf(C){let f={},h=C.split("&");for(let b=0,N=h.length;b<N;b++){let K=h[b].split("=");f[decodeURIComponent(K[0])]=decodeURIComponent(K[1])}return f}class xf extends Error{constructor(f,h,b){super(f),this.description=h,this.context=b,this.type="TransportError"}}class bl extends je{constructor(f){super(),this.writable=!1,pn(this,f),this.opts=f,this.query=f.query,this.socket=f.socket,this.supportsBinary=!f.forceBase64}onError(f,h,b){return super.emitReserved("error",new xf(f,h,b)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(f){this.readyState==="open"&&this.write(f)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(f){const h=kl(f,this.socket.binaryType);this.onPacket(h)}onPacket(f){super.emitReserved("packet",f)}onClose(f){this.readyState="closed",super.emitReserved("close",f)}pause(f){}createUri(f,h={}){return f+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const f=this.opts.hostname;return f.indexOf(":")===-1?f:"["+f+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(f){const h=kf(f);return h.length?"?"+h:""}}class Rf extends bl{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(f){this.readyState="pausing";const h=()=>{this.readyState="paused",f()};if(this._polling||!this.writable){let b=0;this._polling&&(b++,this.once("pollComplete",function(){--b||h()})),this.writable||(b++,this.once("drain",function(){--b||h()}))}else h()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(f){const h=b=>{if(this.readyState==="opening"&&b.type==="open"&&this.onOpen(),b.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(b)};_f(f,this.socket.binaryType).forEach(h),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const f=()=>{this.write([{type:"close"}])};this.readyState==="open"?f():this.once("open",f)}write(f){this.writable=!1,ff(f,h=>{this.doWrite(h,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const f=this.opts.secure?"https":"http",h=this.query||{};return this.opts.timestampRequests!==!1&&(h[this.opts.timestampParam]=Uh()),!this.supportsBinary&&!h.sid&&(h.b64=1),this.createUri(f,h)}}let Wh=!1;try{Wh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Lf=Wh;function Df(){}class Tf extends Rf{constructor(f){if(super(f),typeof location<"u"){const h=location.protocol==="https:";let b=location.port;b||(b=h?"443":"80"),this.xd=typeof location<"u"&&f.hostname!==location.hostname||b!==f.port}}doWrite(f,h){const b=this.request({method:"POST",data:f});b.on("success",h),b.on("error",(N,K)=>{this.onError("xhr post error",N,K)})}doPoll(){const f=this.request();f.on("data",this.onData.bind(this)),f.on("error",(h,b)=>{this.onError("xhr poll error",h,b)}),this.pollXhr=f}}class jt extends je{constructor(f,h,b){super(),this.createRequest=f,pn(this,b),this._opts=b,this._method=b.method||"GET",this._uri=h,this._data=b.data!==void 0?b.data:null,this._create()}_create(){var f;const h=jh(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");h.xdomain=!!this._opts.xd;const b=this._xhr=this.createRequest(h);try{b.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){b.setDisableHeaderCheck&&b.setDisableHeaderCheck(!0);for(let N in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(N)&&b.setRequestHeader(N,this._opts.extraHeaders[N])}}catch{}if(this._method==="POST")try{b.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{b.setRequestHeader("Accept","*/*")}catch{}(f=this._opts.cookieJar)===null||f===void 0||f.addCookies(b),"withCredentials"in b&&(b.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(b.timeout=this._opts.requestTimeout),b.onreadystatechange=()=>{var N;b.readyState===3&&((N=this._opts.cookieJar)===null||N===void 0||N.parseCookies(b.getResponseHeader("set-cookie"))),b.readyState===4&&(b.status===200||b.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof b.status=="number"?b.status:0)},0))},b.send(this._data)}catch(N){this.setTimeoutFn(()=>{this._onError(N)},0);return}typeof document<"u"&&(this._index=jt.requestsCount++,jt.requests[this._index]=this)}_onError(f){this.emitReserved("error",f,this._xhr),this._cleanup(!0)}_cleanup(f){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Df,f)try{this._xhr.abort()}catch{}typeof document<"u"&&delete jt.requests[this._index],this._xhr=null}}_onLoad(){const f=this._xhr.responseText;f!==null&&(this.emitReserved("data",f),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}jt.requestsCount=0;jt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Dh);else if(typeof addEventListener=="function"){const C="onpagehide"in bt?"pagehide":"unload";addEventListener(C,Dh,!1)}}function Dh(){for(let C in jt.requests)jt.requests.hasOwnProperty(C)&&jt.requests[C].abort()}const Af=(function(){const C=$h({xdomain:!1});return C&&C.responseType!==null})();class Bf extends Tf{constructor(f){super(f);const h=f&&f.forceBase64;this.supportsBinary=Af&&!h}request(f={}){return Object.assign(f,{xd:this.xd},this.opts),new jt($h,this.uri(),f)}}function $h(C){const f=C.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!f||Lf))return new XMLHttpRequest}catch{}if(!f)try{return new bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Vh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Of extends bl{get name(){return"websocket"}doOpen(){const f=this.uri(),h=this.opts.protocols,b=Vh?{}:jh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(b.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(f,h,b)}catch(N){return this.emitReserved("error",N)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=f=>this.onClose({description:"websocket connection closed",context:f}),this.ws.onmessage=f=>this.onData(f.data),this.ws.onerror=f=>this.onError("websocket error",f)}write(f){this.writable=!1;for(let h=0;h<f.length;h++){const b=f[h],N=h===f.length-1;El(b,this.supportsBinary,K=>{try{this.doWrite(b,K)}catch{}N&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const f=this.opts.secure?"wss":"ws",h=this.query||{};return this.opts.timestampRequests&&(h[this.opts.timestampParam]=Uh()),this.supportsBinary||(h.b64=1),this.createUri(f,h)}}const dl=bt.WebSocket||bt.MozWebSocket;class Pf extends Of{createSocket(f,h,b){return Vh?new dl(f,h,b):h?new dl(f,h):new dl(f)}doWrite(f,h){this.ws.send(h)}}class Mf extends bl{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(f){return this.emitReserved("error",f)}this._transport.closed.then(()=>{this.onClose()}).catch(f=>{this.onError("webtransport error",f)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(f=>{const h=vf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),b=f.readable.pipeThrough(h).getReader(),N=pf();N.readable.pipeTo(f.writable),this._writer=N.writable.getWriter();const K=()=>{b.read().then(({done:c,value:u})=>{c||(this.onPacket(u),K())}).catch(c=>{})};K();const j={type:"open"};this.query.sid&&(j.data=`{"sid":"${this.query.sid}"}`),this._writer.write(j).then(()=>this.onOpen())})})}write(f){this.writable=!1;for(let h=0;h<f.length;h++){const b=f[h],N=h===f.length-1;this._writer.write(b).then(()=>{N&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var f;(f=this._transport)===null||f===void 0||f.close()}}const If={websocket:Pf,webtransport:Mf,polling:Bf},Nf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Hf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gl(C){if(C.length>8e3)throw"URI too long";const f=C,h=C.indexOf("["),b=C.indexOf("]");h!=-1&&b!=-1&&(C=C.substring(0,h)+C.substring(h,b).replace(/:/g,";")+C.substring(b,C.length));let N=Nf.exec(C||""),K={},j=14;for(;j--;)K[Hf[j]]=N[j]||"";return h!=-1&&b!=-1&&(K.source=f,K.host=K.host.substring(1,K.host.length-1).replace(/;/g,":"),K.authority=K.authority.replace("[","").replace("]","").replace(/;/g,":"),K.ipv6uri=!0),K.pathNames=Ff(K,K.path),K.queryKey=zf(K,K.query),K}function Ff(C,f){const h=/\/{2,9}/g,b=f.replace(h,"/").split("/");return(f.slice(0,1)=="/"||f.length===0)&&b.splice(0,1),f.slice(-1)=="/"&&b.splice(b.length-1,1),b}function zf(C,f){const h={};return f.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(b,N,K){N&&(h[N]=K)}),h}const ml=typeof addEventListener=="function"&&typeof removeEventListener=="function",hn=[];ml&&addEventListener("offline",()=>{hn.forEach(C=>C())},!1);class Cr extends je{constructor(f,h){if(super(),this.binaryType=mf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,f&&typeof f=="object"&&(h=f,f=null),f){const b=gl(f);h.hostname=b.host,h.secure=b.protocol==="https"||b.protocol==="wss",h.port=b.port,b.query&&(h.query=b.query)}else h.host&&(h.hostname=gl(h.host).host);pn(this,h),this.secure=h.secure!=null?h.secure:typeof location<"u"&&location.protocol==="https:",h.hostname&&!h.port&&(h.port=this.secure?"443":"80"),this.hostname=h.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=h.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},h.transports.forEach(b=>{const N=b.prototype.name;this.transports.push(N),this._transportsByName[N]=b}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},h),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bf(this.opts.query)),ml&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},hn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(f){const h=Object.assign({},this.opts.query);h.EIO=zh,h.transport=f,this.id&&(h.sid=this.id);const b=Object.assign({},this.opts,{query:h,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[f]);return new this._transportsByName[f](b)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const f=this.opts.rememberUpgrade&&Cr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const h=this.createTransport(f);h.open(),this.setTransport(h)}setTransport(f){this.transport&&this.transport.removeAllListeners(),this.transport=f,f.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",h=>this._onClose("transport close",h))}onOpen(){this.readyState="open",Cr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(f){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",f),this.emitReserved("heartbeat"),f.type){case"open":this.onHandshake(JSON.parse(f.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const h=new Error("server error");h.code=f.data,this._onError(h);break;case"message":this.emitReserved("data",f.data),this.emitReserved("message",f.data);break}}onHandshake(f){this.emitReserved("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this._pingInterval=f.pingInterval,this._pingTimeout=f.pingTimeout,this._maxPayload=f.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const f=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+f,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},f),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const f=this._getWritablePackets();this.transport.send(f),this._prevBufferLen=f.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let h=1;for(let b=0;b<this.writeBuffer.length;b++){const N=this.writeBuffer[b].data;if(N&&(h+=Cf(N)),b>0&&h>this._maxPayload)return this.writeBuffer.slice(0,b);h+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const f=Date.now()>this._pingTimeoutTime;return f&&(this._pingTimeoutTime=0,_n(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),f}write(f,h,b){return this._sendPacket("message",f,h,b),this}send(f,h,b){return this._sendPacket("message",f,h,b),this}_sendPacket(f,h,b,N){if(typeof h=="function"&&(N=h,h=void 0),typeof b=="function"&&(N=b,b=null),this.readyState==="closing"||this.readyState==="closed")return;b=b||{},b.compress=b.compress!==!1;const K={type:f,data:h,options:b};this.emitReserved("packetCreate",K),this.writeBuffer.push(K),N&&this.once("flush",N),this.flush()}close(){const f=()=>{this._onClose("forced close"),this.transport.close()},h=()=>{this.off("upgrade",h),this.off("upgradeError",h),f()},b=()=>{this.once("upgrade",h),this.once("upgradeError",h)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?b():f()}):this.upgrading?b():f()),this}_onError(f){if(Cr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",f),this._onClose("transport error",f)}_onClose(f,h){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ml&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const b=hn.indexOf(this._offlineEventListener);b!==-1&&hn.splice(b,1)}this.readyState="closed",this.id=null,this.emitReserved("close",f,h),this.writeBuffer=[],this._prevBufferLen=0}}}Cr.protocol=zh;class jf extends Cr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let f=0;f<this._upgrades.length;f++)this._probe(this._upgrades[f])}_probe(f){let h=this.createTransport(f),b=!1;Cr.priorWebsocketSuccess=!1;const N=()=>{b||(h.send([{type:"ping",data:"probe"}]),h.once("packet",d=>{if(!b)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",h),!h)return;Cr.priorWebsocketSuccess=h.name==="websocket",this.transport.pause(()=>{b||this.readyState!=="closed"&&(y(),this.setTransport(h),h.send([{type:"upgrade"}]),this.emitReserved("upgrade",h),h=null,this.upgrading=!1,this.flush())})}else{const S=new Error("probe error");S.transport=h.name,this.emitReserved("upgradeError",S)}}))};function K(){b||(b=!0,y(),h.close(),h=null)}const j=d=>{const S=new Error("probe error: "+d);S.transport=h.name,K(),this.emitReserved("upgradeError",S)};function c(){j("transport closed")}function u(){j("socket closed")}function v(d){h&&d.name!==h.name&&K()}const y=()=>{h.removeListener("open",N),h.removeListener("error",j),h.removeListener("close",c),this.off("close",u),this.off("upgrading",v)};h.once("open",N),h.once("error",j),h.once("close",c),this.once("close",u),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&f!=="webtransport"?this.setTimeoutFn(()=>{b||h.open()},200):h.open()}onHandshake(f){this._upgrades=this._filterUpgrades(f.upgrades),super.onHandshake(f)}_filterUpgrades(f){const h=[];for(let b=0;b<f.length;b++)~this.transports.indexOf(f[b])&&h.push(f[b]);return h}}let Uf=class extends jf{constructor(f,h={}){const b=typeof f=="object"?f:h;(!b.transports||b.transports&&typeof b.transports[0]=="string")&&(b.transports=(b.transports||["polling","websocket","webtransport"]).map(N=>If[N]).filter(N=>!!N)),super(f,b)}};function Wf(C,f="",h){let b=C;h=h||typeof location<"u"&&location,C==null&&(C=h.protocol+"//"+h.host),typeof C=="string"&&(C.charAt(0)==="/"&&(C.charAt(1)==="/"?C=h.protocol+C:C=h.host+C),/^(https?|wss?):\/\//.test(C)||(typeof h<"u"?C=h.protocol+"//"+C:C="https://"+C),b=gl(C)),b.port||(/^(http|ws)$/.test(b.protocol)?b.port="80":/^(http|ws)s$/.test(b.protocol)&&(b.port="443")),b.path=b.path||"/";const K=b.host.indexOf(":")!==-1?"["+b.host+"]":b.host;return b.id=b.protocol+"://"+K+":"+b.port+f,b.href=b.protocol+"://"+K+(h&&h.port===b.port?"":":"+b.port),b}const $f=typeof ArrayBuffer=="function",Vf=C=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(C):C.buffer instanceof ArrayBuffer,Kh=Object.prototype.toString,Kf=typeof Blob=="function"||typeof Blob<"u"&&Kh.call(Blob)==="[object BlobConstructor]",qf=typeof File=="function"||typeof File<"u"&&Kh.call(File)==="[object FileConstructor]";function xl(C){return $f&&(C instanceof ArrayBuffer||Vf(C))||Kf&&C instanceof Blob||qf&&C instanceof File}function un(C,f){if(!C||typeof C!="object")return!1;if(Array.isArray(C)){for(let h=0,b=C.length;h<b;h++)if(un(C[h]))return!0;return!1}if(xl(C))return!0;if(C.toJSON&&typeof C.toJSON=="function"&&arguments.length===1)return un(C.toJSON(),!0);for(const h in C)if(Object.prototype.hasOwnProperty.call(C,h)&&un(C[h]))return!0;return!1}function Xf(C){const f=[],h=C.data,b=C;return b.data=Sl(h,f),b.attachments=f.length,{packet:b,buffers:f}}function Sl(C,f){if(!C)return C;if(xl(C)){const h={_placeholder:!0,num:f.length};return f.push(C),h}else if(Array.isArray(C)){const h=new Array(C.length);for(let b=0;b<C.length;b++)h[b]=Sl(C[b],f);return h}else if(typeof C=="object"&&!(C instanceof Date)){const h={};for(const b in C)Object.prototype.hasOwnProperty.call(C,b)&&(h[b]=Sl(C[b],f));return h}return C}function Gf(C,f){return C.data=yl(C.data,f),delete C.attachments,C}function yl(C,f){if(!C)return C;if(C&&C._placeholder===!0){if(typeof C.num=="number"&&C.num>=0&&C.num<f.length)return f[C.num];throw new Error("illegal attachments")}else if(Array.isArray(C))for(let h=0;h<C.length;h++)C[h]=yl(C[h],f);else if(typeof C=="object")for(const h in C)Object.prototype.hasOwnProperty.call(C,h)&&(C[h]=yl(C[h],f));return C}const qh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Yf=5;var Ce;(function(C){C[C.CONNECT=0]="CONNECT",C[C.DISCONNECT=1]="DISCONNECT",C[C.EVENT=2]="EVENT",C[C.ACK=3]="ACK",C[C.CONNECT_ERROR=4]="CONNECT_ERROR",C[C.BINARY_EVENT=5]="BINARY_EVENT",C[C.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class Qf{constructor(f){this.replacer=f}encode(f){return(f.type===Ce.EVENT||f.type===Ce.ACK)&&un(f)?this.encodeAsBinary({type:f.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:f.nsp,data:f.data,id:f.id}):[this.encodeAsString(f)]}encodeAsString(f){let h=""+f.type;return(f.type===Ce.BINARY_EVENT||f.type===Ce.BINARY_ACK)&&(h+=f.attachments+"-"),f.nsp&&f.nsp!=="/"&&(h+=f.nsp+","),f.id!=null&&(h+=f.id),f.data!=null&&(h+=JSON.stringify(f.data,this.replacer)),h}encodeAsBinary(f){const h=Xf(f),b=this.encodeAsString(h.packet),N=h.buffers;return N.unshift(b),N}}class Rl extends je{constructor(f){super(),this.reviver=f}add(f){let h;if(typeof f=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(f);const b=h.type===Ce.BINARY_EVENT;b||h.type===Ce.BINARY_ACK?(h.type=b?Ce.EVENT:Ce.ACK,this.reconstructor=new Jf(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if(xl(f)||f.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(f),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+f)}decodeString(f){let h=0;const b={type:Number(f.charAt(0))};if(Ce[b.type]===void 0)throw new Error("unknown packet type "+b.type);if(b.type===Ce.BINARY_EVENT||b.type===Ce.BINARY_ACK){const K=h+1;for(;f.charAt(++h)!=="-"&&h!=f.length;);const j=f.substring(K,h);if(j!=Number(j)||f.charAt(h)!=="-")throw new Error("Illegal attachments");b.attachments=Number(j)}if(f.charAt(h+1)==="/"){const K=h+1;for(;++h&&!(f.charAt(h)===","||h===f.length););b.nsp=f.substring(K,h)}else b.nsp="/";const N=f.charAt(h+1);if(N!==""&&Number(N)==N){const K=h+1;for(;++h;){const j=f.charAt(h);if(j==null||Number(j)!=j){--h;break}if(h===f.length)break}b.id=Number(f.substring(K,h+1))}if(f.charAt(++h)){const K=this.tryParse(f.substr(h));if(Rl.isPayloadValid(b.type,K))b.data=K;else throw new Error("invalid payload")}return b}tryParse(f){try{return JSON.parse(f,this.reviver)}catch{return!1}}static isPayloadValid(f,h){switch(f){case Ce.CONNECT:return fn(h);case Ce.DISCONNECT:return h===void 0;case Ce.CONNECT_ERROR:return typeof h=="string"||fn(h);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&qh.indexOf(h[0])===-1);case Ce.ACK:case Ce.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Jf{constructor(f){this.packet=f,this.buffers=[],this.reconPack=f}takeBinaryData(f){if(this.buffers.push(f),this.buffers.length===this.reconPack.attachments){const h=Gf(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Zf(C){return typeof C=="string"}const e_=Number.isInteger||function(C){return typeof C=="number"&&isFinite(C)&&Math.floor(C)===C};function t_(C){return C===void 0||e_(C)}function fn(C){return Object.prototype.toString.call(C)==="[object Object]"}function r_(C,f){switch(C){case Ce.CONNECT:return f===void 0||fn(f);case Ce.DISCONNECT:return f===void 0;case Ce.EVENT:return Array.isArray(f)&&(typeof f[0]=="number"||typeof f[0]=="string"&&qh.indexOf(f[0])===-1);case Ce.ACK:return Array.isArray(f);case Ce.CONNECT_ERROR:return typeof f=="string"||fn(f);default:return!1}}function i_(C){return Zf(C.nsp)&&t_(C.id)&&r_(C.type,C.data)}const s_=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rl,Encoder:Qf,get PacketType(){return Ce},isPacketValid:i_,protocol:Yf},Symbol.toStringTag,{value:"Module"}));function Pt(C,f,h){return C.on(f,h),function(){C.off(f,h)}}const n_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Xh extends je{constructor(f,h,b){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=f,this.nsp=h,b&&b.auth&&(this.auth=b.auth),this._opts=Object.assign({},b),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const f=this.io;this.subs=[Pt(f,"open",this.onopen.bind(this)),Pt(f,"packet",this.onpacket.bind(this)),Pt(f,"error",this.onerror.bind(this)),Pt(f,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...f){return f.unshift("message"),this.emit.apply(this,f),this}emit(f,...h){var b,N,K;if(n_.hasOwnProperty(f))throw new Error('"'+f.toString()+'" is a reserved event name');if(h.unshift(f),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(h),this;const j={type:Ce.EVENT,data:h};if(j.options={},j.options.compress=this.flags.compress!==!1,typeof h[h.length-1]=="function"){const y=this.ids++,d=h.pop();this._registerAckCallback(y,d),j.id=y}const c=(N=(b=this.io.engine)===null||b===void 0?void 0:b.transport)===null||N===void 0?void 0:N.writable,u=this.connected&&!(!((K=this.io.engine)===null||K===void 0)&&K._hasPingExpired());return this.flags.volatile&&!c||(u?(this.notifyOutgoingListeners(j),this.packet(j)):this.sendBuffer.push(j)),this.flags={},this}_registerAckCallback(f,h){var b;const N=(b=this.flags.timeout)!==null&&b!==void 0?b:this._opts.ackTimeout;if(N===void 0){this.acks[f]=h;return}const K=this.io.setTimeoutFn(()=>{delete this.acks[f];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===f&&this.sendBuffer.splice(c,1);h.call(this,new Error("operation has timed out"))},N),j=(...c)=>{this.io.clearTimeoutFn(K),h.apply(this,c)};j.withError=!0,this.acks[f]=j}emitWithAck(f,...h){return new Promise((b,N)=>{const K=(j,c)=>j?N(j):b(c);K.withError=!0,h.push(K),this.emit(f,...h)})}_addToQueue(f){let h;typeof f[f.length-1]=="function"&&(h=f.pop());const b={id:this._queueSeq++,tryCount:0,pending:!1,args:f,flags:Object.assign({fromQueue:!0},this.flags)};f.push((N,...K)=>(this._queue[0],N!==null?b.tryCount>this._opts.retries&&(this._queue.shift(),h&&h(N)):(this._queue.shift(),h&&h(null,...K)),b.pending=!1,this._drainQueue())),this._queue.push(b),this._drainQueue()}_drainQueue(f=!1){if(!this.connected||this._queue.length===0)return;const h=this._queue[0];h.pending&&!f||(h.pending=!0,h.tryCount++,this.flags=h.flags,this.emit.apply(this,h.args))}packet(f){f.nsp=this.nsp,this.io._packet(f)}onopen(){typeof this.auth=="function"?this.auth(f=>{this._sendConnectPacket(f)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(f){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},f):f})}onerror(f){this.connected||this.emitReserved("connect_error",f)}onclose(f,h){this.connected=!1,delete this.id,this.emitReserved("disconnect",f,h),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(f=>{if(!this.sendBuffer.some(b=>String(b.id)===f)){const b=this.acks[f];delete this.acks[f],b.withError&&b.call(this,new Error("socket has been disconnected"))}})}onpacket(f){if(f.nsp===this.nsp)switch(f.type){case Ce.CONNECT:f.data&&f.data.sid?this.onconnect(f.data.sid,f.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(f);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(f);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const b=new Error(f.data.message);b.data=f.data.data,this.emitReserved("connect_error",b);break}}onevent(f){const h=f.data||[];f.id!=null&&h.push(this.ack(f.id)),this.connected?this.emitEvent(h):this.receiveBuffer.push(Object.freeze(h))}emitEvent(f){if(this._anyListeners&&this._anyListeners.length){const h=this._anyListeners.slice();for(const b of h)b.apply(this,f)}super.emit.apply(this,f),this._pid&&f.length&&typeof f[f.length-1]=="string"&&(this._lastOffset=f[f.length-1])}ack(f){const h=this;let b=!1;return function(...N){b||(b=!0,h.packet({type:Ce.ACK,id:f,data:N}))}}onack(f){const h=this.acks[f.id];typeof h=="function"&&(delete this.acks[f.id],h.withError&&f.data.unshift(null),h.apply(this,f.data))}onconnect(f,h){this.id=f,this.recovered=h&&this._pid===h,this._pid=h,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(f=>this.emitEvent(f)),this.receiveBuffer=[],this.sendBuffer.forEach(f=>{this.notifyOutgoingListeners(f),this.packet(f)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(f=>f()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(f){return this.flags.compress=f,this}get volatile(){return this.flags.volatile=!0,this}timeout(f){return this.flags.timeout=f,this}onAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(f),this}prependAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(f),this}offAny(f){if(!this._anyListeners)return this;if(f){const h=this._anyListeners;for(let b=0;b<h.length;b++)if(f===h[b])return h.splice(b,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(f),this}prependAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(f),this}offAnyOutgoing(f){if(!this._anyOutgoingListeners)return this;if(f){const h=this._anyOutgoingListeners;for(let b=0;b<h.length;b++)if(f===h[b])return h.splice(b,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(f){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const h=this._anyOutgoingListeners.slice();for(const b of h)b.apply(this,f.data)}}}function ci(C){C=C||{},this.ms=C.min||100,this.max=C.max||1e4,this.factor=C.factor||2,this.jitter=C.jitter>0&&C.jitter<=1?C.jitter:0,this.attempts=0}ci.prototype.duration=function(){var C=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var f=Math.random(),h=Math.floor(f*this.jitter*C);C=(Math.floor(f*10)&1)==0?C-h:C+h}return Math.min(C,this.max)|0};ci.prototype.reset=function(){this.attempts=0};ci.prototype.setMin=function(C){this.ms=C};ci.prototype.setMax=function(C){this.max=C};ci.prototype.setJitter=function(C){this.jitter=C};class wl extends je{constructor(f,h){var b;super(),this.nsps={},this.subs=[],f&&typeof f=="object"&&(h=f,f=void 0),h=h||{},h.path=h.path||"/socket.io",this.opts=h,pn(this,h),this.reconnection(h.reconnection!==!1),this.reconnectionAttempts(h.reconnectionAttempts||1/0),this.reconnectionDelay(h.reconnectionDelay||1e3),this.reconnectionDelayMax(h.reconnectionDelayMax||5e3),this.randomizationFactor((b=h.randomizationFactor)!==null&&b!==void 0?b:.5),this.backoff=new ci({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(h.timeout==null?2e4:h.timeout),this._readyState="closed",this.uri=f;const N=h.parser||s_;this.encoder=new N.Encoder,this.decoder=new N.Decoder,this._autoConnect=h.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(f){return arguments.length?(this._reconnection=!!f,f||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(f){return f===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=f,this)}reconnectionDelay(f){var h;return f===void 0?this._reconnectionDelay:(this._reconnectionDelay=f,(h=this.backoff)===null||h===void 0||h.setMin(f),this)}randomizationFactor(f){var h;return f===void 0?this._randomizationFactor:(this._randomizationFactor=f,(h=this.backoff)===null||h===void 0||h.setJitter(f),this)}reconnectionDelayMax(f){var h;return f===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=f,(h=this.backoff)===null||h===void 0||h.setMax(f),this)}timeout(f){return arguments.length?(this._timeout=f,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(f){if(~this._readyState.indexOf("open"))return this;this.engine=new Uf(this.uri,this.opts);const h=this.engine,b=this;this._readyState="opening",this.skipReconnect=!1;const N=Pt(h,"open",function(){b.onopen(),f&&f()}),K=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),f?f(c):this.maybeReconnectOnOpen()},j=Pt(h,"error",K);if(this._timeout!==!1){const c=this._timeout,u=this.setTimeoutFn(()=>{N(),K(new Error("timeout")),h.close()},c);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(N),this.subs.push(j),this}connect(f){return this.open(f)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const f=this.engine;this.subs.push(Pt(f,"ping",this.onping.bind(this)),Pt(f,"data",this.ondata.bind(this)),Pt(f,"error",this.onerror.bind(this)),Pt(f,"close",this.onclose.bind(this)),Pt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(f){try{this.decoder.add(f)}catch(h){this.onclose("parse error",h)}}ondecoded(f){_n(()=>{this.emitReserved("packet",f)},this.setTimeoutFn)}onerror(f){this.emitReserved("error",f)}socket(f,h){let b=this.nsps[f];return b?this._autoConnect&&!b.active&&b.connect():(b=new Xh(this,f,h),this.nsps[f]=b),b}_destroy(f){const h=Object.keys(this.nsps);for(const b of h)if(this.nsps[b].active)return;this._close()}_packet(f){const h=this.encoder.encode(f);for(let b=0;b<h.length;b++)this.engine.write(h[b],f.options)}cleanup(){this.subs.forEach(f=>f()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(f,h){var b;this.cleanup(),(b=this.engine)===null||b===void 0||b.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",f,h),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const f=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const h=this.backoff.duration();this._reconnecting=!0;const b=this.setTimeoutFn(()=>{f.skipReconnect||(this.emitReserved("reconnect_attempt",f.backoff.attempts),!f.skipReconnect&&f.open(N=>{N?(f._reconnecting=!1,f.reconnect(),this.emitReserved("reconnect_error",N)):f.onreconnect()}))},h);this.opts.autoUnref&&b.unref(),this.subs.push(()=>{this.clearTimeoutFn(b)})}}onreconnect(){const f=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",f)}}const qi={};function dn(C,f){typeof C=="object"&&(f=C,C=void 0),f=f||{};const h=Wf(C,f.path||"/socket.io"),b=h.source,N=h.id,K=h.path,j=qi[N]&&K in qi[N].nsps,c=f.forceNew||f["force new connection"]||f.multiplex===!1||j;let u;return c?u=new wl(b,f):(qi[N]||(qi[N]=new wl(b,f)),u=qi[N]),h.query&&!f.query&&(f.query=h.queryKey),u.socket(h.path,f)}Object.assign(dn,{Manager:wl,Socket:Xh,io:dn,connect:dn});let kt=null;function Ll(){const[C,f]=et.useState(!1),h=et.useRef(null);et.useEffect(()=>{kt||(kt=dn(window.location.origin,{reconnection:!0,reconnectionAttempts:5,reconnectionDelay:1e3})),h.current=kt;const j=()=>{console.log("Socket connected"),f(!0)},c=()=>{console.log("Socket disconnected"),f(!1)};return kt.on("connect",j),kt.on("disconnect",c),kt.connected&&f(!0),()=>{kt==null||kt.off("connect",j),kt==null||kt.off("disconnect",c)}},[]);const b=et.useCallback((j,c)=>{var u;(u=h.current)==null||u.emit(j,c)},[]),N=et.useCallback((j,c)=>{var u;(u=h.current)==null||u.on(j,c)},[]),K=et.useCallback((j,c)=>{var u,v;c?(u=h.current)==null||u.off(j,c):(v=h.current)==null||v.off(j)},[]);return{socket:h.current,connected:C,emit:b,on:N,off:K}}function o_(){const C=st(f=>f.projectInfo);return oe.jsxs("header",{className:"header",children:[oe.jsx("h1",{children:lf}),oe.jsxs("div",{className:"project-info",children:[C&&oe.jsxs(oe.Fragment,{children:[oe.jsxs("span",{className:"branch",children:[oe.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:oe.jsx("path",{d:"M11.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zm-2.25.75a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25zM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zM3.5 3.25a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0z"})}),C.currentBranch||"Unknown"]}),oe.jsx("span",{children:C.cwd})]}),oe.jsxs("span",{children:["v",af]})]})]})}const l_=[{id:"branch",number:1,label:"Branch Selection"},{id:"agent",number:2,label:"Agent Selection"},{id:"worktree",number:3,label:"Worktree Count"},{id:"running",number:4,label:"Running"}];function a_({number:C,label:f,status:h,onClick:b,disabled:N}){return oe.jsxs("button",{className:`lnb-step ${h}`,onClick:b,disabled:N,type:"button",children:[oe.jsx("span",{className:"step-number",children:h==="completed"?"✓":C}),oe.jsx("span",{className:"step-label",children:f})]})}function c_(){const{step:C,goToStep:f,canNavigateTo:h,getStepStatus:b}=st();return C==="running"?null:oe.jsxs("nav",{className:"left-nav-bar",children:[oe.jsx("div",{className:"lnb-header",children:oe.jsx("span",{children:"Setup Steps"})}),oe.jsx("div",{className:"lnb-steps",children:l_.map(N=>oe.jsx(a_,{step:N.id,number:N.number,label:N.label,status:b(N.id),onClick:()=>f(N.id),disabled:!h(N.id)},N.id))})]})}function h_({children:C}){const h=st(b=>b.step)!=="running";return oe.jsxs("div",{className:"main-layout",children:[h&&oe.jsx(c_,{}),oe.jsx("div",{className:`main-content-area ${h?"with-lnb":"full-width"}`,children:C})]})}function Dl({children:C,title:f,description:h,showNavButtons:b=!0,nextLabel:N="Next",onNext:K,nextDisabled:j=!1}){const{step:c,goToNext:u,goToPrev:v,isStepComplete:y}=st(),d=c==="branch",S=y(c),w=()=>{K?K():u()};return oe.jsxs("div",{className:"step-container",children:[oe.jsxs("div",{className:"step-header",children:[oe.jsx("h2",{children:f}),h&&oe.jsx("p",{children:h})]}),oe.jsx("div",{className:"step-content",children:C}),b&&oe.jsxs("div",{className:"step-navigation",children:[oe.jsx("button",{className:"nav-button prev",onClick:v,disabled:d,type:"button",children:"Previous"}),oe.jsx("button",{className:"nav-button next",onClick:w,disabled:j||!S,type:"button",children:N})]})]})}function u_(){const{branches:C,selectedBranch:f,setSelectedBranch:h}=st();return oe.jsxs("div",{className:"setup-section",children:[oe.jsx("label",{htmlFor:"branch-select",children:"Select Branch"}),oe.jsxs("select",{id:"branch-select",value:f||"",onChange:b=>h(b.target.value||null),children:[oe.jsx("option",{value:"",children:"-- Select a branch --"}),C.map(b=>oe.jsxs("option",{value:b.name,children:[b.name,b.isCurrent?" (current)":"",b.isRemote?" (remote)":""]},b.name))]})]})}function Th(){const C=st(f=>f.selectedBranch);return oe.jsx(Dl,{title:"Select Branch",description:"Choose the Git branch to create worktrees from",nextDisabled:!C,children:oe.jsx(u_,{})})}function d_(){const{selectedAgent:C,setSelectedAgent:f}=st();return oe.jsxs("div",{className:"setup-section",children:[oe.jsx("label",{children:"Select AI Agent"}),oe.jsx("div",{className:"agent-cards",children:Ph.map(h=>oe.jsxs("div",{className:`agent-card ${C===h.id?"selected":""}`,onClick:()=>f(h.id),children:[oe.jsx("h4",{children:h.name}),oe.jsx("p",{children:h.description})]},h.id))})]})}function f_(){const C=st(f=>f.selectedAgent);return oe.jsx(Dl,{title:"Select AI Agent",description:"Choose which AI coding agent to run in each worktree",nextDisabled:!C,children:oe.jsx(d_,{})})}function __(){const{worktreeCount:C,incrementWorktreeCount:f,decrementWorktreeCount:h}=st();return oe.jsxs("div",{className:"setup-section",children:[oe.jsx("label",{children:"Number of Worktrees"}),oe.jsxs("div",{className:"counter",children:[oe.jsx("button",{onClick:h,disabled:C<=an,children:"-"}),oe.jsx("span",{children:C}),oe.jsx("button",{onClick:f,disabled:C>=pl,children:"+"})]})]})}function p_(){var j;const{execute:C,isLoading:f,selectedBranch:h,selectedAgent:b,worktreeCount:N}=st(),K=((j=Ph.find(c=>c.id===b))==null?void 0:j.name)||b;return oe.jsxs(Dl,{title:"Configure Worktrees",description:"Set the number of parallel worktrees to create",nextLabel:f?"Creating...":"Execute",onNext:C,nextDisabled:!h||f||N<1,children:[oe.jsx(__,{}),oe.jsxs("div",{className:"execution-summary",children:[oe.jsx("h4",{children:"Summary"}),oe.jsxs("div",{className:"summary-item",children:[oe.jsx("span",{className:"summary-label",children:"Branch:"}),oe.jsx("span",{className:"summary-value",children:h})]}),oe.jsxs("div",{className:"summary-item",children:[oe.jsx("span",{className:"summary-label",children:"Agent:"}),oe.jsx("span",{className:"summary-value",children:K})]}),oe.jsxs("div",{className:"summary-item",children:[oe.jsx("span",{className:"summary-label",children:"Worktrees:"}),oe.jsx("span",{className:"summary-value",children:N})]})]})]})}var fl={exports:{}},Ah;function v_(){return Ah||(Ah=1,(function(C,f){(function(h,b){C.exports=b()})(globalThis,(()=>(()=>{var h={4567:function(j,c,u){var v=this&&this.__decorate||function(s,n,p,E){var k,x=arguments.length,m=x<3?n:E===null?E=Object.getOwnPropertyDescriptor(n,p):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(s,n,p,E);else for(var A=s.length-1;A>=0;A--)(k=s[A])&&(m=(x<3?k(m):x>3?k(n,p,m):k(n,p))||m);return x>3&&m&&Object.defineProperty(n,p,m),m},y=this&&this.__param||function(s,n){return function(p,E){n(p,E,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;const d=u(9042),S=u(9924),w=u(844),R=u(4725),g=u(2585),o=u(3656);let l=c.AccessibilityManager=class extends w.Disposable{constructor(s,n,p,E){super(),this._terminal=s,this._coreBrowserService=p,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 k=0;k<this._terminal.rows;k++)this._rowElements[k]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[k]);if(this._topBoundaryFocusListener=k=>this._handleBoundaryFocus(k,0),this._bottomBoundaryFocusListener=k=>this._handleBoundaryFocus(k,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 S.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((k=>this._handleResize(k.rows)))),this.register(this._terminal.onRender((k=>this._refreshRows(k.start,k.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((k=>this._handleChar(k)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
41
|
-
`)))),this.register(this._terminal.onA11yTab((k=>this._handleTab(k)))),this.register(this._terminal.onKey((k=>this._handleKey(k.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,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(s){for(let n=0;n<s;n++)this._handleChar(" ")}_handleChar(s){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==s&&(this._charsToAnnounce+=s):this._charsToAnnounce+=s,s===`
|
|
42
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(s){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(s)||this._charsToConsume.push(s)}_refreshRows(s,n){this._liveRegionDebouncer.refresh(s,n,this._terminal.rows)}_renderRows(s,n){const p=this._terminal.buffer,E=p.lines.length.toString();for(let k=s;k<=n;k++){const x=p.lines.get(p.ydisp+k),m=[],A=(x==null?void 0:x.translateToString(!0,void 0,void 0,m))||"",H=(p.ydisp+k+1).toString(),F=this._rowElements[k];F&&(A.length===0?(F.innerText=" ",this._rowColumns.set(F,[0,1])):(F.textContent=A,this._rowColumns.set(F,m)),F.setAttribute("aria-posinset",H),F.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(s,n){const p=s.target,E=this._rowElements[n===0?1:this._rowElements.length-2];if(p.getAttribute("aria-posinset")===(n===0?"1":`${this._terminal.buffer.lines.length}`)||s.relatedTarget!==E)return;let k,x;if(n===0?(k=p,x=this._rowElements.pop(),this._rowContainer.removeChild(x)):(k=this._rowElements.shift(),x=p,this._rowContainer.removeChild(k)),k.removeEventListener("focus",this._topBoundaryFocusListener),x.removeEventListener("focus",this._bottomBoundaryFocusListener),n===0){const m=this._createAccessibilityTreeNode();this._rowElements.unshift(m),this._rowContainer.insertAdjacentElement("afterbegin",m)}else{const m=this._createAccessibilityTreeNode();this._rowElements.push(m),this._rowContainer.appendChild(m)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(n===0?-1:1),this._rowElements[n===0?1:this._rowElements.length-2].focus(),s.preventDefault(),s.stopImmediatePropagation()}_handleSelectionChange(){var A;if(this._rowElements.length===0)return;const s=document.getSelection();if(!s)return;if(s.isCollapsed)return void(this._rowContainer.contains(s.anchorNode)&&this._terminal.clearSelection());if(!s.anchorNode||!s.focusNode)return void console.error("anchorNode and/or focusNode are null");let n={node:s.anchorNode,offset:s.anchorOffset},p={node:s.focusNode,offset:s.focusOffset};if((n.node.compareDocumentPosition(p.node)&Node.DOCUMENT_POSITION_PRECEDING||n.node===p.node&&n.offset>p.offset)&&([n,p]=[p,n]),n.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(n={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(n.node))return;const E=this._rowElements.slice(-1)[0];if(p.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(p={node:E,offset:((A=E.textContent)==null?void 0:A.length)??0}),!this._rowContainer.contains(p.node))return;const k=({node:H,offset:F})=>{const W=H instanceof Text?H.parentNode:H;let M=parseInt(W==null?void 0:W.getAttribute("aria-posinset"),10)-1;if(isNaN(M))return console.warn("row is invalid. Race condition?"),null;const Y=this._rowColumns.get(W);if(!Y)return console.warn("columns is null. Race condition?"),null;let ee=F<Y.length?Y[F]:Y.slice(-1)[0]+1;return ee>=this._terminal.cols&&(++M,ee=0),{row:M,column:ee}},x=k(n),m=k(p);if(x&&m){if(x.row>m.row||x.row===m.row&&x.column>=m.column)throw new Error("invalid range");this._terminal.select(x.column,x.row,(m.row-x.row)*this._terminal.cols-x.column+m.column)}}_handleResize(s){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let n=this._rowContainer.children.length;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);for(;this._rowElements.length>s;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const s=this._coreBrowserService.mainDocument.createElement("div");return s.setAttribute("role","listitem"),s.tabIndex=-1,this._refreshRowDimensions(s),s}_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 s=0;s<this._terminal.rows;s++)this._refreshRowDimensions(this._rowElements[s])}}_refreshRowDimensions(s){s.style.height=`${this._renderService.dimensions.css.cell.height}px`}};c.AccessibilityManager=l=v([y(1,g.IInstantiationService),y(2,R.ICoreBrowserService),y(3,R.IRenderService)],l)},3614:(j,c)=>{function u(S){return S.replace(/\r?\n/g,"\r")}function v(S,w){return w?"\x1B[200~"+S+"\x1B[201~":S}function y(S,w,R,g){S=v(S=u(S),R.decPrivateModes.bracketedPasteMode&&g.rawOptions.ignoreBracketedPasteMode!==!0),R.triggerDataEvent(S,!0),w.value=""}function d(S,w,R){const g=R.getBoundingClientRect(),o=S.clientX-g.left-10,l=S.clientY-g.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${o}px`,w.style.top=`${l}px`,w.style.zIndex="1000",w.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=u,c.bracketTextForPaste=v,c.copyHandler=function(S,w){S.clipboardData&&S.clipboardData.setData("text/plain",w.selectionText),S.preventDefault()},c.handlePasteEvent=function(S,w,R,g){S.stopPropagation(),S.clipboardData&&y(S.clipboardData.getData("text/plain"),w,R,g)},c.paste=y,c.moveTextAreaUnderMouseCursor=d,c.rightClickHandler=function(S,w,R,g,o){d(S,w,R),o&&g.rightClickSelect(S),w.value=g.selectionText,w.select()}},7239:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;const v=u(1505);c.ColorContrastCache=class{constructor(){this._color=new v.TwoKeyMap,this._css=new v.TwoKeyMap}setCss(y,d,S){this._css.set(y,d,S)}getCss(y,d){return this._css.get(y,d)}setColor(y,d,S){this._color.set(y,d,S)}getColor(y,d){return this._color.get(y,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(u,v,y,d){u.addEventListener(v,y,d);let S=!1;return{dispose:()=>{S||(S=!0,u.removeEventListener(v,y,d))}}}},3551:function(j,c,u){var v=this&&this.__decorate||function(l,s,n,p){var E,k=arguments.length,x=k<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,n):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(l,s,n,p);else for(var m=l.length-1;m>=0;m--)(E=l[m])&&(x=(k<3?E(x):k>3?E(s,n,x):E(s,n))||x);return k>3&&x&&Object.defineProperty(s,n,x),x},y=this&&this.__param||function(l,s){return function(n,p){s(n,p,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier=void 0;const d=u(3656),S=u(8460),w=u(844),R=u(2585),g=u(4725);let o=c.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(l,s,n,p,E){super(),this._element=l,this._mouseService=s,this._renderService=n,this._bufferService=p,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new S.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new S.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var k;this._lastMouseEvent=void 0,(k=this._activeProviderReplies)==null||k.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,d.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,d.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(l){this._lastMouseEvent=l;const s=this._positionFromMouseEvent(l,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const n=l.composedPath();for(let p=0;p<n.length;p++){const E=n[p];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(l){if(this._activeLine!==l.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(l,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,l)||(this._clearCurrentLink(),this._askForLink(l,!0))}_askForLink(l,s){var p,E;this._activeProviderReplies&&s||((p=this._activeProviderReplies)==null||p.forEach((k=>{k==null||k.forEach((x=>{x.link.dispose&&x.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=l.y);let n=!1;for(const[k,x]of this._linkProviderService.linkProviders.entries())s?(E=this._activeProviderReplies)!=null&&E.get(k)&&(n=this._checkLinkProviderResult(k,l,n)):x.provideLinks(l.y,(m=>{var H,F;if(this._isMouseOut)return;const A=m==null?void 0:m.map((W=>({link:W})));(H=this._activeProviderReplies)==null||H.set(k,A),n=this._checkLinkProviderResult(k,l,n),((F=this._activeProviderReplies)==null?void 0:F.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(l.y,this._activeProviderReplies)}))}_removeIntersectingLinks(l,s){const n=new Set;for(let p=0;p<s.size;p++){const E=s.get(p);if(E)for(let k=0;k<E.length;k++){const x=E[k],m=x.link.range.start.y<l?0:x.link.range.start.x,A=x.link.range.end.y>l?this._bufferService.cols:x.link.range.end.x;for(let H=m;H<=A;H++){if(n.has(H)){E.splice(k--,1);break}n.add(H)}}}}_checkLinkProviderResult(l,s,n){var k;if(!this._activeProviderReplies)return n;const p=this._activeProviderReplies.get(l);let E=!1;for(let x=0;x<l;x++)this._activeProviderReplies.has(x)&&!this._activeProviderReplies.get(x)||(E=!0);if(!E&&p){const x=p.find((m=>this._linkAtPosition(m.link,s)));x&&(n=!0,this._handleNewLink(x))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let x=0;x<this._activeProviderReplies.size;x++){const m=(k=this._activeProviderReplies.get(x))==null?void 0:k.find((A=>this._linkAtPosition(A.link,s)));if(m){n=!0,this._handleNewLink(m);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(l){if(!this._currentLink)return;const s=this._positionFromMouseEvent(l,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(l,this._currentLink.link.text)}_clearCurrentLink(l,s){this._currentLink&&this._lastMouseEvent&&(!l||!s||this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(l){if(!this._lastMouseEvent)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(l.link,s)&&(this._currentLink=l,this._currentLink.state={decorations:{underline:l.link.decorations===void 0||l.link.decorations.underline,pointerCursor:l.link.decorations===void 0||l.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,l.link,this._lastMouseEvent),l.link.decorations={},Object.defineProperties(l.link.decorations,{pointerCursor:{get:()=>{var n,p;return(p=(n=this._currentLink)==null?void 0:n.state)==null?void 0:p.decorations.pointerCursor},set:n=>{var p;(p=this._currentLink)!=null&&p.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",n))}},underline:{get:()=>{var n,p;return(p=(n=this._currentLink)==null?void 0:n.state)==null?void 0:p.decorations.underline},set:n=>{var p,E,k;(p=this._currentLink)!=null&&p.state&&((k=(E=this._currentLink)==null?void 0:E.state)==null?void 0:k.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(l.link,n))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((n=>{if(!this._currentLink)return;const p=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=p&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(p,E),this._lastMouseEvent)){const k=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);k&&this._askForLink(k,!1)}}))))}_linkHover(l,s,n){var p;(p=this._currentLink)!=null&&p.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&l.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(n,s.text)}_fireUnderlineEvent(l,s){const n=l.range,p=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-p-1,n.end.x,n.end.y-p-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(l,s,n){var p;(p=this._currentLink)!=null&&p.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&l.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(n,s.text)}_linkAtPosition(l,s){const n=l.range.start.y*this._bufferService.cols+l.range.start.x,p=l.range.end.y*this._bufferService.cols+l.range.end.x,E=s.y*this._bufferService.cols+s.x;return n<=E&&E<=p}_positionFromMouseEvent(l,s,n){const p=n.getCoords(l,s,this._bufferService.cols,this._bufferService.rows);if(p)return{x:p[0],y:p[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(l,s,n,p,E){return{x1:l,y1:s,x2:n,y2:p,cols:this._bufferService.cols,fg:E}}};c.Linkifier=o=v([y(1,g.IMouseService),y(2,g.IRenderService),y(3,R.IBufferService),y(4,g.ILinkProviderService)],o)},9042:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(j,c,u){var v=this&&this.__decorate||function(g,o,l,s){var n,p=arguments.length,E=p<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,o,l,s);else for(var k=g.length-1;k>=0;k--)(n=g[k])&&(E=(p<3?n(E):p>3?n(o,l,E):n(o,l))||E);return p>3&&E&&Object.defineProperty(o,l,E),E},y=this&&this.__param||function(g,o){return function(l,s){o(l,s,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkProvider=void 0;const d=u(511),S=u(2585);let w=c.OscLinkProvider=class{constructor(g,o,l){this._bufferService=g,this._optionsService=o,this._oscLinkService=l}provideLinks(g,o){var A;const l=this._bufferService.buffer.lines.get(g-1);if(!l)return void o(void 0);const s=[],n=this._optionsService.rawOptions.linkHandler,p=new d.CellData,E=l.getTrimmedLength();let k=-1,x=-1,m=!1;for(let H=0;H<E;H++)if(x!==-1||l.hasContent(H)){if(l.loadCell(H,p),p.hasExtendedAttrs()&&p.extended.urlId){if(x===-1){x=H,k=p.extended.urlId;continue}m=p.extended.urlId!==k}else x!==-1&&(m=!0);if(m||x!==-1&&H===E-1){const F=(A=this._oscLinkService.getLinkData(k))==null?void 0:A.uri;if(F){const W={start:{x:x+1,y:g},end:{x:H+(m||H!==E-1?0:1),y:g}};let M=!1;if(!(n!=null&&n.allowNonHttpProtocols))try{const Y=new URL(F);["http:","https:"].includes(Y.protocol)||(M=!0)}catch{M=!0}M||s.push({text:F,range:W,activate:(Y,ee)=>n?n.activate(Y,ee,W):R(0,ee),hover:(Y,ee)=>{var se;return(se=n==null?void 0:n.hover)==null?void 0:se.call(n,Y,ee,W)},leave:(Y,ee)=>{var se;return(se=n==null?void 0:n.leave)==null?void 0:se.call(n,Y,ee,W)}})}m=!1,p.hasExtendedAttrs()&&p.extended.urlId?(x=H,k=p.extended.urlId):(x=-1,k=-1)}}o(s)}};function R(g,o){if(confirm(`Do you want to navigate to ${o}?
|
|
43
|
-
|
|
44
|
-
WARNING: This link could potentially be dangerous`)){const l=window.open();if(l){try{l.opener=null}catch{}l.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}}c.OscLinkProvider=w=v([y(0,S.IBufferService),y(1,S.IOptionsService),y(2,S.IOscLinkService)],w)},6193:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0,c.RenderDebouncer=class{constructor(u,v){this._renderCallback=u,this._coreBrowserService=v,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,v,y){this._rowCount=y,u=u!==void 0?u:0,v=v!==void 0?v: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,v):v,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),v=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,v),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;const v=u(3614),y=u(3656),d=u(3551),S=u(9042),w=u(3730),R=u(1680),g=u(3107),o=u(5744),l=u(2950),s=u(1296),n=u(428),p=u(4269),E=u(5114),k=u(8934),x=u(3230),m=u(9312),A=u(4725),H=u(6731),F=u(8055),W=u(8969),M=u(8460),Y=u(844),ee=u(6114),se=u(8437),le=u(2584),X=u(7399),L=u(5941),O=u(9074),T=u(2585),P=u(5435),J=u(4567),te=u(779);class ce extends W.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(U={}){super(U),this.browser=ee,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Y.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(T.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(te.LinkProviderService),this._instantiationService.setService(A.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((B,Z)=>this.refresh(B,Z)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((B=>this._reportWindowsOptions(B)))),this.register(this._inputHandler.onColor((B=>this._handleColorEvent(B)))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((B=>this._afterResize(B.cols,B.rows)))),this.register((0,Y.toDisposable)((()=>{var B,Z;this._customKeyEventHandler=void 0,(Z=(B=this.element)==null?void 0:B.parentNode)==null||Z.removeChild(this.element)})))}_handleColorEvent(U){if(this._themeService)for(const B of U){let Z,Q="";switch(B.index){case 256:Z="foreground",Q="10";break;case 257:Z="background",Q="11";break;case 258:Z="cursor",Q="12";break;default:Z="ansi",Q="4;"+B.index}switch(B.type){case 0:const de=F.color.toColorRGB(Z==="ansi"?this._themeService.colors.ansi[B.index]:this._themeService.colors[Z]);this.coreService.triggerDataEvent(`${le.C0.ESC}]${Q};${(0,L.toRgbString)(de)}${le.C1_ESCAPED.ST}`);break;case 1:if(Z==="ansi")this._themeService.modifyColors((ue=>ue.ansi[B.index]=F.channels.toColor(...B.color)));else{const ue=Z;this._themeService.modifyColors((Ee=>Ee[ue]=F.channels.toColor(...B.color)))}break;case 2:this._themeService.restoreColor(B.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(U){U?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(J.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(U){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(le.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var U;return(U=this.textarea)==null?void 0:U.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(le.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 U=this.buffer.ybase+this.buffer.y,B=this.buffer.lines.get(U);if(!B)return;const Z=Math.min(this.buffer.x,this.cols-1),Q=this._renderService.dimensions.css.cell.height,de=B.getWidth(Z),ue=this._renderService.dimensions.css.cell.width*de,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,Le=Z*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Le+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=ue+"px",this.textarea.style.height=Q+"px",this.textarea.style.lineHeight=Q+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,y.addDisposableDomListener)(this.element,"copy",(B=>{this.hasSelection()&&(0,v.copyHandler)(B,this._selectionService)})));const U=B=>(0,v.handlePasteEvent)(B,this.textarea,this.coreService,this.optionsService);this.register((0,y.addDisposableDomListener)(this.textarea,"paste",U)),this.register((0,y.addDisposableDomListener)(this.element,"paste",U)),ee.isFirefox?this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(B=>{B.button===2&&(0,v.rightClickHandler)(B,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,y.addDisposableDomListener)(this.element,"contextmenu",(B=>{(0,v.rightClickHandler)(B,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ee.isLinux&&this.register((0,y.addDisposableDomListener)(this.element,"auxclick",(B=>{B.button===1&&(0,v.moveTextAreaUnderMouseCursor)(B,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,y.addDisposableDomListener)(this.textarea,"keyup",(U=>this._keyUp(U)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keydown",(U=>this._keyDown(U)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keypress",(U=>this._keyPress(U)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionupdate",(U=>this._compositionHelper.compositionupdate(U)))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,y.addDisposableDomListener)(this.textarea,"input",(U=>this._inputEvent(U)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(U){var Z;if(!U)throw new Error("Terminal requires a parent element.");if(U.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((Z=this.element)==null?void 0:Z.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=U.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"),U.appendChild(this.element);const B=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),B.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,y.addDisposableDomListener)(this.screenElement,"mousemove",(Q=>this.updateCursorStyle(Q)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),B.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",S.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,U.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(A.ICoreBrowserService,this._coreBrowserService),this.register((0,y.addDisposableDomListener)(this.textarea,"focus",(Q=>this._handleTextAreaFocus(Q)))),this.register((0,y.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(n.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(A.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(H.ThemeService),this._instantiationService.setService(A.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(p.CharacterJoinerService),this._instantiationService.setService(A.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(x.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(A.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((Q=>this._onRender.fire(Q)))),this.onResize((Q=>this._renderService.resize(Q.cols,Q.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(l.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(k.MouseService),this._instantiationService.setService(A.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(d.Linkifier,this.screenElement)),this.element.appendChild(B);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(R.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((Q=>this.scrollLines(Q.amount,Q.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(m.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(A.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((Q=>this.scrollLines(Q.amount,Q.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Q=>this._renderService.handleSelectionChanged(Q.start,Q.end,Q.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Q=>{this.textarea.value=Q,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Q=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,y.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(g.BufferDecorationRenderer,this.screenElement)),this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(Q=>this._selectionService.handleMouseDown(Q)))),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(J.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(Q=>this._handleScreenReaderModeOptionChange(Q)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Q=>{!this._overviewRulerRenderer&&Q&&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(s.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const U=this,B=this.element;function Z(ue){const Ee=U._mouseService.getMouseReportCoords(ue,U.screenElement);if(!Ee)return!1;let Le,Te;switch(ue.overrideType||ue.type){case"mousemove":Te=32,ue.buttons===void 0?(Le=3,ue.button!==void 0&&(Le=ue.button<3?ue.button:3)):Le=1&ue.buttons?0:4&ue.buttons?1:2&ue.buttons?2:3;break;case"mouseup":Te=0,Le=ue.button<3?ue.button:3;break;case"mousedown":Te=1,Le=ue.button<3?ue.button:3;break;case"wheel":if(U._customWheelEventHandler&&U._customWheelEventHandler(ue)===!1||U.viewport.getLinesScrolled(ue)===0)return!1;Te=ue.deltaY<0?0:1,Le=4;break;default:return!1}return!(Te===void 0||Le===void 0||Le>4)&&U.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:Le,action:Te,ctrl:ue.ctrlKey,alt:ue.altKey,shift:ue.shiftKey})}const Q={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:ue=>(Z(ue),ue.buttons||(this._document.removeEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.removeEventListener("mousemove",Q.mousedrag)),this.cancel(ue)),wheel:ue=>(Z(ue),this.cancel(ue,!0)),mousedrag:ue=>{ue.buttons&&Z(ue)},mousemove:ue=>{ue.buttons||Z(ue)}};this.register(this.coreMouseService.onProtocolChange((ue=>{ue?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ue)),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&ue?Q.mousemove||(B.addEventListener("mousemove",de.mousemove),Q.mousemove=de.mousemove):(B.removeEventListener("mousemove",Q.mousemove),Q.mousemove=null),16&ue?Q.wheel||(B.addEventListener("wheel",de.wheel,{passive:!1}),Q.wheel=de.wheel):(B.removeEventListener("wheel",Q.wheel),Q.wheel=null),2&ue?Q.mouseup||(Q.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",Q.mouseup),Q.mouseup=null),4&ue?Q.mousedrag||(Q.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",Q.mousedrag),Q.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,y.addDisposableDomListener)(B,"mousedown",(ue=>{if(ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ue))return Z(ue),Q.mouseup&&this._document.addEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.addEventListener("mousemove",Q.mousedrag),this.cancel(ue)}))),this.register((0,y.addDisposableDomListener)(B,"wheel",(ue=>{if(!Q.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ue)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(ue);if(Ee===0)return;const Le=le.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ue.deltaY<0?"A":"B");let Te="";for(let qe=0;qe<Math.abs(Ee);qe++)Te+=Le;return this.coreService.triggerDataEvent(Te,!0),this.cancel(ue,!0)}return this.viewport.handleWheel(ue)?this.cancel(ue):void 0}}),{passive:!1})),this.register((0,y.addDisposableDomListener)(B,"touchstart",(ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ue),this.cancel(ue)}),{passive:!0})),this.register((0,y.addDisposableDomListener)(B,"touchmove",(ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ue)?void 0:this.cancel(ue)}),{passive:!1}))}refresh(U,B){var Z;(Z=this._renderService)==null||Z.refreshRows(U,B)}updateCursorStyle(U){var B;(B=this._selectionService)!=null&&B.shouldColumnSelect(U)?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(U,B,Z=0){var Q;Z===1?(super.scrollLines(U,B,Z),this.refresh(0,this.rows-1)):(Q=this.viewport)==null||Q.scrollLines(U)}paste(U){(0,v.paste)(U,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(U){this._customKeyEventHandler=U}attachCustomWheelEventHandler(U){this._customWheelEventHandler=U}registerLinkProvider(U){return this._linkProviderService.registerLinkProvider(U)}registerCharacterJoiner(U){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const B=this._characterJoinerService.register(U);return this.refresh(0,this.rows-1),B}deregisterCharacterJoiner(U){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(U)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(U){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+U)}registerDecoration(U){return this._decorationService.registerDecoration(U)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(U,B,Z){this._selectionService.setSelection(U,B,Z)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var U;(U=this._selectionService)==null||U.clearSelection()}selectAll(){var U;(U=this._selectionService)==null||U.selectAll()}selectLines(U,B){var Z;(Z=this._selectionService)==null||Z.selectLines(U,B)}_keyDown(U){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(U)===!1)return!1;const B=this.browser.isMac&&this.options.macOptionIsMeta&&U.altKey;if(!B&&!this._compositionHelper.keydown(U))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;B||U.key!=="Dead"&&U.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const Z=(0,X.evaluateKeyboardEvent)(U,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(U),Z.type===3||Z.type===2){const Q=this.rows-1;return this.scrollLines(Z.type===2?-Q:Q),this.cancel(U,!0)}return Z.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,U)||(Z.cancel&&this.cancel(U,!0),!Z.key||!!(U.key&&!U.ctrlKey&&!U.altKey&&!U.metaKey&&U.key.length===1&&U.key.charCodeAt(0)>=65&&U.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(Z.key!==le.C0.ETX&&Z.key!==le.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Z.key,domEvent:U}),this._showCursor(),this.coreService.triggerDataEvent(Z.key,!0),!this.optionsService.rawOptions.screenReaderMode||U.altKey||U.ctrlKey?this.cancel(U,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(U,B){const Z=U.isMac&&!this.options.macOptionIsMeta&&B.altKey&&!B.ctrlKey&&!B.metaKey||U.isWindows&&B.altKey&&B.ctrlKey&&!B.metaKey||U.isWindows&&B.getModifierState("AltGraph");return B.type==="keypress"?Z:Z&&(!B.keyCode||B.keyCode>47)}_keyUp(U){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(U)===!1||((function(B){return B.keyCode===16||B.keyCode===17||B.keyCode===18})(U)||this.focus(),this.updateCursorStyle(U),this._keyPressHandled=!1)}_keyPress(U){let B;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(U)===!1)return!1;if(this.cancel(U),U.charCode)B=U.charCode;else if(U.which===null||U.which===void 0)B=U.keyCode;else{if(U.which===0||U.charCode===0)return!1;B=U.which}return!(!B||(U.altKey||U.ctrlKey||U.metaKey)&&!this._isThirdLevelShift(this.browser,U)||(B=String.fromCharCode(B),this._onKey.fire({key:B,domEvent:U}),this._showCursor(),this.coreService.triggerDataEvent(B,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(U){if(U.data&&U.inputType==="insertText"&&(!U.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const B=U.data;return this.coreService.triggerDataEvent(B,!0),this.cancel(U),!0}return!1}resize(U,B){U!==this.cols||B!==this.rows?super.resize(U,B):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(U,B){var Z,Q;(Z=this._charSizeService)==null||Z.measure(),(Q=this.viewport)==null||Q.syncScrollArea(!0)}clear(){var U;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 B=1;B<this.rows;B++)this.buffer.lines.push(this.buffer.getBlankLine(se.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(U=this.viewport)==null||U.reset(),this.refresh(0,this.rows-1)}}reset(){var B,Z;this.options.rows=this.rows,this.options.cols=this.cols;const U=this._customKeyEventHandler;this._setup(),super.reset(),(B=this._selectionService)==null||B.reset(),this._decorationService.reset(),(Z=this.viewport)==null||Z.reset(),this._customKeyEventHandler=U,this.refresh(0,this.rows-1)}clearTextureAtlas(){var U;(U=this._renderService)==null||U.clearTextureAtlas()}_reportFocus(){var U;(U=this.element)!=null&&U.classList.contains("focus")?this.coreService.triggerDataEvent(le.C0.ESC+"[I"):this.coreService.triggerDataEvent(le.C0.ESC+"[O")}_reportWindowsOptions(U){if(this._renderService)switch(U){case P.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const B=this._renderService.dimensions.css.canvas.width.toFixed(0),Z=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${le.C0.ESC}[4;${Z};${B}t`);break;case P.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Q=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${le.C0.ESC}[6;${de};${Q}t`)}}cancel(U,B){if(this.options.cancelEvents||B)return U.preventDefault(),U.stopPropagation(),!1}}c.Terminal=ce},9924:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TimeBasedDebouncer=void 0,c.TimeBasedDebouncer=class{constructor(u,v=1e3){this._renderCallback=u,this._debounceThresholdMS=v,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,v,y){this._rowCount=y,u=u!==void 0?u:0,v=v!==void 0?v: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,v):v;const d=Date.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){const S=d-this._lastRefreshMs,w=this._debounceThresholdMS-S;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),v=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,v)}}},1680:function(j,c,u){var v=this&&this.__decorate||function(l,s,n,p){var E,k=arguments.length,x=k<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,n):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(l,s,n,p);else for(var m=l.length-1;m>=0;m--)(E=l[m])&&(x=(k<3?E(x):k>3?E(s,n,x):E(s,n))||x);return k>3&&x&&Object.defineProperty(s,n,x),x},y=this&&this.__param||function(l,s){return function(n,p){s(n,p,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;const d=u(3656),S=u(4725),w=u(8460),R=u(844),g=u(2585);let o=c.Viewport=class extends R.Disposable{constructor(l,s,n,p,E,k,x,m){super(),this._viewportElement=l,this._scrollArea=s,this._bufferService=n,this._optionsService=p,this._charSizeService=E,this._renderService=k,this._coreBrowserService=x,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 w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((A=>this._activeBuffer=A.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((A=>this._renderDimensions=A))),this._handleThemeChange(m.colors),this.register(m.onChangeColors((A=>this._handleThemeChange(A)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(l){this._viewportElement.style.backgroundColor=l.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(l){if(l)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 s=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==s&&(this._lastRecordedBufferHeight=s,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const l=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==l&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=l),this._refreshAnimationFrame=null}syncScrollArea(l=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(l);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(l)}_handleScroll(l){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 s=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:s,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const l=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(l*(this._smoothScrollState.target-this._smoothScrollState.origin)),l<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(l,s){const n=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(s<0&&this._viewportElement.scrollTop!==0||s>0&&n<this._lastRecordedBufferHeight)||(l.cancelable&&l.preventDefault(),!1)}handleWheel(l){const s=this._getPixelsScrolled(l);return s!==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+s:this._smoothScrollState.target+=s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=s,this._bubbleScroll(l,s))}scrollLines(l){if(l!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const s=l*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!1})}_getPixelsScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let s=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_LINE?s*=this._currentRowHeight:l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._currentRowHeight*this._bufferService.rows),s}getBufferElements(l,s){var m;let n,p="";const E=[],k=s??this._bufferService.buffer.lines.length,x=this._bufferService.buffer.lines;for(let A=l;A<k;A++){const H=x.get(A);if(!H)continue;const F=(m=x.get(A+1))==null?void 0:m.isWrapped;if(p+=H.translateToString(!F),!F||A===x.length-1){const W=document.createElement("div");W.textContent=p,E.push(W),p.length>0&&(n=W),p=""}}return{bufferElements:E,cursorElement:n}}getLinesScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let s=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(s/=this._currentRowHeight+0,this._wheelPartialScroll+=s,s=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._bufferService.rows),s}_applyScrollModifier(l,s){const n=this._optionsService.rawOptions.fastScrollModifier;return n==="alt"&&s.altKey||n==="ctrl"&&s.ctrlKey||n==="shift"&&s.shiftKey?l*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:l*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(l){this._lastTouchY=l.touches[0].pageY}handleTouchMove(l){const s=this._lastTouchY-l.touches[0].pageY;return this._lastTouchY=l.touches[0].pageY,s!==0&&(this._viewportElement.scrollTop+=s,this._bubbleScroll(l,s))}};c.Viewport=o=v([y(2,g.IBufferService),y(3,g.IOptionsService),y(4,S.ICharSizeService),y(5,S.IRenderService),y(6,S.ICoreBrowserService),y(7,S.IThemeService)],o)},3107:function(j,c,u){var v=this&&this.__decorate||function(g,o,l,s){var n,p=arguments.length,E=p<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,o,l,s);else for(var k=g.length-1;k>=0;k--)(n=g[k])&&(E=(p<3?n(E):p>3?n(o,l,E):n(o,l))||E);return p>3&&E&&Object.defineProperty(o,l,E),E},y=this&&this.__param||function(g,o){return function(l,s){o(l,s,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferDecorationRenderer=void 0;const d=u(4725),S=u(844),w=u(2585);let R=c.BufferDecorationRenderer=class extends S.Disposable{constructor(g,o,l,s,n){super(),this._screenElement=g,this._bufferService=o,this._coreBrowserService=l,this._decorationService=s,this._renderService=n,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((p=>this._removeDecoration(p)))),this.register((0,S.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 g of this._decorationService.decorations)this._renderDecoration(g);this._dimensionsChanged=!1}_renderDecoration(g){this._refreshStyle(g),this._dimensionsChanged&&this._refreshXPosition(g)}_createElement(g){var s;const o=this._coreBrowserService.mainDocument.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",((s=g==null?void 0:g.options)==null?void 0:s.layer)==="top"),o.style.width=`${Math.round((g.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(g.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(g.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 l=g.options.x??0;return l&&l>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(g,o),o}_refreshStyle(g){const o=g.marker.line-this._bufferService.buffers.active.ydisp;if(o<0||o>=this._bufferService.rows)g.element&&(g.element.style.display="none",g.onRenderEmitter.fire(g.element));else{let l=this._decorationElements.get(g);l||(l=this._createElement(g),g.element=l,this._decorationElements.set(g,l),this._container.appendChild(l),g.onDispose((()=>{this._decorationElements.delete(g),l.remove()}))),l.style.top=o*this._renderService.dimensions.css.cell.height+"px",l.style.display=this._altBufferIsActive?"none":"block",g.onRenderEmitter.fire(l)}}_refreshXPosition(g,o=g.element){if(!o)return;const l=g.options.x??0;(g.options.anchor||"left")==="right"?o.style.right=l?l*this._renderService.dimensions.css.cell.width+"px":"":o.style.left=l?l*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(g){var o;(o=this._decorationElements.get(g))==null||o.remove(),this._decorationElements.delete(g),g.dispose()}};c.BufferDecorationRenderer=R=v([y(1,w.IBufferService),y(2,d.ICoreBrowserService),y(3,w.IDecorationService),y(4,d.IRenderService)],R)},5871:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorZoneStore=void 0,c.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 v of this._zones)if(v.color===u.options.overviewRulerOptions.color&&v.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(v,u.marker.line))return;if(this._lineAdjacentToZone(v,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(v,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,v){return v>=u.startBufferLine&&v<=u.endBufferLine}_lineAdjacentToZone(u,v,y){return v>=u.startBufferLine-this._linePadding[y||"full"]&&v<=u.endBufferLine+this._linePadding[y||"full"]}_addLineToZone(u,v){u.startBufferLine=Math.min(u.startBufferLine,v),u.endBufferLine=Math.max(u.endBufferLine,v)}}},5744:function(j,c,u){var v=this&&this.__decorate||function(n,p,E,k){var x,m=arguments.length,A=m<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,E):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(n,p,E,k);else for(var H=n.length-1;H>=0;H--)(x=n[H])&&(A=(m<3?x(A):m>3?x(p,E,A):x(p,E))||A);return m>3&&A&&Object.defineProperty(p,E,A),A},y=this&&this.__param||function(n,p){return function(E,k){p(E,k,n)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OverviewRulerRenderer=void 0;const d=u(5871),S=u(4725),w=u(844),R=u(2585),g={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0};let s=c.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(n,p,E,k,x,m,A){var F;super(),this._viewportElement=n,this._screenElement=p,this._bufferService=E,this._decorationService=k,this._renderService=x,this._optionsService=m,this._coreBrowserService=A,this._colorZoneStore=new d.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(),(F=this._viewportElement.parentElement)==null||F.insertBefore(this._canvas,this._viewportElement);const H=this._canvas.getContext("2d");if(!H)throw new Error("Ctx cannot be null");this._ctx=H,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var W;(W=this._canvas)==null||W.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 n=Math.floor(this._canvas.width/3),p=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=n,o.center=p,o.right=n,this._refreshDrawHeightConstants(),l.full=0,l.left=0,l.center=o.left,l.right=o.left+o.center}_refreshDrawHeightConstants(){g.full=Math.round(2*this._coreBrowserService.dpr);const n=this._canvas.height/this._bufferService.buffer.lines.length,p=Math.round(Math.max(Math.min(n,12),6)*this._coreBrowserService.dpr);g.left=p,g.center=p,g.right=p}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.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 p of this._decorationService.decorations)this._colorZoneStore.addDecoration(p);this._ctx.lineWidth=1;const n=this._colorZoneStore.zones;for(const p of n)p.position!=="full"&&this._renderColorZone(p);for(const p of n)p.position==="full"&&this._renderColorZone(p);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(n){this._ctx.fillStyle=n.color,this._ctx.fillRect(l[n.position||"full"],Math.round((this._canvas.height-1)*(n.startBufferLine/this._bufferService.buffers.active.lines.length)-g[n.position||"full"]/2),o[n.position||"full"],Math.round((this._canvas.height-1)*((n.endBufferLine-n.startBufferLine)/this._bufferService.buffers.active.lines.length)+g[n.position||"full"]))}_queueRefresh(n,p){this._shouldUpdateDimensions=n||this._shouldUpdateDimensions,this._shouldUpdateAnchor=p||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};c.OverviewRulerRenderer=s=v([y(2,R.IBufferService),y(3,R.IDecorationService),y(4,S.IRenderService),y(5,R.IOptionsService),y(6,S.ICoreBrowserService)],s)},2950:function(j,c,u){var v=this&&this.__decorate||function(g,o,l,s){var n,p=arguments.length,E=p<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,o,l,s);else for(var k=g.length-1;k>=0;k--)(n=g[k])&&(E=(p<3?n(E):p>3?n(o,l,E):n(o,l))||E);return p>3&&E&&Object.defineProperty(o,l,E),E},y=this&&this.__param||function(g,o){return function(l,s){o(l,s,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;const d=u(4725),S=u(2585),w=u(2584);let R=c.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(g,o,l,s,n,p){this._textarea=g,this._compositionView=o,this._bufferService=l,this._optionsService=s,this._coreService=n,this._renderService=p,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(g){this._compositionView.textContent=g.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(g){if(this._isComposing||this._isSendingComposition){if(g.keyCode===229||g.keyCode===16||g.keyCode===17||g.keyCode===18)return!1;this._finalizeComposition(!1)}return g.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(g){if(this._compositionView.classList.remove("active"),this._isComposing=!1,g){const o={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let l;this._isSendingComposition=!1,o.start+=this._dataAlreadySent.length,l=this._isComposing?this._textarea.value.substring(o.start,o.end):this._textarea.value.substring(o.start),l.length>0&&this._coreService.triggerDataEvent(l,!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 g=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const o=this._textarea.value,l=o.replace(g,"");this._dataAlreadySent=l,o.length>g.length?this._coreService.triggerDataEvent(l,!0):o.length<g.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):o.length===g.length&&o!==g&&this._coreService.triggerDataEvent(o,!0)}}),0)}updateCompositionElements(g){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const o=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),l=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,n=o*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=n+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=l+"px",this._compositionView.style.lineHeight=l+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const p=this._compositionView.getBoundingClientRect();this._textarea.style.left=n+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(p.width,1)+"px",this._textarea.style.height=Math.max(p.height,1)+"px",this._textarea.style.lineHeight=p.height+"px"}g||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};c.CompositionHelper=R=v([y(2,S.IBufferService),y(3,S.IOptionsService),y(4,S.ICoreService),y(5,d.IRenderService)],R)},9806:(j,c)=>{function u(v,y,d){const S=d.getBoundingClientRect(),w=v.getComputedStyle(d),R=parseInt(w.getPropertyValue("padding-left")),g=parseInt(w.getPropertyValue("padding-top"));return[y.clientX-S.left-R,y.clientY-S.top-g]}Object.defineProperty(c,"__esModule",{value:!0}),c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=u,c.getCoords=function(v,y,d,S,w,R,g,o,l){if(!R)return;const s=u(v,y,d);return s?(s[0]=Math.ceil((s[0]+(l?g/2:0))/g),s[1]=Math.ceil(s[1]/o),s[0]=Math.min(Math.max(s[0],1),S+(l?1:0)),s[1]=Math.min(Math.max(s[1],1),w),s):void 0}},9504:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;const v=u(2584);function y(o,l,s,n){const p=o-d(o,s),E=l-d(l,s),k=Math.abs(p-E)-(function(x,m,A){let H=0;const F=x-d(x,A),W=m-d(m,A);for(let M=0;M<Math.abs(F-W);M++){const Y=S(x,m)==="A"?-1:1,ee=A.buffer.lines.get(F+Y*M);ee!=null&&ee.isWrapped&&H++}return H})(o,l,s);return g(k,R(S(o,l),n))}function d(o,l){let s=0,n=l.buffer.lines.get(o),p=n==null?void 0:n.isWrapped;for(;p&&o>=0&&o<l.rows;)s++,n=l.buffer.lines.get(--o),p=n==null?void 0:n.isWrapped;return s}function S(o,l){return o>l?"A":"B"}function w(o,l,s,n,p,E){let k=o,x=l,m="";for(;k!==s||x!==n;)k+=p?1:-1,p&&k>E.cols-1?(m+=E.buffer.translateBufferLineToString(x,!1,o,k),k=0,o=0,x++):!p&&k<0&&(m+=E.buffer.translateBufferLineToString(x,!1,0,o+1),k=E.cols-1,o=k,x--);return m+E.buffer.translateBufferLineToString(x,!1,o,k)}function R(o,l){const s=l?"O":"[";return v.C0.ESC+s+o}function g(o,l){o=Math.floor(o);let s="";for(let n=0;n<o;n++)s+=l;return s}c.moveToCellSequence=function(o,l,s,n){const p=s.buffer.x,E=s.buffer.y;if(!s.buffer.hasScrollback)return(function(m,A,H,F,W,M){return y(A,F,W,M).length===0?"":g(w(m,A,m,A-d(A,W),!1,W).length,R("D",M))})(p,E,0,l,s,n)+y(E,l,s,n)+(function(m,A,H,F,W,M){let Y;Y=y(A,F,W,M).length>0?F-d(F,W):A;const ee=F,se=(function(le,X,L,O,T,P){let J;return J=y(L,O,T,P).length>0?O-d(O,T):X,le<L&&J<=O||le>=L&&J<O?"C":"D"})(m,A,H,F,W,M);return g(w(m,Y,H,ee,se==="C",W).length,R(se,M))})(p,E,o,l,s,n);let k;if(E===l)return k=p>o?"D":"C",g(Math.abs(p-o),R(k,n));k=E>l?"D":"C";const x=Math.abs(E-l);return g((function(m,A){return A.cols-m})(E>l?o:p,s)+(x-1)*s.cols+1+((E>l?p:o)-1),R(k,n))}},1296:function(j,c,u){var v=this&&this.__decorate||function(M,Y,ee,se){var le,X=arguments.length,L=X<3?Y:se===null?se=Object.getOwnPropertyDescriptor(Y,ee):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(M,Y,ee,se);else for(var O=M.length-1;O>=0;O--)(le=M[O])&&(L=(X<3?le(L):X>3?le(Y,ee,L):le(Y,ee))||L);return X>3&&L&&Object.defineProperty(Y,ee,L),L},y=this&&this.__param||function(M,Y){return function(ee,se){Y(ee,se,M)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;const d=u(3787),S=u(2550),w=u(2223),R=u(6171),g=u(6052),o=u(4725),l=u(8055),s=u(8460),n=u(844),p=u(2585),E="xterm-dom-renderer-owner-",k="xterm-rows",x="xterm-fg-",m="xterm-bg-",A="xterm-focus",H="xterm-selection";let F=1,W=c.DomRenderer=class extends n.Disposable{constructor(M,Y,ee,se,le,X,L,O,T,P,J,te,ce){super(),this._terminal=M,this._document=Y,this._element=ee,this._screenElement=se,this._viewportElement=le,this._helperContainer=X,this._linkifier2=L,this._charSizeService=T,this._optionsService=P,this._bufferService=J,this._coreBrowserService=te,this._themeService=ce,this._terminalClass=F++,this._rowElements=[],this._selectionRenderModel=(0,g.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new s.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(k),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(H),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,R.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((he=>this._injectCss(he)))),this._injectCss(this._themeService.colors),this._rowFactory=O.createInstance(d.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,n.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 S.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 M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const 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 Y=`${this._terminalSelector} .${k} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Y,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(M){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Y=`${this._terminalSelector} .${k} { color: ${M.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Y+=`${this._terminalSelector} .${k} .xterm-dim { color: ${l.color.multiplyOpacity(M.foreground,.5).css};}`,Y+=`${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}`,se=`blink_bar_${this._terminalClass}`,le=`blink_block_${this._terminalClass}`;Y+=`@keyframes ${ee} { 50% { border-bottom-style: hidden; }}`,Y+=`@keyframes ${se} { 50% { box-shadow: none; }}`,Y+=`@keyframes ${le} { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,Y+=`${this._terminalSelector} .${k}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ee} 1s step-end infinite;}${this._terminalSelector} .${k}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${se} 1s step-end infinite;}${this._terminalSelector} .${k}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${le} 1s step-end infinite;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-block { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${M.cursor.css} !important; color: ${M.cursorAccent.css} !important;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Y+=`${this._terminalSelector} .${H} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${H} div { position: absolute; background-color: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${H} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[X,L]of M.ansi.entries())Y+=`${this._terminalSelector} .${x}${X} { color: ${L.css}; }${this._terminalSelector} .${x}${X}.xterm-dim { color: ${l.color.multiplyOpacity(L,.5).css}; }${this._terminalSelector} .${m}${X} { background-color: ${L.css}; }`;Y+=`${this._terminalSelector} .${x}${w.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(M.background).css}; }${this._terminalSelector} .${x}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${m}${w.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=Y}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,Y){for(let ee=this._rowElements.length;ee<=Y;ee++){const se=this._document.createElement("div");this._rowContainer.appendChild(se),this._rowElements.push(se)}for(;this._rowElements.length>Y;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,Y){this._refreshRowElements(M,Y),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(A),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(A),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(M,Y,ee){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,Y,ee),this.renderRows(0,this._bufferService.rows-1),!M||!Y)return;this._selectionRenderModel.update(this._terminal,M,Y,ee);const se=this._selectionRenderModel.viewportStartRow,le=this._selectionRenderModel.viewportEndRow,X=this._selectionRenderModel.viewportCappedStartRow,L=this._selectionRenderModel.viewportCappedEndRow;if(X>=this._bufferService.rows||L<0)return;const O=this._document.createDocumentFragment();if(ee){const T=M[0]>Y[0];O.appendChild(this._createSelectionElement(X,T?Y[0]:M[0],T?M[0]:Y[0],L-X+1))}else{const T=se===X?M[0]:0,P=X===le?Y[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(X,T,P));const J=L-X-1;if(O.appendChild(this._createSelectionElement(X+1,0,this._bufferService.cols,J)),X!==L){const te=le===L?Y[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(L,0,te))}}this._selectionContainer.appendChild(O)}_createSelectionElement(M,Y,ee,se=1){const le=this._document.createElement("div"),X=Y*this.dimensions.css.cell.width;let L=this.dimensions.css.cell.width*(ee-Y);return X+L>this.dimensions.css.canvas.width&&(L=this.dimensions.css.canvas.width-X),le.style.height=se*this.dimensions.css.cell.height+"px",le.style.top=M*this.dimensions.css.cell.height+"px",le.style.left=`${X}px`,le.style.width=`${L}px`,le}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const M of this._rowElements)M.replaceChildren()}renderRows(M,Y){const ee=this._bufferService.buffer,se=ee.ybase+ee.y,le=Math.min(ee.x,this._bufferService.cols-1),X=this._optionsService.rawOptions.cursorBlink,L=this._optionsService.rawOptions.cursorStyle,O=this._optionsService.rawOptions.cursorInactiveStyle;for(let T=M;T<=Y;T++){const P=T+ee.ydisp,J=this._rowElements[T],te=ee.lines.get(P);if(!J||!te)break;J.replaceChildren(...this._rowFactory.createRow(te,P,P===se,L,O,le,X,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,Y,ee,se,le,X){ee<0&&(M=0),se<0&&(Y=0);const L=this._bufferService.rows-1;ee=Math.max(Math.min(ee,L),0),se=Math.max(Math.min(se,L),0),le=Math.min(le,this._bufferService.cols);const O=this._bufferService.buffer,T=O.ybase+O.y,P=Math.min(O.x,le-1),J=this._optionsService.rawOptions.cursorBlink,te=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=ee;he<=se;++he){const U=he+O.ydisp,B=this._rowElements[he],Z=O.lines.get(U);if(!B||!Z)break;B.replaceChildren(...this._rowFactory.createRow(Z,U,U===T,te,ce,P,J,this.dimensions.css.cell.width,this._widthCache,X?he===ee?M:0:-1,X?(he===se?Y:le)-1:-1))}}};c.DomRenderer=W=v([y(7,p.IInstantiationService),y(8,o.ICharSizeService),y(9,p.IOptionsService),y(10,p.IBufferService),y(11,o.ICoreBrowserService),y(12,o.IThemeService)],W)},3787:function(j,c,u){var v=this&&this.__decorate||function(k,x,m,A){var H,F=arguments.length,W=F<3?x:A===null?A=Object.getOwnPropertyDescriptor(x,m):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(k,x,m,A);else for(var M=k.length-1;M>=0;M--)(H=k[M])&&(W=(F<3?H(W):F>3?H(x,m,W):H(x,m))||W);return F>3&&W&&Object.defineProperty(x,m,W),W},y=this&&this.__param||function(k,x){return function(m,A){x(m,A,k)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=void 0;const d=u(2223),S=u(643),w=u(511),R=u(2585),g=u(8055),o=u(4725),l=u(4269),s=u(6171),n=u(3734);let p=c.DomRendererRowFactory=class{constructor(k,x,m,A,H,F,W){this._document=k,this._characterJoinerService=x,this._optionsService=m,this._coreBrowserService=A,this._coreService=H,this._decorationService=F,this._themeService=W,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(k,x,m){this._selectionStart=k,this._selectionEnd=x,this._columnSelectMode=m}createRow(k,x,m,A,H,F,W,M,Y,ee,se){const le=[],X=this._characterJoinerService.getJoinedCharacters(x),L=this._themeService.colors;let O,T=k.getNoBgTrimmedLength();m&&T<F+1&&(T=F+1);let P=0,J="",te=0,ce=0,he=0,U=!1,B=0,Z=!1,Q=0;const de=[],ue=ee!==-1&&se!==-1;for(let Ee=0;Ee<T;Ee++){k.loadCell(Ee,this._workCell);let Le=this._workCell.getWidth();if(Le===0)continue;let Te=!1,qe=Ee,ye=this._workCell;if(X.length>0&&Ee===X[0][0]){Te=!0;const Ae=X.shift();ye=new l.JoinedCellData(this._workCell,k.translateToString(!0,Ae[0],Ae[1]),Ae[1]-Ae[0]),qe=Ae[1]-1,Le=ye.getWidth()}const Jt=this._isCellInSelection(Ee,x),Er=m&&Ee===F,Wt=ue&&Ee>=ee&&Ee<=se;let Mt=!1;this._decorationService.forEachDecorationAtCell(Ee,x,void 0,(Ae=>{Mt=!0}));let Zt=ye.getChars()||S.WHITESPACE_CELL_CHAR;if(Zt===" "&&(ye.isUnderline()||ye.isOverline())&&(Zt=" "),Q=Le*M-Y.get(Zt,ye.isBold(),ye.isItalic()),O){if(P&&(Jt&&Z||!Jt&&!Z&&ye.bg===te)&&(Jt&&Z&&L.selectionForeground||ye.fg===ce)&&ye.extended.ext===he&&Wt===U&&Q===B&&!Er&&!Te&&!Mt){ye.isInvisible()?J+=S.WHITESPACE_CELL_CHAR:J+=Zt,P++;continue}P&&(O.textContent=J),O=this._document.createElement("span"),P=0,J=""}else O=this._document.createElement("span");if(te=ye.bg,ce=ye.fg,he=ye.extended.ext,U=Wt,B=Q,Z=Jt,Te&&F>=Ee&&F<=qe&&(F=Ee),!this._coreService.isCursorHidden&&Er&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)W&&de.push("xterm-cursor-blink"),de.push(A==="bar"?"xterm-cursor-bar":A==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(H)switch(H){case"outline":de.push("xterm-cursor-outline");break;case"block":de.push("xterm-cursor-block");break;case"bar":de.push("xterm-cursor-bar");break;case"underline":de.push("xterm-cursor-underline")}}if(ye.isBold()&&de.push("xterm-bold"),ye.isItalic()&&de.push("xterm-italic"),ye.isDim()&&de.push("xterm-dim"),J=ye.isInvisible()?S.WHITESPACE_CELL_CHAR:ye.getChars()||S.WHITESPACE_CELL_CHAR,ye.isUnderline()&&(de.push(`xterm-underline-${ye.extended.underlineStyle}`),J===" "&&(J=" "),!ye.isUnderlineColorDefault()))if(ye.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${n.AttributeData.toColorRGB(ye.getUnderlineColor()).join(",")})`;else{let Ae=ye.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ye.isBold()&&Ae<8&&(Ae+=8),O.style.textDecorationColor=L.ansi[Ae].css}ye.isOverline()&&(de.push("xterm-overline"),J===" "&&(J=" ")),ye.isStrikethrough()&&de.push("xterm-strikethrough"),Wt&&(O.style.textDecoration="underline");let tt=ye.getFgColor(),er=ye.getFgColorMode(),dt=ye.getBgColor(),tr=ye.getBgColorMode();const kr=!!ye.isInverse();if(kr){const Ae=tt;tt=dt,dt=Ae;const Yi=er;er=tr,tr=Yi}let ft,br,nt,xt=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,x,void 0,(Ae=>{Ae.options.layer!=="top"&&xt||(Ae.backgroundColorRGB&&(tr=50331648,dt=Ae.backgroundColorRGB.rgba>>8&16777215,ft=Ae.backgroundColorRGB),Ae.foregroundColorRGB&&(er=50331648,tt=Ae.foregroundColorRGB.rgba>>8&16777215,br=Ae.foregroundColorRGB),xt=Ae.options.layer==="top")})),!xt&&Jt&&(ft=this._coreBrowserService.isFocused?L.selectionBackgroundOpaque:L.selectionInactiveBackgroundOpaque,dt=ft.rgba>>8&16777215,tr=50331648,xt=!0,L.selectionForeground&&(er=50331648,tt=L.selectionForeground.rgba>>8&16777215,br=L.selectionForeground)),xt&&de.push("xterm-decoration-top"),tr){case 16777216:case 33554432:nt=L.ansi[dt],de.push(`xterm-bg-${dt}`);break;case 50331648:nt=g.channels.toColor(dt>>16,dt>>8&255,255&dt),this._addStyle(O,`background-color:#${E((dt>>>0).toString(16),"0",6)}`);break;default:kr?(nt=L.foreground,de.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):nt=L.background}switch(ft||ye.isDim()&&(ft=g.color.multiplyOpacity(nt,.5)),er){case 16777216:case 33554432:ye.isBold()&&tt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(tt+=8),this._applyMinimumContrast(O,nt,L.ansi[tt],ye,ft,void 0)||de.push(`xterm-fg-${tt}`);break;case 50331648:const Ae=g.channels.toColor(tt>>16&255,tt>>8&255,255&tt);this._applyMinimumContrast(O,nt,Ae,ye,ft,br)||this._addStyle(O,`color:#${E(tt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,nt,L.foreground,ye,ft,br)||kr&&de.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}de.length&&(O.className=de.join(" "),de.length=0),Er||Te||Mt?O.textContent=J:P++,Q!==this.defaultSpacing&&(O.style.letterSpacing=`${Q}px`),le.push(O),Ee=qe}return O&&P&&(O.textContent=J),le}_applyMinimumContrast(k,x,m,A,H,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,s.treatGlyphAsBackgroundColor)(A.getCode()))return!1;const W=this._getContrastCache(A);let M;if(H||F||(M=W.getColor(x.rgba,m.rgba)),M===void 0){const Y=this._optionsService.rawOptions.minimumContrastRatio/(A.isDim()?2:1);M=g.color.ensureContrastRatio(H||x,F||m,Y),W.setColor((H||x).rgba,(F||m).rgba,M??null)}return!!M&&(this._addStyle(k,`color:${M.css}`),!0)}_getContrastCache(k){return k.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(k,x){k.setAttribute("style",`${k.getAttribute("style")||""}${x};`)}_isCellInSelection(k,x){const m=this._selectionStart,A=this._selectionEnd;return!(!m||!A)&&(this._columnSelectMode?m[0]<=A[0]?k>=m[0]&&x>=m[1]&&k<A[0]&&x<=A[1]:k<m[0]&&x>=m[1]&&k>=A[0]&&x<=A[1]:x>m[1]&&x<A[1]||m[1]===A[1]&&x===m[1]&&k>=m[0]&&k<A[0]||m[1]<A[1]&&x===A[1]&&k<A[0]||m[1]<A[1]&&x===m[1]&&k>=m[0])}};function E(k,x,m){for(;k.length<m;)k=x+k;return k}c.DomRendererRowFactory=p=v([y(1,o.ICharacterJoinerService),y(2,R.IOptionsService),y(3,o.ICoreBrowserService),y(4,R.ICoreService),y(5,R.IDecorationService),y(6,o.IThemeService)],p)},2550:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WidthCache=void 0,c.WidthCache=class{constructor(u,v){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 y=u.createElement("span");y.classList.add("xterm-char-measure-element");const d=u.createElement("span");d.classList.add("xterm-char-measure-element"),d.style.fontWeight="bold";const S=u.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontStyle="italic";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[y,d,S,w],this._container.appendChild(y),this._container.appendChild(d),this._container.appendChild(S),this._container.appendChild(w),v.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,v,y,d){u===this._font&&v===this._fontSize&&y===this._weight&&d===this._weightBold||(this._font=u,this._fontSize=v,this._weight=y,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${y}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${y}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(u,v,y){let d=0;if(!v&&!y&&u.length===1&&(d=u.charCodeAt(0))<256){if(this._flat[d]!==-9999)return this._flat[d];const R=this._measure(u,0);return R>0&&(this._flat[d]=R),R}let S=u;v&&(S+="B"),y&&(S+="I");let w=this._holey.get(S);if(w===void 0){let R=0;v&&(R|=1),y&&(R|=2),w=this._measure(u,R),w>0&&this._holey.set(S,w)}return w}_measure(u,v){const y=this._measureElements[v];return y.textContent=u.repeat(32),y.offsetWidth/32}}},2223:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TEXT_BASELINE=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0;const v=u(6114);c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.TEXT_BASELINE=v.isFirefox||v.isLegacyEdge?"bottom":"ideographic"},6171:(j,c)=>{function u(y){return 57508<=y&&y<=57558}function v(y){return y>=128512&&y<=128591||y>=127744&&y<=128511||y>=128640&&y<=128767||y>=9728&&y<=9983||y>=9984&&y<=10175||y>=65024&&y<=65039||y>=129280&&y<=129535||y>=127462&&y<=127487}Object.defineProperty(c,"__esModule",{value:!0}),c.computeNextVariantOffset=c.createRenderDimensions=c.treatGlyphAsBackgroundColor=c.allowRescaling=c.isEmoji=c.isRestrictedPowerlineGlyph=c.isPowerlineGlyph=c.throwIfFalsy=void 0,c.throwIfFalsy=function(y){if(!y)throw new Error("value must not be falsy");return y},c.isPowerlineGlyph=u,c.isRestrictedPowerlineGlyph=function(y){return 57520<=y&&y<=57527},c.isEmoji=v,c.allowRescaling=function(y,d,S,w){return d===1&&S>Math.ceil(1.5*w)&&y!==void 0&&y>255&&!v(y)&&!u(y)&&!(function(R){return 57344<=R&&R<=63743})(y)},c.treatGlyphAsBackgroundColor=function(y){return u(y)||(function(d){return 9472<=d&&d<=9631})(y)},c.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}}}},c.computeNextVariantOffset=function(y,d,S=0){return(y-(2*Math.round(d)-S))%(2*Math.round(d))}},6052:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.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(y,d,S,w=!1){if(this.selectionStart=d,this.selectionEnd=S,!d||!S||d[0]===S[0]&&d[1]===S[1])return void this.clear();const R=y.buffers.active.ydisp,g=d[1]-R,o=S[1]-R,l=Math.max(g,0),s=Math.min(o,y.rows-1);l>=y.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=g,this.viewportEndRow=o,this.viewportCappedStartRow=l,this.viewportCappedEndRow=s,this.startCol=d[0],this.endCol=S[0])}isCellSelected(y,d,S){return!!this.hasSelection&&(S-=y.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?d>=this.startCol&&S>=this.viewportCappedStartRow&&d<this.endCol&&S<=this.viewportCappedEndRow:d<this.startCol&&S>=this.viewportCappedStartRow&&d>=this.endCol&&S<=this.viewportCappedEndRow:S>this.viewportStartRow&&S<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&S===this.viewportStartRow&&d>=this.startCol&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&S===this.viewportEndRow&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&S===this.viewportStartRow&&d>=this.startCol)}}c.createSelectionRenderModel=function(){return new u}},456:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0,c.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,v=this.selectionEnd;return!(!u||!v)&&(u[1]>v[1]||u[1]===v[1]&&u[0]>v[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(j,c,u){var v=this&&this.__decorate||function(s,n,p,E){var k,x=arguments.length,m=x<3?n:E===null?E=Object.getOwnPropertyDescriptor(n,p):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(s,n,p,E);else for(var A=s.length-1;A>=0;A--)(k=s[A])&&(m=(x<3?k(m):x>3?k(n,p,m):k(n,p))||m);return x>3&&m&&Object.defineProperty(n,p,m),m},y=this&&this.__param||function(s,n){return function(p,E){n(p,E,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;const d=u(2585),S=u(8460),w=u(844);let R=c.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(s,n,p){super(),this._optionsService=p,this.width=0,this.height=0,this._onCharSizeChange=this.register(new S.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new l(this._optionsService))}catch{this._measureStrategy=this.register(new o(s,n,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const s=this._measureStrategy.measure();s.width===this.width&&s.height===this.height||(this.width=s.width,this.height=s.height,this._onCharSizeChange.fire())}};c.CharSizeService=R=v([y(2,d.IOptionsService)],R);class g extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(n,p){n!==void 0&&n>0&&p!==void 0&&p>0&&(this._result.width=n,this._result.height=p)}}class o extends g{constructor(n,p,E){super(),this._document=n,this._parentElement=p,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 l extends g{constructor(n){super(),this._optionsService=n,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const p=this._ctx.measureText("W");if(!("width"in p&&"fontBoundingBoxAscent"in p&&"fontBoundingBoxDescent"in p))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const n=this._ctx.measureText("W");return this._validateAndSet(n.width,n.fontBoundingBoxAscent+n.fontBoundingBoxDescent),this._result}}},4269:function(j,c,u){var v=this&&this.__decorate||function(l,s,n,p){var E,k=arguments.length,x=k<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,n):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(l,s,n,p);else for(var m=l.length-1;m>=0;m--)(E=l[m])&&(x=(k<3?E(x):k>3?E(s,n,x):E(s,n))||x);return k>3&&x&&Object.defineProperty(s,n,x),x},y=this&&this.__param||function(l,s){return function(n,p){s(n,p,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerService=c.JoinedCellData=void 0;const d=u(3734),S=u(643),w=u(511),R=u(2585);class g extends d.AttributeData{constructor(s,n,p){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=n,this._width=p}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(s){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.JoinedCellData=g;let o=c.CharacterJoinerService=class Gh{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(s){const n={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(n),n.id}deregister(s){for(let n=0;n<this._characterJoiners.length;n++)if(this._characterJoiners[n].id===s)return this._characterJoiners.splice(n,1),!0;return!1}getJoinedCharacters(s){if(this._characterJoiners.length===0)return[];const n=this._bufferService.buffer.lines.get(s);if(!n||n.length===0)return[];const p=[],E=n.translateToString(!0);let k=0,x=0,m=0,A=n.getFg(0),H=n.getBg(0);for(let F=0;F<n.getTrimmedLength();F++)if(n.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==A||this._workCell.bg!==H){if(F-k>1){const W=this._getJoinedRanges(E,m,x,n,k);for(let M=0;M<W.length;M++)p.push(W[M])}k=F,m=x,A=this._workCell.fg,H=this._workCell.bg}x+=this._workCell.getChars().length||S.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-k>1){const F=this._getJoinedRanges(E,m,x,n,k);for(let W=0;W<F.length;W++)p.push(F[W])}return p}_getJoinedRanges(s,n,p,E,k){const x=s.substring(n,p);let m=[];try{m=this._characterJoiners[0].handler(x)}catch(A){console.error(A)}for(let A=1;A<this._characterJoiners.length;A++)try{const H=this._characterJoiners[A].handler(x);for(let F=0;F<H.length;F++)Gh._mergeRanges(m,H[F])}catch(H){console.error(H)}return this._stringRangesToCellRanges(m,E,k),m}_stringRangesToCellRanges(s,n,p){let E=0,k=!1,x=0,m=s[E];if(m){for(let A=p;A<this._bufferService.cols;A++){const H=n.getWidth(A),F=n.getString(A).length||S.WHITESPACE_CELL_CHAR.length;if(H!==0){if(!k&&m[0]<=x&&(m[0]=A,k=!0),m[1]<=x){if(m[1]=A,m=s[++E],!m)break;m[0]<=x?(m[0]=A,k=!0):k=!1}x+=F}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(s,n){let p=!1;for(let E=0;E<s.length;E++){const k=s[E];if(p){if(n[1]<=k[0])return s[E-1][1]=n[1],s;if(n[1]<=k[1])return s[E-1][1]=Math.max(n[1],k[1]),s.splice(E,1),s;s.splice(E,1),E--}else{if(n[1]<=k[0])return s.splice(E,0,n),s;if(n[1]<=k[1])return k[0]=Math.min(n[0],k[0]),s;n[0]<k[1]&&(k[0]=Math.min(n[0],k[0]),p=!0)}}return p?s[s.length-1][1]=n[1]:s.push(n),s}};c.CharacterJoinerService=o=v([y(0,R.IBufferService)],o)},5114:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;const v=u(844),y=u(8460),d=u(3656);class S extends v.Disposable{constructor(g,o,l){super(),this._textarea=g,this._window=o,this.mainDocument=l,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new y.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new y.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((s=>this._screenDprMonitor.setWindow(s)))),this.register((0,y.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(g){this._window!==g&&(this._window=g,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}}c.CoreBrowserService=S;class w extends v.Disposable{constructor(g){super(),this._parentWindow=g,this._windowResizeListener=this.register(new v.MutableDisposable),this._onDprChange=this.register(new y.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,v.toDisposable)((()=>this.clearListener())))}setWindow(g){this._parentWindow=g,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,d.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)==null||g.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:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.LinkProviderService=void 0;const v=u(844);class y extends v.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,v.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(S){return this.linkProviders.push(S),{dispose:()=>{const w=this.linkProviders.indexOf(S);w!==-1&&this.linkProviders.splice(w,1)}}}}c.LinkProviderService=y},8934:function(j,c,u){var v=this&&this.__decorate||function(R,g,o,l){var s,n=arguments.length,p=n<3?g:l===null?l=Object.getOwnPropertyDescriptor(g,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(R,g,o,l);else for(var E=R.length-1;E>=0;E--)(s=R[E])&&(p=(n<3?s(p):n>3?s(g,o,p):s(g,o))||p);return n>3&&p&&Object.defineProperty(g,o,p),p},y=this&&this.__param||function(R,g){return function(o,l){g(o,l,R)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;const d=u(4725),S=u(9806);let w=c.MouseService=class{constructor(R,g){this._renderService=R,this._charSizeService=g}getCoords(R,g,o,l,s){return(0,S.getCoords)(window,R,g,o,l,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,s)}getMouseReportCoords(R,g){const o=(0,S.getCoordsRelativeToElement)(window,R,g);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])}}};c.MouseService=w=v([y(0,d.IRenderService),y(1,d.ICharSizeService)],w)},3230:function(j,c,u){var v=this&&this.__decorate||function(s,n,p,E){var k,x=arguments.length,m=x<3?n:E===null?E=Object.getOwnPropertyDescriptor(n,p):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(s,n,p,E);else for(var A=s.length-1;A>=0;A--)(k=s[A])&&(m=(x<3?k(m):x>3?k(n,p,m):k(n,p))||m);return x>3&&m&&Object.defineProperty(n,p,m),m},y=this&&this.__param||function(s,n){return function(p,E){n(p,E,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;const d=u(6193),S=u(4725),w=u(8460),R=u(844),g=u(7226),o=u(2585);let l=c.RenderService=class extends R.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(s,n,p,E,k,x,m,A){super(),this._rowCount=s,this._charSizeService=E,this._renderer=this.register(new R.MutableDisposable),this._pausedResizeTask=new g.DebouncedIdleTask,this._observerDisposable=this.register(new R.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 w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new d.RenderDebouncer(((H,F)=>this._renderRows(H,F)),m),this.register(this._renderDebouncer),this.register(m.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(x.onResize((()=>this._fullRefresh()))),this.register(x.buffers.onBufferActivate((()=>{var H;return(H=this._renderer.value)==null?void 0:H.clear()}))),this.register(p.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(k.onDecorationRegistered((()=>this._fullRefresh()))),this.register(k.onDecorationRemoved((()=>this._fullRefresh()))),this.register(p.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(x.cols,x.rows),this._fullRefresh()}))),this.register(p.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(x.buffer.y,x.buffer.y,!0)))),this.register(A.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(m.window,n),this.register(m.onWindowChange((H=>this._registerIntersectionObserver(H,n))))}_registerIntersectionObserver(s,n){if("IntersectionObserver"in s){const p=new s.IntersectionObserver((E=>this._handleIntersectionChange(E[E.length-1])),{threshold:0});p.observe(n),this._observerDisposable.value=(0,R.toDisposable)((()=>p.disconnect()))}}_handleIntersectionChange(s){this._isPaused=s.isIntersecting===void 0?s.intersectionRatio===0:!s.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(s,n,p=!1){this._isPaused?this._needsFullRefresh=!0:(p||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(s,n,this._rowCount))}_renderRows(s,n){this._renderer.value&&(s=Math.min(s,this._rowCount-1),n=Math.min(n,this._rowCount-1),this._renderer.value.renderRows(s,n),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:s,end:n}),this._onRender.fire({start:s,end:n}),this._isNextRenderRedrawOnly=!0)}resize(s,n){this._rowCount=n,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(s){this._renderer.value=s,this._renderer.value&&(this._renderer.value.onRequestRedraw((n=>this.refreshRows(n.start,n.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(s){return this._renderDebouncer.addRefreshCallback(s)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var s,n;this._renderer.value&&((n=(s=this._renderer.value).clearTextureAtlas)==null||n.call(s),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(s,n){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var p;return(p=this._renderer.value)==null?void 0:p.handleResize(s,n)})):this._renderer.value.handleResize(s,n),this._fullRefresh())}handleCharSizeChanged(){var s;(s=this._renderer.value)==null||s.handleCharSizeChanged()}handleBlur(){var s;(s=this._renderer.value)==null||s.handleBlur()}handleFocus(){var s;(s=this._renderer.value)==null||s.handleFocus()}handleSelectionChanged(s,n,p){var E;this._selectionState.start=s,this._selectionState.end=n,this._selectionState.columnSelectMode=p,(E=this._renderer.value)==null||E.handleSelectionChanged(s,n,p)}handleCursorMove(){var s;(s=this._renderer.value)==null||s.handleCursorMove()}clear(){var s;(s=this._renderer.value)==null||s.clear()}};c.RenderService=l=v([y(2,o.IOptionsService),y(3,S.ICharSizeService),y(4,o.IDecorationService),y(5,o.IBufferService),y(6,S.ICoreBrowserService),y(7,S.IThemeService)],l)},9312:function(j,c,u){var v=this&&this.__decorate||function(m,A,H,F){var W,M=arguments.length,Y=M<3?A:F===null?F=Object.getOwnPropertyDescriptor(A,H):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(m,A,H,F);else for(var ee=m.length-1;ee>=0;ee--)(W=m[ee])&&(Y=(M<3?W(Y):M>3?W(A,H,Y):W(A,H))||Y);return M>3&&Y&&Object.defineProperty(A,H,Y),Y},y=this&&this.__param||function(m,A){return function(H,F){A(H,F,m)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;const d=u(9806),S=u(9504),w=u(456),R=u(4725),g=u(8460),o=u(844),l=u(6114),s=u(4841),n=u(511),p=u(2585),E=" ",k=new RegExp(E,"g");let x=c.SelectionService=class extends o.Disposable{constructor(m,A,H,F,W,M,Y,ee,se){super(),this._element=m,this._screenElement=A,this._linkifier=H,this._bufferService=F,this._coreService=W,this._mouseService=M,this._optionsService=Y,this._renderService=ee,this._coreBrowserService=se,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new n.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new g.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new g.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=le=>this._handleMouseMove(le),this._mouseUpListener=le=>this._handleMouseUp(le),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((le=>this._handleTrim(le))),this.register(this._bufferService.buffers.onBufferActivate((le=>this._handleBufferActivate(le)))),this.enable(),this._model=new w.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 m=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!m||!A||m[0]===A[0]&&m[1]===A[1])}get selectionText(){const m=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;if(!m||!A)return"";const H=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(m[0]===A[0])return"";const W=m[0]<A[0]?m[0]:A[0],M=m[0]<A[0]?A[0]:m[0];for(let Y=m[1];Y<=A[1];Y++){const ee=H.translateBufferLineToString(Y,!0,W,M);F.push(ee)}}else{const W=m[1]===A[1]?A[0]:void 0;F.push(H.translateBufferLineToString(m[1],!0,m[0],W));for(let M=m[1]+1;M<=A[1]-1;M++){const Y=H.lines.get(M),ee=H.translateBufferLineToString(M,!0);Y!=null&&Y.isWrapped?F[F.length-1]+=ee:F.push(ee)}if(m[1]!==A[1]){const M=H.lines.get(A[1]),Y=H.translateBufferLineToString(A[1],!0,0,A[0]);M&&M.isWrapped?F[F.length-1]+=Y:F.push(Y)}}return F.map((W=>W.replace(k," "))).join(l.isWindows?`\r
|
|
45
|
-
`:`
|
|
46
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(m){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),l.isLinux&&m&&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(m){const A=this._getMouseBufferCoords(m),H=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(H&&F&&A)&&this._areCoordsInSelection(A,H,F)}isCellInSelection(m,A){const H=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!H||!F)&&this._areCoordsInSelection([m,A],H,F)}_areCoordsInSelection(m,A,H){return m[1]>A[1]&&m[1]<H[1]||A[1]===H[1]&&m[1]===A[1]&&m[0]>=A[0]&&m[0]<H[0]||A[1]<H[1]&&m[1]===H[1]&&m[0]<H[0]||A[1]<H[1]&&m[1]===A[1]&&m[0]>=A[0]}_selectWordAtCursor(m,A){var W,M;const H=(M=(W=this._linkifier.currentLink)==null?void 0:W.link)==null?void 0:M.range;if(H)return this._model.selectionStart=[H.start.x-1,H.start.y-1],this._model.selectionStartLength=(0,s.getRangeLength)(H,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(m);return!!F&&(this._selectWordAt(F,A),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(m,A){this._model.clearSelection(),m=Math.max(m,0),A=Math.min(A,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,A],this.refresh(),this._onSelectionChange.fire()}_handleTrim(m){this._model.handleTrim(m)&&this.refresh()}_getMouseBufferCoords(m){const A=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(A)return A[0]--,A[1]--,A[1]+=this._bufferService.buffer.ydisp,A}_getMouseEventScrollAmount(m){let A=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,m,this._screenElement)[1];const H=this._renderService.dimensions.css.canvas.height;return A>=0&&A<=H?0:(A>H&&(A-=H),A=Math.min(Math.max(A,-50),50),A/=50,A/Math.abs(A)+Math.round(14*A))}shouldForceSelection(m){return l.isMac?m.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:m.shiftKey}handleMouseDown(m){if(this._mouseDownTimeStamp=m.timeStamp,(m.button!==2||!this.hasSelection)&&m.button===0){if(!this._enabled){if(!this.shouldForceSelection(m))return;m.stopPropagation()}m.preventDefault(),this._dragScrollAmount=0,this._enabled&&m.shiftKey?this._handleIncrementalClick(m):m.detail===1?this._handleSingleClick(m):m.detail===2?this._handleDoubleClick(m):m.detail===3&&this._handleTripleClick(m),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(m){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(m))}_handleSingleClick(m){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(m)?3:0,this._model.selectionStart=this._getMouseBufferCoords(m),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const A=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);A&&A.length!==this._model.selectionStart[0]&&A.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(m){this._selectWordAtCursor(m,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(m){const A=this._getMouseBufferCoords(m);A&&(this._activeSelectionMode=2,this._selectLineAt(A[1]))}shouldColumnSelect(m){return m.altKey&&!(l.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(m){if(m.stopImmediatePropagation(),!this._model.selectionStart)return;const A=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(m),!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(m),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const H=this._bufferService.buffer;if(this._model.selectionEnd[1]<H.lines.length){const F=H.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}A&&A[0]===this._model.selectionEnd[0]&&A[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 m=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(m.ydisp+this._bufferService.rows,m.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=m.ydisp),this.refresh()}}_handleMouseUp(m){const A=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&A<500&&m.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const H=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(H&&H[0]!==void 0&&H[1]!==void 0){const F=(0,S.moveToCellSequence)(H[0]-1,H[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const m=this._model.finalSelectionStart,A=this._model.finalSelectionEnd,H=!(!m||!A||m[0]===A[0]&&m[1]===A[1]);H?m&&A&&(this._oldSelectionStart&&this._oldSelectionEnd&&m[0]===this._oldSelectionStart[0]&&m[1]===this._oldSelectionStart[1]&&A[0]===this._oldSelectionEnd[0]&&A[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(m,A,H)):this._oldHasSelection&&this._fireOnSelectionChange(m,A,H)}_fireOnSelectionChange(m,A,H){this._oldSelectionStart=m,this._oldSelectionEnd=A,this._oldHasSelection=H,this._onSelectionChange.fire()}_handleBufferActivate(m){this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim((A=>this._handleTrim(A)))}_convertViewportColToCharacterIndex(m,A){let H=A;for(let F=0;A>=F;F++){const W=m.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?H--:W>1&&A!==F&&(H+=W-1)}return H}setSelection(m,A,H){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,A],this._model.selectionStartLength=H,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(m){this._isClickInSelection(m)||(this._selectWordAtCursor(m,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(m,A,H=!0,F=!0){if(m[0]>=this._bufferService.cols)return;const W=this._bufferService.buffer,M=W.lines.get(m[1]);if(!M)return;const Y=W.translateBufferLineToString(m[1],!1);let ee=this._convertViewportColToCharacterIndex(M,m[0]),se=ee;const le=m[0]-ee;let X=0,L=0,O=0,T=0;if(Y.charAt(ee)===" "){for(;ee>0&&Y.charAt(ee-1)===" ";)ee--;for(;se<Y.length&&Y.charAt(se+1)===" ";)se++}else{let te=m[0],ce=m[0];M.getWidth(te)===0&&(X++,te--),M.getWidth(ce)===2&&(L++,ce++);const he=M.getString(ce).length;for(he>1&&(T+=he-1,se+=he-1);te>0&&ee>0&&!this._isCharWordSeparator(M.loadCell(te-1,this._workCell));){M.loadCell(te-1,this._workCell);const U=this._workCell.getChars().length;this._workCell.getWidth()===0?(X++,te--):U>1&&(O+=U-1,ee-=U-1),ee--,te--}for(;ce<M.length&&se+1<Y.length&&!this._isCharWordSeparator(M.loadCell(ce+1,this._workCell));){M.loadCell(ce+1,this._workCell);const U=this._workCell.getChars().length;this._workCell.getWidth()===2?(L++,ce++):U>1&&(T+=U-1,se+=U-1),se++,ce++}}se++;let P=ee+le-X+O,J=Math.min(this._bufferService.cols,se-ee+X+L-O-T);if(A||Y.slice(ee,se).trim()!==""){if(H&&P===0&&M.getCodePoint(0)!==32){const te=W.lines.get(m[1]-1);if(te&&M.isWrapped&&te.getCodePoint(this._bufferService.cols-1)!==32){const ce=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(ce){const he=this._bufferService.cols-ce.start;P-=he,J+=he}}}if(F&&P+J===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){const te=W.lines.get(m[1]+1);if(te!=null&&te.isWrapped&&te.getCodePoint(0)!==32){const ce=this._getWordAt([0,m[1]+1],!1,!1,!0);ce&&(J+=ce.length)}}return{start:P,length:J}}}_selectWordAt(m,A){const H=this._getWordAt(m,A);if(H){for(;H.start<0;)H.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[H.start,m[1]],this._model.selectionStartLength=H.length}}_selectToWordAt(m){const A=this._getWordAt(m,!0);if(A){let H=m[1];for(;A.start<0;)A.start+=this._bufferService.cols,H--;if(!this._model.areSelectionValuesReversed())for(;A.start+A.length>this._bufferService.cols;)A.length-=this._bufferService.cols,H++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?A.start:A.start+A.length,H]}}_isCharWordSeparator(m){return m.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(m.getChars())>=0}_selectLineAt(m){const A=this._bufferService.buffer.getWrappedRangeForLine(m),H={start:{x:0,y:A.first},end:{x:this._bufferService.cols-1,y:A.last}};this._model.selectionStart=[0,A.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,s.getRangeLength)(H,this._bufferService.cols)}};c.SelectionService=x=v([y(3,p.IBufferService),y(4,p.ICoreService),y(5,R.IMouseService),y(6,p.IOptionsService),y(7,R.IRenderService),y(8,R.ICoreBrowserService)],x)},4725:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ILinkProviderService=c.IThemeService=c.ICharacterJoinerService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;const v=u(8343);c.ICharSizeService=(0,v.createDecorator)("CharSizeService"),c.ICoreBrowserService=(0,v.createDecorator)("CoreBrowserService"),c.IMouseService=(0,v.createDecorator)("MouseService"),c.IRenderService=(0,v.createDecorator)("RenderService"),c.ISelectionService=(0,v.createDecorator)("SelectionService"),c.ICharacterJoinerService=(0,v.createDecorator)("CharacterJoinerService"),c.IThemeService=(0,v.createDecorator)("ThemeService"),c.ILinkProviderService=(0,v.createDecorator)("LinkProviderService")},6731:function(j,c,u){var v=this&&this.__decorate||function(x,m,A,H){var F,W=arguments.length,M=W<3?m:H===null?H=Object.getOwnPropertyDescriptor(m,A):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,m,A,H);else for(var Y=x.length-1;Y>=0;Y--)(F=x[Y])&&(M=(W<3?F(M):W>3?F(m,A,M):F(m,A))||M);return W>3&&M&&Object.defineProperty(m,A,M),M},y=this&&this.__param||function(x,m){return function(A,H){m(A,H,x)}};Object.defineProperty(c,"__esModule",{value:!0}),c.ThemeService=c.DEFAULT_ANSI_COLORS=void 0;const d=u(7239),S=u(8055),w=u(8460),R=u(844),g=u(2585),o=S.css.toColor("#ffffff"),l=S.css.toColor("#000000"),s=S.css.toColor("#ffffff"),n=S.css.toColor("#000000"),p={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const x=[S.css.toColor("#2e3436"),S.css.toColor("#cc0000"),S.css.toColor("#4e9a06"),S.css.toColor("#c4a000"),S.css.toColor("#3465a4"),S.css.toColor("#75507b"),S.css.toColor("#06989a"),S.css.toColor("#d3d7cf"),S.css.toColor("#555753"),S.css.toColor("#ef2929"),S.css.toColor("#8ae234"),S.css.toColor("#fce94f"),S.css.toColor("#729fcf"),S.css.toColor("#ad7fa8"),S.css.toColor("#34e2e2"),S.css.toColor("#eeeeec")],m=[0,95,135,175,215,255];for(let A=0;A<216;A++){const H=m[A/36%6|0],F=m[A/6%6|0],W=m[A%6];x.push({css:S.channels.toCss(H,F,W),rgba:S.channels.toRgba(H,F,W)})}for(let A=0;A<24;A++){const H=8+10*A;x.push({css:S.channels.toCss(H,H,H),rgba:S.channels.toRgba(H,H,H)})}return x})());let E=c.ThemeService=class extends R.Disposable{get colors(){return this._colors}constructor(x){super(),this._optionsService=x,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:o,background:l,cursor:s,cursorAccent:n,selectionForeground:void 0,selectionBackgroundTransparent:p,selectionBackgroundOpaque:S.color.blend(l,p),selectionInactiveBackgroundTransparent:p,selectionInactiveBackgroundOpaque:S.color.blend(l,p),ansi:c.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(x={}){const m=this._colors;if(m.foreground=k(x.foreground,o),m.background=k(x.background,l),m.cursor=k(x.cursor,s),m.cursorAccent=k(x.cursorAccent,n),m.selectionBackgroundTransparent=k(x.selectionBackground,p),m.selectionBackgroundOpaque=S.color.blend(m.background,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundTransparent=k(x.selectionInactiveBackground,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundOpaque=S.color.blend(m.background,m.selectionInactiveBackgroundTransparent),m.selectionForeground=x.selectionForeground?k(x.selectionForeground,S.NULL_COLOR):void 0,m.selectionForeground===S.NULL_COLOR&&(m.selectionForeground=void 0),S.color.isOpaque(m.selectionBackgroundTransparent)&&(m.selectionBackgroundTransparent=S.color.opacity(m.selectionBackgroundTransparent,.3)),S.color.isOpaque(m.selectionInactiveBackgroundTransparent)&&(m.selectionInactiveBackgroundTransparent=S.color.opacity(m.selectionInactiveBackgroundTransparent,.3)),m.ansi=c.DEFAULT_ANSI_COLORS.slice(),m.ansi[0]=k(x.black,c.DEFAULT_ANSI_COLORS[0]),m.ansi[1]=k(x.red,c.DEFAULT_ANSI_COLORS[1]),m.ansi[2]=k(x.green,c.DEFAULT_ANSI_COLORS[2]),m.ansi[3]=k(x.yellow,c.DEFAULT_ANSI_COLORS[3]),m.ansi[4]=k(x.blue,c.DEFAULT_ANSI_COLORS[4]),m.ansi[5]=k(x.magenta,c.DEFAULT_ANSI_COLORS[5]),m.ansi[6]=k(x.cyan,c.DEFAULT_ANSI_COLORS[6]),m.ansi[7]=k(x.white,c.DEFAULT_ANSI_COLORS[7]),m.ansi[8]=k(x.brightBlack,c.DEFAULT_ANSI_COLORS[8]),m.ansi[9]=k(x.brightRed,c.DEFAULT_ANSI_COLORS[9]),m.ansi[10]=k(x.brightGreen,c.DEFAULT_ANSI_COLORS[10]),m.ansi[11]=k(x.brightYellow,c.DEFAULT_ANSI_COLORS[11]),m.ansi[12]=k(x.brightBlue,c.DEFAULT_ANSI_COLORS[12]),m.ansi[13]=k(x.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),m.ansi[14]=k(x.brightCyan,c.DEFAULT_ANSI_COLORS[14]),m.ansi[15]=k(x.brightWhite,c.DEFAULT_ANSI_COLORS[15]),x.extendedAnsi){const A=Math.min(m.ansi.length-16,x.extendedAnsi.length);for(let H=0;H<A;H++)m.ansi[H+16]=k(x.extendedAnsi[H],c.DEFAULT_ANSI_COLORS[H+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(x){this._restoreColor(x),this._onChangeColors.fire(this.colors)}_restoreColor(x){if(x!==void 0)switch(x){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[x]=this._restoreColors.ansi[x]}else for(let m=0;m<this._restoreColors.ansi.length;++m)this._colors.ansi[m]=this._restoreColors.ansi[m]}modifyColors(x){x(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 k(x,m){if(x!==void 0)try{return S.css.toColor(x)}catch{}return m}c.ThemeService=E=v([y(0,g.IOptionsService)],E)},6349:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;const v=u(8460),y=u(844);class d extends y.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new v.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new v.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new v.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(w){if(this._maxLength===w)return;const R=new Array(w);for(let g=0;g<Math.min(w,this.length);g++)R[g]=this._array[this._getCyclicIndex(g)];this._array=R,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let R=this._length;R<w;R++)this._array[R]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,R){this._array[this._getCyclicIndex(w)]=R}push(w){this._array[this._getCyclicIndex(this._length)]=w,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(w,R,...g){if(R){for(let o=w;o<this._length-R;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+R)];this._length-=R,this.onDeleteEmitter.fire({index:w,amount:R})}for(let o=this._length-1;o>=w;o--)this._array[this._getCyclicIndex(o+g.length)]=this._array[this._getCyclicIndex(o)];for(let o=0;o<g.length;o++)this._array[this._getCyclicIndex(w+o)]=g[o];if(g.length&&this.onInsertEmitter.fire({index:w,amount:g.length}),this._length+g.length>this._maxLength){const o=this._length+g.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=g.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,R,g){if(!(R<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+g<0)throw new Error("Cannot shift elements in list beyond index 0");if(g>0){for(let l=R-1;l>=0;l--)this.set(w+l+g,this.get(w+l));const o=w+R+g-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<R;o++)this.set(w+o+g,this.get(w+o))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}c.CircularList=d},1439:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function u(v,y=5){if(typeof v!="object")return v;const d=Array.isArray(v)?[]:{};for(const S in v)d[S]=y<=1?v[S]:v[S]&&u(v[S],y-1);return d}},8055:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=c.NULL_COLOR=void 0;let u=0,v=0,y=0,d=0;var S,w,R,g,o;function l(n){const p=n.toString(16);return p.length<2?"0"+p:p}function s(n,p){return n<p?(p+.05)/(n+.05):(n+.05)/(p+.05)}c.NULL_COLOR={css:"#00000000",rgba:0},(function(n){n.toCss=function(p,E,k,x){return x!==void 0?`#${l(p)}${l(E)}${l(k)}${l(x)}`:`#${l(p)}${l(E)}${l(k)}`},n.toRgba=function(p,E,k,x=255){return(p<<24|E<<16|k<<8|x)>>>0},n.toColor=function(p,E,k,x){return{css:n.toCss(p,E,k,x),rgba:n.toRgba(p,E,k,x)}}})(S||(c.channels=S={})),(function(n){function p(E,k){return d=Math.round(255*k),[u,v,y]=o.toChannels(E.rgba),{css:S.toCss(u,v,y,d),rgba:S.toRgba(u,v,y,d)}}n.blend=function(E,k){if(d=(255&k.rgba)/255,d===1)return{css:k.css,rgba:k.rgba};const x=k.rgba>>24&255,m=k.rgba>>16&255,A=k.rgba>>8&255,H=E.rgba>>24&255,F=E.rgba>>16&255,W=E.rgba>>8&255;return u=H+Math.round((x-H)*d),v=F+Math.round((m-F)*d),y=W+Math.round((A-W)*d),{css:S.toCss(u,v,y),rgba:S.toRgba(u,v,y)}},n.isOpaque=function(E){return(255&E.rgba)==255},n.ensureContrastRatio=function(E,k,x){const m=o.ensureContrastRatio(E.rgba,k.rgba,x);if(m)return S.toColor(m>>24&255,m>>16&255,m>>8&255)},n.opaque=function(E){const k=(255|E.rgba)>>>0;return[u,v,y]=o.toChannels(k),{css:S.toCss(u,v,y),rgba:k}},n.opacity=p,n.multiplyOpacity=function(E,k){return d=255&E.rgba,p(E,d*k/255)},n.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}})(w||(c.color=w={})),(function(n){let p,E;try{const k=document.createElement("canvas");k.width=1,k.height=1;const x=k.getContext("2d",{willReadFrequently:!0});x&&(p=x,p.globalCompositeOperation="copy",E=p.createLinearGradient(0,0,1,1))}catch{}n.toColor=function(k){if(k.match(/#[\da-f]{3,8}/i))switch(k.length){case 4:return u=parseInt(k.slice(1,2).repeat(2),16),v=parseInt(k.slice(2,3).repeat(2),16),y=parseInt(k.slice(3,4).repeat(2),16),S.toColor(u,v,y);case 5:return u=parseInt(k.slice(1,2).repeat(2),16),v=parseInt(k.slice(2,3).repeat(2),16),y=parseInt(k.slice(3,4).repeat(2),16),d=parseInt(k.slice(4,5).repeat(2),16),S.toColor(u,v,y,d);case 7:return{css:k,rgba:(parseInt(k.slice(1),16)<<8|255)>>>0};case 9:return{css:k,rgba:parseInt(k.slice(1),16)>>>0}}const x=k.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(x)return u=parseInt(x[1]),v=parseInt(x[2]),y=parseInt(x[3]),d=Math.round(255*(x[5]===void 0?1:parseFloat(x[5]))),S.toColor(u,v,y,d);if(!p||!E)throw new Error("css.toColor: Unsupported css format");if(p.fillStyle=E,p.fillStyle=k,typeof p.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(p.fillRect(0,0,1,1),[u,v,y,d]=p.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:S.toRgba(u,v,y,d),css:k}}})(R||(c.css=R={})),(function(n){function p(E,k,x){const m=E/255,A=k/255,H=x/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.0722*(H<=.03928?H/12.92:Math.pow((H+.055)/1.055,2.4))}n.relativeLuminance=function(E){return p(E>>16&255,E>>8&255,255&E)},n.relativeLuminance2=p})(g||(c.rgb=g={})),(function(n){function p(k,x,m){const A=k>>24&255,H=k>>16&255,F=k>>8&255;let W=x>>24&255,M=x>>16&255,Y=x>>8&255,ee=s(g.relativeLuminance2(W,M,Y),g.relativeLuminance2(A,H,F));for(;ee<m&&(W>0||M>0||Y>0);)W-=Math.max(0,Math.ceil(.1*W)),M-=Math.max(0,Math.ceil(.1*M)),Y-=Math.max(0,Math.ceil(.1*Y)),ee=s(g.relativeLuminance2(W,M,Y),g.relativeLuminance2(A,H,F));return(W<<24|M<<16|Y<<8|255)>>>0}function E(k,x,m){const A=k>>24&255,H=k>>16&255,F=k>>8&255;let W=x>>24&255,M=x>>16&255,Y=x>>8&255,ee=s(g.relativeLuminance2(W,M,Y),g.relativeLuminance2(A,H,F));for(;ee<m&&(W<255||M<255||Y<255);)W=Math.min(255,W+Math.ceil(.1*(255-W))),M=Math.min(255,M+Math.ceil(.1*(255-M))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),ee=s(g.relativeLuminance2(W,M,Y),g.relativeLuminance2(A,H,F));return(W<<24|M<<16|Y<<8|255)>>>0}n.blend=function(k,x){if(d=(255&x)/255,d===1)return x;const m=x>>24&255,A=x>>16&255,H=x>>8&255,F=k>>24&255,W=k>>16&255,M=k>>8&255;return u=F+Math.round((m-F)*d),v=W+Math.round((A-W)*d),y=M+Math.round((H-M)*d),S.toRgba(u,v,y)},n.ensureContrastRatio=function(k,x,m){const A=g.relativeLuminance(k>>8),H=g.relativeLuminance(x>>8);if(s(A,H)<m){if(H<A){const M=p(k,x,m),Y=s(A,g.relativeLuminance(M>>8));if(Y<m){const ee=E(k,x,m);return Y>s(A,g.relativeLuminance(ee>>8))?M:ee}return M}const F=E(k,x,m),W=s(A,g.relativeLuminance(F>>8));if(W<m){const M=p(k,x,m);return W>s(A,g.relativeLuminance(M>>8))?F:M}return F}},n.reduceLuminance=p,n.increaseLuminance=E,n.toChannels=function(k){return[k>>24&255,k>>16&255,k>>8&255,255&k]}})(o||(c.rgba=o={})),c.toPaddedHex=l,c.contrastRatio=s},8969:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;const v=u(844),y=u(2585),d=u(4348),S=u(7866),w=u(744),R=u(7302),g=u(6975),o=u(8460),l=u(1753),s=u(1480),n=u(7994),p=u(9282),E=u(5435),k=u(5981),x=u(2660);let m=!1;class A extends v.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new o.EventEmitter),this._onScroll.event((F=>{var W;(W=this._onScrollApi)==null||W.fire(F.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(F){for(const W in F)this.optionsService.options[W]=F[W]}constructor(F){super(),this._windowsWrappingHeuristics=this.register(new v.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 d.InstantiationService,this.optionsService=this.register(new R.OptionsService(F)),this._instantiationService.setService(y.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(y.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(S.LogService)),this._instantiationService.setService(y.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(g.CoreService)),this._instantiationService.setService(y.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(l.CoreMouseService)),this._instantiationService.setService(y.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(s.UnicodeService)),this._instantiationService.setService(y.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(n.CharsetService),this._instantiationService.setService(y.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(x.OscLinkService),this._instantiationService.setService(y.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((W=>{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((W=>{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 k.WriteBuffer(((W,M)=>this._inputHandler.parse(W,M)))),this.register((0,o.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,W){this._writeBuffer.write(F,W)}writeSync(F,W){this._logService.logLevel<=y.LogLevelEnum.WARN&&!m&&(this._logService.warn("writeSync is unreliable and will be removed soon."),m=!0),this._writeBuffer.writeSync(F,W)}input(F,W=!0){this.coreService.triggerDataEvent(F,W)}resize(F,W){isNaN(F)||isNaN(W)||(F=Math.max(F,w.MINIMUM_COLS),W=Math.max(W,w.MINIMUM_ROWS),this._bufferService.resize(F,W))}scroll(F,W=!1){this._bufferService.scroll(F,W)}scrollLines(F,W,M){this._bufferService.scrollLines(F,W,M)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const W=F-this._bufferService.buffer.ydisp;W!==0&&this.scrollLines(W)}registerEscHandler(F,W){return this._inputHandler.registerEscHandler(F,W)}registerDcsHandler(F,W){return this._inputHandler.registerDcsHandler(F,W)}registerCsiHandler(F,W){return this._inputHandler.registerCsiHandler(F,W)}registerOscHandler(F,W){return this._inputHandler.registerOscHandler(F,W)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const W=this.optionsService.rawOptions.windowsPty;W&&W.buildNumber!==void 0&&W.buildNumber!==void 0?F=W.backend==="conpty"&&W.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(p.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},(()=>((0,p.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,v.toDisposable)((()=>{for(const W of F)W.dispose()}))}}}c.CoreTerminal=A},8460:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.runAndSubscribe=c.forwardEvent=c.EventEmitter=void 0,c.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 v=0;v<this._listeners.length;v++)if(this._listeners[v]===u)return void this._listeners.splice(v,1)}}})),this._event}fire(u,v){const y=[];for(let d=0;d<this._listeners.length;d++)y.push(this._listeners[d]);for(let d=0;d<y.length;d++)y[d].call(void 0,u,v)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},c.forwardEvent=function(u,v){return u((y=>v.fire(y)))},c.runAndSubscribe=function(u,v){return v(void 0),u((y=>v(y)))}},5435:function(j,c,u){var v=this&&this.__decorate||function(X,L,O,T){var P,J=arguments.length,te=J<3?L:T===null?T=Object.getOwnPropertyDescriptor(L,O):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(X,L,O,T);else for(var ce=X.length-1;ce>=0;ce--)(P=X[ce])&&(te=(J<3?P(te):J>3?P(L,O,te):P(L,O))||te);return J>3&&te&&Object.defineProperty(L,O,te),te},y=this&&this.__param||function(X,L){return function(O,T){L(O,T,X)}};Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;const d=u(2584),S=u(7116),w=u(2015),R=u(844),g=u(482),o=u(8437),l=u(8460),s=u(643),n=u(511),p=u(3734),E=u(2585),k=u(1480),x=u(6242),m=u(6351),A=u(5941),H={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function W(X,L){if(X>24)return L.setWinLines||!1;switch(X){case 1:return!!L.restoreWin;case 2:return!!L.minimizeWin;case 3:return!!L.setWinPosition;case 4:return!!L.setWinSizePixels;case 5:return!!L.raiseWin;case 6:return!!L.lowerWin;case 7:return!!L.refreshWin;case 8:return!!L.setWinSizeChars;case 9:return!!L.maximizeWin;case 10:return!!L.fullscreenWin;case 11:return!!L.getWinState;case 13:return!!L.getWinPosition;case 14:return!!L.getWinSizePixels;case 15:return!!L.getScreenSizePixels;case 16:return!!L.getCellSizePixels;case 18:return!!L.getWinSizeChars;case 19:return!!L.getScreenSizeChars;case 20:return!!L.getIconTitle;case 21:return!!L.getWinTitle;case 22:return!!L.pushTitle;case 23:return!!L.popTitle;case 24:return!!L.setWinLines}return!1}var M;(function(X){X[X.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",X[X.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(c.WindowsOptionsReportType=M={}));let Y=0;class ee extends R.Disposable{getAttrData(){return this._curAttrData}constructor(L,O,T,P,J,te,ce,he,U=new w.EscapeSequenceParser){super(),this._bufferService=L,this._charsetService=O,this._coreService=T,this._logService=P,this._optionsService=J,this._oscLinkService=te,this._coreMouseService=ce,this._unicodeService=he,this._parser=U,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new g.StringToUtf32,this._utf8Decoder=new g.Utf8ToUtf32,this._workCell=new n.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 l.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new l.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new l.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new l.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new l.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new l.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new l.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new l.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new l.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new l.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new l.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 se(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._parser.setCsiHandlerFallback(((B,Z)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(B),params:Z.toArray()})})),this._parser.setEscHandlerFallback((B=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(B)})})),this._parser.setExecuteHandlerFallback((B=>{this._logService.debug("Unknown EXECUTE code: ",{code:B})})),this._parser.setOscHandlerFallback(((B,Z,Q)=>{this._logService.debug("Unknown OSC code: ",{identifier:B,action:Z,data:Q})})),this._parser.setDcsHandlerFallback(((B,Z,Q)=>{Z==="HOOK"&&(Q=Q.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(B),action:Z,payload:Q})})),this._parser.setPrintHandler(((B,Z,Q)=>this.print(B,Z,Q))),this._parser.registerCsiHandler({final:"@"},(B=>this.insertChars(B))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(B=>this.scrollLeft(B))),this._parser.registerCsiHandler({final:"A"},(B=>this.cursorUp(B))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(B=>this.scrollRight(B))),this._parser.registerCsiHandler({final:"B"},(B=>this.cursorDown(B))),this._parser.registerCsiHandler({final:"C"},(B=>this.cursorForward(B))),this._parser.registerCsiHandler({final:"D"},(B=>this.cursorBackward(B))),this._parser.registerCsiHandler({final:"E"},(B=>this.cursorNextLine(B))),this._parser.registerCsiHandler({final:"F"},(B=>this.cursorPrecedingLine(B))),this._parser.registerCsiHandler({final:"G"},(B=>this.cursorCharAbsolute(B))),this._parser.registerCsiHandler({final:"H"},(B=>this.cursorPosition(B))),this._parser.registerCsiHandler({final:"I"},(B=>this.cursorForwardTab(B))),this._parser.registerCsiHandler({final:"J"},(B=>this.eraseInDisplay(B,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(B=>this.eraseInDisplay(B,!0))),this._parser.registerCsiHandler({final:"K"},(B=>this.eraseInLine(B,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(B=>this.eraseInLine(B,!0))),this._parser.registerCsiHandler({final:"L"},(B=>this.insertLines(B))),this._parser.registerCsiHandler({final:"M"},(B=>this.deleteLines(B))),this._parser.registerCsiHandler({final:"P"},(B=>this.deleteChars(B))),this._parser.registerCsiHandler({final:"S"},(B=>this.scrollUp(B))),this._parser.registerCsiHandler({final:"T"},(B=>this.scrollDown(B))),this._parser.registerCsiHandler({final:"X"},(B=>this.eraseChars(B))),this._parser.registerCsiHandler({final:"Z"},(B=>this.cursorBackwardTab(B))),this._parser.registerCsiHandler({final:"`"},(B=>this.charPosAbsolute(B))),this._parser.registerCsiHandler({final:"a"},(B=>this.hPositionRelative(B))),this._parser.registerCsiHandler({final:"b"},(B=>this.repeatPrecedingCharacter(B))),this._parser.registerCsiHandler({final:"c"},(B=>this.sendDeviceAttributesPrimary(B))),this._parser.registerCsiHandler({prefix:">",final:"c"},(B=>this.sendDeviceAttributesSecondary(B))),this._parser.registerCsiHandler({final:"d"},(B=>this.linePosAbsolute(B))),this._parser.registerCsiHandler({final:"e"},(B=>this.vPositionRelative(B))),this._parser.registerCsiHandler({final:"f"},(B=>this.hVPosition(B))),this._parser.registerCsiHandler({final:"g"},(B=>this.tabClear(B))),this._parser.registerCsiHandler({final:"h"},(B=>this.setMode(B))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(B=>this.setModePrivate(B))),this._parser.registerCsiHandler({final:"l"},(B=>this.resetMode(B))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(B=>this.resetModePrivate(B))),this._parser.registerCsiHandler({final:"m"},(B=>this.charAttributes(B))),this._parser.registerCsiHandler({final:"n"},(B=>this.deviceStatus(B))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(B=>this.deviceStatusPrivate(B))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(B=>this.softReset(B))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(B=>this.setCursorStyle(B))),this._parser.registerCsiHandler({final:"r"},(B=>this.setScrollRegion(B))),this._parser.registerCsiHandler({final:"s"},(B=>this.saveCursor(B))),this._parser.registerCsiHandler({final:"t"},(B=>this.windowOptions(B))),this._parser.registerCsiHandler({final:"u"},(B=>this.restoreCursor(B))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(B=>this.insertColumns(B))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(B=>this.deleteColumns(B))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(B=>this.selectProtected(B))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(B=>this.requestMode(B,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(B=>this.requestMode(B,!1))),this._parser.setExecuteHandler(d.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(d.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(d.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(d.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(d.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(d.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(d.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(d.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(d.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(d.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(d.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(d.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new x.OscHandler((B=>(this.setTitle(B),this.setIconName(B),!0)))),this._parser.registerOscHandler(1,new x.OscHandler((B=>this.setIconName(B)))),this._parser.registerOscHandler(2,new x.OscHandler((B=>this.setTitle(B)))),this._parser.registerOscHandler(4,new x.OscHandler((B=>this.setOrReportIndexedColor(B)))),this._parser.registerOscHandler(8,new x.OscHandler((B=>this.setHyperlink(B)))),this._parser.registerOscHandler(10,new x.OscHandler((B=>this.setOrReportFgColor(B)))),this._parser.registerOscHandler(11,new x.OscHandler((B=>this.setOrReportBgColor(B)))),this._parser.registerOscHandler(12,new x.OscHandler((B=>this.setOrReportCursorColor(B)))),this._parser.registerOscHandler(104,new x.OscHandler((B=>this.restoreIndexedColor(B)))),this._parser.registerOscHandler(110,new x.OscHandler((B=>this.restoreFgColor(B)))),this._parser.registerOscHandler(111,new x.OscHandler((B=>this.restoreBgColor(B)))),this._parser.registerOscHandler(112,new x.OscHandler((B=>this.restoreCursorColor(B)))),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 B in S.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:B},(()=>this.selectCharset("("+B))),this._parser.registerEscHandler({intermediates:")",final:B},(()=>this.selectCharset(")"+B))),this._parser.registerEscHandler({intermediates:"*",final:B},(()=>this.selectCharset("*"+B))),this._parser.registerEscHandler({intermediates:"+",final:B},(()=>this.selectCharset("+"+B))),this._parser.registerEscHandler({intermediates:"-",final:B},(()=>this.selectCharset("-"+B))),this._parser.registerEscHandler({intermediates:".",final:B},(()=>this.selectCharset("."+B))),this._parser.registerEscHandler({intermediates:"/",final:B},(()=>this.selectCharset("/"+B)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((B=>(this._logService.error("Parsing error: ",B),B))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler(((B,Z)=>this.requestStatusString(B,Z))))}_preserveStack(L,O,T,P){this._parseStack.paused=!0,this._parseStack.cursorStartX=L,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=T,this._parseStack.position=P}_logSlowResolvingAsync(L){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([L,new Promise(((O,T)=>setTimeout((()=>T("#SLOW_TIMEOUT")),5e3)))]).catch((O=>{if(O!=="#SLOW_TIMEOUT")throw O;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(L,O){let T,P=this._activeBuffer.x,J=this._activeBuffer.y,te=0;const ce=this._parseStack.paused;if(ce){if(T=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(T),T;P=this._parseStack.cursorStartX,J=this._parseStack.cursorStartY,this._parseStack.paused=!1,L.length>F&&(te=this._parseStack.position+F)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof L=="string"?` "${L}"`:` "${Array.prototype.map.call(L,(B=>String.fromCharCode(B))).join("")}"`),typeof L=="string"?L.split("").map((B=>B.charCodeAt(0))):L),this._parseBuffer.length<L.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(L.length,F))),ce||this._dirtyRowTracker.clearRange(),L.length>F)for(let B=te;B<L.length;B+=F){const Z=B+F<L.length?B+F:L.length,Q=typeof L=="string"?this._stringDecoder.decode(L.substring(B,Z),this._parseBuffer):this._utf8Decoder.decode(L.subarray(B,Z),this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,Q))return this._preserveStack(P,J,Q,B),this._logSlowResolvingAsync(T),T}else if(!ce){const B=typeof L=="string"?this._stringDecoder.decode(L,this._parseBuffer):this._utf8Decoder.decode(L,this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,B))return this._preserveStack(P,J,B,0),this._logSlowResolvingAsync(T),T}this._activeBuffer.x===P&&this._activeBuffer.y===J||this._onCursorMove.fire();const he=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),U=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);U<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(U,this._bufferService.rows-1),Math.min(he,this._bufferService.rows-1))}print(L,O,T){let P,J;const te=this._charsetService.charset,ce=this._optionsService.rawOptions.screenReaderMode,he=this._bufferService.cols,U=this._coreService.decPrivateModes.wraparound,B=this._coreService.modes.insertMode,Z=this._curAttrData;let Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&T-O>0&&Q.getWidth(this._activeBuffer.x-1)===2&&Q.setCellFromCodepoint(this._activeBuffer.x-1,0,1,Z);let de=this._parser.precedingJoinState;for(let ue=O;ue<T;++ue){if(P=L[ue],P<127&&te){const qe=te[String.fromCharCode(P)];qe&&(P=qe.charCodeAt(0))}const Ee=this._unicodeService.charProperties(P,de);J=k.UnicodeService.extractWidth(Ee);const Le=k.UnicodeService.extractShouldJoin(Ee),Te=Le?k.UnicodeService.extractWidth(de):0;if(de=Ee,ce&&this._onA11yChar.fire((0,g.stringFromCodePoint)(P)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+J-Te>he){if(U){const qe=Q;let ye=this._activeBuffer.x-Te;for(this._activeBuffer.x=Te,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),Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Te>0&&Q instanceof o.BufferLine&&Q.copyCellsFrom(qe,ye,0,Te,!1);ye<he;)qe.setCellFromCodepoint(ye++,0,1,Z)}else if(this._activeBuffer.x=he-1,J===2)continue}if(Le&&this._activeBuffer.x){const qe=Q.getWidth(this._activeBuffer.x-1)?1:2;Q.addCodepointToCell(this._activeBuffer.x-qe,P,J);for(let ye=J-Te;--ye>=0;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,Z)}else if(B&&(Q.insertCells(this._activeBuffer.x,J-Te,this._activeBuffer.getNullCell(Z)),Q.getWidth(he-1)===2&&Q.setCellFromCodepoint(he-1,s.NULL_CELL_CODE,s.NULL_CELL_WIDTH,Z)),Q.setCellFromCodepoint(this._activeBuffer.x++,P,J,Z),J>0)for(;--J;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,Z)}this._parser.precedingJoinState=de,this._activeBuffer.x<he&&T-O>0&&Q.getWidth(this._activeBuffer.x)===0&&!Q.hasContent(this._activeBuffer.x)&&Q.setCellFromCodepoint(this._activeBuffer.x,0,1,Z),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(L,O){return L.final!=="t"||L.prefix||L.intermediates?this._parser.registerCsiHandler(L,O):this._parser.registerCsiHandler(L,(T=>!W(T.params[0],this._optionsService.rawOptions.windowOptions)||O(T)))}registerDcsHandler(L,O){return this._parser.registerDcsHandler(L,new m.DcsHandler(O))}registerEscHandler(L,O){return this._parser.registerEscHandler(L,O)}registerOscHandler(L,O){return this._parser.registerOscHandler(L,new x.OscHandler(O))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var L;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&&((L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&L.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);O.hasWidth(this._activeBuffer.x)&&!O.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const L=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-L),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(L=this._bufferService.cols-1){this._activeBuffer.x=Math.min(L,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(L,O){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=L,this._activeBuffer.y=this._activeBuffer.scrollTop+O):(this._activeBuffer.x=L,this._activeBuffer.y=O),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(L,O){this._restrictCursor(),this._setCursor(this._activeBuffer.x+L,this._activeBuffer.y+O)}cursorUp(L){const O=this._activeBuffer.y-this._activeBuffer.scrollTop;return O>=0?this._moveCursor(0,-Math.min(O,L.params[0]||1)):this._moveCursor(0,-(L.params[0]||1)),!0}cursorDown(L){const O=this._activeBuffer.scrollBottom-this._activeBuffer.y;return O>=0?this._moveCursor(0,Math.min(O,L.params[0]||1)):this._moveCursor(0,L.params[0]||1),!0}cursorForward(L){return this._moveCursor(L.params[0]||1,0),!0}cursorBackward(L){return this._moveCursor(-(L.params[0]||1),0),!0}cursorNextLine(L){return this.cursorDown(L),this._activeBuffer.x=0,!0}cursorPrecedingLine(L){return this.cursorUp(L),this._activeBuffer.x=0,!0}cursorCharAbsolute(L){return this._setCursor((L.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(L){return this._setCursor(L.length>=2?(L.params[1]||1)-1:0,(L.params[0]||1)-1),!0}charPosAbsolute(L){return this._setCursor((L.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(L){return this._moveCursor(L.params[0]||1,0),!0}linePosAbsolute(L){return this._setCursor(this._activeBuffer.x,(L.params[0]||1)-1),!0}vPositionRelative(L){return this._moveCursor(0,L.params[0]||1),!0}hVPosition(L){return this.cursorPosition(L),!0}tabClear(L){const O=L.params[0];return O===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:O===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(L){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=L.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(L){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=L.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(L){const O=L.params[0];return O===1&&(this._curAttrData.bg|=536870912),O!==2&&O!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(L,O,T,P=!1,J=!1){const te=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);te.replaceCells(O,T,this._activeBuffer.getNullCell(this._eraseAttrData()),J),P&&(te.isWrapped=!1)}_resetBufferLine(L,O=!1){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);T&&(T.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),O),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+L),T.isWrapped=!1)}eraseInDisplay(L,O=!1){let T;switch(this._restrictCursor(this._bufferService.cols),L.params[0]){case 0:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);T<this._bufferService.rows;T++)this._resetBufferLine(T,O);this._dirtyRowTracker.markDirty(T);break;case 1:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T,0,this._activeBuffer.x+1,!0,O),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(T+1).isWrapped=!1);T--;)this._resetBufferLine(T,O);this._dirtyRowTracker.markDirty(0);break;case 2:for(T=this._bufferService.rows,this._dirtyRowTracker.markDirty(T-1);T--;)this._resetBufferLine(T,O);this._dirtyRowTracker.markDirty(0);break;case 3:const P=this._activeBuffer.lines.length-this._bufferService.rows;P>0&&(this._activeBuffer.lines.trimStart(P),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-P,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-P,0),this._onScroll.fire(0))}return!0}eraseInLine(L,O=!1){switch(this._restrictCursor(this._bufferService.cols),L.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,O);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,O)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(L){this._restrictCursor();let O=L.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y,P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,J=this._bufferService.rows-1+this._activeBuffer.ybase-P+1;for(;O--;)this._activeBuffer.lines.splice(J-1,1),this._activeBuffer.lines.splice(T,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(L){this._restrictCursor();let O=L.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y;let P;for(P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,P=this._bufferService.rows-1+this._activeBuffer.ybase-P;O--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(P,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(L){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.insertCells(this._activeBuffer.x,L.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(L){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.deleteCells(this._activeBuffer.x,L.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(L){let O=L.params[0]||1;for(;O--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(L){let O=L.params[0]||1;for(;O--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(o.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=L.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);P.deleteCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=L.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);P.insertCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=L.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);P.insertCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=L.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);P.deleteCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(L){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(L.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(L){const O=this._parser.precedingJoinState;if(!O)return!0;const T=L.params[0]||1,P=k.UnicodeService.extractWidth(O),J=this._activeBuffer.x-P,te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(J),ce=new Uint32Array(te.length*T);let he=0;for(let B=0;B<te.length;){const Z=te.codePointAt(B)||0;ce[he++]=Z,B+=Z>65535?2:1}let U=he;for(let B=1;B<T;++B)ce.copyWithin(U,0,he),U+=he;return this.print(ce,0,U),!0}sendDeviceAttributesPrimary(L){return L.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(L){return L.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(L.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(L){return(this._optionsService.rawOptions.termName+"").indexOf(L)===0}setMode(L){for(let O=0;O<L.length;O++)switch(L.params[O]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(L){for(let O=0;O<L.length;O++)switch(L.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,S.DEFAULT_CHARSET),this._charsetService.setgCharset(1,S.DEFAULT_CHARSET),this._charsetService.setgCharset(2,S.DEFAULT_CHARSET),this._charsetService.setgCharset(3,S.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(L){for(let O=0;O<L.length;O++)switch(L.params[O]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(L){for(let O=0;O<L.length;O++)switch(L.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),L.params[O]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(L,O){const T=this._coreService.decPrivateModes,{activeProtocol:P,activeEncoding:J}=this._coreMouseService,te=this._coreService,{buffers:ce,cols:he}=this._bufferService,{active:U,alt:B}=ce,Z=this._optionsService.rawOptions,Q=Le=>Le?1:2,de=L.params[0];return ue=de,Ee=O?de===2?4:de===4?Q(te.modes.insertMode):de===12?3:de===20?Q(Z.convertEol):0:de===1?Q(T.applicationCursorKeys):de===3?Z.windowOptions.setWinLines?he===80?2:he===132?1:0:0:de===6?Q(T.origin):de===7?Q(T.wraparound):de===8?3:de===9?Q(P==="X10"):de===12?Q(Z.cursorBlink):de===25?Q(!te.isCursorHidden):de===45?Q(T.reverseWraparound):de===66?Q(T.applicationKeypad):de===67?4:de===1e3?Q(P==="VT200"):de===1002?Q(P==="DRAG"):de===1003?Q(P==="ANY"):de===1004?Q(T.sendFocus):de===1005?4:de===1006?Q(J==="SGR"):de===1015?4:de===1016?Q(J==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?Q(U===B):de===2004?Q(T.bracketedPasteMode):0,te.triggerDataEvent(`${d.C0.ESC}[${O?"":"?"}${ue};${Ee}$y`),!0;var ue,Ee}_updateAttrColor(L,O,T,P,J){return O===2?(L|=50331648,L&=-16777216,L|=p.AttributeData.fromColorRGB([T,P,J])):O===5&&(L&=-50331904,L|=33554432|255&T),L}_extractColor(L,O,T){const P=[0,0,-1,0,0,0];let J=0,te=0;do{if(P[te+J]=L.params[O+te],L.hasSubParams(O+te)){const ce=L.getSubParams(O+te);let he=0;do P[1]===5&&(J=1),P[te+he+1+J]=ce[he];while(++he<ce.length&&he+te+1+J<P.length);break}if(P[1]===5&&te+J>=2||P[1]===2&&te+J>=5)break;P[1]&&(J=1)}while(++te+O<L.length&&te+J<P.length);for(let ce=2;ce<P.length;++ce)P[ce]===-1&&(P[ce]=0);switch(P[0]){case 38:T.fg=this._updateAttrColor(T.fg,P[1],P[3],P[4],P[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,P[1],P[3],P[4],P[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,P[1],P[3],P[4],P[5])}return te}_processUnderline(L,O){O.extended=O.extended.clone(),(!~L||L>5)&&(L=1),O.extended.underlineStyle=L,O.fg|=268435456,L===0&&(O.fg&=-268435457),O.updateExtended()}_processSGR0(L){L.fg=o.DEFAULT_ATTR_DATA.fg,L.bg=o.DEFAULT_ATTR_DATA.bg,L.extended=L.extended.clone(),L.extended.underlineStyle=0,L.extended.underlineColor&=-67108864,L.updateExtended()}charAttributes(L){if(L.length===1&&L.params[0]===0)return this._processSGR0(this._curAttrData),!0;const O=L.length;let T;const P=this._curAttrData;for(let J=0;J<O;J++)T=L.params[J],T>=30&&T<=37?(P.fg&=-50331904,P.fg|=16777216|T-30):T>=40&&T<=47?(P.bg&=-50331904,P.bg|=16777216|T-40):T>=90&&T<=97?(P.fg&=-50331904,P.fg|=16777224|T-90):T>=100&&T<=107?(P.bg&=-50331904,P.bg|=16777224|T-100):T===0?this._processSGR0(P):T===1?P.fg|=134217728:T===3?P.bg|=67108864:T===4?(P.fg|=268435456,this._processUnderline(L.hasSubParams(J)?L.getSubParams(J)[0]:1,P)):T===5?P.fg|=536870912:T===7?P.fg|=67108864:T===8?P.fg|=1073741824:T===9?P.fg|=2147483648:T===2?P.bg|=134217728:T===21?this._processUnderline(2,P):T===22?(P.fg&=-134217729,P.bg&=-134217729):T===23?P.bg&=-67108865:T===24?(P.fg&=-268435457,this._processUnderline(0,P)):T===25?P.fg&=-536870913:T===27?P.fg&=-67108865:T===28?P.fg&=-1073741825:T===29?P.fg&=2147483647:T===39?(P.fg&=-67108864,P.fg|=16777215&o.DEFAULT_ATTR_DATA.fg):T===49?(P.bg&=-67108864,P.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):T===38||T===48||T===58?J+=this._extractColor(L,J,P):T===53?P.bg|=1073741824:T===55?P.bg&=-1073741825:T===59?(P.extended=P.extended.clone(),P.extended.underlineColor=-1,P.updateExtended()):T===100?(P.fg&=-67108864,P.fg|=16777215&o.DEFAULT_ATTR_DATA.fg,P.bg&=-67108864,P.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",T);return!0}deviceStatus(L){switch(L.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const O=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${O};${T}R`)}return!0}deviceStatusPrivate(L){if(L.params[0]===6){const O=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${O};${T}R`)}return!0}softReset(L){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(L){const O=L.params[0]||1;switch(O){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const T=O%2==1;return this._optionsService.options.cursorBlink=T,!0}setScrollRegion(L){const O=L.params[0]||1;let T;return(L.length<2||(T=L.params[1])>this._bufferService.rows||T===0)&&(T=this._bufferService.rows),T>O&&(this._activeBuffer.scrollTop=O-1,this._activeBuffer.scrollBottom=T-1,this._setCursor(0,0)),!0}windowOptions(L){if(!W(L.params[0],this._optionsService.rawOptions.windowOptions))return!0;const O=L.length>1?L.params[1]:0;switch(L.params[0]){case 14:O!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${d.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:O!==0&&O!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),O!==0&&O!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:O!==0&&O!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),O!==0&&O!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(L){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(L){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(L){return this._windowTitle=L,this._onTitleChange.fire(L),!0}setIconName(L){return this._iconName=L,!0}setOrReportIndexedColor(L){const O=[],T=L.split(";");for(;T.length>1;){const P=T.shift(),J=T.shift();if(/^\d+$/.exec(P)){const te=parseInt(P);if(le(te))if(J==="?")O.push({type:0,index:te});else{const ce=(0,A.parseColor)(J);ce&&O.push({type:1,index:te,color:ce})}}}return O.length&&this._onColor.fire(O),!0}setHyperlink(L){const O=L.split(";");return!(O.length<2)&&(O[1]?this._createHyperlink(O[0],O[1]):!O[0]&&this._finishHyperlink())}_createHyperlink(L,O){this._getCurrentLinkId()&&this._finishHyperlink();const T=L.split(":");let P;const J=T.findIndex((te=>te.startsWith("id=")));return J!==-1&&(P=T[J].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:P,uri:O}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(L,O){const T=L.split(";");for(let P=0;P<T.length&&!(O>=this._specialColors.length);++P,++O)if(T[P]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{const J=(0,A.parseColor)(T[P]);J&&this._onColor.fire([{type:1,index:this._specialColors[O],color:J}])}return!0}setOrReportFgColor(L){return this._setOrReportSpecialColor(L,0)}setOrReportBgColor(L){return this._setOrReportSpecialColor(L,1)}setOrReportCursorColor(L){return this._setOrReportSpecialColor(L,2)}restoreIndexedColor(L){if(!L)return this._onColor.fire([{type:2}]),!0;const O=[],T=L.split(";");for(let P=0;P<T.length;++P)if(/^\d+$/.exec(T[P])){const J=parseInt(T[P]);le(J)&&O.push({type:2,index:J})}return O.length&&this._onColor.fire(O),!0}restoreFgColor(L){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(L){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(L){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,S.DEFAULT_CHARSET),!0}selectCharset(L){return L.length!==2?(this.selectDefaultCharset(),!0):(L[0]==="/"||this._charsetService.setgCharset(H[L[0]],S.CHARSETS[L[1]]||S.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 L=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,L,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(L){return this._charsetService.setgLevel(L),!0}screenAlignmentPattern(){const L=new n.CellData;L.content=4194373,L.fg=this._curAttrData.fg,L.bg=this._curAttrData.bg,this._setCursor(0,0);for(let O=0;O<this._bufferService.rows;++O){const T=this._activeBuffer.ybase+this._activeBuffer.y+O,P=this._activeBuffer.lines.get(T);P&&(P.fill(L),P.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(L,O){const T=this._bufferService.buffer,P=this._optionsService.rawOptions;return(J=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${J}${d.C0.ESC}\\`),!0))(L==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:L==='"p'?'P1$r61;1"p':L==="r"?`P1$r${T.scrollTop+1};${T.scrollBottom+1}r`:L==="m"?"P1$r0m":L===" q"?`P1$r${{block:2,underline:4,bar:6}[P.cursorStyle]-(P.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(L,O){this._dirtyRowTracker.markRangeDirty(L,O)}}c.InputHandler=ee;let se=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,L){X>L&&(Y=X,X=L,L=Y),X<this.start&&(this.start=X),L>this.end&&(this.end=L)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function le(X){return 0<=X&&X<256}se=v([y(0,E.IBufferService)],se)},844:(j,c)=>{function u(v){for(const y of v)y.dispose();v.length=0}Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.toDisposable=c.MutableDisposable=c.Disposable=void 0,c.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const v of this._disposables)v.dispose();this._disposables.length=0}register(v){return this._disposables.push(v),v}unregister(v){const y=this._disposables.indexOf(v);y!==-1&&this._disposables.splice(y,1)}},c.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(v){var y;this._isDisposed||v===this._value||((y=this._value)==null||y.dispose(),this._value=v)}clear(){this.value=void 0}dispose(){var v;this._isDisposed=!0,(v=this._value)==null||v.dispose(),this._value=void 0}},c.toDisposable=function(v){return{dispose:v}},c.disposeArray=u,c.getDisposeArrayDisposable=function(v){return{dispose:()=>u(v)}}},1505:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.FourKeyMap=c.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(y,d,S){this._data[y]||(this._data[y]={}),this._data[y][d]=S}get(y,d){return this._data[y]?this._data[y][d]:void 0}clear(){this._data={}}}c.TwoKeyMap=u,c.FourKeyMap=class{constructor(){this._data=new u}set(v,y,d,S,w){this._data.get(v,y)||this._data.set(v,y,new u),this._data.get(v,y).set(d,S,w)}get(v,y,d,S){var w;return(w=this._data.get(v,y))==null?void 0:w.get(d,S)}clear(){this._data.clear()}}},6114:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.isChromeOS=c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.getSafariVersion=c.isSafari=c.isLegacyEdge=c.isFirefox=c.isNode=void 0,c.isNode=typeof process<"u"&&"title"in process;const u=c.isNode?"node":navigator.userAgent,v=c.isNode?"node":navigator.platform;c.isFirefox=u.includes("Firefox"),c.isLegacyEdge=u.includes("Edge"),c.isSafari=/^((?!chrome|android).)*safari/i.test(u),c.getSafariVersion=function(){if(!c.isSafari)return 0;const y=u.match(/Version\/(\d+)/);return y===null||y.length<2?0:parseInt(y[1])},c.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(v),c.isIpad=v==="iPad",c.isIphone=v==="iPhone",c.isWindows=["Windows","Win16","Win32","WinCE"].includes(v),c.isLinux=v.indexOf("Linux")>=0,c.isChromeOS=/\bCrOS\b/.test(u)},6106:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SortedList=void 0;let u=0;c.SortedList=class{constructor(v){this._getKey=v,this._array=[]}clear(){this._array.length=0}insert(v){this._array.length!==0?(u=this._search(this._getKey(v)),this._array.splice(u,0,v)):this._array.push(v)}delete(v){if(this._array.length===0)return!1;const y=this._getKey(v);if(y===void 0||(u=this._search(y),u===-1)||this._getKey(this._array[u])!==y)return!1;do if(this._array[u]===v)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===y);return!1}*getKeyIterator(v){if(this._array.length!==0&&(u=this._search(v),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===v))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===v)}forEachByKey(v,y){if(this._array.length!==0&&(u=this._search(v),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===v))do y(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===v)}values(){return[...this._array].values()}_search(v){let y=0,d=this._array.length-1;for(;d>=y;){let S=y+d>>1;const w=this._getKey(this._array[S]);if(w>v)d=S-1;else{if(!(w<v)){for(;S>0&&this._getKey(this._array[S-1])===v;)S--;return S}y=S+1}}return y}}},7226:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DebouncedIdleTask=c.IdleTaskQueue=c.PriorityTaskQueue=void 0;const v=u(6114);class y{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let R=0,g=0,o=w.timeRemaining(),l=0;for(;this._i<this._tasks.length;){if(R=Date.now(),this._tasks[this._i]()||this._i++,R=Math.max(1,Date.now()-R),g=Math.max(R,g),l=w.timeRemaining(),1.5*g>l)return o-R<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-R))}ms`),void this._start();o=l}this.clear()}}class d extends y{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const R=Date.now()+w;return{timeRemaining:()=>Math.max(0,R-Date.now())}}}c.PriorityTaskQueue=d,c.IdleTaskQueue=!v.isNode&&"requestIdleCallback"in window?class extends y{_requestCallback(S){return requestIdleCallback(S)}_cancelCallback(S){cancelIdleCallback(S)}}:d,c.DebouncedIdleTask=class{constructor(){this._queue=new c.IdleTaskQueue}set(S){this._queue.clear(),this._queue.enqueue(S)}flush(){this._queue.flush()}}},9282:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;const v=u(643);c.updateWindowsModeWrappedState=function(y){const d=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),S=d==null?void 0:d.get(y.cols-1),w=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);w&&S&&(w.isWrapped=S[v.CHAR_DATA_CODE_INDEX]!==v.NULL_CELL_CODE&&S[v.CHAR_DATA_CODE_INDEX]!==v.WHITESPACE_CELL_CODE)}},3734:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new v}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new u;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}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}}c.AttributeData=u;class v{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}get underlineVariantOffset(){const d=(3758096384&this._ext)>>29;return d<0?4294967288^d:d}set underlineVariantOffset(d){this._ext&=536870911,this._ext|=d<<29&3758096384}constructor(d=0,S=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=S}clone(){return new v(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}c.ExtendedAttrs=v},9092:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Buffer=c.MAX_BUFFER_SIZE=void 0;const v=u(6349),y=u(7226),d=u(3734),S=u(8437),w=u(4634),R=u(511),g=u(643),o=u(4863),l=u(7116);c.MAX_BUFFER_SIZE=4294967295,c.Buffer=class{constructor(s,n,p){this._hasScrollback=s,this._optionsService=n,this._bufferService=p,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=S.DEFAULT_ATTR_DATA.clone(),this.savedCharset=l.DEFAULT_CHARSET,this.markers=[],this._nullCell=R.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),this._whitespaceCell=R.CellData.fromCharData([0,g.WHITESPACE_CELL_CHAR,g.WHITESPACE_CELL_WIDTH,g.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new y.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new v.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(s){return s?(this._nullCell.fg=s.fg,this._nullCell.bg=s.bg,this._nullCell.extended=s.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new d.ExtendedAttrs),this._nullCell}getWhitespaceCell(s){return s?(this._whitespaceCell.fg=s.fg,this._whitespaceCell.bg=s.bg,this._whitespaceCell.extended=s.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new d.ExtendedAttrs),this._whitespaceCell}getBlankLine(s,n){return new S.BufferLine(this._bufferService.cols,this.getNullCell(s),n)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const s=this.ybase+this.y-this.ydisp;return s>=0&&s<this._rows}_getCorrectBufferLength(s){if(!this._hasScrollback)return s;const n=s+this._optionsService.rawOptions.scrollback;return n>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:n}fillViewportRows(s){if(this.lines.length===0){s===void 0&&(s=S.DEFAULT_ATTR_DATA);let n=this._rows;for(;n--;)this.lines.push(this.getBlankLine(s))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new v.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(s,n){const p=this.getNullCell(S.DEFAULT_ATTR_DATA);let E=0;const k=this._getCorrectBufferLength(n);if(k>this.lines.maxLength&&(this.lines.maxLength=k),this.lines.length>0){if(this._cols<s)for(let m=0;m<this.lines.length;m++)E+=+this.lines.get(m).resize(s,p);let x=0;if(this._rows<n)for(let m=this._rows;m<n;m++)this.lines.length<n+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new S.BufferLine(s,p)):this.ybase>0&&this.lines.length<=this.ybase+this.y+x+1?(this.ybase--,x++,this.ydisp>0&&this.ydisp--):this.lines.push(new S.BufferLine(s,p)));else for(let m=this._rows;m>n;m--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(k<this.lines.maxLength){const m=this.lines.length-k;m>0&&(this.lines.trimStart(m),this.ybase=Math.max(this.ybase-m,0),this.ydisp=Math.max(this.ydisp-m,0),this.savedY=Math.max(this.savedY-m,0)),this.lines.maxLength=k}this.x=Math.min(this.x,s-1),this.y=Math.min(this.y,n-1),x&&(this.y+=x),this.savedX=Math.min(this.savedX,s-1),this.scrollTop=0}if(this.scrollBottom=n-1,this._isReflowEnabled&&(this._reflow(s,n),this._cols>s))for(let x=0;x<this.lines.length;x++)E+=+this.lines.get(x).resize(s,p);this._cols=s,this._rows=n,this._memoryCleanupQueue.clear(),E>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let s=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,s=!1);let n=0;for(;this._memoryCleanupPosition<this.lines.length;)if(n+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),n>100)return!0;return s}get _isReflowEnabled(){const s=this._optionsService.rawOptions.windowsPty;return s&&s.buildNumber?this._hasScrollback&&s.backend==="conpty"&&s.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(s,n){this._cols!==s&&(s>this._cols?this._reflowLarger(s,n):this._reflowSmaller(s,n))}_reflowLarger(s,n){const p=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,s,this.ybase+this.y,this.getNullCell(S.DEFAULT_ATTR_DATA));if(p.length>0){const E=(0,w.reflowLargerCreateNewLayout)(this.lines,p);(0,w.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(s,n,E.countRemoved)}}_reflowLargerAdjustViewport(s,n,p){const E=this.getNullCell(S.DEFAULT_ATTR_DATA);let k=p;for(;k-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new S.BufferLine(s,E))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-p,0)}_reflowSmaller(s,n){const p=this.getNullCell(S.DEFAULT_ATTR_DATA),E=[];let k=0;for(let x=this.lines.length-1;x>=0;x--){let m=this.lines.get(x);if(!m||!m.isWrapped&&m.getTrimmedLength()<=s)continue;const A=[m];for(;m.isWrapped&&x>0;)m=this.lines.get(--x),A.unshift(m);const H=this.ybase+this.y;if(H>=x&&H<x+A.length)continue;const F=A[A.length-1].getTrimmedLength(),W=(0,w.reflowSmallerGetNewLineLengths)(A,this._cols,s),M=W.length-A.length;let Y;Y=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const ee=[];for(let T=0;T<M;T++){const P=this.getBlankLine(S.DEFAULT_ATTR_DATA,!0);ee.push(P)}ee.length>0&&(E.push({start:x+A.length+k,newLines:ee}),k+=ee.length),A.push(...ee);let se=W.length-1,le=W[se];le===0&&(se--,le=W[se]);let X=A.length-M-1,L=F;for(;X>=0;){const T=Math.min(L,le);if(A[se]===void 0)break;if(A[se].copyCellsFrom(A[X],L-T,le-T,T,!0),le-=T,le===0&&(se--,le=W[se]),L-=T,L===0){X--;const P=Math.max(X,0);L=(0,w.getWrappedLineTrimmedLength)(A,P,this._cols)}}for(let T=0;T<A.length;T++)W[T]<s&&A[T].setCell(W[T],p);let O=M-Y;for(;O-- >0;)this.ybase===0?this.y<n-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+k)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+n-1)}if(E.length>0){const x=[],m=[];for(let se=0;se<this.lines.length;se++)m.push(this.lines.get(se));const A=this.lines.length;let H=A-1,F=0,W=E[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+k);let M=0;for(let se=Math.min(this.lines.maxLength-1,A+k-1);se>=0;se--)if(W&&W.start>H+M){for(let le=W.newLines.length-1;le>=0;le--)this.lines.set(se--,W.newLines[le]);se++,x.push({index:H+1,amount:W.newLines.length}),M+=W.newLines.length,W=E[++F]}else this.lines.set(se,m[H--]);let Y=0;for(let se=x.length-1;se>=0;se--)x[se].index+=Y,this.lines.onInsertEmitter.fire(x[se]),Y+=x[se].amount;const ee=Math.max(0,A+k-this.lines.maxLength);ee>0&&this.lines.onTrimEmitter.fire(ee)}}translateBufferLineToString(s,n,p=0,E){const k=this.lines.get(s);return k?k.translateToString(n,p,E):""}getWrappedRangeForLine(s){let n=s,p=s;for(;n>0&&this.lines.get(n).isWrapped;)n--;for(;p+1<this.lines.length&&this.lines.get(p+1).isWrapped;)p++;return{first:n,last:p}}setupTabStops(s){for(s!=null?this.tabs[s]||(s=this.prevStop(s)):(this.tabs={},s=0);s<this._cols;s+=this._optionsService.rawOptions.tabStopWidth)this.tabs[s]=!0}prevStop(s){for(s==null&&(s=this.x);!this.tabs[--s]&&s>0;);return s>=this._cols?this._cols-1:s<0?0:s}nextStop(s){for(s==null&&(s=this.x);!this.tabs[++s]&&s<this._cols;);return s>=this._cols?this._cols-1:s<0?0:s}clearMarkers(s){this._isClearing=!0;for(let n=0;n<this.markers.length;n++)this.markers[n].line===s&&(this.markers[n].dispose(),this.markers.splice(n--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let s=0;s<this.markers.length;s++)this.markers[s].dispose(),this.markers.splice(s--,1);this._isClearing=!1}addMarker(s){const n=new o.Marker(s);return this.markers.push(n),n.register(this.lines.onTrim((p=>{n.line-=p,n.line<0&&n.dispose()}))),n.register(this.lines.onInsert((p=>{n.line>=p.index&&(n.line+=p.amount)}))),n.register(this.lines.onDelete((p=>{n.line>=p.index&&n.line<p.index+p.amount&&n.dispose(),n.line>p.index&&(n.line-=p.amount)}))),n.register(n.onDispose((()=>this._removeMarker(n)))),n}_removeMarker(s){this._isClearing||this.markers.splice(this.markers.indexOf(s),1)}}},8437:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;const v=u(3734),y=u(511),d=u(643),S=u(482);c.DEFAULT_ATTR_DATA=Object.freeze(new v.AttributeData);let w=0;class R{constructor(o,l,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);const n=l||y.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let p=0;p<o;++p)this.setCell(p,n);this.length=o}get(o){const l=this._data[3*o+0],s=2097151&l;return[this._data[3*o+1],2097152&l?this._combined[o]:s?(0,S.stringFromCodePoint)(s):"",l>>22,2097152&l?this._combined[o].charCodeAt(this._combined[o].length-1):s]}set(o,l){this._data[3*o+1]=l[d.CHAR_DATA_ATTR_INDEX],l[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=l[1],this._data[3*o+0]=2097152|o|l[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=l[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|l[d.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 l=this._data[3*o+0];return 2097152&l?this._combined[o].charCodeAt(this._combined[o].length-1):2097151&l}isCombined(o){return 2097152&this._data[3*o+0]}getString(o){const l=this._data[3*o+0];return 2097152&l?this._combined[o]:2097151&l?(0,S.stringFromCodePoint)(2097151&l):""}isProtected(o){return 536870912&this._data[3*o+2]}loadCell(o,l){return w=3*o,l.content=this._data[w+0],l.fg=this._data[w+1],l.bg=this._data[w+2],2097152&l.content&&(l.combinedData=this._combined[o]),268435456&l.bg&&(l.extended=this._extendedAttrs[o]),l}setCell(o,l){2097152&l.content&&(this._combined[o]=l.combinedData),268435456&l.bg&&(this._extendedAttrs[o]=l.extended),this._data[3*o+0]=l.content,this._data[3*o+1]=l.fg,this._data[3*o+2]=l.bg}setCellFromCodepoint(o,l,s,n){268435456&n.bg&&(this._extendedAttrs[o]=n.extended),this._data[3*o+0]=l|s<<22,this._data[3*o+1]=n.fg,this._data[3*o+2]=n.bg}addCodepointToCell(o,l,s){let n=this._data[3*o+0];2097152&n?this._combined[o]+=(0,S.stringFromCodePoint)(l):2097151&n?(this._combined[o]=(0,S.stringFromCodePoint)(2097151&n)+(0,S.stringFromCodePoint)(l),n&=-2097152,n|=2097152):n=l|4194304,s&&(n&=-12582913,n|=s<<22),this._data[3*o+0]=n}insertCells(o,l,s){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,s),l<this.length-o){const n=new y.CellData;for(let p=this.length-o-l-1;p>=0;--p)this.setCell(o+l+p,this.loadCell(o+p,n));for(let p=0;p<l;++p)this.setCell(o+p,s)}else for(let n=o;n<this.length;++n)this.setCell(n,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(o,l,s){if(o%=this.length,l<this.length-o){const n=new y.CellData;for(let p=0;p<this.length-o-l;++p)this.setCell(o+p,this.loadCell(o+l+p,n));for(let p=this.length-l;p<this.length;++p)this.setCell(p,s)}else for(let n=o;n<this.length;++n)this.setCell(n,s);o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,s),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodepoint(o,0,1,s)}replaceCells(o,l,s,n=!1){if(n)for(o&&this.getWidth(o-1)===2&&!this.isProtected(o-1)&&this.setCellFromCodepoint(o-1,0,1,s),l<this.length&&this.getWidth(l-1)===2&&!this.isProtected(l)&&this.setCellFromCodepoint(l,0,1,s);o<l&&o<this.length;)this.isProtected(o)||this.setCell(o,s),o++;else for(o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,s),l<this.length&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l,0,1,s);o<l&&o<this.length;)this.setCell(o++,s)}resize(o,l){if(o===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const s=3*o;if(o>this.length){if(this._data.buffer.byteLength>=4*s)this._data=new Uint32Array(this._data.buffer,0,s);else{const n=new Uint32Array(s);n.set(this._data),this._data=n}for(let n=this.length;n<o;++n)this.setCell(n,l)}else{this._data=this._data.subarray(0,s);const n=Object.keys(this._combined);for(let E=0;E<n.length;E++){const k=parseInt(n[E],10);k>=o&&delete this._combined[k]}const p=Object.keys(this._extendedAttrs);for(let E=0;E<p.length;E++){const k=parseInt(p[E],10);k>=o&&delete this._extendedAttrs[k]}}return this.length=o,4*s*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,l=!1){if(l)for(let s=0;s<this.length;++s)this.isProtected(s)||this.setCell(s,o);else{this._combined={},this._extendedAttrs={};for(let s=0;s<this.length;++s)this.setCell(s,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 l in o._combined)this._combined[l]=o._combined[l];this._extendedAttrs={};for(const l in o._extendedAttrs)this._extendedAttrs[l]=o._extendedAttrs[l];this.isWrapped=o.isWrapped}clone(){const o=new R(0);o._data=new Uint32Array(this._data),o.length=this.length;for(const l in this._combined)o._combined[l]=this._combined[l];for(const l in this._extendedAttrs)o._extendedAttrs[l]=this._extendedAttrs[l];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,l,s,n,p){const E=o._data;if(p)for(let x=n-1;x>=0;x--){for(let m=0;m<3;m++)this._data[3*(s+x)+m]=E[3*(l+x)+m];268435456&E[3*(l+x)+2]&&(this._extendedAttrs[s+x]=o._extendedAttrs[l+x])}else for(let x=0;x<n;x++){for(let m=0;m<3;m++)this._data[3*(s+x)+m]=E[3*(l+x)+m];268435456&E[3*(l+x)+2]&&(this._extendedAttrs[s+x]=o._extendedAttrs[l+x])}const k=Object.keys(o._combined);for(let x=0;x<k.length;x++){const m=parseInt(k[x],10);m>=l&&(this._combined[m-l+s]=o._combined[m])}}translateToString(o,l,s,n){l=l??0,s=s??this.length,o&&(s=Math.min(s,this.getTrimmedLength())),n&&(n.length=0);let p="";for(;l<s;){const E=this._data[3*l+0],k=2097151&E,x=2097152&E?this._combined[l]:k?(0,S.stringFromCodePoint)(k):d.WHITESPACE_CELL_CHAR;if(p+=x,n)for(let m=0;m<x.length;++m)n.push(l);l+=E>>22||1}return n&&n.push(l),p}}c.BufferLine=R},4841:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getRangeLength=void 0,c.getRangeLength=function(u,v){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 v*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(j,c)=>{function u(v,y,d){if(y===v.length-1)return v[y].getTrimmedLength();const S=!v[y].hasContent(d-1)&&v[y].getWidth(d-1)===1,w=v[y+1].getWidth(0)===2;return S&&w?d-1:d}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(v,y,d,S,w){const R=[];for(let g=0;g<v.length-1;g++){let o=g,l=v.get(++o);if(!l.isWrapped)continue;const s=[v.get(g)];for(;o<v.length&&l.isWrapped;)s.push(l),l=v.get(++o);if(S>=g&&S<o){g+=s.length-1;continue}let n=0,p=u(s,n,y),E=1,k=0;for(;E<s.length;){const m=u(s,E,y),A=m-k,H=d-p,F=Math.min(A,H);s[n].copyCellsFrom(s[E],k,p,F,!1),p+=F,p===d&&(n++,p=0),k+=F,k===m&&(E++,k=0),p===0&&n!==0&&s[n-1].getWidth(d-1)===2&&(s[n].copyCellsFrom(s[n-1],d-1,p++,1,!1),s[n-1].setCell(d-1,w))}s[n].replaceCells(p,d,w);let x=0;for(let m=s.length-1;m>0&&(m>n||s[m].getTrimmedLength()===0);m--)x++;x>0&&(R.push(g+s.length-x),R.push(x)),g+=s.length-1}return R},c.reflowLargerCreateNewLayout=function(v,y){const d=[];let S=0,w=y[S],R=0;for(let g=0;g<v.length;g++)if(w===g){const o=y[++S];v.onDeleteEmitter.fire({index:g-R,amount:o}),g+=o-1,R+=o,w=y[++S]}else d.push(g);return{layout:d,countRemoved:R}},c.reflowLargerApplyNewLayout=function(v,y){const d=[];for(let S=0;S<y.length;S++)d.push(v.get(y[S]));for(let S=0;S<d.length;S++)v.set(S,d[S]);v.length=y.length},c.reflowSmallerGetNewLineLengths=function(v,y,d){const S=[],w=v.map(((l,s)=>u(v,s,y))).reduce(((l,s)=>l+s));let R=0,g=0,o=0;for(;o<w;){if(w-o<d){S.push(w-o);break}R+=d;const l=u(v,g,y);R>l&&(R-=l,g++);const s=v[g].getWidth(R-1)===2;s&&R--;const n=s?d-1:d;S.push(n),o+=n}return S},c.getWrappedLineTrimmedLength=u},5295:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;const v=u(8460),y=u(844),d=u(9092);class S extends y.Disposable{constructor(R,g){super(),this._optionsService=R,this._bufferService=g,this._onBufferActivate=this.register(new v.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 d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.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(R){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(R),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(R,g){this._normal.resize(R,g),this._alt.resize(R,g),this.setupTabStops(R)}setupTabStops(R){this._normal.setupTabStops(R),this._alt.setupTabStops(R)}}c.BufferSet=S},511:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;const v=u(482),y=u(643),d=u(3734);class S extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(R){const g=new S;return g.setFromCharData(R),g}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,v.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(R){this.fg=R[y.CHAR_DATA_ATTR_INDEX],this.bg=0;let g=!1;if(R[y.CHAR_DATA_CHAR_INDEX].length>2)g=!0;else if(R[y.CHAR_DATA_CHAR_INDEX].length===2){const o=R[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=o&&o<=56319){const l=R[y.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=l&&l<=57343?this.content=1024*(o-55296)+l-56320+65536|R[y.CHAR_DATA_WIDTH_INDEX]<<22:g=!0}else g=!0}else this.content=R[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|R[y.CHAR_DATA_WIDTH_INDEX]<<22;g&&(this.combinedData=R[y.CHAR_DATA_CHAR_INDEX],this.content=2097152|R[y.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.CellData=S},643:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_EXT=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=0,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.DEFAULT_EXT=0,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},4863:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;const v=u(8460),y=u(844);class d{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=d._nextId++,this._onDispose=this.register(new v.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,y.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}c.Marker=d,d._nextId=1},7116:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.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:"≥","{":"π","|":"≠","}":"£","~":"·"},c.CHARSETS.A={"#":"£"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},c.CHARSETS.C=c.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},c.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},c.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},c.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},c.CHARSETS.E=c.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},c.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},c.CHARSETS.H=c.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(j,c)=>{var u,v,y;Object.defineProperty(c,"__esModule",{value:!0}),c.C1_ESCAPED=c.C1=c.C0=void 0,(function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
|
|
47
|
-
`,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""})(u||(c.C0=u={})),(function(d){d.PAD="",d.HOP="",d.BPH="",d.NBH="",d.IND="",d.NEL="
",d.SSA="",d.ESA="",d.HTS="",d.HTJ="",d.VTS="",d.PLD="",d.PLU="",d.RI="",d.SS2="",d.SS3="",d.DCS="",d.PU1="",d.PU2="",d.STS="",d.CCH="",d.MW="",d.SPA="",d.EPA="",d.SOS="",d.SGCI="",d.SCI="",d.CSI="",d.ST="",d.OSC="",d.PM="",d.APC=""})(v||(c.C1=v={})),(function(d){d.ST=`${u.ESC}\\`})(y||(c.C1_ESCAPED=y={}))},7399:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;const v=u(2584),y={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};c.evaluateKeyboardEvent=function(d,S,w,R){const g={type:0,cancel:!1,key:void 0},o=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?g.key=S?v.C0.ESC+"OA":v.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?g.key=S?v.C0.ESC+"OD":v.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?g.key=S?v.C0.ESC+"OC":v.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(g.key=S?v.C0.ESC+"OB":v.C0.ESC+"[B");break;case 8:g.key=d.ctrlKey?"\b":v.C0.DEL,d.altKey&&(g.key=v.C0.ESC+g.key);break;case 9:if(d.shiftKey){g.key=v.C0.ESC+"[Z";break}g.key=v.C0.HT,g.cancel=!0;break;case 13:g.key=d.altKey?v.C0.ESC+v.C0.CR:v.C0.CR,g.cancel=!0;break;case 27:g.key=v.C0.ESC,d.altKey&&(g.key=v.C0.ESC+v.C0.ESC),g.cancel=!0;break;case 37:if(d.metaKey)break;o?(g.key=v.C0.ESC+"[1;"+(o+1)+"D",g.key===v.C0.ESC+"[1;3D"&&(g.key=v.C0.ESC+(w?"b":"[1;5D"))):g.key=S?v.C0.ESC+"OD":v.C0.ESC+"[D";break;case 39:if(d.metaKey)break;o?(g.key=v.C0.ESC+"[1;"+(o+1)+"C",g.key===v.C0.ESC+"[1;3C"&&(g.key=v.C0.ESC+(w?"f":"[1;5C"))):g.key=S?v.C0.ESC+"OC":v.C0.ESC+"[C";break;case 38:if(d.metaKey)break;o?(g.key=v.C0.ESC+"[1;"+(o+1)+"A",w||g.key!==v.C0.ESC+"[1;3A"||(g.key=v.C0.ESC+"[1;5A")):g.key=S?v.C0.ESC+"OA":v.C0.ESC+"[A";break;case 40:if(d.metaKey)break;o?(g.key=v.C0.ESC+"[1;"+(o+1)+"B",w||g.key!==v.C0.ESC+"[1;3B"||(g.key=v.C0.ESC+"[1;5B")):g.key=S?v.C0.ESC+"OB":v.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(g.key=v.C0.ESC+"[2~");break;case 46:g.key=o?v.C0.ESC+"[3;"+(o+1)+"~":v.C0.ESC+"[3~";break;case 36:g.key=o?v.C0.ESC+"[1;"+(o+1)+"H":S?v.C0.ESC+"OH":v.C0.ESC+"[H";break;case 35:g.key=o?v.C0.ESC+"[1;"+(o+1)+"F":S?v.C0.ESC+"OF":v.C0.ESC+"[F";break;case 33:d.shiftKey?g.type=2:d.ctrlKey?g.key=v.C0.ESC+"[5;"+(o+1)+"~":g.key=v.C0.ESC+"[5~";break;case 34:d.shiftKey?g.type=3:d.ctrlKey?g.key=v.C0.ESC+"[6;"+(o+1)+"~":g.key=v.C0.ESC+"[6~";break;case 112:g.key=o?v.C0.ESC+"[1;"+(o+1)+"P":v.C0.ESC+"OP";break;case 113:g.key=o?v.C0.ESC+"[1;"+(o+1)+"Q":v.C0.ESC+"OQ";break;case 114:g.key=o?v.C0.ESC+"[1;"+(o+1)+"R":v.C0.ESC+"OR";break;case 115:g.key=o?v.C0.ESC+"[1;"+(o+1)+"S":v.C0.ESC+"OS";break;case 116:g.key=o?v.C0.ESC+"[15;"+(o+1)+"~":v.C0.ESC+"[15~";break;case 117:g.key=o?v.C0.ESC+"[17;"+(o+1)+"~":v.C0.ESC+"[17~";break;case 118:g.key=o?v.C0.ESC+"[18;"+(o+1)+"~":v.C0.ESC+"[18~";break;case 119:g.key=o?v.C0.ESC+"[19;"+(o+1)+"~":v.C0.ESC+"[19~";break;case 120:g.key=o?v.C0.ESC+"[20;"+(o+1)+"~":v.C0.ESC+"[20~";break;case 121:g.key=o?v.C0.ESC+"[21;"+(o+1)+"~":v.C0.ESC+"[21~";break;case 122:g.key=o?v.C0.ESC+"[23;"+(o+1)+"~":v.C0.ESC+"[23~";break;case 123:g.key=o?v.C0.ESC+"[24;"+(o+1)+"~":v.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(w&&!R||!d.altKey||d.metaKey)!w||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?g.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(g.key=v.C0.US),d.key==="@"&&(g.key=v.C0.NUL)):d.keyCode===65&&(g.type=1);else{const l=y[d.keyCode],s=l==null?void 0:l[d.shiftKey?1:0];if(s)g.key=v.C0.ESC+s;else if(d.keyCode>=65&&d.keyCode<=90){const n=d.ctrlKey?d.keyCode-64:d.keyCode+32;let p=String.fromCharCode(n);d.shiftKey&&(p=p.toUpperCase()),g.key=v.C0.ESC+p}else if(d.keyCode===32)g.key=v.C0.ESC+(d.ctrlKey?v.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let n=d.code.slice(3,4);d.shiftKey||(n=n.toLowerCase()),g.key=v.C0.ESC+n,g.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?g.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?g.key=v.C0.NUL:d.keyCode>=51&&d.keyCode<=55?g.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?g.key=v.C0.DEL:d.keyCode===219?g.key=v.C0.ESC:d.keyCode===220?g.key=v.C0.FS:d.keyCode===221&&(g.key=v.C0.GS)}return g}},482:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},c.utf32ToString=function(u,v=0,y=u.length){let d="";for(let S=v;S<y;++S){let w=u[S];w>65535?(w-=65536,d+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):d+=String.fromCharCode(w)}return d},c.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,v){const y=u.length;if(!y)return 0;let d=0,S=0;if(this._interim){const w=u.charCodeAt(S++);56320<=w&&w<=57343?v[d++]=1024*(this._interim-55296)+w-56320+65536:(v[d++]=this._interim,v[d++]=w),this._interim=0}for(let w=S;w<y;++w){const R=u.charCodeAt(w);if(55296<=R&&R<=56319){if(++w>=y)return this._interim=R,d;const g=u.charCodeAt(w);56320<=g&&g<=57343?v[d++]=1024*(R-55296)+g-56320+65536:(v[d++]=R,v[d++]=g)}else R!==65279&&(v[d++]=R)}return d}},c.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,v){const y=u.length;if(!y)return 0;let d,S,w,R,g=0,o=0,l=0;if(this.interim[0]){let p=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let k,x=0;for(;(k=63&this.interim[++x])&&x<4;)E<<=6,E|=k;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,A=m-x;for(;l<A;){if(l>=y)return 0;if(k=u[l++],(192&k)!=128){l--,p=!0;break}this.interim[x++]=k,E<<=6,E|=63&k}p||(m===2?E<128?l--:v[g++]=E:m===3?E<2048||E>=55296&&E<=57343||E===65279||(v[g++]=E):E<65536||E>1114111||(v[g++]=E)),this.interim.fill(0)}const s=y-4;let n=l;for(;n<y;){for(;!(!(n<s)||128&(d=u[n])||128&(S=u[n+1])||128&(w=u[n+2])||128&(R=u[n+3]));)v[g++]=d,v[g++]=S,v[g++]=w,v[g++]=R,n+=4;if(d=u[n++],d<128)v[g++]=d;else if((224&d)==192){if(n>=y)return this.interim[0]=d,g;if(S=u[n++],(192&S)!=128){n--;continue}if(o=(31&d)<<6|63&S,o<128){n--;continue}v[g++]=o}else if((240&d)==224){if(n>=y)return this.interim[0]=d,g;if(S=u[n++],(192&S)!=128){n--;continue}if(n>=y)return this.interim[0]=d,this.interim[1]=S,g;if(w=u[n++],(192&w)!=128){n--;continue}if(o=(15&d)<<12|(63&S)<<6|63&w,o<2048||o>=55296&&o<=57343||o===65279)continue;v[g++]=o}else if((248&d)==240){if(n>=y)return this.interim[0]=d,g;if(S=u[n++],(192&S)!=128){n--;continue}if(n>=y)return this.interim[0]=d,this.interim[1]=S,g;if(w=u[n++],(192&w)!=128){n--;continue}if(n>=y)return this.interim[0]=d,this.interim[1]=S,this.interim[2]=w,g;if(R=u[n++],(192&R)!=128){n--;continue}if(o=(7&d)<<18|(63&S)<<12|(63&w)<<6|63&R,o<65536||o>1114111)continue;v[g++]=o}}return g}}},225:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;const v=u(1480),y=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],d=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let S;c.UnicodeV6=class{constructor(){if(this.version="6",!S){S=new Uint8Array(65536),S.fill(1),S[0]=0,S.fill(0,1,32),S.fill(0,127,160),S.fill(2,4352,4448),S[9001]=2,S[9002]=2,S.fill(2,11904,42192),S[12351]=1,S.fill(2,44032,55204),S.fill(2,63744,64256),S.fill(2,65040,65050),S.fill(2,65072,65136),S.fill(2,65280,65377),S.fill(2,65504,65511);for(let w=0;w<y.length;++w)S.fill(0,y[w][0],y[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?S[w]:(function(R,g){let o,l=0,s=g.length-1;if(R<g[0][0]||R>g[s][1])return!1;for(;s>=l;)if(o=l+s>>1,R>g[o][1])l=o+1;else{if(!(R<g[o][0]))return!0;s=o-1}return!1})(w,d)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,R){let g=this.wcwidth(w),o=g===0&&R!==0;if(o){const l=v.UnicodeService.extractWidth(R);l===0?o=!1:l>g&&(g=l)}return v.UnicodeService.createPropertyValue(0,g,o)}}},5981:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;const v=u(8460),y=u(844);class d extends y.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,R){if(R!==void 0&&this._syncCalls>R)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let g;for(this._isSyncWriting=!0;g=this._writeBuffer.shift();){this._action(g);const o=this._callbacks.shift();o&&o()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,R){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+=w.length,this._writeBuffer.push(w),this._callbacks.push(R),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(R)}_innerWrite(w=0,R=!0){const g=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const o=this._writeBuffer[this._bufferOffset],l=this._action(o,R);if(l){const n=p=>Date.now()-g>=12?setTimeout((()=>this._innerWrite(0,p))):this._innerWrite(g,p);return void l.catch((p=>(queueMicrotask((()=>{throw p})),Promise.resolve(!1)))).then(n)}const s=this._callbacks[this._bufferOffset];if(s&&s(),this._bufferOffset++,this._pendingData-=o.length,Date.now()-g>=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()}}c.WriteBuffer=d},5941:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.toRgbString=c.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})$/,v=/^[\da-f]+$/;function y(d,S){const w=d.toString(16),R=w.length<2?"0"+w:w;switch(S){case 4:return w[0];case 8:return R;case 12:return(R+R).slice(0,3);default:return R+R}}c.parseColor=function(d){if(!d)return;let S=d.toLowerCase();if(S.indexOf("rgb:")===0){S=S.slice(4);const w=u.exec(S);if(w){const R=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/R*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/R*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/R*255)]}}else if(S.indexOf("#")===0&&(S=S.slice(1),v.exec(S)&&[3,6,9,12].includes(S.length))){const w=S.length/3,R=[0,0,0];for(let g=0;g<3;++g){const o=parseInt(S.slice(w*g,w*g+w),16);R[g]=w===1?o<<4:w===2?o:w===3?o>>4:o>>8}return R}},c.toRgbString=function(d,S=16){const[w,R,g]=d;return`rgb:${y(w,S)}/${y(R,S)}/${y(g,S)}`}},5770:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},6351:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;const v=u(482),y=u(8742),d=u(5770),S=[];c.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=S,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=S}registerHandler(R,g){this._handlers[R]===void 0&&(this._handlers[R]=[]);const o=this._handlers[R];return o.push(g),{dispose:()=>{const l=o.indexOf(g);l!==-1&&o.splice(l,1)}}}clearHandler(R){this._handlers[R]&&delete this._handlers[R]}setHandlerFallback(R){this._handlerFb=R}reset(){if(this._active.length)for(let R=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;R>=0;--R)this._active[R].unhook(!1);this._stack.paused=!1,this._active=S,this._ident=0}hook(R,g){if(this.reset(),this._ident=R,this._active=this._handlers[R]||S,this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].hook(g);else this._handlerFb(this._ident,"HOOK",g)}put(R,g,o){if(this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].put(R,g,o);else this._handlerFb(this._ident,"PUT",(0,v.utf32ToString)(R,g,o))}unhook(R,g=!0){if(this._active.length){let o=!1,l=this._active.length-1,s=!1;if(this._stack.paused&&(l=this._stack.loopPosition-1,o=g,s=this._stack.fallThrough,this._stack.paused=!1),!s&&o===!1){for(;l>=0&&(o=this._active[l].unhook(R),o!==!0);l--)if(o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!1,o;l--}for(;l>=0;l--)if(o=this._active[l].unhook(!1),o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!0,o}else this._handlerFb(this._ident,"UNHOOK",R);this._active=S,this._ident=0}};const w=new y.Params;w.addParam(0),c.DcsHandler=class{constructor(R){this._handler=R,this._data="",this._params=w,this._hitLimit=!1}hook(R){this._params=R.length>1||R.params[0]?R.clone():w,this._data="",this._hitLimit=!1}put(R,g,o){this._hitLimit||(this._data+=(0,v.utf32ToString)(R,g,o),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(R){let g=!1;if(this._hitLimit)g=!1;else if(R&&(g=this._handler(this._data,this._params),g instanceof Promise))return g.then((o=>(this._params=w,this._data="",this._hitLimit=!1,o)));return this._params=w,this._data="",this._hitLimit=!1,g}}},2015:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;const v=u(844),y=u(8742),d=u(6242),S=u(6351);class w{constructor(l){this.table=new Uint8Array(l)}setDefault(l,s){this.table.fill(l<<4|s)}add(l,s,n,p){this.table[s<<8|l]=n<<4|p}addMany(l,s,n,p){for(let E=0;E<l.length;E++)this.table[s<<8|l[E]]=n<<4|p}}c.TransitionTable=w;const R=160;c.VT500_TRANSITION_TABLE=(function(){const o=new w(4095),l=Array.apply(null,Array(256)).map(((x,m)=>m)),s=(x,m)=>l.slice(x,m),n=s(32,127),p=s(0,24);p.push(25),p.push.apply(p,s(28,32));const E=s(0,14);let k;for(k in o.setDefault(1,0),o.addMany(n,0,2,0),E)o.addMany([24,26,153,154],k,3,0),o.addMany(s(128,144),k,3,0),o.addMany(s(144,152),k,3,0),o.add(156,k,0,0),o.add(27,k,11,1),o.add(157,k,4,8),o.addMany([152,158,159],k,0,7),o.add(155,k,11,3),o.add(144,k,11,9);return o.addMany(p,0,3,0),o.addMany(p,1,3,1),o.add(127,1,0,1),o.addMany(p,8,0,8),o.addMany(p,3,3,3),o.add(127,3,0,3),o.addMany(p,4,3,4),o.add(127,4,0,4),o.addMany(p,6,3,6),o.addMany(p,5,3,5),o.add(127,5,0,5),o.addMany(p,2,3,2),o.add(127,2,0,2),o.add(93,1,4,8),o.addMany(n,8,5,8),o.add(127,8,5,8),o.addMany([156,27,24,26,7],8,6,0),o.addMany(s(28,32),8,0,8),o.addMany([88,94,95],1,0,7),o.addMany(n,7,0,7),o.addMany(p,7,0,7),o.add(156,7,0,0),o.add(127,7,0,7),o.add(91,1,11,3),o.addMany(s(64,127),3,7,0),o.addMany(s(48,60),3,8,4),o.addMany([60,61,62,63],3,9,4),o.addMany(s(48,60),4,8,4),o.addMany(s(64,127),4,7,0),o.addMany([60,61,62,63],4,0,6),o.addMany(s(32,64),6,0,6),o.add(127,6,0,6),o.addMany(s(64,127),6,0,0),o.addMany(s(32,48),3,9,5),o.addMany(s(32,48),5,9,5),o.addMany(s(48,64),5,0,6),o.addMany(s(64,127),5,7,0),o.addMany(s(32,48),4,9,5),o.addMany(s(32,48),1,9,2),o.addMany(s(32,48),2,9,2),o.addMany(s(48,127),2,10,0),o.addMany(s(48,80),1,10,0),o.addMany(s(81,88),1,10,0),o.addMany([89,90,92],1,10,0),o.addMany(s(96,127),1,10,0),o.add(80,1,11,9),o.addMany(p,9,0,9),o.add(127,9,0,9),o.addMany(s(28,32),9,0,9),o.addMany(s(32,48),9,9,12),o.addMany(s(48,60),9,8,10),o.addMany([60,61,62,63],9,9,10),o.addMany(p,11,0,11),o.addMany(s(32,128),11,0,11),o.addMany(s(28,32),11,0,11),o.addMany(p,10,0,10),o.add(127,10,0,10),o.addMany(s(28,32),10,0,10),o.addMany(s(48,60),10,8,10),o.addMany([60,61,62,63],10,0,11),o.addMany(s(32,48),10,9,12),o.addMany(p,12,0,12),o.add(127,12,0,12),o.addMany(s(28,32),12,0,12),o.addMany(s(32,48),12,9,12),o.addMany(s(48,64),12,0,11),o.addMany(s(64,127),12,12,13),o.addMany(s(64,127),10,12,13),o.addMany(s(64,127),9,12,13),o.addMany(p,13,13,13),o.addMany(n,13,13,13),o.add(127,13,0,13),o.addMany([27,156,24,26],13,14,0),o.add(R,0,2,0),o.add(R,8,5,8),o.add(R,6,0,6),o.add(R,11,0,11),o.add(R,13,13,13),o})();class g extends v.Disposable{constructor(l=c.VT500_TRANSITION_TABLE){super(),this._transitions=l,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new y.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(s,n,p)=>{},this._executeHandlerFb=s=>{},this._csiHandlerFb=(s,n)=>{},this._escHandlerFb=s=>{},this._errorHandlerFb=s=>s,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,v.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new d.OscParser),this._dcsParser=this.register(new S.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(l,s=[64,126]){let n=0;if(l.prefix){if(l.prefix.length>1)throw new Error("only one byte as prefix supported");if(n=l.prefix.charCodeAt(0),n&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(l.intermediates){if(l.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let E=0;E<l.intermediates.length;++E){const k=l.intermediates.charCodeAt(E);if(32>k||k>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=k}}if(l.final.length!==1)throw new Error("final must be a single byte");const p=l.final.charCodeAt(0);if(s[0]>p||p>s[1])throw new Error(`final must be in range ${s[0]} .. ${s[1]}`);return n<<=8,n|=p,n}identToString(l){const s=[];for(;l;)s.push(String.fromCharCode(255&l)),l>>=8;return s.reverse().join("")}setPrintHandler(l){this._printHandler=l}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(l,s){const n=this._identifier(l,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);const p=this._escHandlers[n];return p.push(s),{dispose:()=>{const E=p.indexOf(s);E!==-1&&p.splice(E,1)}}}clearEscHandler(l){this._escHandlers[this._identifier(l,[48,126])]&&delete this._escHandlers[this._identifier(l,[48,126])]}setEscHandlerFallback(l){this._escHandlerFb=l}setExecuteHandler(l,s){this._executeHandlers[l.charCodeAt(0)]=s}clearExecuteHandler(l){this._executeHandlers[l.charCodeAt(0)]&&delete this._executeHandlers[l.charCodeAt(0)]}setExecuteHandlerFallback(l){this._executeHandlerFb=l}registerCsiHandler(l,s){const n=this._identifier(l);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);const p=this._csiHandlers[n];return p.push(s),{dispose:()=>{const E=p.indexOf(s);E!==-1&&p.splice(E,1)}}}clearCsiHandler(l){this._csiHandlers[this._identifier(l)]&&delete this._csiHandlers[this._identifier(l)]}setCsiHandlerFallback(l){this._csiHandlerFb=l}registerDcsHandler(l,s){return this._dcsParser.registerHandler(this._identifier(l),s)}clearDcsHandler(l){this._dcsParser.clearHandler(this._identifier(l))}setDcsHandlerFallback(l){this._dcsParser.setHandlerFallback(l)}registerOscHandler(l,s){return this._oscParser.registerHandler(l,s)}clearOscHandler(l){this._oscParser.clearHandler(l)}setOscHandlerFallback(l){this._oscParser.setHandlerFallback(l)}setErrorHandler(l){this._errorHandler=l}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(l,s,n,p,E){this._parseStack.state=l,this._parseStack.handlers=s,this._parseStack.handlerPos=n,this._parseStack.transition=p,this._parseStack.chunkPos=E}parse(l,s,n){let p,E=0,k=0,x=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,x=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const m=this._parseStack.handlers;let A=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&A>-1){for(;A>=0&&(p=m[A](this._params),p!==!0);A--)if(p instanceof Promise)return this._parseStack.handlerPos=A,p}this._parseStack.handlers=[];break;case 4:if(n===!1&&A>-1){for(;A>=0&&(p=m[A](),p!==!0);A--)if(p instanceof Promise)return this._parseStack.handlerPos=A,p}this._parseStack.handlers=[];break;case 6:if(E=l[this._parseStack.chunkPos],p=this._dcsParser.unhook(E!==24&&E!==26,n),p)return p;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=l[this._parseStack.chunkPos],p=this._oscParser.end(E!==24&&E!==26,n),p)return p;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,x=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let m=x;m<s;++m){switch(E=l[m],k=this._transitions.table[this.currentState<<8|(E<160?E:R)],k>>4){case 2:for(let M=m+1;;++M){if(M>=s||(E=l[M])<32||E>126&&E<R){this._printHandler(l,m,M),m=M-1;break}if(++M>=s||(E=l[M])<32||E>126&&E<R){this._printHandler(l,m,M),m=M-1;break}if(++M>=s||(E=l[M])<32||E>126&&E<R){this._printHandler(l,m,M),m=M-1;break}if(++M>=s||(E=l[M])<32||E>126&&E<R){this._printHandler(l,m,M),m=M-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:m,code:E,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const A=this._csiHandlers[this._collect<<8|E];let H=A?A.length-1:-1;for(;H>=0&&(p=A[H](this._params),p!==!0);H--)if(p instanceof Promise)return this._preserveStack(3,A,H,k,m),p;H<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(++m<s&&(E=l[m])>47&&E<60);m--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const F=this._escHandlers[this._collect<<8|E];let W=F?F.length-1:-1;for(;W>=0&&(p=F[W](),p!==!0);W--)if(p instanceof Promise)return this._preserveStack(4,F,W,k,m),p;W<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 M=m+1;;++M)if(M>=s||(E=l[M])===24||E===26||E===27||E>127&&E<R){this._dcsParser.put(l,m,M),m=M-1;break}break;case 14:if(p=this._dcsParser.unhook(E!==24&&E!==26),p)return this._preserveStack(6,[],0,k,m),p;E===27&&(k|=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 M=m+1;;M++)if(M>=s||(E=l[M])<32||E>127&&E<R){this._oscParser.put(l,m,M),m=M-1;break}break;case 6:if(p=this._oscParser.end(E!==24&&E!==26),p)return this._preserveStack(5,[],0,k,m),p;E===27&&(k|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&k}}}c.EscapeSequenceParser=g},6242:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;const v=u(5770),y=u(482),d=[];c.OscParser=class{constructor(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(S,w){this._handlers[S]===void 0&&(this._handlers[S]=[]);const R=this._handlers[S];return R.push(w),{dispose:()=>{const g=R.indexOf(w);g!==-1&&R.splice(g,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}reset(){if(this._state===2)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].start();else this._handlerFb(this._id,"START")}_put(S,w,R){if(this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].put(S,w,R);else this._handlerFb(this._id,"PUT",(0,y.utf32ToString)(S,w,R))}start(){this.reset(),this._state=1}put(S,w,R){if(this._state!==3){if(this._state===1)for(;w<R;){const g=S[w++];if(g===59){this._state=2,this._start();break}if(g<48||57<g)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+g-48}this._state===2&&R-w>0&&this._put(S,w,R)}}end(S,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let R=!1,g=this._active.length-1,o=!1;if(this._stack.paused&&(g=this._stack.loopPosition-1,R=w,o=this._stack.fallThrough,this._stack.paused=!1),!o&&R===!1){for(;g>=0&&(R=this._active[g].end(S),R!==!0);g--)if(R instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!1,R;g--}for(;g>=0;g--)if(R=this._active[g].end(!1),R instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!0,R}else this._handlerFb(this._id,"END",S);this._active=d,this._id=-1,this._state=0}}},c.OscHandler=class{constructor(S){this._handler=S,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(S,w,R){this._hitLimit||(this._data+=(0,y.utf32ToString)(S,w,R),this._data.length>v.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(S){let w=!1;if(this._hitLimit)w=!1;else if(S&&(w=this._handler(this._data),w instanceof Promise))return w.then((R=>(this._data="",this._hitLimit=!1,R)));return this._data="",this._hitLimit=!1,w}}},8742:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;const u=2147483647;class v{static fromArray(d){const S=new v;if(!d.length)return S;for(let w=Array.isArray(d[0])?1:0;w<d.length;++w){const R=d[w];if(Array.isArray(R))for(let g=0;g<R.length;++g)S.addSubParam(R[g]);else S.addParam(R)}return S}constructor(d=32,S=32){if(this.maxLength=d,this.maxSubParamsLength=S,S>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(S),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const d=new v(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let S=0;S<this.length;++S){d.push(this.params[S]);const w=this._subParamsIdx[S]>>8,R=255&this._subParamsIdx[S];R-w>0&&d.push(Array.prototype.slice.call(this._subParams,w,R))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>u?u:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>u?u:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const S=this._subParamsIdx[d]>>8,w=255&this._subParamsIdx[d];return w-S>0?this._subParams.subarray(S,w):null}getSubParamsAll(){const d={};for(let S=0;S<this.length;++S){const w=this._subParamsIdx[S]>>8,R=255&this._subParamsIdx[S];R-w>0&&(d[S]=this._subParams.slice(w,R))}return d}addDigit(d){let S;if(this._rejectDigits||!(S=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,R=w[S-1];w[S-1]=~R?Math.min(10*R+d,u):d}}c.Params=v},5741:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0,c.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,v){const y={instance:v,dispose:v.dispose,isDisposed:!1};this._addons.push(y),v.dispose=()=>this._wrappedAddonDispose(y),v.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let v=-1;for(let y=0;y<this._addons.length;y++)if(this._addons[y]===u){v=y;break}if(v===-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(v,1)}}},8771:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferApiView=void 0;const v=u(3785),y=u(511);c.BufferApiView=class{constructor(d,S){this._buffer=d,this.type=S}init(d){return this._buffer=d,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(d){const S=this._buffer.lines.get(d);if(S)return new v.BufferLineApiView(S)}getNullCell(){return new y.CellData}}},3785:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLineApiView=void 0;const v=u(511);c.BufferLineApiView=class{constructor(y){this._line=y}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(y,d){if(!(y<0||y>=this._line.length))return d?(this._line.loadCell(y,d),d):this._line.loadCell(y,new v.CellData)}translateToString(y,d,S){return this._line.translateToString(y,d,S)}}},8285:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferNamespaceApi=void 0;const v=u(8771),y=u(8460),d=u(844);class S extends d.Disposable{constructor(R){super(),this._core=R,this._onBufferChange=this.register(new y.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new v.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new v.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)}}c.BufferNamespaceApi=S},7975:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ParserApi=void 0,c.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,v){return this._core.registerCsiHandler(u,(y=>v(y.toArray())))}addCsiHandler(u,v){return this.registerCsiHandler(u,v)}registerDcsHandler(u,v){return this._core.registerDcsHandler(u,((y,d)=>v(y,d.toArray())))}addDcsHandler(u,v){return this.registerDcsHandler(u,v)}registerEscHandler(u,v){return this._core.registerEscHandler(u,v)}addEscHandler(u,v){return this.registerEscHandler(u,v)}registerOscHandler(u,v){return this._core.registerOscHandler(u,v)}addOscHandler(u,v){return this.registerOscHandler(u,v)}}},7090:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeApi=void 0,c.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(j,c,u){var v=this&&this.__decorate||function(o,l,s,n){var p,E=arguments.length,k=E<3?l:n===null?n=Object.getOwnPropertyDescriptor(l,s):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(o,l,s,n);else for(var x=o.length-1;x>=0;x--)(p=o[x])&&(k=(E<3?p(k):E>3?p(l,s,k):p(l,s))||k);return E>3&&k&&Object.defineProperty(l,s,k),k},y=this&&this.__param||function(o,l){return function(s,n){l(s,n,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;const d=u(8460),S=u(844),w=u(5295),R=u(2585);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;let g=c.BufferService=class extends S.Disposable{get buffer(){return this.buffers.active}constructor(o){super(),this.isUserScrolling=!1,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(o.rawOptions.cols||0,c.MINIMUM_COLS),this.rows=Math.max(o.rawOptions.rows||0,c.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(o,this))}resize(o,l){this.cols=o,this.rows=l,this.buffers.resize(o,l),this._onResize.fire({cols:o,rows:l})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(o,l=!1){const s=this.buffer;let n;n=this._cachedBlankLine,n&&n.length===this.cols&&n.getFg(0)===o.fg&&n.getBg(0)===o.bg||(n=s.getBlankLine(o,l),this._cachedBlankLine=n),n.isWrapped=l;const p=s.ybase+s.scrollTop,E=s.ybase+s.scrollBottom;if(s.scrollTop===0){const k=s.lines.isFull;E===s.lines.length-1?k?s.lines.recycle().copyFrom(n):s.lines.push(n.clone()):s.lines.splice(E+1,0,n.clone()),k?this.isUserScrolling&&(s.ydisp=Math.max(s.ydisp-1,0)):(s.ybase++,this.isUserScrolling||s.ydisp++)}else{const k=E-p+1;s.lines.shiftElements(p+1,k-1,-1),s.lines.set(E,n.clone())}this.isUserScrolling||(s.ydisp=s.ybase),this._onScroll.fire(s.ydisp)}scrollLines(o,l,s){const n=this.buffer;if(o<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else o+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);const p=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+o,n.ybase),0),p!==n.ydisp&&(l||this._onScroll.fire(n.ydisp))}};c.BufferService=g=v([y(0,R.IOptionsService)],g)},7994:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0,c.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,v){this._charsets[u]=v,this.glevel===u&&(this.charset=v)}}},1753:function(j,c,u){var v=this&&this.__decorate||function(n,p,E,k){var x,m=arguments.length,A=m<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,E):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(n,p,E,k);else for(var H=n.length-1;H>=0;H--)(x=n[H])&&(A=(m<3?x(A):m>3?x(p,E,A):x(p,E))||A);return m>3&&A&&Object.defineProperty(p,E,A),A},y=this&&this.__param||function(n,p){return function(E,k){p(E,k,n)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;const d=u(2585),S=u(8460),w=u(844),R={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:n=>n.button!==4&&n.action===1&&(n.ctrl=!1,n.alt=!1,n.shift=!1,!0)},VT200:{events:19,restrict:n=>n.action!==32},DRAG:{events:23,restrict:n=>n.action!==32||n.button!==3},ANY:{events:31,restrict:n=>!0}};function g(n,p){let E=(n.ctrl?16:0)|(n.shift?4:0)|(n.alt?8:0);return n.button===4?(E|=64,E|=n.action):(E|=3&n.button,4&n.button&&(E|=64),8&n.button&&(E|=128),n.action===32?E|=32:n.action!==0||p||(E|=3)),E}const o=String.fromCharCode,l={DEFAULT:n=>{const p=[g(n,!1)+32,n.col+32,n.row+32];return p[0]>255||p[1]>255||p[2]>255?"":`\x1B[M${o(p[0])}${o(p[1])}${o(p[2])}`},SGR:n=>{const p=n.action===0&&n.button!==4?"m":"M";return`\x1B[<${g(n,!0)};${n.col};${n.row}${p}`},SGR_PIXELS:n=>{const p=n.action===0&&n.button!==4?"m":"M";return`\x1B[<${g(n,!0)};${n.x};${n.y}${p}`}};let s=c.CoreMouseService=class extends w.Disposable{constructor(n,p){super(),this._bufferService=n,this._coreService=p,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new S.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(R))this.addProtocol(E,R[E]);for(const E of Object.keys(l))this.addEncoding(E,l[E]);this.reset()}addProtocol(n,p){this._protocols[n]=p}addEncoding(n,p){this._encodings[n]=p}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(n){if(!this._protocols[n])throw new Error(`unknown protocol "${n}"`);this._activeProtocol=n,this._onProtocolChange.fire(this._protocols[n].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(n){if(!this._encodings[n])throw new Error(`unknown encoding "${n}"`);this._activeEncoding=n}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(n){if(n.col<0||n.col>=this._bufferService.cols||n.row<0||n.row>=this._bufferService.rows||n.button===4&&n.action===32||n.button===3&&n.action!==32||n.button!==4&&(n.action===2||n.action===3)||(n.col++,n.row++,n.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,n,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(n))return!1;const p=this._encodings[this._activeEncoding](n);return p&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(p):this._coreService.triggerDataEvent(p,!0)),this._lastEvent=n,!0}explainEvents(n){return{down:!!(1&n),up:!!(2&n),drag:!!(4&n),move:!!(8&n),wheel:!!(16&n)}}_equalEvents(n,p,E){if(E){if(n.x!==p.x||n.y!==p.y)return!1}else if(n.col!==p.col||n.row!==p.row)return!1;return n.button===p.button&&n.action===p.action&&n.ctrl===p.ctrl&&n.alt===p.alt&&n.shift===p.shift}};c.CoreMouseService=s=v([y(0,d.IBufferService),y(1,d.ICoreService)],s)},6975:function(j,c,u){var v=this&&this.__decorate||function(s,n,p,E){var k,x=arguments.length,m=x<3?n:E===null?E=Object.getOwnPropertyDescriptor(n,p):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(s,n,p,E);else for(var A=s.length-1;A>=0;A--)(k=s[A])&&(m=(x<3?k(m):x>3?k(n,p,m):k(n,p))||m);return x>3&&m&&Object.defineProperty(n,p,m),m},y=this&&this.__param||function(s,n){return function(p,E){n(p,E,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;const d=u(1439),S=u(8460),w=u(844),R=u(2585),g=Object.freeze({insertMode:!1}),o=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let l=c.CoreService=class extends w.Disposable{constructor(s,n,p){super(),this._bufferService=s,this._logService=n,this._optionsService=p,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new S.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new S.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new S.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new S.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,d.clone)(g),this.decPrivateModes=(0,d.clone)(o)}reset(){this.modes=(0,d.clone)(g),this.decPrivateModes=(0,d.clone)(o)}triggerDataEvent(s,n=!1){if(this._optionsService.rawOptions.disableStdin)return;const p=this._bufferService.buffer;n&&this._optionsService.rawOptions.scrollOnUserInput&&p.ybase!==p.ydisp&&this._onRequestScrollToBottom.fire(),n&&this._onUserInput.fire(),this._logService.debug(`sending data "${s}"`,(()=>s.split("").map((E=>E.charCodeAt(0))))),this._onData.fire(s)}triggerBinaryEvent(s){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${s}"`,(()=>s.split("").map((n=>n.charCodeAt(0))))),this._onBinary.fire(s))}};c.CoreService=l=v([y(0,R.IBufferService),y(1,R.ILogService),y(2,R.IOptionsService)],l)},9074:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DecorationService=void 0;const v=u(8055),y=u(8460),d=u(844),S=u(6106);let w=0,R=0;class g extends d.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new S.SortedList((s=>s==null?void 0:s.marker.line)),this._onDecorationRegistered=this.register(new y.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new y.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)((()=>this.reset())))}registerDecoration(s){if(s.marker.isDisposed)return;const n=new o(s);if(n){const p=n.marker.onDispose((()=>n.dispose()));n.onDispose((()=>{n&&(this._decorations.delete(n)&&this._onDecorationRemoved.fire(n),p.dispose())})),this._decorations.insert(n),this._onDecorationRegistered.fire(n)}return n}reset(){for(const s of this._decorations.values())s.dispose();this._decorations.clear()}*getDecorationsAtCell(s,n,p){let E=0,k=0;for(const x of this._decorations.getKeyIterator(n))E=x.options.x??0,k=E+(x.options.width??1),s>=E&&s<k&&(!p||(x.options.layer??"bottom")===p)&&(yield x)}forEachDecorationAtCell(s,n,p,E){this._decorations.forEachByKey(n,(k=>{w=k.options.x??0,R=w+(k.options.width??1),s>=w&&s<R&&(!p||(k.options.layer??"bottom")===p)&&E(k)}))}}c.DecorationService=g;class o extends d.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=v.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=v.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(s){super(),this.options=s,this.onRenderEmitter=this.register(new y.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new y.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=s.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;const v=u(2585),y=u(8343);class d{constructor(...w){this._entries=new Map;for(const[R,g]of w)this.set(R,g)}set(w,R){const g=this._entries.get(w);return this._entries.set(w,R),g}forEach(w){for(const[R,g]of this._entries.entries())w(R,g)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}c.ServiceCollection=d,c.InstantiationService=class{constructor(){this._services=new d,this._services.set(v.IInstantiationService,this)}setService(S,w){this._services.set(S,w)}getService(S){return this._services.get(S)}createInstance(S,...w){const R=(0,y.getServiceDependencies)(S).sort(((l,s)=>l.index-s.index)),g=[];for(const l of R){const s=this._services.get(l.id);if(!s)throw new Error(`[createInstance] ${S.name} depends on UNKNOWN service ${l.id}.`);g.push(s)}const o=R.length>0?R[0].index:w.length;if(w.length!==o)throw new Error(`[createInstance] First service dependency of ${S.name} at position ${o+1} conflicts with ${w.length} static arguments`);return new S(...w,...g)}}},7866:function(j,c,u){var v=this&&this.__decorate||function(o,l,s,n){var p,E=arguments.length,k=E<3?l:n===null?n=Object.getOwnPropertyDescriptor(l,s):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(o,l,s,n);else for(var x=o.length-1;x>=0;x--)(p=o[x])&&(k=(E<3?p(k):E>3?p(l,s,k):p(l,s))||k);return E>3&&k&&Object.defineProperty(l,s,k),k},y=this&&this.__param||function(o,l){return function(s,n){l(s,n,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.traceCall=c.setTraceLogger=c.LogService=void 0;const d=u(844),S=u(2585),w={trace:S.LogLevelEnum.TRACE,debug:S.LogLevelEnum.DEBUG,info:S.LogLevelEnum.INFO,warn:S.LogLevelEnum.WARN,error:S.LogLevelEnum.ERROR,off:S.LogLevelEnum.OFF};let R,g=c.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(o){super(),this._optionsService=o,this._logLevel=S.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),R=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(o){for(let l=0;l<o.length;l++)typeof o[l]=="function"&&(o[l]=o[l]())}_log(o,l,s){this._evalLazyOptionalParams(s),o.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+l,...s)}trace(o,...l){var s;this._logLevel<=S.LogLevelEnum.TRACE&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.trace.bind(this._optionsService.options.logger))??console.log,o,l)}debug(o,...l){var s;this._logLevel<=S.LogLevelEnum.DEBUG&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.debug.bind(this._optionsService.options.logger))??console.log,o,l)}info(o,...l){var s;this._logLevel<=S.LogLevelEnum.INFO&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.info.bind(this._optionsService.options.logger))??console.info,o,l)}warn(o,...l){var s;this._logLevel<=S.LogLevelEnum.WARN&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.warn.bind(this._optionsService.options.logger))??console.warn,o,l)}error(o,...l){var s;this._logLevel<=S.LogLevelEnum.ERROR&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.error.bind(this._optionsService.options.logger))??console.error,o,l)}};c.LogService=g=v([y(0,S.IOptionsService)],g),c.setTraceLogger=function(o){R=o},c.traceCall=function(o,l,s){if(typeof s.value!="function")throw new Error("not supported");const n=s.value;s.value=function(...p){if(R.logLevel!==S.LogLevelEnum.TRACE)return n.apply(this,p);R.trace(`GlyphRenderer#${n.name}(${p.map((k=>JSON.stringify(k))).join(", ")})`);const E=n.apply(this,p);return R.trace(`GlyphRenderer#${n.name} return`,E),E}}},7302:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=void 0;const v=u(8460),y=u(844),d=u(6114);c.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:d.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const S=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends y.Disposable{constructor(g){super(),this._onOptionChange=this.register(new v.EventEmitter),this.onOptionChange=this._onOptionChange.event;const o={...c.DEFAULT_OPTIONS};for(const l in g)if(l in o)try{const s=g[l];o[l]=this._sanitizeAndValidateOption(l,s)}catch(s){console.error(s)}this.rawOptions=o,this.options={...o},this._setupOptions(),this.register((0,y.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(g,o){return this.onOptionChange((l=>{l===g&&o(this.rawOptions[g])}))}onMultipleOptionChange(g,o){return this.onOptionChange((l=>{g.indexOf(l)!==-1&&o()}))}_setupOptions(){const g=l=>{if(!(l in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);return this.rawOptions[l]},o=(l,s)=>{if(!(l in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);s=this._sanitizeAndValidateOption(l,s),this.rawOptions[l]!==s&&(this.rawOptions[l]=s,this._onOptionChange.fire(l))};for(const l in this.rawOptions){const s={get:g.bind(this,l),set:o.bind(this,l)};Object.defineProperty(this.options,l,s)}}_sanitizeAndValidateOption(g,o){switch(g){case"cursorStyle":if(o||(o=c.DEFAULT_OPTIONS[g]),!(function(l){return l==="block"||l==="underline"||l==="bar"})(o))throw new Error(`"${o}" is not a valid value for ${g}`);break;case"wordSeparator":o||(o=c.DEFAULT_OPTIONS[g]);break;case"fontWeight":case"fontWeightBold":if(typeof o=="number"&&1<=o&&o<=1e3)break;o=S.includes(o)?o:c.DEFAULT_OPTIONS[g];break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(`${g} 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(`${g} cannot be less than 0, value: ${o}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(`${g} cannot be less than or equal to 0, value: ${o}`);break;case"rows":case"cols":if(!o&&o!==0)throw new Error(`${g} must be numeric, value: ${o}`);break;case"windowsPty":o=o??{}}return o}}c.OptionsService=w},2660:function(j,c,u){var v=this&&this.__decorate||function(w,R,g,o){var l,s=arguments.length,n=s<3?R:o===null?o=Object.getOwnPropertyDescriptor(R,g):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(w,R,g,o);else for(var p=w.length-1;p>=0;p--)(l=w[p])&&(n=(s<3?l(n):s>3?l(R,g,n):l(R,g))||n);return s>3&&n&&Object.defineProperty(R,g,n),n},y=this&&this.__param||function(w,R){return function(g,o){R(g,o,w)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkService=void 0;const d=u(2585);let S=c.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const R=this._bufferService.buffer;if(w.id===void 0){const p=R.addMarker(R.ybase+R.y),E={data:w,id:this._nextId++,lines:[p]};return p.onDispose((()=>this._removeMarkerFromLink(E,p))),this._dataByLinkId.set(E.id,E),E.id}const g=w,o=this._getEntryIdKey(g),l=this._entriesWithId.get(o);if(l)return this.addLineToLink(l.id,R.ybase+R.y),l.id;const s=R.addMarker(R.ybase+R.y),n={id:this._nextId++,key:this._getEntryIdKey(g),data:g,lines:[s]};return s.onDispose((()=>this._removeMarkerFromLink(n,s))),this._entriesWithId.set(n.key,n),this._dataByLinkId.set(n.id,n),n.id}addLineToLink(w,R){const g=this._dataByLinkId.get(w);if(g&&g.lines.every((o=>o.line!==R))){const o=this._bufferService.buffer.addMarker(R);g.lines.push(o),o.onDispose((()=>this._removeMarkerFromLink(g,o)))}}getLinkData(w){var R;return(R=this._dataByLinkId.get(w))==null?void 0:R.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,R){const g=w.lines.indexOf(R);g!==-1&&(w.lines.splice(g,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};c.OscLinkService=S=v([y(0,d.IBufferService)],S)},8343:(j,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0;const u="di$target",v="di$dependencies";c.serviceRegistry=new Map,c.getServiceDependencies=function(y){return y[v]||[]},c.createDecorator=function(y){if(c.serviceRegistry.has(y))return c.serviceRegistry.get(y);const d=function(S,w,R){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(g,o,l){o[u]===o?o[v].push({id:g,index:l}):(o[v]=[{id:g,index:l}],o[u]=o)})(d,S,R)};return d.toString=()=>y,c.serviceRegistry.set(y,d),d}},2585:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.IDecorationService=c.IUnicodeService=c.IOscLinkService=c.IOptionsService=c.ILogService=c.LogLevelEnum=c.IInstantiationService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;const v=u(8343);var y;c.IBufferService=(0,v.createDecorator)("BufferService"),c.ICoreMouseService=(0,v.createDecorator)("CoreMouseService"),c.ICoreService=(0,v.createDecorator)("CoreService"),c.ICharsetService=(0,v.createDecorator)("CharsetService"),c.IInstantiationService=(0,v.createDecorator)("InstantiationService"),(function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"})(y||(c.LogLevelEnum=y={})),c.ILogService=(0,v.createDecorator)("LogService"),c.IOptionsService=(0,v.createDecorator)("OptionsService"),c.IOscLinkService=(0,v.createDecorator)("OscLinkService"),c.IUnicodeService=(0,v.createDecorator)("UnicodeService"),c.IDecorationService=(0,v.createDecorator)("DecorationService")},1480:(j,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;const v=u(8460),y=u(225);class d{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,R,g=!1){return(16777215&w)<<3|(3&R)<<1|(g?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new v.EventEmitter,this.onChange=this._onChange.event;const w=new y.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let R=0,g=0;const o=w.length;for(let l=0;l<o;++l){let s=w.charCodeAt(l);if(55296<=s&&s<=56319){if(++l>=o)return R+this.wcwidth(s);const E=w.charCodeAt(l);56320<=E&&E<=57343?s=1024*(s-55296)+E-56320+65536:R+=this.wcwidth(E)}const n=this.charProperties(s,g);let p=d.extractWidth(n);d.extractShouldJoin(n)&&(p-=d.extractWidth(g)),R+=p,g=n}return R}charProperties(w,R){return this._activeProvider.charProperties(w,R)}}c.UnicodeService=d}},b={};function N(j){var c=b[j];if(c!==void 0)return c.exports;var u=b[j]={exports:{}};return h[j].call(u.exports,u,u.exports,N),u.exports}var K={};return(()=>{var j=K;Object.defineProperty(j,"__esModule",{value:!0}),j.Terminal=void 0;const c=N(9042),u=N(3236),v=N(844),y=N(5741),d=N(8285),S=N(7975),w=N(7090),R=["cols","rows"];class g extends v.Disposable{constructor(l){super(),this._core=this.register(new u.Terminal(l)),this._addonManager=this.register(new y.AddonManager),this._publicOptions={...this._core.options};const s=p=>this._core.options[p],n=(p,E)=>{this._checkReadonlyOptions(p),this._core.options[p]=E};for(const p in this._core.options){const E={get:s.bind(this,p),set:n.bind(this,p)};Object.defineProperty(this._publicOptions,p,E)}}_checkReadonlyOptions(l){if(R.includes(l))throw new Error(`Option "${l}" 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 S.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.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 d.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const l=this._core.coreService.decPrivateModes;let s="none";switch(this._core.coreMouseService.activeProtocol){case"X10":s="x10";break;case"VT200":s="vt200";break;case"DRAG":s="drag";break;case"ANY":s="any"}return{applicationCursorKeysMode:l.applicationCursorKeys,applicationKeypadMode:l.applicationKeypad,bracketedPasteMode:l.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:s,originMode:l.origin,reverseWraparoundMode:l.reverseWraparound,sendFocusMode:l.sendFocus,wraparoundMode:l.wraparound}}get options(){return this._publicOptions}set options(l){for(const s in l)this._publicOptions[s]=l[s]}blur(){this._core.blur()}focus(){this._core.focus()}input(l,s=!0){this._core.input(l,s)}resize(l,s){this._verifyIntegers(l,s),this._core.resize(l,s)}open(l){this._core.open(l)}attachCustomKeyEventHandler(l){this._core.attachCustomKeyEventHandler(l)}attachCustomWheelEventHandler(l){this._core.attachCustomWheelEventHandler(l)}registerLinkProvider(l){return this._core.registerLinkProvider(l)}registerCharacterJoiner(l){return this._checkProposedApi(),this._core.registerCharacterJoiner(l)}deregisterCharacterJoiner(l){this._checkProposedApi(),this._core.deregisterCharacterJoiner(l)}registerMarker(l=0){return this._verifyIntegers(l),this._core.registerMarker(l)}registerDecoration(l){return this._checkProposedApi(),this._verifyPositiveIntegers(l.x??0,l.width??0,l.height??0),this._core.registerDecoration(l)}hasSelection(){return this._core.hasSelection()}select(l,s,n){this._verifyIntegers(l,s,n),this._core.select(l,s,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(l,s){this._verifyIntegers(l,s),this._core.selectLines(l,s)}dispose(){super.dispose()}scrollLines(l){this._verifyIntegers(l),this._core.scrollLines(l)}scrollPages(l){this._verifyIntegers(l),this._core.scrollPages(l)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(l){this._verifyIntegers(l),this._core.scrollToLine(l)}clear(){this._core.clear()}write(l,s){this._core.write(l,s)}writeln(l,s){this._core.write(l),this._core.write(`\r
|
|
48
|
-
`,s)}paste(l){this._core.paste(l)}refresh(l,s){this._verifyIntegers(l,s),this._core.refresh(l,s)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(l){this._addonManager.loadAddon(this,l)}static get strings(){return c}_verifyIntegers(...l){for(const s of l)if(s===1/0||isNaN(s)||s%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...l){for(const s of l)if(s&&(s===1/0||isNaN(s)||s%1!=0||s<0))throw new Error("This API only accepts positive integers")}}j.Terminal=g})(),K})()))})(fl)),fl.exports}var g_=v_(),_l={exports:{}},Bh;function m_(){return Bh||(Bh=1,(function(C,f){(function(h,b){C.exports=b()})(self,(()=>(()=>{var h={};return(()=>{var b=h;Object.defineProperty(b,"__esModule",{value:!0}),b.FitAddon=void 0,b.FitAddon=class{activate(N){this._terminal=N}dispose(){}fit(){const N=this.proposeDimensions();if(!N||!this._terminal||isNaN(N.cols)||isNaN(N.rows))return;const K=this._terminal._core;this._terminal.rows===N.rows&&this._terminal.cols===N.cols||(K._renderService.clear(),this._terminal.resize(N.cols,N.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const N=this._terminal._core,K=N._renderService.dimensions;if(K.css.cell.width===0||K.css.cell.height===0)return;const j=this._terminal.options.scrollback===0?0:N.viewport.scrollBarWidth,c=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(c.getPropertyValue("height")),v=Math.max(0,parseInt(c.getPropertyValue("width"))),y=window.getComputedStyle(this._terminal.element),d=u-(parseInt(y.getPropertyValue("padding-top"))+parseInt(y.getPropertyValue("padding-bottom"))),S=v-(parseInt(y.getPropertyValue("padding-right"))+parseInt(y.getPropertyValue("padding-left")))-j;return{cols:Math.max(2,Math.floor(S/K.css.cell.width)),rows:Math.max(1,Math.floor(d/K.css.cell.height))}}}})(),h})()))})(_l)),_l.exports}var S_=m_();function y_({sessionId:C,worktreePath:f,agentType:h,isActive:b}){const N=et.useRef(null),K=et.useRef(null),j=et.useRef(null),c=et.useRef(!1),{emit:u,on:v,off:y,connected:d}=Ll(),S=st(w=>w.updateTerminalStatus);return et.useEffect(()=>{if(!N.current||c.current)return;const w=new g_.Terminal({cursorBlink:!0,fontSize:14,fontFamily:"'JetBrains Mono', Menlo, Monaco, 'Courier New', monospace",theme:{background:"#0d1117",foreground:"#c9d1d9",cursor:"#58a6ff",cursorAccent:"#0d1117",black:"#0d1117",red:"#f85149",green:"#3fb950",yellow:"#d29922",blue:"#58a6ff",magenta:"#a371f7",cyan:"#39c5cf",white:"#c9d1d9",brightBlack:"#6e7681",brightRed:"#ff7b72",brightGreen:"#56d364",brightYellow:"#e3b341",brightBlue:"#79c0ff",brightMagenta:"#bc8cff",brightCyan:"#56d4dd",brightWhite:"#f0f6fc"},allowProposedApi:!0}),R=new S_.FitAddon;return w.loadAddon(R),w.open(N.current),K.current=w,j.current=R,c.current=!0,setTimeout(()=>{R.fit()},0),()=>{w.dispose(),c.current=!1}},[]),et.useEffect(()=>{if(!K.current||!d)return;const w=K.current,R=j.current,g=p=>{const E=p;E.sessionId===C&&w.write(E.data)},o=p=>{const{sessionId:E}=p;E===C&&S(C,"running")},l=p=>{const{sessionId:E}=p;E===C&&(S(C,"stopped"),w.write(`\r
|
|
49
|
-
[Process exited]\r
|
|
50
|
-
`))},s=p=>{const{sessionId:E,error:k}=p;E===C&&(S(C,"error"),w.write(`\r
|
|
51
|
-
[Error: ${k}]\r
|
|
52
|
-
`))};v("terminal:output",g),v("terminal:created",o),v("terminal:exit",l),v("terminal:error",s);const n=w.onData(p=>{u("terminal:input",{sessionId:C,data:p})});return u("terminal:create",{sessionId:C,worktreePath:f,agentType:h}),R&&u("terminal:resize",{sessionId:C,cols:w.cols,rows:w.rows}),()=>{y("terminal:output",g),y("terminal:created",o),y("terminal:exit",l),y("terminal:error",s),n.dispose()}},[C,f,h,d,u,v,y,S]),et.useEffect(()=>{if(!N.current||!j.current)return;const w=j.current,R=K.current,g=()=>{b&&R&&w&&(w.fit(),u("terminal:resize",{sessionId:C,cols:R.cols,rows:R.rows}))},o=new ResizeObserver(()=>{g()});return o.observe(N.current),b&&setTimeout(g,0),()=>{o.disconnect()}},[C,b,u]),et.useEffect(()=>{b&&K.current&&K.current.focus()},[b]),oe.jsx("div",{ref:N,className:"terminal",style:{height:"100%",width:"100%"}})}function w_(){const{terminals:C,activeTerminalIndex:f,setActiveTerminal:h,removeTerminal:b,clearAllTerminals:N,reset:K}=st(),{emit:j}=Ll(),c=async(y,d)=>{d.stopPropagation(),j("terminal:kill",{sessionId:y});const S=C.find(w=>w.sessionId===y);if(S)try{await fetch(`/api/worktrees/${S.worktreeName}`,{method:"DELETE"})}catch(w){console.error("Failed to delete worktree:",w)}b(y)},u=async()=>{for(const y of C)j("terminal:kill",{sessionId:y.sessionId});try{await fetch("/api/worktrees",{method:"DELETE"})}catch(y){console.error("Failed to delete worktrees:",y)}N(),K()},v=()=>{C.length>0?window.confirm("This will terminate all running agents and delete all worktrees. Are you sure you want to go back to setup?")&&u():K()};return oe.jsxs("div",{className:"terminal-panel",children:[oe.jsxs("div",{className:"terminal-tabs",children:[C.map((y,d)=>oe.jsxs("button",{className:`terminal-tab ${d===f?"active":""}`,onClick:()=>h(d),children:[oe.jsx("span",{className:`status ${y.status}`}),oe.jsx("span",{children:y.worktreeName}),oe.jsx("button",{className:"close-btn",onClick:S=>c(y.sessionId,S),title:"Close terminal",children:"×"})]},y.sessionId)),oe.jsxs("div",{className:"terminal-actions",children:[oe.jsx("button",{onClick:v,children:"Back to Setup"}),oe.jsx("button",{className:"danger",onClick:u,children:"Close All"})]})]}),oe.jsx("div",{className:"terminal-container",children:C.map((y,d)=>oe.jsx("div",{className:`terminal-wrapper ${d!==f?"hidden":""}`,children:oe.jsx(y_,{sessionId:y.sessionId,worktreePath:y.worktreePath,agentType:y.agentType,isActive:d===f})},y.sessionId))})]})}function C_(){const{step:C,isLoading:f,loadingMessage:h,error:b}=st(),{connected:N}=Ll();et.useEffect(()=>{st.getState().fetchProjectInfo(),st.getState().fetchBranches()},[]);const K=()=>{switch(C){case"branch":return oe.jsx(Th,{});case"agent":return oe.jsx(f_,{});case"worktree":return oe.jsx(p_,{});case"running":return oe.jsx(w_,{});default:return oe.jsx(Th,{})}};return oe.jsxs("div",{className:"app",children:[oe.jsx(o_,{}),oe.jsx(h_,{children:K()}),f&&oe.jsxs("div",{className:"loading-overlay",children:[oe.jsx("div",{className:"loading-spinner"}),oe.jsx("p",{children:h||"Loading..."})]}),b&&oe.jsx("div",{className:"error-banner",children:b}),oe.jsxs("div",{className:"connection-status",children:[oe.jsx("span",{className:`dot ${N?"connected":"disconnected"}`}),N?"Connected":"Disconnected"]})]})}ef.createRoot(document.getElementById("root")).render(oe.jsx(Xi.StrictMode,{children:oe.jsx(C_,{})}));
|
|
53
|
-
//# sourceMappingURL=index-WEdVUKxb.js.map
|